centos6 升级nginx
centos6 默认源的nginx版本很低,网上给出的大部分方法下载源码编译安装;
这种方法比较麻烦,其实最简单的方法是使用nginx官网的源进行安装;
- 进入 /etc/yum.repos.d/ 目录下生成nginx的源配置
cd /etc/yum.repos.d/
用vi/vim/cat 工具生成nginx.repo填入以下内容
[nginx] name=nginx repo baseurl=http://nginx.org/packages/centos/$releasever/$basearch/ gpgcheck=0 enabled=1
安装 yum install -y nginx 更新 yum update nginx
参考:http://my.oschina.net/VincentJiang/blog/224993
https://www.nginx.com/resources/wiki/start/topics/tutorials/install/