1、安装环境
CentOS 6.5
Nginx1.10.1
a) 打开 /etc/yum.repos.d/nginx.repo文件, 添加
[nginx]
name=nginx repo baseurl=http://nginx.org/packages/mainline/OS/OSRELEASE/$basearch/ gpgcheck=0 enabled=1
引用地址:http://nginx.org/en/linux_packages.html#stable
b)执行 <span>yum </span><span>install</span><span> nginx -y ,完成自动安装</span>
<span><span>2、测试是否安装成功</span></span>
<span><span> a) 启动 nginx</span></span>
<span><span><span>/etc/init.d/nginx </span><span>start</span></span></span>
<span></span>
<span><span><span> b) 在浏览器的地址栏直接输入访问的url,会看到如下页面,</span></span></span>
<span></span>
<span><span><span><img src="http://image.codes51.com/Article/image/20160703/20160703214750_0065.png" alt=" CentOS系统安装Nginx"></span></span></span>
<span></span>
<span></span>
以上就介绍了 CentOS系统安装Nginx,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。