首页 >后端开发 >php教程 >CentOS 66 yum 安装 nginx

CentOS 66 yum 安装 nginx

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB原创
2016-08-08 09:19:471049浏览

操作系统

<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教程有兴趣的朋友有所帮助。

声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn