Methods/steps
Download the nginx package (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
Establish nginx yum warehouse
# 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 is under the /etc/nginx path. You can use this configuration Run nginx correctly; if you need to customize it, just modify the nginx.conf and other files under it.
Test
Enter the IP of the machine where the nginx environment is deployed in the browser address bar. If everything is normal, you should see the following content.
The above introduces the installation of nginx on Centos7, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.