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