RHEL6.5升級nginx
1.解壓nginx
tar -zxvf nginx-1.10.2.tar.gz -C /usr/local/src
2.檢視nginx現有配置
nginx -V
輸出現有配置資訊
--prefix=/etc/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-log-path=/var/log/nginx/access.log --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --lock-path=/var/lock/nginx.lock --pid-path=/var/run/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
3.編譯nginx
cd /usr/local/src/nginx-1.10.2
./configure --prefix=/etc/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-log-path=/var/log/nginx/access.log --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --lock-path=/var/lock/nginx.lock --pid-path=/var/run/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
make
4.備份原有nginx檔案並複製新檔案
mv /usr/sbin/nginx /usr/sbin/nginx-20121122
cp objs/nginx /usr/sbin/nginx
/usr/sbin/nginx -t
執行/usr/sbin/nginx -t 命令檢查配置檔案並將返回下面的資訊:
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
5.升級nginx
make upgrade
6.驗證版本資訊
nginx -V
tar -zxvf nginx-1.10.2.tar.gz -C /usr/local/src
2.檢視nginx現有配置
nginx -V
輸出現有配置資訊
--prefix=/etc/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-log-path=/var/log/nginx/access.log --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --lock-path=/var/lock/nginx.lock --pid-path=/var/run/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
3.編譯nginx
cd /usr/local/src/nginx-1.10.2
./configure --prefix=/etc/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-log-path=/var/log/nginx/access.log --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --lock-path=/var/lock/nginx.lock --pid-path=/var/run/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
make
4.備份原有nginx檔案並複製新檔案
mv /usr/sbin/nginx /usr/sbin/nginx-20121122
cp objs/nginx /usr/sbin/nginx
/usr/sbin/nginx -t
執行/usr/sbin/nginx -t 命令檢查配置檔案並將返回下面的資訊:
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
5.升級nginx
make upgrade
6.驗證版本資訊
nginx -V
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/8551823/viewspace-2130890/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Nginx升級Nginx
- Nginx如何升級OpensslNginx
- nginx升級與回退Nginx
- centos 7 版本升級nginxCentOSNginx
- nginx之升級openssl及自定義nginx版本Nginx
- Nginx如何進行平滑升級Nginx
- Linux下平滑升級nginxLinuxNginx
- centos 升級nginx到1.10.2CentOSNginx
- nginx升級與版本回退Nginx
- nginx升級1.0.2最新穩定版Nginx
- 生產環境nginx平滑升級演示Nginx
- 升級nginx以支援http2的方法NginxHTTP
- Nginx range filter模組數字錯誤漏洞修復 (Nginx平滑升級)NginxFilter
- Nginx vs Envoy vs MOSN 平滑升級原理解析Nginx
- 全站HTTPS升級系列(三)nginx配置全站HTTPSHTTPNginx
- 1分鐘搞定 Nginx 版本的平滑升級與回滾Nginx
- [筆記] nginx 兩種方式 啟動 重啟 停止 升級筆記Nginx
- 《Openstack的搭建》RHEL6.5
- 免費購買SSL證書,nginx無縫升級httpsNginxHTTP
- Linux下Nginx的安裝、升級及動態新增模組LinuxNginx
- Truffle 2.0升級3.0升級指南
- 高效能Web伺服器Nginx的配置與部署研究(14)平滑升級你的NginxWeb伺服器Nginx
- rac 升級crs 升級資料庫軟體,升級資料庫資料庫
- <ganglia+nagios>rhel6.5iOS
- linux 核心升級步驟,kernel升級Linux
- 升級核心
- mysql升級MySql
- ES升級
- 資料庫升級之-Dataguard滾動升級資料庫
- mongodb單機從3.2升級到4.0.4升級MongoDB
- 生產庫升級:oracle 9.2.0.1升級oracle 9.2.0.8Oracle
- (十二).NET6 + React :升級!升級!還是***升級!!!+ IdentityServer4實戰ReactIDEServer
- oracle 10 rac 升級 10.2.0.1升級到10.2.0.5Oracle
- Brew Elasticsearch 升級Elasticsearch
- Windows 升級 powershellWindows
- node 版本升級
- 升級APEX 元件元件
- Zurmo – – 升級指南