It is very convenient to install nginx using YUM. All it takes is simple configuration!
The first step is to configure the nginx source
Create a source configuration file nginx.repo in the /etc/yum.repos.d/ directory: cd /etc/yum.repos.d/ <br>
vim nginx.repo
Fill in the following content:
[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/centos/releaseve r / basearch/
gpgcheck=0
enabled=1
Save, a /etc/yum.repos.d/nginx.repo file will be generated.
Second step, install Nginx
Execute the following command to automatically install Nginx: yum install nginx -y
yum install nginx -y
After the installation is complete, you can start Nginx directly as follows: /etc/init.d/nginx start
/etc/init.d/nginx start
Nginx command and configuration file location: /etc/init.d/nginx start # 启动Nginx服务
/etc/init.d/nginx stop # 停止Nginx服务
/etc/nginx/nginx.conf # Nginx配置文件位置
/etc/init.d/nginx stop # Stop Nginx service
/etc/nginx /nginx.conf # Nginx configuration file location🎜🎜🎜').addClass('pre-numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i 🎜').text(i)); }; $numbering.fadeIn(1700); }); }); 🎜 🎜 The above introduces the installation of NGINX through YUM on CENTOS, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials. 🎜 🎜 🎜