侧边栏壁纸
博主头像
落叶人生博主等级

走进秋风,寻找秋天的落叶

  • 累计撰写 130562 篇文章
  • 累计创建 28 个标签
  • 累计收到 9 条评论
标签搜索

目 录CONTENT

文章目录

平滑编译升级Nginx

2023-11-17 星期五 / 0 评论 / 0 点赞 / 55 阅读 / 1259 字

$ cd ~ $ wget http://nginx.org/download/nginx-1.12.0.tar.gz $ tar xf nginx-1.12.0.tar.gz $ cd nginx-

$ cd ~
$ wget http://nginx.org/download/nginx-1.12.0.tar.gz
$ tar xf nginx-1.12.0.tar.gz
$ cd nginx-1.12.0/
$ ./configure --user=www --group=www --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-ipv6 --with-openssl=../openssl-1.1.0e --with-pcre=../pcre-8.40 --with-zlib=../zlib-1.2.11 --with-stream --with-stream_ssl_module
$ make
$ su
# cp -f objs/nginx /usr/local/nginx/sbin/
# chown www:www /usr/local/nginx/sbin/nginx
# systemctl restart nginx
# exit
$ cd ..
$ rm -fr nginx-1.12.0/
注:以上的openssl-1.1.0e/、pcre-8.40/、zlib-1.2.11/是相应的源码目录,与nginx-1.12.0/目录都在相同的父级目录下。

注意重启服务的命令:CentOS 7环境下systemctl restart nginx命令,CentOS 5.x, 6.x等低版本的使用service nginx restart

资源下载地址(点击标题可进入下载页面以方便选择下载其他版本):

1、openssl: https://www.openssl.org/source/openssl-1.1.0e.tar.gz

2、pcre: https://ftp.pcre.org/pub/pcre/pcre-8.40.tar.gz

3、zlib: http://zlib.net/zlib-1.2.11.tar.gz

4、nginx: http://nginx.org/download/nginx-1.12.0.tar.gz

广告 广告

评论区