@H_404_0@ yum 安装 Nginx
@H_404_0@手动执行
@H_404_0@rpm -ivh http://Nginx.org/packages/centos/6/noarch/RPMS/Nginx-release-centos-6-0.el6.ngx.noarch.rpm
@H_404_0@
@H_404_0@yum list
@H_404_0@
@H_404_0@yum install Nginx
@H_404_0@
@H_404_0@iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
@H_404_0@
@H_404_0@service Nginx start
@H_404_0@
@H_404_0@脚本执行:
@H_404_0@#!/bin/bash
@H_404_0@rpm -ivh http://Nginx.org/packages/centos/6/noarch/RPMS/Nginx-release-centos-6-0.el6.ngx.noarch.rpm
@H_404_0@
@H_404_0@yum clean all
@H_404_0@yum list
@H_404_0@sleep 2
@H_404_0@rpm -qa |grep Nginx
@H_404_0@yum remove Nginx
@H_404_0@yum install Nginx -y
@H_404_0@service Nginx start
@H_404_0@chkconfig Nginx on
@H_404_0@/etc/init.d/Nginx restart
@H_404_0@iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
@H_404_0@service iptables save
@H_404_0@/etc/init.d/iptables restart