作業系統
<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>
安裝0 0.0.0.0/0 tcp dpt:80
說明防火牆配置成功
啟動nginx /etc/init.d/nginx start
瀏覽器存取本機IP:
版權聲明:本文為主部落客原創文章,未經博主不得轉載。