Join the community today
Register Now

Upgrade How to upgrade Centmin Mod

Discussion in 'Install & Upgrades or Pre-Install Questions' started by eva2000, May 25, 2014.

Thread Status:
Not open for further replies.
  1. eva2000

    eva2000 Administrator Staff Member

    53,251
    12,117
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,655
    Local Time:
    1:54 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Centmin Mod's centmin.sh is just a shell based wrapper script which automates installation of various software and tweaks the out of box configurations.

    Reproducing the official FAQ #4 answer at FAQ - CentminMod.com LEMP Nginx web stack for CentOS

    Upgrades In General

    Centmin Mod 1.2.3-eva2000.08 and higher has changed the upgrade method for actual Centmin Mod code itself. You can read the full upgrade method on the Upgrade page. For upgading Nginx and PHP etc, it's still the same as outlined below.

    Within same v1.2.2 branch or within same v1.2.3 upgrades

    If you are upgrading a server which already previously had Centmin Mod installed of the same branch i.e. Centmin Mod v1.2.2-eva2000.** or within same v1.2.3-eva2000.** branch, you DO NOT need to run option #1 (in fact as of Centmin Mod v1.2.2-eva2000.14 it will be impossible to run option #1 as the script will detect previous install of Centmin Mod and abort the script). Instead run option #4 and then option #5 for upgrading Nginx web server and upgrading PHP. You only need to run these if you upgrading to new Nginx or PHP version. If your existing Centmin Mod install has the same versions for Nginx and PHP, no need to even run those menu options. Update: as of v1.2.3-eva2000.07, there's a new menu option #22 which can upgrade Nginx, PHP-FPM and Siege benchmark versions to the versions set in centmin.sh. This means if you are upgrade Centmin Mod from say .07 to .08, you only have to run centmin.sh menu option #21 from .08 release, to automatically upgrade Nginx, PHP-FPM and Siege benchmark. Again, if between Centmin Mod releases, you upgraded Nginx and PHP-FPM versions to versions matching those in the new Centmin Mod releases's centmin.sh version number variables, then there is no need to run menu option #21.

    v1.2.2 to v1.2.3+ upgrades

    But if you are on the older, Centmin Mod v1.2.2-eva2000.** branch, and want to move to utilising the full 100% feature set of Centmin Mod v1.2.3 branch, you will need to use a fresh CentOS installed server and do fresh Centmin Mod v1.2.3 install rather than upgrade and transfer your old files to the new server. The reason is the Centmin Mod v1.2.3 branch has alot of new features that are installed at initial install time only and not via upgrade.

    If you don't need 100% of the new features in Centmin Mod v1.2.3 branch and are only concerned with utilising v1.2.3 Nginx, PHP and MariaDB 5.5 improvements, then just running Nginx upgrade option #4 and PHP upgrade option #5 and MariaDB 5.2.x to 5.5.x upgrade option #12 will allow you to use all the new Nginx, PHP and MariaDB 5.5 features listed at Centmin Mod v1.2.3. So running Nginx upgrade option #4, you will always still get Google SPDY and ngx_pagespeed and other listed modules support on Nginx page. Same if you run PHP upgrade option #5, you will always still get all compiled extensions supported and listed on PHP page.

    Nginx upgrade

    Menu option #4 will upgrade Nginx web server by prompting you to enter the Nginx version you want to install. You may receive 404 Not Found errors on php pages after Nginx upgrade. If you do, run Menu option #5 to upgrade/reinstall PHP version. You will find the latest stable and development versions onNginx.org. The Nginx upgrade routine will do a preliminary YUM update check to make sure any new Centmin Mod options have their required YUM installed software prior to the upgrade.

    You can also use the menu option #4 to downgrade Nginx versions as well just by entering a Nginx version you want. For Centmin Mod, I would stick with the stable version Nginx v1.1.xx to v1.2.xx as there are changes to nginx.conf etc which Centmin Mod caters to in it's configuration files, which earlier Nginx versions won't support.


    Nginx upgrade process will also backup your existing Nginx conf directory and file via 3 options in centmin.sh: NGINXBACKUP='y', NGINXCONFDIR='/usr/local/nginx/conf', NGINXBACKUPDIR='/usr/local/nginxbackup'. You will find backups of previous Nginx versions in timestamped directories located within /usr/local/nginxbackup.

    PHP Upgrade

    Menu option #5 will upgrade your PHP version to whatever version you enter at the prompt. You'll find latest PHP versions stable releases on the top right corner column on php.net. But as of this moment, stick with PHP 5.3.x as PHP 5.4.x seems to have problems with some extensions such as Xcache, APC, Suhosin and FFMPEG PHP extensions. APC v3.1.11+ and Xcache v2.0x seem to work with PHP 5.4.x but double check that your intended PHP scripts work with PHP 5.4.x.

    Upgrading PHP involves some additional steps if you had installed any of the following PHP extensions, Xcache, APC, Suhosin, FFMPEG, Memcache or generally any extension which required you to manually load a *.so file into php.ini. The reason why is the PHP upgrade routine will backup your existing php.ini which is at /usr/local/lib/php.ini and save backup to /usr/local/lib/php.ini-oldversion_timestamp and then overwrite that php.ini file with latest php.ini supplied by PHP tarball download package.

    The PHP upgrade process will then do a DIFF comparison check between new /usr/local/lib/php.ini and saved backup at /usr/local/lib/php.ini-oldversion_timestamp and display all the changes and differences between the file. There's a 60 second delay on the screen so you can use that opportunity to copy or note the changes for your own records. Usually, the changes will highlight what PHP extensions were installed previously and what is missing in the new php.ini.

    All you have to do is re-install those PHP extensions via menu options listed below - for Suhosin and FFMPEG install is fine:
    • 6). XCache Re-install
    • 7). APC Cache Re-install
    • 10). Memcached Server Re-install (this also updates your libevent version)
    • 15). Install/Re-install imagick PHP Extension
    • 18). Suhosin PHP Extension install
    • 19). Install FFMPEG and FFMPEG PHP Extension
    The PHP upgrade process also backs up and overwrites your existing php-fpm configuration file /usr/local/etc/php-fpm.conf to /usr/local/etc/php-fpm.conf-oldversion_timestamped. It will prompt you and ask if you want to overwrite and backup the php-fpm.conf file. This is to ensure updated php-fpm.conf changes make it into your server's php-fpm configuration.

    MariaDB 10 MySQL ?

    Centmin Mod v1.2.3-eva2000.08+ and higher have MariaDB 10.x MySQL default support as outlined here.

    For existing Centmin Mod users still on MariaDB 5.5, you'll find the new revised menu option #12 is for MariaDB 5.5.x update to MariaDB 10.x for folks wanting to test older Centmin Mod installs upgrade process to MariaDB 10.x. See step 3 of the .07 and older update guide for more details or on the forums.

    Since MariaDB 5.5 and 10.0.x uses YUM repository, future updates can be done via YUM:
    Code:
    yum update MariaDB-client MariaDB-common MariaDB-compat MariaDB-devel MariaDB-server MariaDB-shared
    Before upgrading it is highly recommended to backup all your mysql databases using mysqldump

    backup

    Code:
    mysqldump -u mysqlusername -p mysqldatabasename > /path/to/mysqldatabasename_backup_date.sql
    
    restore

    Code:
    mysql -u mysqlusername -p mysqldatabasename < /path/to/mysqldatabasename_backup_date.sql
    
     
    Last edited: Feb 15, 2016
  2. eva2000

    eva2000 Administrator Staff Member

    53,251
    12,117
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,655
    Local Time:
    1:54 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+

    Additional Info on Centmin Mod Upgrades



    Above info still applies, just more details below and for Centmin Mod 1.2.3-eva2000.08+ and higher see Install - Centmin Mod 1.2.3-eva2000.08 how to install & update

    Upgrading Centmin Mod involves 2 parts.
    1. Upgrading the actual Centmin Mod code which you downloaded via zip file or via github. This is heart of Centmin Mod where the code is the engine that runs centmin.sh shell based menu and all the automation you're accustomed to.
    2. Upgrade software that Centmin Mod installed or manages. For this part following outline at Upgrade - How to upgrade Centmin Mod is best.
    So essentially, you can upgrade from .07 to .08 in place, but not everything is upgraded as some things like server initial environment setup isn't changed i.e. how swap, tmp setup and allocation are created etc. The main parts from part 2 above are what in place upgrades do i.e. Nginx and PHP-FPM compilation and config/settings parameters and MariaDB version from 5.5 to 10.0.x. If you want the full environment changed including tmp and swap setup to .08's configuration, then you would need a fresh OS install and fresh .08 initial install. You can think of it like upgrading Windows 7 to Windows 8. An in place upgrade will upgrade code but won't change your computer environment from when you installed Windows 7 i.e. disk configuration and partition sizes won't change from when you initially installed Windows 7. Only way to change that would be fresh Windows 8 install.

    There's 3 ways you can upgrade your 123.08stable or 123.09beta01 code you have on your server. They are outlined in respective upgrade sections of the first posts linked below:
    1. For .08 stable 1st post see section on upgrades Install - Centmin Mod 1.2.3-eva2000.08 how to install & update | Centmin Mod Community
    2. For .09 betas 1st post see section on upgrade to latest code Beta Branch - Centmin Mod .09 beta branch Testing | Centmin Mod Community
    3. Follow instructions on official page at centminmod.com/upgrade.html
    Github commit log for
     
    Last edited: Jan 27, 2016
Thread Status:
Not open for further replies.