RHEL / Centos 6 - Install Nginx Using Yum Command

https://w‮ww‬.lautturi.com
RHEL / Centos 6 - Install Nginx Using Yum Command

To install Nginx on RHEL 6 or CentOS 6 using the yum command, you can follow these steps:

  1. Add the Nginx repository to your system:
sudo rpm -Uvh http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm

This will add the Nginx repository to your system and allow you to install Nginx packages using yum.

  1. Install Nginx:
sudo yum install nginx

This will install the latest version of Nginx available in the repository.

  1. Start the Nginx service and enable it to start automatically on boot:
sudo service nginx start
sudo chkconfig nginx on
  1. Test the installation:

Open a web browser and navigate to http://localhost. You should see the default Nginx welcome page, indicating that Nginx is working correctly.

Created Time:2017-10-30 14:27:13  Author:lautturi