Rumah > Artikel > pembangunan bahagian belakang > CentOS 安装 Nginx
转:http://my.oschina.net/VincentJiang/blog/224993
CENTOS 6.5 配置YUM安装NGINX
<spanmicrosoft yahei font-size:14px>/etc/yum.repos.d/</spanmicrosoft>
<spanmicrosoft yahei font-size:14px>nginx.repo</spanmicrosoft>
cd /etc/yum.repos.d/ vim nginx.repo
[nginx] name=nginx repo baseurl=http://nginx.org/packages/centos/$releasever/$basearch/ gpgcheck=0 enabled=1
<spanmicrosoft yahei font-size:14px>/etc/yum.repos.d/nginx.repo</spanmicrosoft>
yum install nginx -y
/etc/init.d/nginx start
iptables -I INPUT 5 -i eth0 -p tcp --dport 80 -m state --state NEW,ESTABLISHED -j ACCEPT service iptables save service iptables restart
/etc/init.d/nginx start # 启动Nginx服务 /etc/init.d/nginx stop # 停止Nginx服务 /etc/nginx/nginx.conf # Nginx配置文件位置
以上就介绍了CentOS 安装 Nginx,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。