Get the most out of your Centmin Mod LEMP stack
Become a Member

Upgrading

Discussion in 'Install & Upgrades or Pre-Install Questions' started by Robust, Jun 14, 2015.

  1. Robust

    Robust Member

    49
    2
    8
    Jun 14, 2015
    Ratings:
    +4
    Local Time:
    9:15 PM
    1.9.7
    10.1
    So I deployed a 1GB server for testing, but I want to resize it (using Linode) to 2-4GB. Do I need a reinstall? When I installed PHP I put that under 2GB RAM is installed, so for full efficiency do I need a reinstall of Centmin (aka a new Linode)? Or is there a way to change these options? I dunno what options Centmin sets if there is more or less than 2GB of RAM.
     
  2. eva2000

    eva2000 Administrator Staff Member

    28,971
    6,575
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,759
    Local Time:
    9:15 PM
    Nginx 1.13.x
    MariaDB 5.5
    VPS level resize like on Linode DO NOT need to reinstall Centmin Mod most of the time. The memory prompts are to do with what amount of memory Centmin Mod has to work with for creating swap/tmp and php.ini default memory settings. So only time you would want to reinstall if is you want those changed. It's similar to the situation with Centmin Mod upgrades.

    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 .07 stable or .08 beta03 code you have on your server. They are outlined in respective upgrade sections of the first posts linked below:
    1. For .07 stable 1st post see section on upgrades Install - Centmin Mod 1.2.3-eva2000.07 stable install
    2. For .08 beta 03 1st post see section on upgrade to latest code CentOS 7.x - How to help test .08 CentOS 7 Betas with Github code ?
    3. For either .07 stable or .08 beta03 via github command line Upgrade - Working with git command line for updating Centmin Mod local copies
    Github commit log for
     
  3. Robust

    Robust Member

    49
    2
    8
    Jun 14, 2015
    Ratings:
    +4
    Local Time:
    9:15 PM
    1.9.7
    10.1
    So if I want to increase the memory I need to reinstall. What's the alternative option to make the changes manually?
     
  4. eva2000

    eva2000 Administrator Staff Member

    28,971
    6,575
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,759
    Local Time:
    9:15 PM
    Nginx 1.13.x
    MariaDB 5.5
    No need to reinstall unless you want changes done to tmp/swap settings etc really. You could do it manually but would get messy.

    for example on .08 beta 03 the logic used to determine tmp size and type dependent on memory available is located on lines 758 to 840 of centmin.sh

    for php.conf there's templates at /config/php-fpm/* for memory size at for the config file at /usr/local/etc/php-fpm.conf. You can see here centminmod/config/php-fpm at master · centminmod/centminmod · GitHub -min ones are for <2GB and non-min ones are for >2GB

    there's also custom php.ini edits based on memory at inc/phpsededit.inc - lines 20-36 for Centmin Mod .08 beta03
     
  5. eva2000

    eva2000 Administrator Staff Member

    28,971
    6,575
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,759
    Local Time:
    9:15 PM
    Nginx 1.13.x
    MariaDB 5.5