In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains how to upgrade nginx smoothly after nginx compilation and installation. Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let Xiaobian take you to learn "how to smoothly upgrade nginx after compiling and installing nginx"!
1. Download the new version of nginx
Download page:
wget -c http://nginx.org/download/nginx-1.13.12.tar.gz
Second, get the old version of nginx configuration
View current version: /usr/local/nginx/sbin/nginx -v
View current configuration: /usr/local/nginx/sbin/nginx -v
[root@zixuephp nginx-1.13.6]# /usr/local/nginx/sbin/nginx -vnginx version: nginx/1.13.6[root@zixuephp nginx-1.13.6]# /usr/local/nginx/sbin/nginx -vnginx version: nginx/1.13.6built by gcc 4.8.5 20150623 (red hat 4.8.5-16) (gcc) built with openssl 1.0.2k-fips 26 jan 2017tls sni support enabledconfigure arguments: --prefix=/usr/local/nginx --user=www --group=www --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_v2_module --with-http_gzip_static_module --with-http_sub_module --with-pcre --with-http_ssl_module
Third, extract the new version of nginx source package
tar -xzvf nginx-1.13.12.tar.gzcd nginx-1.13.12
IV. Configuration before recompiling the new version
The requested URL/usr/local/nginx/sbin/nginx-v was not found on this server.
The copy code is as follows:
./ configure --prefix=/usr/local/nginx --user=www --group=www --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_v2_module --with-http_gzip_static_module --with-http_sub_module --with-pcre --with-http_ssl_module
5. Compile and generate objs directory, enter directory, replace nginx
make
After compilation, you can see a directory with objs through ls
[root@zixuephp nginx-1.13.12]# lsauto changes changes.ru conf configure contrib html license makefile man objs readme src[root@zixuephp nginx-1.13.12]#
Enter the objs directory and replace the old version of the nginx main program (be sure to backup before operating here to avoid errors)
[root@zixuephp objs]#mv nginx /usr/local/nginx/sbin/nginx
VI. Smooth upgrade
make upgrade
VII. Upgrade successful, check version
[root@zixuephp nginx-1.13.12]# /usr/local/nginx/sbin/nginx -vnginx version: nginx/1.13.12[root@zixuephp nginx-1.13.12]# /usr/local/nginx/sbin/nginx -vnginx version: nginx/1.13.12built by gcc 4.8.5 20150623 (red hat 4.8.5-16) (gcc) built with openssl 1.0.2k-fips 26 jan 2017tls sni support enabledconfigure arguments: --prefix=/usr/local/nginx --user=www --group=www --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_v2_module --with-http_gzip_static_module --with-http_sub_module --with-pcre --with-http_ssl_module
Before upgrading, be sure to back up nginx programs and websites and other files in advance to avoid errors.
At this point, I believe that everyone has a deeper understanding of "how to smoothly upgrade nginx after compiling and installing nginx", so let's actually operate it! Here is the website, more related content can enter the relevant channels for inquiry, pay attention to us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.