theoforce 发表于 2018-11-15 13:08:11

Nginx Yum 安装

针对 CentOS 6.3  

  
1、配置repo源
  
$ cat /etc/yum.repos.d/nginx.repo
  

  
name=nginx repo
  
baseurl=http://nginx.org/packages/centos/6/$basearch/
  
gpgcheck=0
  
enabled=1
  

  
安装
  
$ yum install nginx
  

  

  
2、nginx配置文件:
  
$ cat /etc/nginx/nginx.conf
  

  
3、启动
  
/etc/init.d/nginx start
  

  
4、关闭防火墙
  
service iptables stop
  

  
5、注册启动Nginx服务
  
chkconfig iptables off
  
chkconfig nginx on


页: [1]
查看完整版本: Nginx Yum 安装