nginx,

Install Nginx on CentOS 9 Stream

May 05, 2022 · 1 min read · Post a comment
Install Nginx on CentOS 9 Stream

Nginx is one of the most used web servers nowadays and can be easily installed on the new CentOS 9 Stream OS. Let’s see how to install Nginx on CentOS 9 Stream and enable the http and https traffic.

Prerequisites

  • CentOS 9 Stream
  • sudo access

Install Nginx on CentOS 9 Stream

Step 1. Make sure that the system packages are up to date.

sudo dnf update

Step 2. Install Nginx.

sudo dnf install nginx

Step 3. Start the service and enable it.

sudo systemctl start nginx
sudo systemctl enable nginx
sudo systemctl status nginx

Step 4. Verify the installation.

nginx -v

Step 5. If your firewall is enabled make sure to allow the 80 and 443 ports.

sudo firewall-cmd --permanent --zone=public --add-service=http 
sudo firewall-cmd --permanent --zone=public --add-service=https
sudo firewall-cmd --reload

Conclusion

Feel free to leave a comment below and if you find this tutorial useful, follow our official channel on Telegram.