-
Download the Nginx bundle (package) corresponding to the current system version
# wget http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
-
Build Nginx's Yum repository
# RPM-IVH nginx-release-centos-7-0.el7.ngx.noarch.rpm
-
Download and install Nginx
# yum Install Nginx
-
Start Nginx Service
Systemctl start Nginx
-
Configuration
The default configuration file under the/etc/nginx path, using this configuration has been able to properly run Nginx, if you need to customize, modify its nginx.conf and other files.
-
Test
Enter the IP of the machine that deploys the NGINX environment in the browser address bar, and if everything is OK, you should see the following words.
END
Precautions
- Unless otherwise specified or in the context of the configuration file, the statement beginning with ' # ' indicates the contents of the command entered in the terminal
[CentOS 7] Installing Nginx