Manual compilation and upgrade of Nginx1.8 in the free version of AMH4.2

Source: Internet
Author: User
Tags php and
The free version of AMH has not been updated or upgraded since version 4.2, and there are few official Solutions. After all, free and non-profitable products are not very interested. However, for most website environments, installing and using the free version of AMH4.2 is sufficient. The combination of WEB panel and one-click package, or manual compiling environment is nothing more than installing several environments 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 little old, as a result, the tutorial for upgrading PHP in the "AMH panel manual compilation and upgrade PHP5.6.9 environment" article is still usable, this is not because we are upgrading Nginx1.4 to the current stable version 1.8.

 

We need to mention that we must pay attention to backup when upgrading an existing website, because we can restore data in case of any problems or there is no major problem with our existing environment, in this way, sometimes it is not a good thing to pursue the latest version. For example, the old Left also upgraded the system to Windows 10 a few days ago, and it is not as easy as Windows 8.1.

 

1. Check the current Nginx version

 

The code is as follows: Copy code

Nginx-V

 

Then we can get this information.

 

 

Here we can see that the current version is 1.4.7, and we need to copy the following information.

 

The code is as follows: Copy code

-- 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 --

 

Here we copy our own, do not copy the above.

 

2. Download Nginx1.8 stable version for decompression

 

The code is as follows: Copy code

Wget http://soft.laozuo.org/nginx/nginx-1.8.0.tar.gz
Tar-zxvf nginx-1.8.0.tar.gz
Cd nginx-1.8.0

 

2. Compiling Environment

 

1. Execute

 

The code is as follows: Copy code

./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 red./configure to the script obtained above and execute it directly.

 

2. Compile

 

The code is as follows: Copy code

Make

 

3. Configure the new Nginx configuration file

 

1. Move the old file

 

The code is as follows: Copy code

Mv/usr/local/nginx/sbin/nginx. old;

 

2. New

 

The code is as follows: Copy code

Cp objs/nginx/usr/local/nginx/sbin/nginx;

 

3. Perform upgrade

 

The code is as follows: Copy code

Make upgrade

 

 

After restarting VPS on the left, no error is reported on the panel and site. It seems that there is no problem. However, we still need to pay attention to the backup environment during operations.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.