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

Upgrade PHP-FPM Beta Branch Centmin Mod .09 beta branch Testing

Discussion in 'Beta release code' started by eva2000, Aug 12, 2015.

Tags:
  1. eva2000

    eva2000 Administrator Staff Member

    58,894
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    5:18 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    reversed part of these changes due to bug/incorrect variable seems not supported in [client] and [mysql] groups update my.cnf templates to default to utf8 instead of latin1 in 123.0… · centminmod/centminmod@f189cb1 · GitHub

    so change
    Code (Text):
    [client]
    socket=/var/lib/mysql/mysql.sock
    default-character-set=utf8
    
    [mysql]
    default-character-set=utf8

    to
    Code (Text):
    [client]
    socket=/var/lib/mysql/mysql.sock
    
    [mysql]
    

    and restart MariaDB mysql server

     
  2. eva2000

    eva2000 Administrator Staff Member

    58,894
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    5:18 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
  3. eva2000

    eva2000 Administrator Staff Member

    58,894
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    5:18 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
  4. eva2000

    eva2000 Administrator Staff Member

    58,894
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    5:18 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
  5. eva2000

    eva2000 Administrator Staff Member

    58,894
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    5:18 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
  6. eva2000

    eva2000 Administrator Staff Member

    58,894
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    5:18 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    Updated Centmin Mod 123.09beta01 nginx vhost generator to check for main hostname domain in 123.09beta01. Details here.

    prevent folks from accidentally creating a new nginx vhost that matches the main server hostname domain name vhost Nginx - [Solved] Problem adding .me vhost on beta branch | Centmin Mod Community

    example

    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 5.2/5.5 & 10.x Upgrade Sub-Menu
    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 ] 2
    --------------------------------------------------------
    

    Code (Text):
    ---------------------------------------------------------------
    Important Information
    ---------------------------------------------------------------
    
    You are about to create an Nginx vhost site account with/without
    HTTPS/SSL support. Details of this process are outlined on site
    at centminmod.com/nginx_domain_dns_setup.html. Also read the
    continually updated Getting Started Guide for Centmin Mod usage
    at centminmod.com/getstarted.html which covers the pure-ftpd
    ftp username that is auto generated with the Nginx vhost site.
    
    Do you want to continue with Nginx vhost site creation ? [y/n] y
    
    Enter vhost domain name to add (without www. prefix): centos7.localdomain
    

    Code (Text):
     Error: centos7.localdomain is already setup for server main hostname
     at /usr/local/nginx/conf/conf.d/virtual.conf
     It is important that main server hostname be setup correctly
    
     As per Getting Started Guide Step 1 centminmod.com/getstarted.html
     The server main hostname needs to be unique. So please setup
     the main server name vhost properly first as per Step 1 of guide.
    
     Aborting nginx vhost creation...
     
  7. eva2000

    eva2000 Administrator Staff Member

    58,894
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    5:18 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
  8. eva2000

    eva2000 Administrator Staff Member

    58,894
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    5:18 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+

    Varnish Cache 3.0 YUM Repo Updated to 4.1 YUM Repo



    Updated 123.09beta01's included Varnish Cache YUM repo from 3.0 to 4.1 version at Beta Branch - Update Varnish Cache 3.0 YUM repo to 4.1 YUM repo in 123.09beta01 | Centmin Mod Community

    For existing 123.09beta01 and older users prior to this update, you need to do a yum check to install the updated Varnish Cache 4.1 YUM repo. The yum checks are the 1st steps in centmin.sh menu option 4 and 5 runs for nginx and php recompiles/updates. You can run centmin.sh menu option 4 and when asked to do a yum check, answer yes so it installs any new YUM repos coded into Centmin Mod. Then just answer no when continuing to nginx upgrade/recompile.

    You can update Centmin Mod 123.09beta01 via centmin.sh menu option 23 submenu option 2 outlined at Upgrade Centmin Mod - CentminMod.com LEMP Nginx web stack for CentOS or just use git pull in /usr/local/src/centminmod

    example of git pull method of updating
    Code (Text):
    cmdir
    git stash
    git pull
    ./centmin.sh


    sample output
    Code (Text):
    [root@centos7 ~]# cmdir
    /usr/local/src/centminmod ~
    
    [root@centos7 centminmod]# git stash
    No local changes to save
    
     git pull
    Updating 497e0fa..4ad1156
    Fast-forward
     addons/acmetool.sh                | 170 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-------------------
     addons/mysqladmin_shell.sh        |  50 +++++++++++++++++++---
     centmin.sh                        |   2 +-
     config/mysql/my-mdb10-16gb.cnf    |   1 +
     config/mysql/my-mdb10-32gb.cnf    |   1 +
     config/mysql/my-mdb10-4gb.cnf     |   1 +
     config/mysql/my-mdb10-64gb-8c.cnf |   1 +
     config/mysql/my-mdb10-64gb.cnf    |   1 +
     config/mysql/my-mdb10-8gb.cnf     |   1 +
     config/mysql/my-mdb10-min.cnf     |   1 +
     config/mysql/my-mdb10.cnf         |   1 +
     example/custom_config.inc         |   2 +-
     inc/downloadlinks.inc             |   8 ++--
     inc/nginx_addvhost.inc            | 159 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------
     inc/nginx_patch.inc               |  13 +++++-
     inc/nginx_upgrade.inc             |   4 ++
     inc/openssl_install.inc           |   9 ++++
     inc/phpsededit.inc                |  16 +++----
     inc/tcp.inc                       |   8 +++-
     inc/wpsetup.inc                   | 486 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-----------------------------------------------------
     inc/yumpriorities.inc             |  22 +++++-----
     tools/nginxupdate.sh              |   2 +-
     tools/nv.sh                       | 159 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------
     tools/nvwp.sh                     |  23 +++++++++-
     tools/setio.sh                    |  45 +++++++++++++++++++-
     25 files changed, 941 insertions(+), 245 deletions(-)

    so 24 files were changed / updated

    run centmin.sh menu option 4 (if using centmin.sh menu option 23, be sure to exist centmin.sh after update and re-enter /usr/local/src/centminmod to re-run centmin.sh menu option 4)
    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 5.2/5.5 & 10.x Upgrade Sub-Menu
    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 ] 4
    --------------------------------------------------------
    

    Code (Text):
    Do you want to run YUM install checks ?  [y/n]
    
    This will increase your upgrade duration time wise.
    Check the change log centminmod.com/changelog.html
    to see if any Nginx or PHP related new additions
    which require checking YUM prequisites are met.
    If no new additions made, you can skip the
    YUM install check to speed up upgrade time.
    
     [y/n]: 

    relevant part of the yum check output
    Code (Text):
    Error: varnish-4.1.el7.rpm not found !!! Downloading now......
    2016-09-24 16:44:32 URL:https://repo.varnish-cache.org/redhat/varnish-4.1.el7.rpm [7088/7088] -> "varnish-4.1.el7.rpm" [1]
    Download done.
    setting yum priorities for varnish-4.1.repo
    [varnish-4.1]
    name=Varnish Cache 4.1 for Enterprise Linux
    baseurl=https://repo.varnish-cache.org/redhat/varnish-4.1/el7/$basearch
    enabled=1
    gpgcheck=1
    *************************************************
    Fixing varnish-4.1.repo YUM Priorities
    *************************************************
    [varnish-4.1]
    name=Varnish Cache 4.1 for Enterprise Linux
    baseurl=https://repo.varnish-cache.org/redhat/varnish-4.1/el7/$basearch
    enabled=1
    gpgcheck=1
    priority=2
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-VARNISH
    

    List of all installed YUM repos on Centmin Mod
    Code (Text):
    yum repolist all -q
    

    varnish-4.1 and previously installed varnish-3.0 YUM repo is listed. varnish-3.0 yum repo is disabled by default while varnish 4.1 yum repo is enabled by default
    Code (Text):
    yum repolist all -q | grep varnish
    varnish-3.0/x86_64                   Varnish 3.0 for Enterp disabled
    varnish-4.1/x86_64                   Varnish Cache 4.1 for  enabled:          29
    

    available packages in varnish-4.1 yum repo only
    Code (Text):
    yum list available --disablerepo=* --enablerepo=varnish-4.1 -q
    Available Packages
    varnish.x86_64                     4.1.3-1.el7           varnish-4.1
    varnish-agent.x86_64               4.1.1-1.el7.centos    varnish-4.1
    varnish-agent-debuginfo.x86_64     4.1.1-1.el7.centos    varnish-4.1
    varnish-debuginfo.x86_64           4.1.3-1.el7           varnish-4.1
    varnish-docs.x86_64                4.1.3-1.el7           varnish-4.1
    varnish-libs.x86_64                4.1.3-1.el7           varnish-4.1
    varnish-libs-devel.x86_64          4.1.3-1.el7           varnish-4.1
    
     
  9. eva2000

    eva2000 Administrator Staff Member

    58,894
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    5:18 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
  10. eva2000

    eva2000 Administrator Staff Member

    58,894
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    5:18 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
  11. eva2000

    eva2000 Administrator Staff Member

    58,894
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    5:18 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+

    Added Profile Guided Optimizations To Boost PHP 7 Performance



    Updated latest Centmin Mod 123.09beta01 with optional support for Profile Guided Optimized PHP 7 only builds which boost PHP performance by between 3-17% for Wordpress, MediaWiki and Drupal like PHP web applications. However, due to PGO requiring to compile PHP twice, it will take longer to compile PHP 7. Details outlined here and on Intel's blog here.

    When you recompile/compile PHP 7 via centmin.sh menu option 5 with PHP_PGO='y' set in persistent config file /etc/centminmod/custom_config.inc, the ending text for PHP 7 compile will read.
    Code (Text):
    ***************************************************
    * PHP upgraded and auto reinstalled PHP extensions
    * PHP_PGO='y' detected. PHP compiled with Profile Guided Optimizations
    * https://software.intel.com/en-us/blogs/2015/10/09/pgo-let-it-go-php
    ***************************************************


    The php log would also display at make stage the following
    Code (Text):
                   ____   _   _  ____       __  __         _       
                  |  _ \ | | | ||  _ \  _  |  \/  |  __ _ | | __ ___
                  | |_) || |_| || |_) |(_) | |\/| | / _` || |/ // _ \
                  |  __/ |  _  ||  __/  _  | |  | || (_| ||   <|  __/
                  |_|    |_| |_||_|    (_) |_|  |_| \__,_||_|\_\\___|
                                                                    
    make -j11 prof-gen
    CCACHE_DISABLE=1 make PROF_FLAGS=-fprofile-generate all
    


    PGO PHP 7 training phase for Wordpress, MediaWiki and Drupal like PHP usage loads will auto generate a MySQL database called pgo_train for this training and will have repeated output similar to below during PHP 7 compilation with PHP_PGO='y' set.
    Code (Text):
    
                    -=- init Database(s) -=-
    Database pgo_train succesfully dropped
    Database pgo_train created succesfully
    Created tables in pgo_train
    
                    -=- Existing Databases -=-
    information_schema
    mysql
    performance_schema
    pgo_train
    Content-type: text/html; charset=UTF-8
    
    Hash benchmark module loaded!
    MySQL benchmark module loaded!
    Date benchmark module loaded!
    String benchmark module loaded!
    Standard benchmark module loaded!
    Class benchmark module loaded!
    
    --------------------------------
    -   Benchmark timing results   -
    --------------------------------
    1.run_hash                 0.055
    2.run_hash                 0.055
    3.run_hash                 0.055
    4.run_hash                 0.055
    --------------------------------
    1.run_mysql_queries        0.020
    2.run_mysql_queries        0.018
    3.run_mysql_queries        0.019
    4.run_mysql_queries        0.018
    --------------------------------
    1.run_time                 0.002
    2.run_time                 0.002
    3.run_time                 0.002
    4.run_time                 0.002
    --------------------------------
    1.run_string               0.012
    2.run_string               0.012
    3.run_string               0.012
    4.run_string               0.012
    --------------------------------
    1.run_standard             0.016
    2.run_standard             0.016
    3.run_standard             0.016
    4.run_standard             0.016
    --------------------------------
    1.run_class                0.001
    2.run_class                0.001
    3.run_class                0.001
    4.run_class                0.001
    --------------------------------
    Total                      0.418
    

    Also added support to define your own path to your PHP web app's index.php page for PGO training Beta Branch - update inc/php_upgrade.inc add PHPPGO_INDEXPATH variable support in 1… | Centmin Mod Community :)
     
    Last edited: Oct 1, 2016
  12. eva2000

    eva2000 Administrator Staff Member

    58,894
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    5:18 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
  13. eva2000

    eva2000 Administrator Staff Member

    58,894
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    5:18 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    Last edited: Oct 2, 2016
  14. eva2000

    eva2000 Administrator Staff Member

    58,894
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    5:18 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
  15. eva2000

    eva2000 Administrator Staff Member

    58,894
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    5:18 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    Updated 123.09beta01 to add LOCALCENTMINMOD_MIRROR variable support Beta Branch - add LOCALCENTMINMOD_MIRROR variable in 123.09beta01 | Centmin Mod Community

    When Centmin Mod downloads fail, in 123.09beta01 the key downloads have fallback mirrors housed on my centminmod.com domain's geodns cluster. But if the local centminmod.com mirrors have issues there would be no other options. This new LOCALCENTMINMOD_MIRROR variable allows you to change where the local centmin mod mirror is linked to.

    The default setting in centmin.sh is
    Code (Text):
    LOCALCENTMINMOD_MIRROR='https://centminmod.com'
    

    Now if you have issues you can set persistent config file at /etc/centminmod/custom_config.inc (create file if doesn't exist), and set in it the variable to override centmin.sh file set version
    Code (Text):
    LOCALCENTMINMOD_MIRROR='https://centmin.sh'
    

    the centmin.sh mirrors are backed by Cloudflare to my geodns based centminmod.com cluster origin so that Cloudflare can communicate with anyone of my 12+ geodns directed server clusters.
     
  16. eva2000

    eva2000 Administrator Staff Member

    58,894
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    5:18 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
  17. eva2000

    eva2000 Administrator Staff Member

    58,894
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    5:18 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
  18. eva2000

    eva2000 Administrator Staff Member

    58,894
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    5:18 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
  19. eva2000

    eva2000 Administrator Staff Member

    58,894
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    5:18 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
  20. eva2000

    eva2000 Administrator Staff Member

    58,894
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    5:18 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+