码迷,mamicode.com
首页 > Web开发 > 详细

nginx_network_install

时间:2017-11-21 10:47:05      阅读:189      评论:0      收藏:0      [点我收藏+]

标签:nginx_yum源安装

1、添加nginx yum仓库

# vi /etc/yum.repos.d/nginx.repo
CentOS增加这段:
[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/centos/$releasever/$basearch/
gpgcheck=0
enabled=1
RHEL增加这段:
[nginx]
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 size: 2.5 M
下载软件包:
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))

本文出自 “12478125” 博客,请务必保留此出处http://12488125.blog.51cto.com/12478125/1983673

nginx_network_install

标签:nginx_yum源安装

原文地址:http://12488125.blog.51cto.com/12478125/1983673

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!