yum 安装nginx

前端之家收集整理的这篇文章主要介绍了yum 安装nginx前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

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

猜你在找的Bash相关文章