阿里云服务器升级nginx 到最新稳定版
来源:互联网 发布:网络拓扑画图软件 编辑:程序博客网 时间:2024/06/11 19:58
阿里云市场有一个2元钱的服务器安装包,一次购买无限次使用,可以一键安装mysql、nginx、php环境。其中nginx是1.4.4版的,而现在最新稳定版是1.10.2,因为某些原因,必须升级到更高版本。从网上查了一下,可以在原程序包的基础上做到无缝隙升级而不用apt-get重装,关键是这个安装包里,用apt-get无法升级。以下是升级步骤:
1.到nginx官网下载资源包到home文件夹:nginx-1.10.2.tar.gz
2.解压,并进入nginx-1.10.2文件夹,如要提示有权限问题,请升级这个文件夹的权限。
3. 执行下面的命令【各种目录,要和老版一一对应,这很重要!】:
./configure --user=www --group=www --prefix=/alidata/server/nginx-1.4.4 --conf-path=/alidata/server/nginx-1.4.4/conf/nginx.conf --error-log-path=/alidata/log/nginx/error.log --http-client-body-temp-path=/alidata/server/nginx-1.4.4/client_body_temp --http-fastcgi-temp-path=/alidata/server/nginx-1.4.4/fastcgi_temp --http-log-path=/alidata/log/nginx/access/access.log --http-proxy-temp-path=/alidata/server/nginx-1.4.4/proxy_temp --http-scgi-temp-path=/alidata/server/nginx-1.4.4/scgi_temp --http-uwsgi-temp-path=/alidata/server/nginx-1.4.4/uwsgi_temp --lock-path=/var/lock/nginx.lock --pid-path=/alidata/server/nginx/logs/nginx.pid --with-debug --with-http_addition_module --with-http_dav_module --with-http_geoip_module --with-http_gzip_static_module --with-http_image_filter_module --with-http_realip_module --with-http_stub_status_module --with-http_ssl_module --with-http_sub_module --with-http_xslt_module --with-ipv6 --with-sha1=/usr/include/openssl --with-md5=/usr/include/openssl --with-mail --with-mail_ssl_module
4.补充几个依赖包【这一步应在第3步之前执行】
apt-get install libxml2 libxml2-dev libxslt-devapt-get install libgd2-xpm libgd2-xpm-devapt-get install geoip-database libgeoip-devapt-get install libpcre3 libpcre3-devapt-get install libcurl4-openssl-dev
5.执行make
6.执行老版本备份:
mv /alidata/server/nginx-1.4.4/sbin/nginx /alidata/server/nginx-1.4.4/sbin/nginx20170105
7.把make 到新文件复制到相关文件夹:
cp objs/nginx /alidata/server/nginx-1.4.4/sbin/nginx
8.执行以下命令:
/alidata/server/nginx-1.4.4/sbin/nginx -t
得到:
nginx: the configuration file /alidata/server/nginx-1.4.4/conf/nginx.conf syntax is oknginx: configuration file /alidata/server/nginx-1.4.4/conf/nginx.conf test is successful
9.在nginx1.10.2文件夹执行:
make upgrade
10.执行nginx -v查看版本,已经是新版本了,重启nginx!
1 0
- 阿里云服务器升级nginx 到最新稳定版
- 如何升级Nginx到最新稳定版
- 升级node.js到最新稳定版
- [Node]升级到最新稳定版方法
- 升级node.js到最新稳定版
- 阿里云debian服务器升级php到7.0
- 阿里云服务器安装 nginx
- nginx的配置文件最全版(使用最新稳定版NGINX1.8.0)
- Centos下nginx稳定版的平滑升级
- CentOS下平滑无缝升级Nginx到最新版本
- 最新阿里云服务器优惠活动汇总
- 个人网站升级改版——在上次的那个稳定运行的阿里云服务器上(PhpStorm的Deployment)
- 基于阿里云从日PV400到150w网站服务器升级记
- 阿里云服务器JDK版本升级
- yum安装最新稳定版本nginx
- Linux(CentOS6.5)下编译安装Nginx官方最新稳定版(nginx-1.10.0)
- Linux(CentOS6.5)下编译安装Nginx官方最新稳定版(nginx-1.10.0)
- 阿里云ECS搭建nginx服务器
- Spring学习10-- AOP实现原理
- 中介者模式---论媒婆的重要性
- c语言初级阶段散知识整理(一)
- Struts1.3——DispatchAction、DynamicForm和全局跳转
- 以目标为导向的需求工程建模方法:KAOS
- 阿里云服务器升级nginx 到最新稳定版
- Git常用命令
- 关联-依赖-聚合
- 基于Token的WEB后台认证机制
- Java多线程 -- Map容器性能比较
- 应用拆分思考
- 微信小程序_仿微信
- bootstrap table
- C++之类之实例