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平滑升級Nginx
- nginx升級與回退Nginx
- Nginx如何升級OpensslNginx
- nginx 版本升級 轉載Nginx
- Nginx配置以及熱升級Nginx
- nginx實現平滑升級Nginx
- nginx之升級openssl及自定義nginx版本Nginx
- nginx升級與版本回退Nginx
- Nginx如何進行平滑升級Nginx
- nginx 命令和訊號及平滑升級Nginx
- 生產環境nginx平滑升級演示Nginx
- 全站HTTPS升級系列(三)nginx配置全站HTTPSHTTPNginx
- 升級nginx以支援http2的方法NginxHTTP
- Nginx vs Envoy vs MOSN 平滑升級原理解析Nginx
- Nginx range filter模組數字錯誤漏洞修復 (Nginx平滑升級)NginxFilter
- 免費購買SSL證書,nginx無縫升級httpsNginxHTTP
- 1分鐘搞定 Nginx 版本的平滑升級與回滾Nginx
- Nacos 爆重大 Bug!!不要升級,不要升級,不要升級
- Truffle 2.0升級3.0升級指南
- RHEL6.5安裝supervisor-3.3.1-py2.6.egg
- oracle 10 rac 升級 10.2.0.1升級到10.2.0.5Oracle
- (十二).NET6 + React :升級!升級!還是***升級!!!+ IdentityServer4實戰ReactIDEServer
- ES升級
- Jenkins升級Jenkins
- 升級pythonPython
- 資料庫升級之-Dataguard滾動升級資料庫
- mongodb單機從3.2升級到4.0.4升級MongoDB
- 全站HTTPS升級系列(一)升級前的科普工作HTTP
- macOS 11.0怎麼升級?macOS Big Sur 升級教程Mac
- nginx配置二級域名Nginx
- 二級域名nginx 配置Nginx
- win10升級11102升級失敗怎麼辦_win10升級11102升級一直失敗修復方法Win10
- Zurmo – – 升級指南
- 升級APEX 元件元件
- gcc版本升級GC
- node 版本升級
- python版本升級Python
- godot shader 升級Go