Rumah >pembangunan bahagian belakang >tutorial php >CentOS 66 yum 安装 nginx
操作系统
<code>[root<span>@10</span>-<span>10</span>-<span>106</span>-<span>30</span> ~]<span># cat /etc/redhat-release</span><span>CentOS</span> release <span>6.6</span> (<span>Final</span>)</code>
yum安装nginx
<code>yum <span>install</span> nginx -y</code>
安装完成
<code>[root<span>@10</span>-<span>10</span>-<span>106</span>-<span>30</span> ~]<span># nginx -v</span> nginx <span>version:</span> nginx/<span>1.0</span>.<span>15</span></code>
防火墙配置
<code>iptables <span>-I</span> INPUT <span>-p</span> tcp <span>--</span>dport <span>80</span><span>-j</span> ACCEPT</code>
运行/etc/init.d/iptables status
如果有这一条 1 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:80
说明防火墙配置成功
启动nginx /etc/init.d/nginx start
浏览器访问本机IP:
版权声明:本文为博主原创文章,未经博主允许不得转载。
以上就介绍了CentOS 66 yum 安装 nginx,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。