yum 安装nginx

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

猜你在找的Bash相关文章