Linux下升级Nginx版本
1.下载新版本nginx包
http://nginx.org/en/download.html
2.获取旧版本nginx的configure选项
/opt/nginx/sbin/nginx -V
3.进入新版本nginx解压后的目录,初始编译nginx,编译参数为第2步获取到的旧版本的参数
4.编译遇错(1)
解决方法:
ubuntu下执行
apt-get install libpcre3-dev
RHEL下执行
yum -y install pcre-devel
5.编译遇错(2)
./configure: error: the HTTP XSLT module requires the libxml2/libxslt
libraries. You can either do not enable the module or install the libraries.
解决办法:
Ubuntu
sudo apt-get install libxml2 libxml2-dev
RHEL
yum install libxslt-devel
6.遇错(3)
./configure: error: the HTTP image filter module requires the GD library.
You can either do not enable the module or install the libraries.
解决办法:
Ubuntu
yum install gd-devel
RHEL
apt-get install libgd2-xpm libgd2-xpm-dev
7.遇错(4)
./configure: error: perl module ExtUtils::Embed is required
解决办法:
yum install perl perl-devel perl-ExtUtils-Embed
8.遇错(5)
./configure: error: the GeoIP module requires the GeoIP library.
You can either do not enable the module or install the library.
解决办法:
Ubantu
sudo apt-get install geoip-database libgeoip-dev
RHEL
yum install GeoI GeoIP-data GeoIP-devel
9.编译
make
10.拷贝命令
mv /usr/sbin/nginx /usr/sbin/nginx.1.2.0.bak
cp /opt/nginx-1.6.3/objs/nginx /usr/sbin/nginx
11.编译安装
make install
12.重启nginx
service nginx restart
- linux 命令收集 阿里云nginx升级等 查看磁盘空间 版本等
- [linux]升级python版本
- 在虚拟机中centos版本的linux的nginx安装
- linux上升级perl版本
- linux 升级 Python 版本 (CentOS 6 为例)
- CentOS 7.0 升级Linux内核3.9及以上版本
- nginx编译升级1.14.1 stable 或1.15.6 主线版本,亲试可行
- linux java版本升级
- Linux动态链接库的命名及版本升级管理
- 各版本Linux下安装实验ORACLE+10gR2+ASM+升级到10.2.0.5+单实例
- nginx1.8.0版本平滑升级新版本1.9.7
- Mysql升级到最新版本mysql-5.7.16-linux-glibc2.5-x86_64.tar.gz
- 升级nginx 至 1.9.5以上版本 来支持 HTTP 2.0
- Ubuntu 14.04 64位升级搜狗拼音输入法linux版本
- linux下nginx多版本php共存
- Linux---centos升级git版本
- linux上升级perl版本
- Nginx升级版本
- Linux6.3_64安装Oracle10.2.0.1数据库并升级至10.2.0.4版本
- Linux(RHEL5)下ORACLE 10g版本升级