Last update at :2024-07-02,Edit by888u
Since the AMH free version stayed at version 4.2, it has not been updated or upgraded, and the official solution documents provided are relatively few. After all, there is still not much interest in free and unprofitable products. However, for most website environments, it is enough to install and use the free version of AMH4.2. The WEB panel, one-click package, or manual compilation environment is nothing more than installing several environment combinations in the system.
For example, the AMH environment uses a combination of Nginx, PHP, and MYSQL. The default versions include PHP5.3, Nginx1.4, and MYSQL5.5. PHP and Nginx are a bit old, so Snail used to use \\"AMH The tutorial for upgrading PHP in the article "Panel Manual Compilation and Upgrading PHP5.6.9 Environment\\" is still usable. This is perfect if we upgrade Nginx1.4 to the current stable version 1.8 today.
It needs to be mentioned here that we must pay attention to backup when upgrading the existing website, because if we encounter problems, we can still restore the data, or there are no major problems with our existing environment, so we can use it like this , sometimes it is not a good thing to pursue the latest version. For example, a few days ago, Snail also upgraded the system to Windows 10 version, which felt not as easy to use as Windows 8.1.
First, check the current Nginx version
nginx -V
Then we can get such information.
Here we can see that the current version is 1.4.7, and we also need to copy the following information.
–prefix=/usr/local/nginx –user=www –group=www –with-http_ssl_module –with-http_gzip_static_module –without-mail_pop3_module –without-mail_imap_module –without-mail_smtp_module –without-http_uwsgi_module –without-http_scgi_module p>
Here we copy our own, don't copy mine above.
Second, download and decompress the stable version of Nginx 1.8
wget https://soft.laozuo.org/nginx/nginx-1.8.0.tar.gztar -zxvf nginx-1.8.0.tar.gzcd nginx-1.8.0
Second, compilation environment
1. Execution
./configure –prefix=/usr/local/nginx –user=www –group=www –with-http_ssl_module –with-http_gzip_static_module –without-mail_pop3_module –without-mail_imap_module –without-mail_smtp_module –without-http_uwsgi_module –without- http_scgi_module
Add the red ./configure to the script obtained above and execute it directly.
2. Compilation
make
Third, configure the new Nginx configuration file
1. Move old files
mv /usr/local/nginx/sbin/nginx /usr/local/nginx/sbin/nginx.old;
2. Create a new one
cp objs/nginx /usr/local/nginx/sbin/nginx;
3. Perform upgrade
make upgrade
Finally, after Snail restarted the VPS, no errors were reported on the panel and site, so there seemed to be no problem. However, we still need to pay attention to the backup environment when operating.
Recommended site search: Hong Kong hosting, server, .cn domain name registration, website ICP filing, Guangdong server rental, asp.net hosting, server rental, US unlimited content hosting, vps hosting, Suqian server,
发表评论