linux nginx 平滑升级,Linux 下安装 nginx 并且平滑升级nginx

Centos6.5

自动安装选择最快的源

[root@localhost ~]# yum install yum-fastestmirror这里 我已经安装过,运行结果如下

Loaded plugins: fastestmirror, refresh-packagekit, security

Loading mirror speeds from cached hostfile

* base: ftp.riken.jp

* epel: mirrors.zju.edu.cn

* extras: ftp.riken.jp

* updates: ftp.riken.jp

Setting up Install Process

Package yum-plugin-fastestmirror-1.1.30-30.el6.noarch already installed and latest version

安装nginx

yum install nginx

[root@localhost ~]# yum install nginx

Loaded plugins: fastestmirror, refresh-packagekit, security

Loading mirror speeds from cached hostfile

* base: ftp.riken.jp

* epel: mirrors.opencas.cn

* extras: ftp.riken.jp

* updates: ftp.riken.jp

Setting up Install Process

Package nginx-1.8.0-1.el6.ngx.x86_64 already installed and latest version

平滑升级

yum update nginx

执行命令前,首先配置nginx 源

[root@localhost ~]# vim /etc/yum.repos.d/nginx.repo

#nginx.repo

[nginx]

name=nginx repo

baseurl=http://nginx.org/packages/centos/6/$basearch/

gpgcheck=0

enabled=1

yum update nginx

执行结果与检查如下

[root@localhost ~]# yum update nginx

Loaded plugins: fastestmirror, refresh-packagekit, security

Loading mirror speeds from cached hostfile

* base: ftp.riken.jp

* epel: ftp.cuhk.edu.hk

* extras: ftp.riken.jp

* updates: ftp.riken.jp

nginx | 2.9 kB 00:00

nginx/primary_db | 37 kB 00:00

Setting up Update Process

Resolving Dependencies

--> Running transaction check

---> Package nginx.x86_64 0:1.0.15-11.el6 will be updated

---> Package nginx.x86_64 0:1.8.0-1.el6.ngx will be an update

--> Finished Dependency Resolution

Dependencies Resolved

========================================================================================================================================================================================

Package Arch Version Repository Size

========================================================================================================================================================================================

Updating:

nginx x86_64 1.8.0-1.el6.ngx nginx 352 k

Transaction Summary

========================================================================================================================================================================================

Upgrade 1 Package(s)

Total download size: 352 k

Is this ok [y/N]: y

Downloading Packages:

nginx-1.8.0-1.el6.ngx.x86_64.rpm | 352 kB 00:03

Running rpm_check_debug

Running Transaction Test

Transaction Test Succeeded

Running Transaction

Updating : nginx-1.8.0-1.el6.ngx.x86_64 1/2

Cleanup : nginx-1.0.15-11.el6.x86_64 2/2

Verifying : nginx-1.8.0-1.el6.ngx.x86_64 1/2

Verifying : nginx-1.0.15-11.el6.x86_64 2/2

Updated:

nginx.x86_64 0:1.8.0-1.el6.ngx

Complete!

[root@localhost ~]# service nginx stop

停止 nginx: [确定]

[root@localhost ~]# service nginx start

正在启动 nginx: [确定]

[root@localhost ~]# nginx -v

nginx version: nginx/1.8.0

当前nginx版本为 1.8.0   (

nginx -v)

nginx 访问结果如下图

1295159875533348864.htm

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值