tianzhig 发表于 2018-11-12 13:24:04

nginx_network_install

  1、添加nginx yum仓库
  # vi /etc/yum.repos.d/nginx.repo
  CentOS增加这段:
  
  name=nginx repo
  baseurl=http://nginx.org/packages/centos/$releasever/$basearch/
  gpgcheck=0
  enabled=1
  RHEL增加这段:
  
  name=nginx repo
  baseurl=http://nginx.org/packages/rhel/$releasever/$basearch/
  gpgcheck=0
  enabled=1
  # yum install nginx -y
  已加载插件:fastestmirror, refresh-packagekit, security
  设置安装进程
  Loading mirror speeds from cached hostfile
  * base: mirror.bit.edu.cn
  * extras: mirrors.163.com
  * updates: mirror.bit.edu.cn
  解决依赖关系
  --> 执行事务检查
  ---> Package nginx.x86_64 0:1.12.2-1.el6.ngx will be 安装
  --> 完成依赖关系计算
  依赖关系解决
  ========================================================================================
  软件包         架构            版本                         仓库            大小
  ========================================================================================
  正在安装:
  nginx            x86_64            1.12.2-1.el6.ngx             nginx            916 k
  事务概要
  ========================================================================================
  Install       1 Package(s)
  总下载量:916 k

  Installed>  下载软件包:
  nginx-1.12.2-1.el6.ngx.x86_64.rpm                              | 916 kB   00:34
  运行 rpm_check_debug
  执行事务测试
  事务测试成功
  执行事务
  正在安装   : nginx-1.12.2-1.el6.ngx.x86_64                                        1/1
  ----------------------------------------------------------------------
  Thanks for using nginx!
  Please find the official documentation for nginx here:
  * http://nginx.org/en/docs/
  Please subscribe to nginx-announce mailing list to get
  the most important news about nginx:
  * http://nginx.org/en/support.html
  Commercial subscriptions for nginx are available on:
  * http://nginx.com/products/
  ----------------------------------------------------------------------
  Verifying: nginx-1.12.2-1.el6.ngx.x86_64                                        1/1
  已安装:
  nginx.x86_64 0:1.12.2-1.el6.ngx
  完毕!
  # service nginx start
  正在启动 nginx:                                           [确定]
  # ss -tunlp |grep nginx
  tcp    LISTEN   0      128                  *:80                  *:*      users:(("nginx",3015,6),("nginx",3017,6))

页: [1]
查看完整版本: nginx_network_install