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

Beta Branch set mariadb 10.3 & enable php-fpm systemd service defaults in 123.09beta01

Discussion in 'Centmin Mod Github Commits' started by eva2000, Mar 23, 2019.

  1. eva2000

    eva2000 Administrator Staff Member

    40,190
    8,888
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +13,698
    Local Time:
    11:44 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    set mariadb 10.3 & enable php-fpm systemd service defaults in 123.09beta01

    - time has come to make 123.09beta01 fresh installs default to using mariadb 10.3 as default via MARIADB_INSTALLTENTHREE='y' and also for centos 7 installs to switch php-fpm service file from init.d based to systemd based via SWITCH_PHPFPM_SYSTEMD='y' outlined at https://community.centminmod.com/threads/16511/
    - if you want new installs to use old default mariadb 10.1, set in persistent config file /etc/centminmod/custom_config.inc the variable MARIADB_INSTALLTENTHREE='n' BEFORE initial centmin mod install
    - if you want new installs to use old php-fpm via init.d service file on centos 7 installs, set in persistent config file /etc/centminmod/custom_config.inc the variable SWITCH_PHPFPM_SYSTEMD='n' BEFORE initial centmin mod install

    Continue reading...

    123.09beta01 branch
     
    • Like Like x 1
  2. Itworx4me

    Itworx4me Premium Member Premium Member

    172
    18
    18
    Mar 14, 2017
    Ratings:
    +25
    Local Time:
    6:44 AM
    Nginx 1.17.X
    MariaDB 10.3.X
    Can you explain how to upgrade from 10.1 to 10.3 for people that are on 10.1 currently.

    Thanks
    Itworx4me
     
  3. eva2000

    eva2000 Administrator Staff Member

    40,190
    8,888
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +13,698
    Local Time:
    11:44 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    If you have a spare test VPS/server, you can manually enable the 10.1 to 10.2 upgrade routine in 123.09beta01.

    On test VPS, you can enable Centmin Mod 123.09beta01's centmin.sh menu option 11 submenu option 6 to upgrade MariaDB 10.1.x branch to MariaDB 10.2.x branch by first setting in persistent config file at /etc/centminmod/custom_config.inc the variable BEFORE running centmin.sh
    Code (Text):
    ENABLE_MARIADBTENTWOUPGRADE='y'
    

    There's also a variable ENABLE_MARIADBTENTHREEUPGRADE='y' to enable MariaDB 10.2.x to 10.3.x upgrades which is only supported on CentOS 7.x for now due to reported issues with CentOS 6. Again do on test VPS/server only and not live production server as MariaDB 10.2 to 10.3 has had even less long term testing than MariaDB 10.1 to 10.2 process. If you run into problems, my only solution for you is to setup a new VPS/server and reinstall Centmin Mod and migrate your site data and MySQL data if intact (if not that restore from MySQL backups).
    Code (Text):
    ENABLE_MARIADBTENTHREEUPGRADE='y'
    


    Code (Text):
    --------------------------------------------------------
         Centmin Mod Menu 123.09beta01 centminmod.com
    --------------------------------------------------------
    1).  Centmin Install
    2).  Add Nginx vhost domain
    3).  NSD setup domain name DNS
    4).  Nginx Upgrade / Downgrade
    5).  PHP Upgrade / Downgrade
    6).  XCache Re-install
    7).  APC Cache Re-install
    8).  XCache Install
    9).  APC Cache Install
    10). Memcached Server Re-install
    11). MariaDB MySQL Upgrade & Management
    12). Zend OpCache Install/Re-install
    13). Install/Reinstall Redis PHP Extension
    14). SELinux disable
    15). Install/Reinstall ImagicK PHP Extension
    16). Change SSHD Port Number
    17). Multi-thread compression: pigz,pbzip2,lbzip2...
    18). Suhosin PHP Extension install
    19). Install FFMPEG and FFMPEG PHP Extension
    20). NSD Install/Re-Install
    21). Update - Nginx + PHP-FPM + Siege
    22). Add Wordpress Nginx vhost + Cache Plugin
    23). Update Centmin Mod Code Base
    24). Exit
    --------------------------------------------------------
    Enter option [ 1 - 24 ] 11
    --------------------------------------------------------
    

    Code (Text):
    --------------------------------------------------------
         MariaDB MySQL Upgrade & Management Sub-Menu
    --------------------------------------------------------
    0). Regenerate New MySQL Root User Password (local server)
    1). MariaDB 5.2.x Branch Upgrade Only
    2). MariaDB 5.2.x to MariaDB 5.5 YUM upgrade
    3). MariaDB 5.5 to MariaDB 10.x YUM upgrade
    4). MariaDB 5.5 to MariaDB 10.1.x YUM upgrade
    5). MariaDB 10.x to MariaDB 10.1.x YUM upgrade
    6). MariaDB 10.1.x to MariaDB 10.2.x YUM upgrade
    7). MariaDB 10.2.x to MariaDB 10.3.x YUM upgrade
    8). Back to Main menu
    --------------------------------------------------------
    Enter option [ 0 - 8 ] 6
    --------------------------------------------------------
    

    Code (Text):
    -------------------------------------------------------------------------------
     This script's MariaDB 10.2.x upgrade process is still in beta testing stages.
     So please test on a test server and not a live production server. But if you use
     on live server or if MySQL databases already exist, please back them up before
     running this upgrade script via mysqldump - instructions at:
     http://dev.mysql.com/doc/refman/5.6/en/mysqldump.html.
    
     ###################################################################
     ###          IMPORTANT MYSQLDUMP BACKUP BEFORE UPGRADE          ###
     ###        OR RISK DATA LOSS DUE TO MARIADB 10.2 Changes        ###
     ###################################################################
    
     For each DATABASENAME backup via mysqldump i.e.
    
      mysqldump --opt --routines DATABASENAME > /path/to/DATABASENAME_backup.sql
    ------------------------------------------------------------------------
    
    Have you backed up your databases ? [y/n] y
    
    MariaDB 10.2.x https://mariadb.com/kb/en/mariadb/what-is-mariadb-102/
    
    !!  Note  !!
    upgrade process can take more >5 minutes.. you may want to shutdown
    nginx server to not show mysql errors to visitors on your site or
    put site(s) into maintenance mode before proceeding with mysql upgrade
    
    Do you want to continue with upgrade to MariaDB 10.2.x ? [y/n] y
    

    Code (Text):
    *************************************************
    * Adjust old MariaDB 10.x /etc/my.cnf
      for MariaDB 10.2.x my.cnf compatibility
    *************************************************
        __  __               _         ____   ____    _   ___     ____
       |  \/  |  __ _  _ __ (_)  __ _ |  _ \ | __ )  / | / _ \   |___ \    __  __
       | |\/| | / _` || '__|| | / _` || | | ||  _ \  | || | | |    __) |   \ \/ /
       | |  | || (_| || |   | || (_| || |_| || |_) | | || |_| |_  / __/  _  >  <
       |_|  |_| \__,_||_|   |_| \__,_||____/ |____/  |_| \___/(_)|_____|(_)/_/\_\
                                                                 
                __     _            __                                  __
               / /___ | |_  ___    / /_ __ ___   _   _     ___  _ __   / _|
              / // _ \| __|/ __|  / /| '_ ` _ \ | | | |   / __|| '_ \ | |_
             / /|  __/| |_| (__  / / | | | | | || |_| | _| (__ | | | ||  _|
            /_/  \___| \__|\___|/_/  |_| |_| |_| \__, |(_)\___||_| |_||_|
                                                 |___/     
             _        _   _              _                            _
            / \    __| | (_) _   _  ___ | |_  _ __ ___    ___  _ __  | |_  ___
           / _ \  / _` | | || | | |/ __|| __|| '_ ` _ \  / _ \| '_ \ | __|/ __|
          / ___ \| (_| | | || |_| |\__ \| |_ | | | | | ||  __/| | | || |_ \__ \
         /_/   \_\\__,_|_/ | \__,_||___/ \__||_| |_| |_| \___||_| |_| \__||___/
                       |__/                                   
    

    Code (Text):
    mysql -t -e "SHOW PLUGINS;"
    +-------------------------------+----------+--------------------+------------------------+---------+
    | Name                          | Status   | Type               | Library                | License |
    +-------------------------------+----------+--------------------+------------------------+---------+
    | binlog                        | ACTIVE   | STORAGE ENGINE     | NULL                   | GPL     |
    | mysql_native_password         | ACTIVE   | AUTHENTICATION     | NULL                   | GPL     |
    | mysql_old_password            | ACTIVE   | AUTHENTICATION     | NULL                   | GPL     |
    | wsrep                         | ACTIVE   | STORAGE ENGINE     | NULL                   | GPL     |
    | MRG_MyISAM                    | ACTIVE   | STORAGE ENGINE     | NULL                   | GPL     |
    | MEMORY                        | ACTIVE   | STORAGE ENGINE     | NULL                   | GPL     |
    | CSV                           | ACTIVE   | STORAGE ENGINE     | NULL                   | GPL     |
    | MyISAM                        | ACTIVE   | STORAGE ENGINE     | NULL                   | GPL     |
    | CLIENT_STATISTICS             | ACTIVE   | INFORMATION SCHEMA | NULL                   | GPL     |
    | INDEX_STATISTICS              | ACTIVE   | INFORMATION SCHEMA | NULL                   | GPL     |
    | TABLE_STATISTICS              | ACTIVE   | INFORMATION SCHEMA | NULL                   | GPL     |
    | USER_STATISTICS               | ACTIVE   | INFORMATION SCHEMA | NULL                   | GPL     |
    | PERFORMANCE_SCHEMA            | ACTIVE   | STORAGE ENGINE     | NULL                   | GPL     |
    | InnoDB                        | ACTIVE   | STORAGE ENGINE     | NULL                   | GPL     |
    | INNODB_TRX                    | ACTIVE   | INFORMATION SCHEMA | NULL                   | GPL     |
    | INNODB_LOCKS                  | ACTIVE   | INFORMATION SCHEMA | NULL                   | GPL     |
    | INNODB_LOCK_WAITS             | ACTIVE   | INFORMATION SCHEMA | NULL                   | GPL     |
    | INNODB_CMP                    | ACTIVE   | INFORMATION SCHEMA | NULL                   | GPL     |
    | INNODB_CMP_RESET              | ACTIVE   | INFORMATION SCHEMA | NULL                   | GPL     |
    | INNODB_CMPMEM                 | ACTIVE   | INFORMATION SCHEMA | NULL                   | GPL     |
    | INNODB_CMPMEM_RESET           | ACTIVE   | INFORMATION SCHEMA | NULL                   | GPL     |
    | INNODB_CMP_PER_INDEX          | ACTIVE   | INFORMATION SCHEMA | NULL                   | GPL     |
    | INNODB_CMP_PER_INDEX_RESET    | ACTIVE   | INFORMATION SCHEMA | NULL                   | GPL     |
    | INNODB_BUFFER_PAGE            | ACTIVE   | INFORMATION SCHEMA | NULL                   | GPL     |
    | INNODB_BUFFER_PAGE_LRU        | ACTIVE   | INFORMATION SCHEMA | NULL                   | GPL     |
    | INNODB_BUFFER_POOL_STATS      | ACTIVE   | INFORMATION SCHEMA | NULL                   | GPL     |
    | INNODB_METRICS                | ACTIVE   | INFORMATION SCHEMA | NULL                   | GPL     |
    | INNODB_FT_DEFAULT_STOPWORD    | ACTIVE   | INFORMATION SCHEMA | NULL                   | GPL     |
    | INNODB_FT_DELETED             | ACTIVE   | INFORMATION SCHEMA | NULL                   | GPL     |
    | INNODB_FT_BEING_DELETED       | ACTIVE   | INFORMATION SCHEMA | NULL                   | GPL     |
    | INNODB_FT_CONFIG              | ACTIVE   | INFORMATION SCHEMA | NULL                   | GPL     |
    | INNODB_FT_INDEX_CACHE         | ACTIVE   | INFORMATION SCHEMA | NULL                   | GPL     |
    | INNODB_FT_INDEX_TABLE         | ACTIVE   | INFORMATION SCHEMA | NULL                   | GPL     |
    | INNODB_SYS_TABLES             | ACTIVE   | INFORMATION SCHEMA | NULL                   | GPL     |
    | INNODB_SYS_TABLESTATS         | ACTIVE   | INFORMATION SCHEMA | NULL                   | GPL     |
    | INNODB_SYS_INDEXES            | ACTIVE   | INFORMATION SCHEMA | NULL                   | GPL     |
    | INNODB_SYS_COLUMNS            | ACTIVE   | INFORMATION SCHEMA | NULL                   | GPL     |
    | INNODB_SYS_FIELDS             | ACTIVE   | INFORMATION SCHEMA | NULL                   | GPL     |
    | INNODB_SYS_FOREIGN            | ACTIVE   | INFORMATION SCHEMA | NULL                   | GPL     |
    | INNODB_SYS_FOREIGN_COLS       | ACTIVE   | INFORMATION SCHEMA | NULL                   | GPL     |
    | INNODB_SYS_TABLESPACES        | ACTIVE   | INFORMATION SCHEMA | NULL                   | GPL     |
    | INNODB_SYS_DATAFILES          | ACTIVE   | INFORMATION SCHEMA | NULL                   | GPL     |
    | INNODB_SYS_VIRTUAL            | ACTIVE   | INFORMATION SCHEMA | NULL                   | GPL     |
    | INNODB_MUTEXES                | ACTIVE   | INFORMATION SCHEMA | NULL                   | GPL     |
    | INNODB_SYS_SEMAPHORE_WAITS    | ACTIVE   | INFORMATION SCHEMA | NULL                   | GPL     |
    | INNODB_TABLESPACES_ENCRYPTION | ACTIVE   | INFORMATION SCHEMA | NULL                   | BSD     |
    | INNODB_TABLESPACES_SCRUBBING  | ACTIVE   | INFORMATION SCHEMA | NULL                   | BSD     |
    | Aria                          | ACTIVE   | STORAGE ENGINE     | NULL                   | GPL     |
    | SEQUENCE                      | ACTIVE   | STORAGE ENGINE     | NULL                   | GPL     |
    | user_variables                | ACTIVE   | INFORMATION SCHEMA | NULL                   | GPL     |
    | FEEDBACK                      | DISABLED | INFORMATION SCHEMA | NULL                   | GPL     |
    | partition                     | ACTIVE   | STORAGE ENGINE     | NULL                   | GPL     |
    | METADATA_LOCK_INFO            | ACTIVE   | INFORMATION SCHEMA | metadata_lock_info.so  | GPL     |
    | QUERY_CACHE_INFO              | ACTIVE   | INFORMATION SCHEMA | query_cache_info.so    | BSD     |
    | QUERY_RESPONSE_TIME           | ACTIVE   | INFORMATION SCHEMA | query_response_time.so | GPL     |
    | QUERY_RESPONSE_TIME_AUDIT     | ACTIVE   | AUDIT              | query_response_time.so | GPL     |
    +-------------------------------+----------+--------------------+------------------------+---------+
    

    Code (Text):
    mysql -t -e "SHOW ENGINES;"
    +--------------------+---------+----------------------------------------------------------------------------------+--------------+------+------------+
    | Engine             | Support | Comment                                                                          | Transactions | XA   | Savepoints |
    +--------------------+---------+----------------------------------------------------------------------------------+--------------+------+------------+
    | CSV                | YES     | CSV storage engine                                                               | NO           | NO   | NO         |
    | MRG_MyISAM         | YES     | Collection of identical MyISAM tables                                            | NO           | NO   | NO         |
    | MyISAM             | YES     | MyISAM storage engine                                                            | NO           | NO   | NO         |
    | SEQUENCE           | YES     | Generated tables filled with sequential values                                   | YES          | NO   | YES        |
    | PERFORMANCE_SCHEMA | YES     | Performance Schema                                                               | NO           | NO   | NO         |
    | MEMORY             | YES     | Hash based, stored in memory, useful for temporary tables                        | NO           | NO   | NO         |
    | Aria               | YES     | Crash-safe tables with MyISAM heritage                                           | NO           | NO   | NO         |
    | InnoDB             | DEFAULT | Supports transactions, row-level locking, foreign keys and encryption for tables | YES          | YES  | YES        |
    +--------------------+---------+----------------------------------------------------------------------------------+--------------+------+------------+
    

    Code (Text):
    mysqladmin  Ver 9.1 Distrib 10.2.13-MariaDB, for Linux on x86_64
    Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
    
    Server version          10.2.13-MariaDB
    Protocol version        10
    Connection              Localhost via UNIX socket
    UNIX socket             /var/lib/mysql/mysql.sock
    Uptime:                 0 sec
    
    Threads: 4  Questions: 1  Slow queries: 0  Opens: 17  Flush tables: 1  Open tables: 11  Queries per second avg: 0.000
    
    ------------------------------------------------
    MariaDB 10.2.x Upgrade completed
    ------------------------------------------------
    

    Then future MariaDB 10.2.x branch updates are done via yum
    Code (Text):
    yum upgrade MariaDB-client MariaDB-common MariaDB-compat MariaDB-devel MariaDB-server MariaDB-shared
    


    Upgrade MariaDB 10.1 To 10.2 & 10.2 To 10.3 Differences



    MariaDB 10.1 to 10.2 has changes you need to be aware of which may affect your script/mysql using app specifically and Centmin Mod may not have tested for it so read Upgrading from MariaDB 10.1 to MariaDB 10.2 (centmin.sh menu option 11 takes care of step 1 to 8 with exception of step 4, you need to do MySQL backups yourself) and inspect /etc/my.cnf before and after MariaDB 10.2 upgrades. Centmin Mod upgrade routines try to as best adjust /etc/my.cnf for MariaDB 10.2 compatibility with previous MariaDB 10.1 but if your web app/scripts have issues, you'll need to figure those out yourself.

    Same goes for MariaDB 10.2 to 10.3 upgrades Upgrading from MariaDB 10.2 to MariaDB 10.3 (centmin.sh menu option 11 takes care of step 1 to 8 with exception of step 4, you need to do MySQL backups yourself)

    One of the big changes is from MariaDB 10.2.2 and newer, innodb_strict_mode is enabled by default while previously it was disabled by default and default options for sql_mode have changed.

    Install MariaDB 10.3 By Default



    Centmin Mod 123.09beta01 and newer also has experimental and optional choice of installing MariaDB 10.3 as default version. See details at Beta Branch - allow MariaDB 10.3 MySQL to be default optionally. Again test on test VPS/server and not live production site servers.
     
    • Like Like x 1
  4. Itworx4me

    Itworx4me Premium Member Premium Member

    172
    18
    18
    Mar 14, 2017
    Ratings:
    +25
    Local Time:
    6:44 AM
    Nginx 1.17.X
    MariaDB 10.3.X
    So you're advising not to upgrade from 10.1 to 10.3 on a production server?

    Thanks,
    Itworx4me
     
  5. eva2000

    eva2000 Administrator Staff Member

    40,190
    8,888
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +13,698
    Local Time:
    11:44 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    I'd try on test copy/server with a copy of your data if you want to be 100% safe and also have full database backups before hand when do you do it on live production servers.
     
    • Like Like x 1
  6. Itworx4me

    Itworx4me Premium Member Premium Member

    172
    18
    18
    Mar 14, 2017
    Ratings:
    +25
    Local Time:
    6:44 AM
    Nginx 1.17.X
    MariaDB 10.3.X
    Upgraded to 10.3 today. Everything went well I think.... Are there any checks that can be done to ensure the upgrade went smooth?

    Thanks,
    Itworx4me
     
  7. eva2000

    eva2000 Administrator Staff Member

    40,190
    8,888
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +13,698
    Local Time:
    11:44 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
..