首页 > 其他 > 详细

nginx学习

时间:2016-07-09 14:56:14      阅读:235      评论:0      收藏:0      [点我收藏+]

1,centos 下nginx平滑升级

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

 

*baseurl=http://nginx.org/packages/centos/6/$basearch/  这一句需要将里面的6修改成对应centos的版本号,如果是centos5则需要改成5

*根据你使用的操作系统不同,分别使用rhel或者centos替换os,使用5或者6替换osrelease,例如5.x或者6.x版本

 

*升级过程可能会遇到centos缓存问题;

Not using downloaded repomd.xml because it is older than what we have

Renewed Red Hat and updated the system with yum update, the following error:

 
Not using downloaded repomd.xml because it is older than what we have:
 
解决方案
 
yum clean all && yum check-update
 
清除centos缓存文件就可以了
 
2,启动与重启

启动nginx :nginx -c /etc/nginx/nginx.conf

关闭nginx:./sbin/nginx -s stop

nginx学习

原文:http://www.cnblogs.com/sign-ptk/p/5655455.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!