Installing Nginx with Yum is easy. Simple configuration is all you need!
The first step is to configure the Nginx source
Create a source profile Nginx.repo under the/etc/yum.repos.d/directory:
cd /etc/yum.repos.d/
vim nginx.repo
Fill in the following content:
[Nginx]
Name=nginx Repo
baseurl=http://nginx.org/packages/centos/ Releas eveR/ basearch/
Gpgcheck=0
Enabled=1
Saved, a/etc/yum.repos.d/nginx.repo file is generated.
Step two, install Nginx
The following instructions are executed to automatically install Nginx:
yum install nginx -y
The installation is complete, the following directly can start Nginx:
/etc/init.d/nginx start
Now Nginx has been launched, direct access to the server will be able to see the Nginx Welcome page.
Nginx command and configuration file location:
/etc/init.d/nginx start # 启动Nginx服务
/etc/init.d/nginx stop # 停止Nginx服务
/etc/nginx/nginx.conf # Nginx配置文件位置
'). addclass (' pre-numbering '). Hide (); $ (this). addclass (' has-numbering '). Parent (). append ($numbering); for (i = 1; i <= lines; i++) {$numbering. Append ($ ('
'). Text (i)); }; $numbering. FadeIn (1700); }); });
The above describes the CENTOS installation Nginx through Yum, including aspects of the content, I hope to be interested in PHP tutorial friends helpful.