国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁(yè) > 網(wǎng)站 > Nginx > 正文

Nginx1.8.0版本平滑升級(jí)新版本1.9.7

2024-08-30 12:21:58
字體:
來(lái)源:轉(zhuǎn)載
供稿:網(wǎng)友
這篇文章主要介紹了Nginx1.8.0版本平滑升級(jí)新版本1.9.7的相關(guān)資料,需要的朋友可以參考下

 首先查看現(xiàn)在環(huán)境nginx的版本為1.8.0 編譯的參數(shù)只指定了安裝路徑;

復(fù)制代碼 代碼如下:
[root@localhost sbin]# ./nginx -V
nginx version: nginx/1.8.0
built by gcc 4.4.7 20120313 (Red Hat 4.4.7-11) (GCC)
configure arguments: --prefix=/usr/local/nginx

平滑升級(jí)步驟如下:

下載nginx1.9.7版本,解壓并進(jìn)入解壓后的目錄

復(fù)制代碼 代碼如下:
[root@localhost ~]# wget -P /usr/local/src/ http://nginx.org/download/nginx-1.9.7.tar.gz
[root@localhost ~]# cd /usr/local/src/
[root@localhost src]# tar -zxvf nginx-1.9.7.tar.gz
[root@localhost src]# cd nginx-1.9.7

編譯安裝之前查看nginx進(jìn)程ID信息:

復(fù)制代碼 代碼如下:
[root@localhost nginx-1.9.7]# ps -ef |grep nginx
root 894 1 0 16:06 ? 00:00:00 nginx: master process /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
nobody 896 894 0 16:06 ? 00:00:00 nginx: worker process
nobody 897 894 0 16:06 ? 00:00:00 nginx: worker process

編譯安裝:指定用戶www 支持ssl 支持pcre 支持狀態(tài)查詢 支持靜態(tài)壓縮模塊;

復(fù)制代碼 代碼如下:
[root@localhost nginx-1.9.7]# ./configure --user=www --group=www --prefix=/usr/local/nginx/ --with-pcre --with-http_stub_status_module --with-http_ssl_module --with-http_gzip_static_module

編譯安裝后可以echo $?查看是否成功,成功后只需要執(zhí)行make,不需要make install;

復(fù)制代碼 代碼如下:
[root@localhost nginx-1.9.7]# make

平滑升級(jí),先移走現(xiàn)有的nginx二進(jìn)制文件

復(fù)制代碼 代碼如下:
[root@localhost nginx-1.9.7]# mv /usr/local/nginx/sbin/nginx /usr/local/nginx/sbin/nginx.old

拷貝新生成的nginx二進(jìn)制文件到指定目錄

復(fù)制代碼 代碼如下:
[root@localhost nginx-1.9.7]# cp objs/nginx /usr/local/nginx/sbin/

執(zhí)行升級(jí)命令

復(fù)制代碼 代碼如下:
[root@localhost nginx-1.9.7]# make upgrade
/usr/local/nginx//sbin/nginx -t
nginx: the configuration file /usr/local/nginx//conf/nginx.conf syntax is ok
nginx: configuration file /usr/local/nginx//conf/nginx.conf test is successful
kill -USR2 `cat /usr/local/nginx//logs/nginx.pid`
sleep 1
test -f /usr/local/nginx//logs/nginx.pid.oldbin
kill -QUIT `cat /usr/local/nginx//logs/nginx.pid.oldbin`

查看版本,發(fā)現(xiàn)已經(jīng)是1.9.7版本,編譯的參數(shù)也存在;

復(fù)制代碼 代碼如下:
[root@localhost nginx-1.9.7]# /usr/local/nginx/sbin/nginx -V
nginx version: nginx/1.9.7
built by gcc 4.4.7 20120313 (Red Hat 4.4.7-16) (GCC)
built with OpenSSL 1.0.1e-fips 11 Feb 2013
TLS SNI support enabled
configure arguments: --user=www --group=www --prefix=/usr/local/nginx/ --with-pcre --with-http_stub_status_module --with-http_ssl_module --with-http_gzip_static_module

發(fā)表評(píng)論 共有條評(píng)論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 故城县| 彭泽县| 桃江县| 台南市| 宁武县| 贡觉县| 将乐县| 松江区| 汉中市| 桦川县| 循化| 嘉鱼县| 宁安市| 上蔡县| 平舆县| 修水县| 会宁县| 页游| 德阳市| 曲沃县| 虎林市| 红原县| 鄂尔多斯市| 唐山市| 卢湾区| 洪泽县| 奉节县| 阿勒泰市| 伊川县| 永善县| 江华| 札达县| 怀宁县| 中卫市| 化州市| 肃宁县| 巴南区| 万宁市| 青龙| 汉川市| 德江县|