How To Install Nginx on CentOS 7
Step 1 — Adding the EPEL Software Repository
To add the CentOS 7 EPEL repository, first connect to your CentOS 7 machine via SSH, then use the yum
command to install the extended package repository:
sudo yum install epel-release
You’ll be prompted to verify that you want to install the software. Type y
then ENTER
to continue.
Next, you’ll install the actual nginx
software package.
Step 2 — Installing Nginx
Now that the EPEL repository is installed on your server, install Nginx using the following yum
command:
sudo yum install nginx
Again, answer yes to the verification prompt, then Nginx will finish installing.
Step 3 — Starting Nginx
Nginx will not start automatically after it is installed. To get Nginx running, use the systemctl
command:
sudo systemctl start nginx
You can check the status of the service with systemctl status:
sudo systemctl status nginx
The service should be active
.
Comments are closed, but trackbacks and pingbacks are open.