Perfect for LNMP/AMH Smooth Upgrade of Tengine Latest Edition

Keywords: Nginx Web Server

Links to the original text: http://www.zntec.cn/archives/nginx-change-tengine.html

I believe there are quite a few people using VPS nowadays. For many people, LNMP and AMH are the best environments.

 

There's no need to say more about Tengine. This is an open source Web server project in Ali. For a large number of visits to the website and performance have better optimization, of course, this is based on Nginx!

1. Installation/compilation. This method is suitable for Junge's LNMP and AMH. If you don't say much, just give you a code to execute.

wget -c http://tengine.taobao.org/download/tengine-1.4.6.tar.gz && tar zxvf tengine-1.4.6.tar.gz && cd tengine-1.4.6/ && ./configure && make && mv /usr/local/nginx/sbin/nginx /usr/local/nginx/sbin/nginx.old && cp -r objs/nginx /usr/local/nginx/sbin/nginx && vi /usr/local/nginx/conf/nginx.conf

2. Delete the configuration. There will be a special explanation later. You will enter the editor and enter "i" after this code. Find out as follows:

location /status {
    stub_status on;
    access_log   off;
}

3. Look at the status, find the above code and delete it decisively. If you can't find it, see if Nginx is normal:

/usr/local/nginx/sbin/nginx -t

If there's a "Successful" ending, that's okay. It's good to finish!

Closing up: Stop Nginx and restart it and view the current version:

kill -USR2 `cat /usr/local/nginx/logs/nginx.pid` && kill -QUIT `cat /usr/local/nginx/logs/nginx.pid.oldbin` && /etc/init.d/nginx restart && /usr/local/nginx/sbin/nginx -v

If you see Tengine/1.4.6, it's a successful upgrade!

If there is no problem, you can start to use it properly!

The above code is explained in detail:

wget -c http://tengine.taobao.org/download/tengine-1.4.6.tar.gz# Gets the compressed package
tar zxvf tengine-1.4.6.tar.gz                                   #decompression
cd tengine-1.4.6/                                               #Enter the catalogue
./configure                                                     #Execute installation scripts
make                                                            #Compile
mv /usr/local/nginx/sbin/nginx /usr/local/nginx/sbin/nginx.old  #Backup configuration
cp -r objs/nginx /usr/local/nginx/sbin/nginx                    #Copy Configuration Paste
vi /usr/local/nginx/conf/nginx.conf                             #Configure Nginx
/usr/local/nginx/sbin/nginx -t                                  #View status
kill -USR2 `cat /usr/local/nginx/logs/nginx.pid`                #Killing process
kill -QUIT `cat /usr/local/nginx/logs/nginx.pid.oldbin`         #Killing process
/etc/init.d/nginx restart                                       #Restart Nginx
/usr/local/nginx/sbin/nginx -v                                  #View the Nginx version

I don't have so many pictures. It seems that there are so many commands. In fact, they will be executed in one fell swoop! ________

Posted by drag0n on Wed, 09 Oct 2019 09:46:55 -0700