Join the community today
Register Now

Nginx unable to install brotli

Discussion in 'Install & Upgrades or Pre-Install Questions' started by narji, Oct 18, 2016.

  1. eva2000

    eva2000 Administrator Staff Member

    44,693
    10,193
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,794
    Local Time:
    7:40 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    the nginx module order looks more correct for 123.09beta01 but it's not detecting NGXDYNAMIC_BROTLI='y' and NGINX_LIBBROTLI='y' settings from /etc/centminmod/custom_config.inc


    post the nginx_upgrade.log for this run as well
     
  2. narji

    narji Member

    69
    6
    8
    Feb 4, 2016
    Ratings:
    +12
    Local Time:
    4:40 PM
  3. eva2000

    eva2000 Administrator Staff Member

    44,693
    10,193
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,794
    Local Time:
    7:40 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    what if you answer no to yum check and just yes to nginx upgrade ?
     
  4. narji

    narji Member

    69
    6
    8
    Feb 4, 2016
    Ratings:
    +12
    Local Time:
    4:40 PM
    without yum =n
    centmin upgrade nginx ,list 4

    Code:
    nginx -V
    nginx version: nginx/1.11.5
    built by gcc 4.8.5 20150623 (Red Hat 4.8.5-4) (GCC)
    built with LibreSSL 2.4.3
    TLS SNI support enabled
    configure arguments: --with-ld-opt='-lrt -ljemalloc -Wl,-z,relro -Wl,-rpath,/usr/local/lib' --with-cc-opt='-m64 -mtune=native -mfpmath=sse -g -O3 -fstack-protector-strong --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2' --sbin-path=/usr/local/sbin/nginx --conf-path=/usr/local/nginx/conf/nginx.conf --with-http_stub_status_module --with-http_secure_link_module --add-module=../nginx-module-vts --with-libatomic --with-http_gzip_static_module --with-http_sub_module --with-http_addition_module --with-http_image_filter_module=dynamic --with-http_geoip_module --with-stream_geoip_module --with-stream_realip_module --with-threads --with-stream=dynamic --with-stream_ssl_module --with-http_realip_module --add-dynamic-module=../ngx-fancyindex-0.4.0 --add-module=../ngx_cache_purge-2.3 --add-module=../ngx_devel_kit-0.3.0 --add-module=../set-misc-nginx-module-0.31 --add-module=../echo-nginx-module-0.60 --add-module=../redis2-nginx-module-0.13 --add-module=../ngx_http_redis-0.3.7 --add-module=../memc-nginx-module-0.17 --add-module=../srcache-nginx-module-0.31 --add-module=../headers-more-nginx-module-0.31 --with-pcre=../pcre-8.39 --with-pcre-jit --with-http_ssl_module --with-http_v2_module --with-openssl=../libressl-2.4.3
    gist github
     
  5. eva2000

    eva2000 Administrator Staff Member

    44,693
    10,193
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,794
    Local Time:
    7:40 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    k so still same problem it's not detecting NGXDYNAMIC_BROTLI='y' and NGINX_LIBBROTLI='y' settings from /etc/centminmod/custom_config.inc
     
  6. eva2000

    eva2000 Administrator Staff Member

    44,693
    10,193
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,794
    Local Time:
    7:40 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    one last thing you can try is directly editing /usr/local/src/centminmod/centmin.sh variables for these values (they will be overwritten the next time you update centmin mod via centmin.sh menu option 23) but you can use this to confirm if it's working directly instead of using persistent config file /etc/centminmod/custom_config.inc method which for you isn't detecting the variables

    Code (Text):
    NGXDYNAMIC_BROTLI='y'
    NGINX_LIBBROTLI='y'
    CLANG='n'
    NGINX_DEVTOOLSETGCC='y'
    GENERAL_DEVTOOLSETGCC='y'
    

    Then recompile nginx via centmin.sh menu option 4

    If that doesn't work then something is really funky with your centmin mod setup.

    You can try wiping the centmin mod local branch code at /usr/local/src/centminmod and reinstall 123.09beta01 branch code itself. This will overwrite any of the direct centmin.sh file edits above

    Just do a fresh Centmin Mod code replacement by wiping /usr/local/src/centminmod as outlined similar to update guide here for older than .07 releases.

    replace branchname with branchname with 123.09beta01 or branch number you intend to use
    Code (Text):
    branchname=123.09beta01
    cd /usr/local/src
    rm -rf centminmod*
    git clone -b ${branchname} --depth=1 https://github.com/centminmod/centminmod.git centminmod
    cd centminmod
    ./centmin.sh
     
  7. narji

    narji Member

    69
    6
    8
    Feb 4, 2016
    Ratings:
    +12
    Local Time:
    4:40 PM
    trying first method edit centmin.sh
    still no brotly module

    trying second method

    Code:
    branchname=123.09beta01
    cd /usr/local/src
    rm -rf centminmod*
    git clone -b ${branchname} --depth=1 https://github.com/centminmod/centminmod.git centminmod
    cd centminmod
    ./centmin.sh
    Code:
    nginx -V
    nginx version: nginx/1.11.5
    built by gcc 4.8.5 20150623 (Red Hat 4.8.5-4) (GCC)
    built with LibreSSL 2.4.3
    TLS SNI support enabled
    configure arguments: --with-ld-opt='-lrt -ljemalloc -Wl,-z,relro -Wl,-rpath,/usr/local/lib' --with-cc-opt='-m64 -mtune=native -mfpmath=sse -g -O3 -fstack-protector-strong --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2' --sbin-path=/usr/local/sbin/nginx --conf-path=/usr/local/nginx/conf/nginx.conf --with-http_stub_status_module --with-http_secure_link_module --add-module=../nginx-module-vts --with-libatomic --with-http_gzip_static_module --with-http_sub_module --with-http_addition_module --with-http_image_filter_module=dynamic --with-http_geoip_module --with-stream_geoip_module --with-stream_realip_module --with-threads --with-stream=dynamic --with-stream_ssl_module --with-http_realip_module --add-dynamic-module=../ngx-fancyindex-0.4.0 --add-module=../ngx_cache_purge-2.3 --add-module=../ngx_devel_kit-0.3.0 --add-module=../set-misc-nginx-module-0.31 --add-module=../echo-nginx-module-0.60 --add-module=../redis2-nginx-module-0.13 --add-module=../ngx_http_redis-0.3.7 --add-module=../memc-nginx-module-0.17 --add-module=../srcache-nginx-module-0.31 --add-module=../headers-more-nginx-module-0.31 --with-pcre=../pcre-8.39 --with-pcre-jit --with-http_ssl_module --with-http_v2_module --with-openssl=../libressl-2.4.3
    Code:
    /etc/centminmod/custom_config.inc
    #LETSENCRYPT_DETECT='y'
    # LibreSSL
    #LIBRESSL_SWITCH='y'        # if set to 'y' it overrides OpenSSL as the default static compiled option for Nginx server
    #LIBRESSL_VERSION='2.4.3'   # Use this version of LibreSSL http://www.libressl.org/
    #NGXMODULE_ALTORDER='y'
    #NGXDYNAMIC_BROTLI='y'
    #NGINX_LIBBROTLI='y'
    #CLANG='n'
    #PHP_PGO='y'
    #PHPPGO_INDEXPATH='/home/nginx/domains/keep.co.id/public/index.php'
    #NGINX_DEVTOOLSETGCC='y'
    #GENERAL_DEVTOOLSETGCC='y'
    LETSENCRYPT_DETECT='y'
    LIBRESSL_SWITCH='y'        # if set to 'y' it overrides OpenSSL as the default static compiled option for Nginx server
    NGXDYNAMIC_BROTLI='y'
    NGINX_LIBBROTLI='y'
    CLANG='n'
    PHP_PGO='y'
    NGINX_DEVTOOLSETGCC='y'
    GENERAL_DEVTOOLSETGCC='y'
    gist github

    still no luck for brotli module in nginx 1.11.5

    regards
     
    Last edited: Oct 18, 2016
  8. eva2000

    eva2000 Administrator Staff Member

    44,693
    10,193
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,794
    Local Time:
    7:40 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    wow that's twilight zone weird if directly editing centmin.sh doesn't even pick up the enabled ngx_brotli variables ! There's no code I can think of that would cause this !
     
  9. eva2000

    eva2000 Administrator Staff Member

    44,693
    10,193
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,794
    Local Time:
    7:40 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    may i ask how are you editing /etc/centminmod/custom_config.inc and /usr/local/src/centminmod/centmin.sh ? using nano or vim text linux editor in sshd ? or editing file locally and uploading to server via sftp ?
     
  10. narji

    narji Member

    69
    6
    8
    Feb 4, 2016
    Ratings:
    +12
    Local Time:
    4:40 PM
    trying to upgrade gcc
    yum install centos-release-scl
    Code:
    yum install centos-release-scl
    Loaded plugins: fastestmirror, priorities
    Loading mirror speeds from cached hostfile
     * base: repos.lax.quadranet.com
     * epel: mirrors.xmission.com
     * extras: mirrors.xmission.com
     * rpmforge: mirror.hmc.edu
     * updates: cosmos.illinois.edu
    227 packages excluded due to repository priority protections
    Resolving Dependencies
    --> Running transaction check
    ---> Package centos-release-scl.noarch 0:2-2.el7.centos will be installed
    --> Processing Dependency: centos-release-scl-rh for package: centos-release-scl-2-2.el7.centos.noarch
    --> Running transaction check
    ---> Package centos-release-scl-rh.noarch 0:2-2.el7.centos will be installed
    --> Finished Dependency Resolution
    
    Dependencies Resolved
    
    =============================================================================================================================================================
     Package                                       Arch                           Version                                   Repository                      Size
    =============================================================================================================================================================
    Installing:
     centos-release-scl                            noarch                         2-2.el7.centos                            extras                          12 k
    Installing for dependencies:
     centos-release-scl-rh                         noarch                         2-2.el7.centos                            extras                          12 k
    
    Transaction Summary
    =============================================================================================================================================================
    Install  1 Package (+1 Dependent package)
    
    Total download size: 24 k
    Installed size: 39 k
    Is this ok [y/d/N]: y
    Downloading packages:
    (1/2): centos-release-scl-2-2.el7.centos.noarch.rpm                                                                                   |  12 kB  00:00:00
    (2/2): centos-release-scl-rh-2-2.el7.centos.noarch.rpm                                                                                |  12 kB  00:00:00
    -------------------------------------------------------------------------------------------------------------------------------------------------------------
    Total                                                                                                                        112 kB/s |  24 kB  00:00:00
    Running transaction check
    Running transaction test
    Transaction test succeeded
    Running transaction
      Installing : centos-release-scl-rh-2-2.el7.centos.noarch                                                                                               1/2
      Installing : centos-release-scl-2-2.el7.centos.noarch                                                                                                  2/2
      Verifying  : centos-release-scl-rh-2-2.el7.centos.noarch                                                                                               1/2
      Verifying  : centos-release-scl-2-2.el7.centos.noarch                                                                                                  2/2
    
    Installed:
      centos-release-scl.noarch 0:2-2.el7.centos
    
    Dependency Installed:
      centos-release-scl-rh.noarch 0:2-2.el7.centos
    
    Complete!
    
    is there any code need to type in ssh to upgrade gcc ?
    when i try to typing
    sudo yum-config-manager --enable rhel-server-rhscl-7-rpms
    it included apache in list to install then i choose no canceling and abort install
     
  11. narji

    narji Member

    69
    6
    8
    Feb 4, 2016
    Ratings:
    +12
    Local Time:
    4:40 PM
    via sftp filezilla in windows then edit automaticly with notepad++
    when i save then auto upload back to centos 7 vps
     
  12. eva2000

    eva2000 Administrator Staff Member

    44,693
    10,193
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,794
    Local Time:
    7:40 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    don't need to do this centmin mod centmin.sh should auto detect and do this if required. so remove centos-release-scl as it is buggy and hangs on downloads. I use one from fedora copr instead of centos-release-scl.
    that could probably be the issue then - what's output in ssh for command
    Code (Text):
    ls- lah /etc/centminmod/custom_config.inc
    cat /etc/centminmod/custom_config.inc


    try directly editing the file in sshd via nano linux text editor - read up more about nano here and here

    so as root user in sshd client remove old /etc/centminmod/custom_config.inc
    Code (Text):
    rm /etc/centminmod/custom_config.inc

    then use nano text editor edit and create new /etc/centminmod/custom_config.inc
    Code (Text):
    nano /etc/centminmod/custom_config.inc
    

    enter the variables
    Code (Text):
    LETSENCRYPT_DETECT='y'
    LIBRESSL_SWITCH='y'
    NGXDYNAMIC_BROTLI='y'
    NGINX_LIBBROTLI='y'
    CLANG='n'
    PHP_PGO='y'
    NGINX_DEVTOOLSETGCC='y'
    GENERAL_DEVTOOLSETGCC='y'

    then save and exit nano using command hit
    Code (Text):
    CTRL+X

    when prompted to save answer 'y'

    then reset manually edited centmin.sh
    Code (Text):
    cd /usr/local/src/centminmod
    git stash
    git pull
    

    then try centmin.sh menu option 4

    it could be sftp uploaded has incorrect permissions or file doesn't register properly
     
  13. narji

    narji Member

    69
    6
    8
    Feb 4, 2016
    Ratings:
    +12
    Local Time:
    4:40 PM
    it working now
    Code:
    nginx -V
    nginx version: nginx/1.11.5
    built by gcc 4.9.2 20150212 (Red Hat 4.9.2-6) (GCC)
    built with LibreSSL 2.4.3
    TLS SNI support enabled
    configure arguments: --with-ld-opt='-lrt -ljemalloc -Wl,-z,relro -Wl,-rpath,/usr/local/lib' --with-cc-opt='-m64 -march=native -g -O3 -fstack-protector-strong --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wno-deprecated-declarations' --sbin-path=/usr/local/sbin/nginx --conf-path=/usr/local/nginx/conf/nginx.conf --with-http_stub_status_module --with-http_secure_link_module --add-module=../nginx-module-vts --with-libatomic --with-http_gzip_static_module --add-dynamic-module=../ngx_brotli --with-http_sub_module --with-http_addition_module --with-http_image_filter_module=dynamic --with-http_geoip_module --with-stream_geoip_module --with-stream_realip_module --with-threads --with-stream=dynamic --with-stream_ssl_module --with-http_realip_module --add-dynamic-module=../ngx-fancyindex-0.4.0 --add-module=../ngx_cache_purge-2.3 --add-module=../ngx_devel_kit-0.3.0 --add-module=../set-misc-nginx-module-0.31 --add-module=../echo-nginx-module-0.60 --add-module=../redis2-nginx-module-0.13 --add-module=../ngx_http_redis-0.3.7 --add-module=../memc-nginx-module-0.17 --add-module=../srcache-nginx-module-0.31 --add-module=../headers-more-nginx-module-0.31 --with-pcre=../pcre-8.39 --with-pcre-jit --with-http_ssl_module --with-http_v2_module --with-openssl=../libressl-2.4.3
    remove # in nginx.conf with nano
    include /usr/local/nginx/conf/brotli_inc.conf;
    nprestart

    do i need to run php upgrade again in centmin menu number 5 ?
    previously i already upgrade with php 7.0.12 but with gcc 4.8 not with gcc 4.9.2
     
  14. eva2000

    eva2000 Administrator Staff Member

    44,693
    10,193
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,794
    Local Time:
    7:40 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    Ah ha so it was the method in which you edited /etc/centminmod/custom_config.inc !

    so yes if you want to properly use GCC 4.9.2 for php compile, recompile via centmin.sh menu option 5 :)