Learn about Centmin Mod LEMP Stack today
Register Now

Beta Branch add LOWMEM_INSTALL variable support in 123.09beta01

Discussion in 'Centmin Mod Github Commits' started by eva2000, Mar 17, 2017.

  1. eva2000

    eva2000 Administrator Staff Member

    49,889
    11,489
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +17,848
    Local Time:
    6:23 AM
    Nginx 1.21.x
    MariaDB 10.x
    add LOWMEM_INSTALL variable support in 123.09beta01


    When set to LOWMEM_INSTALL='y' in persistent config file /etc/centminmod/custom_config.inc which you create prior to initial Centmin Mod 123.09beta01 and higher installs, the option will disable certain Centmin Mod optimisations and nginx and php modules to speed up initial install and reduce the potential maximum memory footprint by disabling some nginx and php modules. LOWMEM_INSTALL='y' will override any relevant variable set in /etc/centminmod/custom_config.inc with ones set via /usr/local/src/centminmod/inc/lowmem.inc

    Continue reading...

    123.09beta01 branch
     
  2. eva2000

    eva2000 Administrator Staff Member

    49,889
    11,489
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +17,848
    Local Time:
    6:23 AM
    Nginx 1.21.x
    MariaDB 10.x
    LOWMEM_INSTALL='y' triggers the variables set in /usr/local/src/centminmod/inc/lowmem.inc which include

    Code (Text):
        ISLOWMEM='131072'
        CLANG='y'
        CLANG_PHP='y'
        GCCINTEL_PHP='n'
        PHP_PGO='n'
        PHP_PGO_CENTOSSIX='n'
        DEVTOOLSETSIX='n'
        NGINX_DEVTOOLSETGCC='n'
        GENERAL_DEVTOOLSETGCC='n'
        CRYPTO_DEVTOOLSETGCC='n'
        NGINXPATCH='n'
        NGINX_GEOIPMEM='n'           # Nginx caches GEOIP databases in memory (default), setting 'n' caches to disk instead
        NGINX_SECURELINK='n'
        NGINX_FANCYINDEX='n'
        NGINX_VHOSTSTATS='n'
        NGINX_LIBBROTLI='n'
        NGINX_PAGESPEED='n'
        NGINX_HTTPREDIS='n'
        ORESTY_LUANGINX='n'
        PHPFINFO='n'
        PHPMAILPARSE='n'
        LIBRESSL_SWITCH='y'
        PHP_FTPEXT='n'
        NSD_INSTALL='n'
     
    Last edited: Mar 17, 2017
  3. eva2000

    eva2000 Administrator Staff Member

    49,889
    11,489
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +17,848
    Local Time:
    6:23 AM
    Nginx 1.21.x
    MariaDB 10.x
    So to install Centmin Mod 123.09beta01 with this option on fresh CentOS OS system for the first time

    step 1. create /etc/centminmod/custom_config.inc and add LOWMEM_INSTALL='y' variable.
    Code (Text):
    mkdir -p /etc/centminmod
    echo "LOWMEM_INSTALL='y'" > /etc/centminmod/custom_config.inc
    

    step 2. run centmin mod 123.09beta01 curl installer

    either standard betainstaller.sh
    Code (Text):
    yum -y update; curl -O https://centminmod.com/betainstaller.sh && chmod 0700 betainstaller.sh && bash betainstaller.sh
    

    or minimal betainstaller-minimal.sh (outlined here)
    Code (Text):
    yum -y update; curl -O https://centminmod.com/betainstaller-minimal.sh && chmod 0700 betainstaller-minimal.sh && bash betainstaller-minimal.sh
    


    betainstaller-minimal.sh also sets in persistent config /etc/centminmod/custom_config.inc the following
    Code (Text):
    NSD_DISABLED=y               # when set to =y, NSD disabled by default with chkconfig off
    NGINX_RTMP=n                 # Nginx RTMP Module support https://github.com/arut/nginx-rtmp-module
    NGINX_FLV=n                  # http://nginx.org/en/docs/http/ngx_http_flv_module.html
    NGINX_MP4=n                  # Nginx MP4 Module http://nginx.org/en/docs/http/ngx_http_mp4_module.html
    NGINX_AUTHREQ=n              # http://nginx.org/en/docs/http/ngx_http_auth_request_module.html
    NGINX_SECURELINK=n           # http://nginx.org/en/docs/http/ngx_http_secure_link_module.html
    NGINX_FANCYINDEX=n           # http://wiki.nginx.org/NgxFancyIndex
    NGINX_VHOSTSTATS=n           # https://github.com/vozlt/nginx-module-vts
    NGINX_PAGESPEED=n            # Install ngx_pagespeed
    NGINX_PASSENGER='n'          # Install Phusion Passenger requires installing addons/passenger.sh before hand
    NGINX_WEBDAV=n               # Nginx WebDAV and nginx-dav-ext-module
    NGINX_UPSTREAMCHECK='n'      # nginx upstream check https://github.com/yaoweibin/nginx_upstream_check_module
    NGINX_OPENRESTY='n'          # Agentzh's openresty Nginx modules
    LUAJIT_GITINSTALL='n'        # opt to install luajit 2.1 from dev branch http://repo.or.cz/w/luajit-2.0.git/shortlog/refs/heads/v2.1
    ORESTY_LUANGINX='n'          # enable or disable or ORESTY_LUA* nginx modules below
    NGINX_STUBSTATUS=y           # http://nginx.org/en/docs/http/ngx_http_stub_status_module.html required for nginx statistics
    NGINX_SUB=n                  # http://nginx.org/en/docs/http/ngx_http_sub_module.html
    NGINX_ADDITION=n             # http://nginx.org/en/docs/http/ngx_http_addition_module.html
    NGINX_IMAGEFILTER=n          # http://nginx.org/en/docs/http/ngx_http_image_filter_module.html
    NGINX_CACHEPURGE=y           # https://github.com/FRiCKLE/ngx_cache_purge/
    NGINX_ACCESSKEY=n            #
    NGINX_HTTPCONCAT=n           # https://github.com/alibaba/nginx-http-concat
    NGINX_THREADS=y              # https://www.nginx.com/blog/thread-pools-boost-performance-9x/
    ORESTY_HEADERSMORE=y         # openresty headers more https://github.com/openresty/headers-more-nginx-module
    
     
    Last edited: Mar 17, 2017
  4. eva2000

    eva2000 Administrator Staff Member

    49,889
    11,489
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +17,848
    Local Time:
    6:23 AM
    Nginx 1.21.x
    MariaDB 10.x
    Just tried betainstaller-minimal with LOWMEM_INSTALL='y' set on 128MB CentOS 6 32bit OpenVZ with 128MB VSWAP and looks like it fails install at pcre 8.40 custom compile for wget 1.19.1 install :(

    compiler bailed out with gcc out of memory condition
    Code (Text):
      CC       pcretest-pcretest.o
      CC       pcretest-pcre_printint.o
      CC       pcretest-pcre16_printint.o
      CC       pcretest-pcre32_printint.o
      CC       pcregrep-pcregrep.o
      CC       pcre_jit_test-pcre_jit_test.o
      CXX      pcrecpp_unittest-pcrecpp_unittest.o
      CXX      pcre_scanner_unittest-pcre_scanner_unittest.o
      CXX      pcre_stringpiece_unittest-pcre_stringpiece_unittest.o
    gcc: Internal error: Killed (program cc1)
    Please submit a full bug report.
    See <http://bugzilla.redhat.com/bugzilla> for instructions.
    make[1]: *** [libpcre16_la-pcre16_compile.lo] Error 1
    make[1]: *** Waiting for unfinished jobs....
    

    probably need 128MB VPS with at least 256-512MB swap heh.

    if i skip custom wget 1.19.1 install on the system can get much further into betainstaller-minimal.sh based install but falls over php compile stage - again out of memory o 128MB VPS
    Code (Text):
    386-redhat-linux-gnu
    Thread model: posix
    clang: note: diagnostic msg: PLEASE submit a bug report to http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and associated run script.
    clang: note: diagnostic msg:
    ********************
    
    PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
    Preprocessed source(s) and associated run script(s) are located at:
    clang: note: diagnostic msg: /tmp/sqlite3-113361.c
    clang: note: diagnostic msg: /tmp/sqlite3-113361.sh
    clang: note: diagnostic msg:
    
    ********************
    make: *** [ext/sqlite3/libsqlite/sqlite3.lo] Error 1
    
    real    3m1.693s
    user    2m41.102s
    sys     0m5.581s
    


    edit: ah i see what's happening, betainstaller-minimal.sh inserted /etc/centminmod/custom_config.inc settings override and wiped out LOWMEM_INSTALL='y' set variable in /etc/centminmod/custom_config.inc prior !
     
    Last edited: Mar 17, 2017
  5. Benjamin74

    Benjamin74 Member

    64
    6
    8
    May 2, 2016
    Ratings:
    +14
    Local Time:
    10:23 PM
    I just tried on a RamNode 128MB / 64 MB swap.

    Despite setting the flag:

    LOWMEM_INSTALL='y'

    The standard beta curl installer:
    yum -y update; curl -O https://centminmod.com/betainstaller.sh && chmod 0700 betainstaller.sh && bash betainstaller.sh

    triggers a :

    Warning: physically installed memory too low for Centmin Mod
    Installation [Installed: 128 MB < 256 MB (recommended minimum)]

    aborting install...

    Weirdly after the install fails, the file : /etc/centminmod/custom_config.inc contains the flag LOWMEM_INSTALL='y' twice (?)

    => Good news, the minimal installed OK (still have to test bit at least the install got to an end and seems fine!)
     
  6. eva2000

    eva2000 Administrator Staff Member

    49,889
    11,489
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +17,848
    Local Time:
    6:23 AM
    Nginx 1.21.x
    MariaDB 10.x
    So did it abort or just say it was aborting but continued to install successfully ? Or you used betainstaller-minimal.sh instead after regular betainstaller.sh failed ?

    Troubleshooting Initial Install



    To troubleshoot initial installation, you need to check the initial install log at /root/centminlogs and instructions under Sharing logs and errors heading for using Pastebin.com or Gists to share a sanitised version of the contents of the initial install log. You can see full details at How to troubleshoot Centmin Mod initial install issues

    Example list /root/centminlogs files in date ascending order and grep for install.log
    Code (Text):
    ls -lahrt /root/centminlogs | grep install.log
    

    example output returns install log at /root/centminlogs/centminmod_1.2.3-eva2000.09.001_111016-112321_install.log
    Code (Text):
    ls -lahrt /root/centminlogs | grep install.log
    -rw-r--r--  1 root root 2.2M Oct 11 01:40 centminmod_1.2.3-eva2000.09.001_111016-112321_install.log
    

    in SSH use cat to ouput contents of /root/centminlogs/centminmod_1.2.3-eva2000.09.001_111016-112321_install.log. Clear your SSH client window/buffer so only output is the contents of the file
    Code (Text):
    cat /root/centminlogs/centminmod_1.2.3-eva2000.09.001_111016-112321_install.log
    

    Then copy and paste into Pastebin.com or Gists entry. If your SSH window scroll buffer isn't that large to get the whole contents of the install log, you can download file manually and copy and paste contents. But makes sure it's sanitised version of the contents of the initial install log as outlined at How to troubleshoot Centmin Mod initial install issues
     
  7. eva2000

    eva2000 Administrator Staff Member

    49,889
    11,489
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +17,848
    Local Time:
    6:23 AM
    Nginx 1.21.x
    MariaDB 10.x
    did you rub betainstaller-minimal.sh right after failed betainstaller.sh run ? that would probably be why as betainstaller-minimal.sh inserts LOWMEM_INSTALL='y' into persistent config file /etc/centminmod/custom_config.inc

    just updated 123.09beta01 for betainstaller.sh and LOWMEM_INSTALL='y' possible fix for the premature aborting