In general, upgrading a production environment is not recommended and will stop LNMP related services after the upgrade begins.
This article applies only to LNMP1.2 and later versions!
In LNMP currently LNMP v1.2 has included Nginx, MYSQL/MARIADB, PHP upgrade script, can help build the environment of the program to upgrade. (Note: The following operations need to be run in the directory after the LNMP compressed package decompression)
One, nginx upgrade script
Execution:./upgrade.sh Nginx Enter the version number after prompting (visit http://nginx.org/en/download.html to find the latest version number and previous version number of Nginx. such as: 1.6.0), enter again confirm to start upgrading Nginx. Nginx upgrade to smooth upgrade, the upgrade process does not affect the operation of Nginx.
Second, MySQL upgrade script
Although the script backs up the data, it is recommended that you back up yourself first!
Execution:./upgrade.sh MySQL needs to enter the MySQL root password for verification, verify that it will not be able to be upgraded, and verify that the version number of MySQL can be obtained by http://dev.mysql.com/downloads/mysql/ , enter to confirm, if you want to enable InnoDB, enter Y, not sure can also enter the input y enter the confirmation, again enter confirm to start the upgrade. The Mysql_upgrade date. log file is generated in the/root directory for troubleshooting when errors occur.
If the upgrade fails, rename the/usr/local/oldmysql date directory to MySQL, and rename the My.conf.bak. Date configuration file/etc/to MY.CNF and/etc/init.d/ Mysql.bak. Rename the date to MySQL to restore the original MySQL. (MySQL upgrade to MARIADB and upgrade mariadb as below)
third, MySQL upgrade to mariadb script
MARIADB is a branch of MySQL that is maintained primarily by the open source community. MARIADB is compatible with MySQL, developed by MySQL founder. It is still recommended that you back up yourself first!
Execution:./upgrade.sh the need to enter the MySQL root password to verify, verify that the failure will not be able to upgrade, the verification can be passed to https://downloads.mariadb.org/to obtain the version number MARIADB, Enter after entering confirm, if you want to enable InnoDB, enter Y, not sure can also enter the input y enter the confirmation, again enter confirm to start the upgrade. The Mysql2mariadb_upgrade date will be produced in the/root directory. log file for troubleshooting when errors occur.
iv. mariadb Upgrade Script
It is still recommended that you back up yourself first!
Execute:./upgrade.sh mariadb need to enter the MARIADB root password to verify, verify that the pass will not be able to upgrade, the verification can be passed to https://downloads.mariadb.org/to obtain MARIADB version number, Enter after entering confirm, if you want to enable InnoDB, enter Y, not sure can also enter the input y enter the confirmation, again enter confirm to start the upgrade. The Mariadb_upgrade date will be produced in the/root directory. log file for troubleshooting when errors occur.
v. LNMP PHP upgrade Script
Before upgrading PHP, please confirm that your website program supports the upgrade to PHP version, prevent the upgrade to the website program is not compatible with the PHP version, specific to the PHP program you use the official website to query the relevant version support information.
Execute:./upgrade.sh php to http://www.php.net/downloads.php get the version number, enter the version number, such as 5.3.28 enter, enter again to confirm to start the upgrade.
vi. lnmpa/lamp php upgrade Script
Before upgrading PHP, please confirm that your website program supports the upgrade to PHP version, prevent the upgrade to the website program is not compatible with the PHP version, specific to the PHP program you use the official website to query the relevant version support information.
Execute:./upgrade.sh phpa to http://www.php.net/downloads.php get the version number, enter the version number, such as 5.3.28 carriage return, enter again to confirm to start the upgrade.
LNMP 1.2 Upgrade Nginx, MYSQL/MARIADB, PHP tutorials