Learn about Centmin Mod LEMP Stack today
Become a Member

Beta Branch wget 1.20 default for 123.09beta01

Discussion in 'Centmin Mod Github Commits' started by eva2000, Dec 4, 2018.

Tags:
  1. eva2000

    eva2000 Administrator Staff Member

    39,216
    8,655
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +13,309
    Local Time:
    1:59 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
  2. Sunka

    Sunka Well-Known Member

    1,097
    297
    83
    Oct 31, 2015
    Rijeka, Croatia
    Ratings:
    +478
    Local Time:
    5:59 AM
    Nginx 1.15.8
    MariaDB 10.3.12
    Still can not upgrade
    Look here for upgrade error log
     
  3. eva2000

    eva2000 Administrator Staff Member

    39,216
    8,655
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +13,309
    Local Time:
    1:59 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    Seems to be the same error that you got for wget 1.19.5 too. Strange I haven't experienced this with wget 1.19.5 or 1.20 on my servers. For now as before to prevent the wget update prompt, set WGET_VERSION='1.19.4' in persistent config file /etc/centminmod/custom_config.inc for now.
    Code (Text):
    /svr-setup/wget-1.20/src/openssl.c:92: undefined reference to `RAND_egd'
    openssl.o: In function `ssl_init':
    /svr-setup/wget-1.20/src/openssl.c:207: undefined reference to `SSL_library_init'
    /svr-setup/wget-1.20/src/openssl.c:208: undefined reference to `SSL_load_error_strings'
    /svr-setup/wget-1.20/src/openssl.c:211: undefined reference to `OPENSSL_add_all_algorithms_noconf'
    /svr-setup/wget-1.20/src/openssl.c:212: undefined reference to `SSL_library_init'
    /svr-setup/wget-1.20/src/openssl.c:225: undefined reference to `SSLv3_client_method'
    /svr-setup/wget-1.20/src/openssl.c:231: undefined reference to `SSLv23_client_method'
    openssl.o: In function `ssl_connect_wget':
    /svr-setup/wget-1.20/src/openssl.c:650: undefined reference to `SSL_state'
    openssl.o: In function `ssl_check_certificate':
    /svr-setup/wget-1.20/src/openssl.c:918: undefined reference to `sk_num'
    /svr-setup/wget-1.20/src/openssl.c:922: undefined reference to `sk_value'
    /svr-setup/wget-1.20/src/openssl.c:963: undefined reference to `sk_pop_free'
    /svr-setup/wget-1.20/src/openssl.c:963: undefined reference to `sk_pop_free'
    /svr-setup/wget-1.20/src/openssl.c:963: undefined reference to `sk_pop_free'
    collect2: error: ld returned 1 exit status
    
     
  4. eva2000

    eva2000 Administrator Staff Member

    39,216
    8,655
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +13,309
    Local Time:
    1:59 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    @Sunka also what's contents of your persistent config file at /etc/centminmod/custom_config.inc ?
    Code (Text):
    cat /etc/centminmod/custom_config.inc
    
     
  5. eva2000

    eva2000 Administrator Staff Member

    39,216
    8,655
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +13,309
    Local Time:
    1:59 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
  6. Sunka

    Sunka Well-Known Member

    1,097
    297
    83
    Oct 31, 2015
    Rijeka, Croatia
    Ratings:
    +478
    Local Time:
    5:59 AM
    Nginx 1.15.8
    MariaDB 10.3.12

    Here it is:
    Code (Text):
    # cat /etc/centminmod/custom_config.inc
    NGINX_LIBBROTLI=y # Brotly extension
    NGXDYNAMIC_BROTLI=y # Brotly dynamic module extension
    PHP_MEMCACHE=n # memcache PHP extension
    PHP_MEMCACHED=n # memcached PHP extension
    PHP_PGO='y' # PGO Let It Go - Profile Guided Optimizations for PHP 7
    PHPPGO_INDEXPATH='/home/nginx/domains/pijanitvor.com/public/index.php' # path for PGO training
    AUDITD_ENABLE='y' # Auditd skripta
    RCLONE_ENABLE='y' # Rclone skripta
    NGINX_DEVTOOLSETGCC='y' # umjesto clang ide gcc kompilacija kod nginx
    #DEVTOOLSETEIGHT='y' # ide 8.x verzija gcc kompilacije umjesto defaultne 5.x ili 6.x ili 7.x
    CRYPTO_DEVTOOLSETGCC='y' # newer Intel GCC
    #NGINX_HPACK='y' # enabling HPACK for Nginx
    NGINX_DYNAMICTLS='y' # add Nginx Dynamic TLS Cloudflare Patch - http://bit.ly/2EYzhk7
    NGINXPATCH='y' # add Nginx Dynamic TLS Cloudflare Patch - http://bit.ly/2EYzhk7
    NGINX_GEOIPTWOLITE='y' # GeoIP2 Lite nginx module
    NGXDYNAMIC_GEOIPTWOLITE='y' # GeoIP2 Lite nginx module
    ENABLE_MARIADBTENTWOUPGRADE='y' # enabling upgrade MariaDB from 10.1.x to 10.2.x
    PHP_ARGON='y' # enabling argon for php 7.2.x, needed for xf 2.1 - delete for php 7.3
    WGET_VERSION='1.19.4'



    OK

    wget_source_install_051218-211913

    strace_wget_make_install and strace_wget_make are here for download at Megaupload:

     
  7. eva2000

    eva2000 Administrator Staff Member

    39,216
    8,655
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +13,309
    Local Time:
    1:59 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    Still not able to see fully where your problem is as wget should be compiled against system OpenSSL as intended and works for me on all my servers.

    You can try this

    1. in persistent config file remove entry for
    Code (Text):
    CRYPTO_DEVTOOLSETGCC
    

    2. if you have done yum updates and there is kernel update, reboot server
    3. run centmin.sh menu option 4 to recompile nginx without CRYPTO_DEVTOOLSETGCC flag
    4. run yum reinstall for openssl and openssl-devel system packages
    Code (Text):
    yum reinstall openssl openssl-devel
    

    5. run centmin.sh to trigger the wget update and see what happens
     
  8. Sunka

    Sunka Well-Known Member

    1,097
    297
    83
    Oct 31, 2015
    Rijeka, Croatia
    Ratings:
    +478
    Local Time:
    5:59 AM
    Nginx 1.15.8
    MariaDB 10.3.12
    same thing
    [Bash] [[email protected] ~]# yum reinstall openssl openssl-devel Loaded plugins: fastestmi - Pastebin.com
     
  9. ENF

    ENF New Member

    9
    4
    3
    May 9, 2016
    Tokyo, Japan
    Ratings:
    +4
    Local Time:
    12:59 PM
    1.15.7
    10
    I haven't had time to diagnosis this issue, but we have the same thing happening on one server.

    Code:
    --------------------------------------------------------
    wget -V
    GNU Wget 1.19.4 built on linux-gnu.
    
    -cares +digest -gpgme +https +ipv6 -iri +large-file -metalink +nls 
    +ntlm +opie -psl +ssl/openssl 
    
    Wgetrc: 
        /usr/local/etc/wgetrc (system)
    Locale: 
        /usr/local/share/locale 
    Compile: 
        ccache gcc -DHAVE_CONFIG_H -DSYSTEM_WGETRC="/usr/local/etc/wgetrc" 
        -DLOCALEDIR="/usr/local/share/locale" -I. -I../lib -I../lib -I 
        /usr/local/include -DHAVE_LIBSSL -DNDEBUG -O2 -g -pipe -Wall 
        -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong 
        --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic 
    Link: 
        ccache gcc -I /usr/local/include -DHAVE_LIBSSL -DNDEBUG -O2 -g 
        -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions 
        -fstack-protector-strong --param=ssp-buffer-size=4 
        -grecord-gcc-switches -m64 -mtune=generic -L /usr/local/lib -lpcre 
        -lssl -lcrypto -lz ftp-opie.o openssl.o http-ntlm.o ../lib/libgnu.a 
    
    Copyright (C) 2015 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later
    <http://www.gnu.org/licenses/gpl.html>.
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.
    
    Originally written by Hrvoje Niksic <[email protected]>.
    Please send bug reports and questions to <[email protected]>.
    --------------------------------------------------------
    wget 1.20 failed to update, still using system wget
    install log: /root/centminlogs/wget_source_install_141218-174703.log
    --------------------------------------------------------
    
    Total wget Install Time: 28.769028211 seconds
    --------------------------------------------------------
         Centmin Mod Menu 123.09beta01 centminmod.com     
    --------------------------------------------------------
    
    Sample Grab from log file:
    Code:
    /svr-setup/wget-1.20/src/openssl.c:92: undefined reference to `RAND_egd'
    openssl.o: In function `ssl_init':
    /svr-setup/wget-1.20/src/openssl.c:207: undefined reference to `SSL_library_init'
    /svr-setup/wget-1.20/src/openssl.c:208: undefined reference to `SSL_load_error_strings'
    /svr-setup/wget-1.20/src/openssl.c:211: undefined reference to `OPENSSL_add_all_algorithms_noconf'
    /svr-setup/wget-1.20/src/openssl.c:212: undefined reference to `SSL_library_init'
    /svr-setup/wget-1.20/src/openssl.c:225: undefined reference to `SSLv3_client_method'
    /svr-setup/wget-1.20/src/openssl.c:231: undefined reference to `SSLv23_client_method'
    openssl.o: In function `ssl_connect_wget':
    /svr-setup/wget-1.20/src/openssl.c:650: undefined reference to `SSL_state'
    openssl.o: In function `ssl_check_certificate':
    /svr-setup/wget-1.20/src/openssl.c:918: undefined reference to `sk_num'
    /svr-setup/wget-1.20/src/openssl.c:922: undefined reference to `sk_value'
    /svr-setup/wget-1.20/src/openssl.c:963: undefined reference to `sk_pop_free'
    /svr-setup/wget-1.20/src/openssl.c:963: undefined reference to `sk_pop_free'
    /svr-setup/wget-1.20/src/openssl.c:963: undefined reference to `sk_pop_free'
    collect2: error: ld returned 1 exit status
    make[2]: *** [wget] Error 1
    make[2]: Leaving directory `/svr-setup/wget-1.20/src'
    make[1]: *** [install-recursive] Error 1
    make[1]: Leaving directory `/svr-setup/wget-1.20'
    make: *** [install] Error 2
    
    
    Will have more time to circle back to this and take a deeper look.
     
    • Like Like x 1
  10. eva2000

    eva2000 Administrator Staff Member

    39,216
    8,655
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +13,309
    Local Time:
    1:59 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    interesting your problem is with 1.20 but fine with 1.19.4. While @Sunka problem is with 1.19.5 but fine with 1.19.4.

    @ENF which OS centos 6.10 or 7.5/7.6 ? who is web host and plan you're on ? can you provide the same info asked at Beta Branch - wget 1.19.5 default in 123.09beta01

    contents of persistent config file ?
    Code (Text):
    cat /etc/centminmod/custom_config.inc
    

    and output for
    Code (Text):
    updatedb
    locate libssl.so
    


    for now you can prevent the wget 1.20 update attempts by setting previous version that worked in persistent config file at /etc/centminmod/custom_config.inc
    Code (Text):
    WGET_VERSION='1.19.3'
    
     
    Last edited: Dec 15, 2018
  11. eva2000

    eva2000 Administrator Staff Member

    39,216
    8,655
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +13,309
    Local Time:
    1:59 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    also @ENF and @Sunka what's output for this command
    Code (Text):
    ls -lah /usr/local/lib
    

    example output
    Code (Text):
    ls -lah /usr/local/lib
    total 33M
    drwxr-xr-x.  5 root root 4.0K Aug 22 23:22 .
    drwxr-xr-x. 19 root root 4.0K Dec 12 13:14 ..
    -rw-r--r--   1 root root 2.1M Aug 22 23:01 libpcre16.a
    -rwxr-xr-x   1 root root  955 Aug 22 23:01 libpcre16.la
    lrwxrwxrwx   1 root root   19 Aug 22 23:01 libpcre16.so -> libpcre16.so.0.2.10
    lrwxrwxrwx   1 root root   19 Aug 22 23:01 libpcre16.so.0 -> libpcre16.so.0.2.10
    -rwxr-xr-x   1 root root 1.4M Aug 22 23:01 libpcre16.so.0.2.10
    -rw-r--r--   1 root root 2.1M Aug 22 23:01 libpcre32.a
    -rwxr-xr-x   1 root root  955 Aug 22 23:01 libpcre32.la
    lrwxrwxrwx   1 root root   19 Aug 22 23:01 libpcre32.so -> libpcre32.so.0.0.10
    lrwxrwxrwx   1 root root   19 Aug 22 23:01 libpcre32.so.0 -> libpcre32.so.0.0.10
    -rwxr-xr-x   1 root root 1.3M Aug 22 23:01 libpcre32.so.0.0.10
    -rw-r--r--   1 root root 2.2M Aug 22 23:01 libpcre.a
    -rw-r--r--   1 root root  46K Aug 22 23:01 libpcrecpp.a
    -rwxr-xr-x   1 root root  986 Aug 22 23:01 libpcrecpp.la
    lrwxrwxrwx   1 root root   19 Aug 22 23:01 libpcrecpp.so -> libpcrecpp.so.0.0.1
    lrwxrwxrwx   1 root root   19 Aug 22 23:01 libpcrecpp.so.0 -> libpcrecpp.so.0.0.1
    -rwxr-xr-x   1 root root  46K Aug 22 23:01 libpcrecpp.so.0.0.1
    -rwxr-xr-x   1 root root  941 Aug 22 23:01 libpcre.la
    -rw-r--r--   1 root root  24K Aug 22 23:01 libpcreposix.a
    -rwxr-xr-x   1 root root 1000 Aug 22 23:01 libpcreposix.la
    lrwxrwxrwx   1 root root   21 Aug 22 23:01 libpcreposix.so -> libpcreposix.so.0.0.6
    lrwxrwxrwx   1 root root   21 Aug 22 23:01 libpcreposix.so.0 -> libpcreposix.so.0.0.6
    -rwxr-xr-x   1 root root  23K Aug 22 23:01 libpcreposix.so.0.0.6
    lrwxrwxrwx   1 root root   17 Aug 22 23:01 libpcre.so -> libpcre.so.1.2.10
    lrwxrwxrwx   1 root root   17 Aug 22 23:01 libpcre.so.1 -> libpcre.so.1.2.10
    -rwxr-xr-x   1 root root 1.5M Aug 22 23:01 libpcre.so.1.2.10
    -rwxr-xr-x   1 root root  22M Aug 22 23:19 libphp5.so
    drwxr-xr-x  15 root root 4.0K Aug 22 23:19 php
    -rw-r--r--   1 root root  72K Aug 22 23:20 php.ini
    drwxr-xr-x   2 root root 4.0K Aug 22 23:01 pkgconfig
    drwxr-xr-x   4 root root 4.0K Aug 22 23:22 sproxy
    
     
  12. eva2000

    eva2000 Administrator Staff Member

    39,216
    8,655
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +13,309
    Local Time:
    1:59 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    also @ENF and @Sunka can you also try this manual edit to see if it fixes the problem by editing manually /usr/local/src/centminmod/addons/wget.sh at line 457 add the following 3 lines
    Code (Text):
        # ensure wget.sh installer utilises system openssl
        export OPENSSL_CFLAGS="-I /usr/include"
        export OPENSSL_LIBS="-L /usr/lib64 -lssl -lcrypto"
    

    so it looks like
    Code (Text):
        export PCRE_CFLAGS="-I /usr/local/include"
        export PCRE_LIBS="-L /usr/local/lib -lpcre"
        # ensure wget.sh installer utilises system openssl
        export OPENSSL_CFLAGS="-I /usr/include"
        export OPENSSL_LIBS="-L /usr/lib64 -lssl -lcrypto"
    

    the try re-running centmin.sh without any manually set WGET_VERSION variables persistent config file /etc/centminmod/custom_config.inc to retry wget update to 1.20

    i suspect if you had an old enough centmin mod 123.09beta01 install, at one stage you had openssl libs in /usr/local/lib which get picked up during wget compile instead of system openssl libs at /usr/lib64 for 64bit systems. This was fixed with new nginx recompiles via centmin.sh menu option 4 detecting such in /usr/local/lib and removing them. This was ages ago, so if you haven't updated nginx is months it could be a possibility.
     
    Last edited: Dec 15, 2018
  13. Sunka

    Sunka Well-Known Member

    1,097
    297
    83
    Oct 31, 2015
    Rijeka, Croatia
    Ratings:
    +478
    Local Time:
    5:59 AM
    Nginx 1.15.8
    MariaDB 10.3.12
    Here you go

    Code (Text):
    # ls -lah /usr/local/lib
    total 81M
    drwxr-xr-x.  5 root root 8.0K Dec  9 19:05 .
    drwxr-xr-x. 21 root root 4.0K Sep  2 03:14 ..
    lrwxrwxrwx   1 root root   20 Feb 20  2018 libbrotlicommon.so -> libbrotlicommon.so.1
    lrwxrwxrwx   1 root root   24 Apr 15  2018 libbrotlicommon.so.1 -> libbrotlicommon.so.1.0.4
    -rwxr-xr-x   1 root root 130K Dec  2  2017 libbrotlicommon.so.1.0.1
    -rwxr-xr-x   1 root root 130K Mar 20  2018 libbrotlicommon.so.1.0.2
    -rwxr-xr-x   1 root root 138K Dec  6 19:18 libbrotlicommon.so.1.0.4
    -rw-r--r--   1 root root 136K Dec  6 19:18 libbrotlicommon-static.a
    -rw-r--r--   1 root root 606K Jun 28  2017 libbrotlidec.a
    -rwxr-xr-x   1 root root  952 Jun 28  2017 libbrotlidec.la
    lrwxrwxrwx   1 root root   17 Feb 20  2018 libbrotlidec.so -> libbrotlidec.so.1
    lrwxrwxrwx   1 root root   21 Apr 15  2018 libbrotlidec.so.1 -> libbrotlidec.so.1.0.4
    -rwxr-xr-x   1 root root 338K Jun 28  2017 libbrotlidec.so.1.0.0
    -rwxr-xr-x   1 root root 238K Dec  2  2017 libbrotlidec.so.1.0.1
    -rwxr-xr-x   1 root root 238K Mar 20  2018 libbrotlidec.so.1.0.2
    -rwxr-xr-x   1 root root 239K Dec  6 19:18 libbrotlidec.so.1.0.4
    -rw-r--r--   1 root root 315K Dec  6 19:18 libbrotlidec-static.a
    -rw-r--r--   1 root root 4.0M Jun 28  2017 libbrotlienc.a
    -rwxr-xr-x   1 root root  956 Jun 28  2017 libbrotlienc.la
    lrwxrwxrwx   1 root root   17 Feb 20  2018 libbrotlienc.so -> libbrotlienc.so.1
    lrwxrwxrwx   1 root root   21 Apr 15  2018 libbrotlienc.so.1 -> libbrotlienc.so.1.0.4
    -rwxr-xr-x   1 root root 2.8M Jun 28  2017 libbrotlienc.so.1.0.0
    -rwxr-xr-x   1 root root 1.5M Dec  2  2017 libbrotlienc.so.1.0.1
    -rwxr-xr-x   1 root root 1.5M Mar 20  2018 libbrotlienc.so.1.0.2
    -rwxr-xr-x   1 root root 3.7M Dec  6 19:18 libbrotlienc.so.1.0.4
    -rw-r--r--   1 root root 4.1M Dec  6 19:18 libbrotlienc-static.a
    -rw-r--r--   1 root root 4.0M May  9  2018 libcrypto.a
    -rw-r--r--   1 root root 1.3M Oct  9 22:35 libgmp.a
    -rwxr-xr-x   1 root root  913 Oct  9 22:35 libgmp.la
    lrwxrwxrwx   1 root root   16 Oct  9 22:35 libgmp.so -> libgmp.so.10.3.2
    lrwxrwxrwx   1 root root   16 Oct  9 22:35 libgmp.so.10 -> libgmp.so.10.3.2
    -rwxr-xr-x   1 root root 516K Oct  9 22:35 libgmp.so.10.3.2
    -rw-r--r--   1 root root 107K Nov  2 17:27 liblz4.a
    lrwxrwxrwx   1 root root   15 Nov  2 17:27 liblz4.so -> liblz4.so.1.8.3
    lrwxrwxrwx   1 root root   15 Nov  2 17:27 liblz4.so.1 -> liblz4.so.1.8.3
    -rwxr-xr-x   1 root root  88K Nov  2 17:27 liblz4.so.1.8.3
    -rw-r--r--   1 root root  83K Nov  2 17:27 liblz.a
    -rw-r--r--   1 root root 176K May  9  2018 libmaxminddb.a
    -rwxr-xr-x   1 root root  956 May  9  2018 libmaxminddb.la
    lrwxrwxrwx   1 root root   21 May  9  2018 libmaxminddb.so -> libmaxminddb.so.0.0.7
    lrwxrwxrwx   1 root root   21 May  9  2018 libmaxminddb.so.0 -> libmaxminddb.so.0.0.7
    -rwxr-xr-x   1 root root  85K May  9  2018 libmaxminddb.so.0.0.7
    -rw-r--r--   1 root root 2.1M Nov 27 18:57 libpcre16.a
    -rwxr-xr-x   1 root root  955 Nov 27 18:57 libpcre16.la
    lrwxrwxrwx   1 root root   19 Nov 27 18:57 libpcre16.so -> libpcre16.so.0.2.10
    lrwxrwxrwx   1 root root   19 Nov 27 18:57 libpcre16.so.0 -> libpcre16.so.0.2.10
    -rwxr-xr-x   1 root root 1.4M Nov 27 18:57 libpcre16.so.0.2.10
    -rwxr-xr-x   1 root root 1.4M Nov 11  2016 libpcre16.so.0.2.7
    -rwxr-xr-x   1 root root 1.4M Feb 21  2017 libpcre16.so.0.2.8
    -rwxr-xr-x   1 root root 1.4M Oct 27  2017 libpcre16.so.0.2.9
    -rw-r--r--   1 root root 2.1M Nov 27 18:57 libpcre32.a
    -rwxr-xr-x   1 root root  955 Nov 27 18:57 libpcre32.la
    lrwxrwxrwx   1 root root   19 Nov 27 18:57 libpcre32.so -> libpcre32.so.0.0.10
    lrwxrwxrwx   1 root root   19 Nov 27 18:57 libpcre32.so.0 -> libpcre32.so.0.0.10
    -rwxr-xr-x   1 root root 1.3M Nov 27 18:57 libpcre32.so.0.0.10
    -rwxr-xr-x   1 root root 1.3M Nov 11  2016 libpcre32.so.0.0.7
    -rwxr-xr-x   1 root root 1.3M Feb 21  2017 libpcre32.so.0.0.8
    -rwxr-xr-x   1 root root 1.3M Oct 27  2017 libpcre32.so.0.0.9
    -rw-r--r--   1 root root 2.2M Nov 27 18:57 libpcre.a
    -rw-r--r--   1 root root  46K Nov 27 18:57 libpcrecpp.a
    -rwxr-xr-x   1 root root  986 Nov 27 18:57 libpcrecpp.la
    lrwxrwxrwx   1 root root   19 Nov 27 18:57 libpcrecpp.so -> libpcrecpp.so.0.0.1
    lrwxrwxrwx   1 root root   19 Nov 27 18:57 libpcrecpp.so.0 -> libpcrecpp.so.0.0.1
    -rwxr-xr-x   1 root root  46K Nov 27 18:57 libpcrecpp.so.0.0.1
    -rwxr-xr-x   1 root root  941 Nov 27 18:57 libpcre.la
    -rw-r--r--   1 root root  24K Nov 27 18:57 libpcreposix.a
    -rwxr-xr-x   1 root root 1000 Nov 27 18:57 libpcreposix.la
    lrwxrwxrwx   1 root root   21 Nov 27 18:57 libpcreposix.so -> libpcreposix.so.0.0.6
    lrwxrwxrwx   1 root root   21 Nov 27 18:57 libpcreposix.so.0 -> libpcreposix.so.0.0.6
    -rwxr-xr-x   1 root root  23K Feb 21  2017 libpcreposix.so.0.0.4
    -rwxr-xr-x   1 root root  23K Oct 27  2017 libpcreposix.so.0.0.5
    -rwxr-xr-x   1 root root  23K Nov 27 18:57 libpcreposix.so.0.0.6
    lrwxrwxrwx   1 root root   17 Nov 27 18:57 libpcre.so -> libpcre.so.1.2.10
    lrwxrwxrwx   1 root root   17 Nov 27 18:57 libpcre.so.1 -> libpcre.so.1.2.10
    -rwxr-xr-x   1 root root 1.5M Nov 27 18:57 libpcre.so.1.2.10
    -rwxr-xr-x   1 root root 1.5M Nov 11  2016 libpcre.so.1.2.7
    -rwxr-xr-x   1 root root 1.5M Feb 21  2017 libpcre.so.1.2.8
    -rwxr-xr-x   1 root root 1.5M Oct 27  2017 libpcre.so.1.2.9
    -rwxr-xr-x   1 root root  24M Dec  9 19:05 libphp7.so
    -rw-r--r--   1 root root 716K May  9  2018 libssl.a
    -rwxr-xr-x   1 root root  14K May  9  2018 libtap.a
    -rwxr-xr-x   1 root root  18K May  9  2018 libtap.so
    -rw-r--r--   1 root root 963K Nov  2 17:27 libzstd.a
    lrwxrwxrwx   1 root root   16 Nov  2 17:27 libzstd.so -> libzstd.so.1.3.7
    lrwxrwxrwx   1 root root   16 Nov  2 17:27 libzstd.so.1 -> libzstd.so.1.3.7
    -rwxr-xr-x   1 root root 806K Nov  2 17:27 libzstd.so.1.3.7
    drwxr-xr-x  15 root root 4.0K Jul  6  2017 php
    -rw-r--r--   1 root root  69K Dec  9 18:54 php.ini
    -rw-r--r--   1 root root  70K Feb  1  2018 php.ini-oldversion_010218-230038
    -rw-r--r--   1 root root  70K May  1  2017 php.ini-oldversion_010517-193727
    -rw-r--r--   1 root root  70K Aug  1  2017 php.ini-oldversion_010817-030451
    -rw-r--r--   1 root root  70K Sep  1  2017 php.ini-oldversion_010917-214520
    -rw-r--r--   1 root root  69K Nov  1 15:39 php.ini-oldversion_011118-153843
    -rw-r--r--   1 root root  70K Dec  1  2017 php.ini-oldversion_011217-210441
    -rw-r--r--   1 root root  69K Feb  2  2018 php.ini-oldversion_020218-214713
    -rw-r--r--   1 root root  69K Mar  2  2018 php.ini-oldversion_020318-002935
    -rw-r--r--   1 root root  70K Mar  4  2017 php.ini-oldversion_040317-021259
    -rw-r--r--   1 root root  70K Aug  4  2017 php.ini-oldversion_040817-015658
    -rw-r--r--   1 root root  70K Aug  4  2017 php.ini-oldversion_040817-021252
    -rw-r--r--   1 root root  70K Jan  5  2018 php.ini-oldversion_050118-011929
    -rw-r--r--   1 root root  69K Jul  5 22:33 php.ini-oldversion_050718-223300
    -rw-r--r--   1 root root  69K Aug  5 01:36 php.ini-oldversion_050818-013610
    -rw-r--r--   1 root root  70K Oct  5  2017 php.ini-oldversion_051017-163115
    -rw-r--r--   1 root root  69K Dec  5  2016 php.ini-oldversion_051216-034621
    -rw-r--r--   1 root root  69K Dec  5 22:26 php.ini-oldversion_051218-222526
    -rw-r--r--   1 root root  70K Jul  6  2017 php.ini-oldversion_060717-225909
    -rw-r--r--   1 root root  69K Dec  6 19:21 php.ini-oldversion_061218-191501
    -rw-r--r--   1 root root  69K Sep  7 01:35 php.ini-oldversion_070918-013516
    -rw-r--r--   1 root root  70K Apr  8  2017 php.ini-oldversion_080417-142648
    -rw-r--r--   1 root root  70K May  8  2017 php.ini-oldversion_080517-040454
    -rw-r--r--   1 root root  69K Oct  8 01:57 php.ini-oldversion_081018-015706
    -rw-r--r--   1 root root  69K Nov  8 23:19 php.ini-oldversion_081118-231836
    -rw-r--r--   1 root root  70K Jun  9  2017 php.ini-oldversion_090617-002325
    -rw-r--r--   1 root root  69K Oct  9 22:37 php.ini-oldversion_091018-223614
    -rw-r--r--   1 root root  69K Dec  9 18:54 php.ini-oldversion_091218-185347
    -rw-r--r--   1 root root  69K Feb 10  2018 php.ini-oldversion_100218-044433
    -rw-r--r--   1 root root  70K Aug 10  2017 php.ini-oldversion_100817-152145
    -rw-r--r--   1 root root  70K Feb 11  2017 php.ini-oldversion_110217-113554
    -rw-r--r--   1 root root  70K Apr 11  2017 php.ini-oldversion_110417-234941
    -rw-r--r--   1 root root  70K Aug 11  2017 php.ini-oldversion_110817-145330
    -rw-r--r--   1 root root  69K Oct 11 22:29 php.ini-oldversion_111018-222813
    -rw-r--r--   1 root root  72K Nov 11  2016 php.ini-oldversion_111116-142742
    -rw-r--r--   1 root root  70K May 12  2017 php.ini-oldversion_120517-012428
    -rw-r--r--   1 root root  69K Jul 12 00:36 php.ini-oldversion_120718-003534
    -rw-r--r--   1 root root  69K Jul 12 14:45 php.ini-oldversion_120718-144507
    -rw-r--r--   1 root root  69K Nov 12  2016 php.ini-oldversion_121116-013505
    -rw-r--r--   1 root root  70K Apr 13  2017 php.ini-oldversion_130417-195918
    -rw-r--r--   1 root root  69K Sep 13 13:20 php.ini-oldversion_130918-132004
    -rw-r--r--   1 root root  70K Jan 14  2017 php.ini-oldversion_140117-021637
    -rw-r--r--   1 root root  69K Feb 14  2018 php.ini-oldversion_140218-132717
    -rw-r--r--   1 root root  69K Mar 14  2018 php.ini-oldversion_140318-184350
    -rw-r--r--   1 root root  70K Apr 14  2017 php.ini-oldversion_140417-115402
    -rw-r--r--   1 root root  69K Oct 14 00:05 php.ini-oldversion_141018-000502
    -rw-r--r--   1 root root  69K Nov 14  2016 php.ini-oldversion_141116-030059
    -rw-r--r--   1 root root  69K Mar 15  2018 php.ini-oldversion_150318-223111
    -rw-r--r--   1 root root  70K Jun 15  2017 php.ini-oldversion_150617-183458
    -rw-r--r--   1 root root  69K Jul 15 00:43 php.ini-oldversion_150718-004222
    -rw-r--r--   1 root root  70K Aug 15  2017 php.ini-oldversion_150817-165844
    -rw-r--r--   1 root root  69K Feb 16  2018 php.ini-oldversion_160218-180424
    -rw-r--r--   1 root root  70K Aug 16  2017 php.ini-oldversion_160817-034449
    -rw-r--r--   1 root root  69K Aug 16 00:12 php.ini-oldversion_160818-001141
    -rw-r--r--   1 root root  69K Nov 16  2016 php.ini-oldversion_161116-103734
    -rw-r--r--   1 root root  70K Mar 17  2017 php.ini-oldversion_170317-013441
    -rw-r--r--   1 root root  69K Mar 17  2018 php.ini-oldversion_170318-025102
    -rw-r--r--   1 root root  69K Aug 17 13:05 php.ini-oldversion_170818-130458
    -rw-r--r--   1 root root  70K Feb 18  2017 php.ini-oldversion_180217-033013
    -rw-r--r--   1 root root  69K May 19  2018 php.ini-oldversion_190518-143906
    -rw-r--r--   1 root root  69K May 19  2018 php.ini-oldversion_190518-164745
    -rw-r--r--   1 root root  69K Jul 19 02:07 php.ini-oldversion_190718-020625
    -rw-r--r--   1 root root  70K Jan 20  2017 php.ini-oldversion_200117-011716
    -rw-r--r--   1 root root  69K Feb 20  2018 php.ini-oldversion_200218-135429
    -rw-r--r--   1 root root  70K Apr 20  2017 php.ini-oldversion_200417-183840
    -rw-r--r--   1 root root  70K Jun 20  2017 php.ini-oldversion_200617-105240
    -rw-r--r--   1 root root  69K Feb 22  2018 php.ini-oldversion_220218-001018
    -rw-r--r--   1 root root  70K Feb 23  2017 php.ini-oldversion_230217-040808
    -rw-r--r--   1 root root  69K Jun 23 13:21 php.ini-oldversion_230618-131631
    -rw-r--r--   1 root root  69K Nov 23  2016 php.ini-oldversion_231116-235805
    -rw-r--r--   1 root root  70K Dec 23  2016 php.ini-oldversion_231216-015536
    -rw-r--r--   1 root root  70K Aug 24  2017 php.ini-oldversion_240817-205337
    -rw-r--r--   1 root root  70K Oct 24  2017 php.ini-oldversion_241017-135128
    -rw-r--r--   1 root root  70K Jan 25  2018 php.ini-oldversion_250118-210251
    -rw-r--r--   1 root root  70K Feb 25  2017 php.ini-oldversion_250217-191829
    -rw-r--r--   1 root root  69K Nov 25 03:20 php.ini-oldversion_251118-031953
    -rw-r--r--   1 root root  70K Jan 26  2018 php.ini-oldversion_260118-134551
    -rw-r--r--   1 root root  69K Apr 26  2018 php.ini-oldversion_260418-185437
    -rw-r--r--   1 root root  69K May 26  2018 php.ini-oldversion_260518-201739
    -rw-r--r--   1 root root  70K Nov 26  2017 php.ini-oldversion_261117-015016
    -rw-r--r--   1 root root  69K Nov 26 19:30 php.ini-oldversion_261118-192932
    -rw-r--r--   1 root root  70K Apr 27  2017 php.ini-oldversion_270417-035957
    -rw-r--r--   1 root root  70K Jul 27  2017 php.ini-oldversion_270717-133416
    -rw-r--r--   1 root root  70K Oct 27  2017 php.ini-oldversion_271017-104426
    -rw-r--r--   1 root root  69K Nov 27 19:31 php.ini-oldversion_271118-193046
    -rw-r--r--   1 root root  70K Apr 28  2017 php.ini-oldversion_280417-134347
    -rw-r--r--   1 root root  70K Jul 28  2017 php.ini-oldversion_280717-041101
    -rw-r--r--   1 root root  69K Mar 29  2018 php.ini-oldversion_290318-145242
    -rw-r--r--   1 root root  69K Aug 29 03:46 php.ini-oldversion_290818-034622
    -rw-r--r--   1 root root  70K Dec 29  2016 php.ini-oldversion_291216-174318
    -rw-r--r--   1 root root  70K Aug 30  2017 php.ini-oldversion_300817-195223
    -rw-r--r--   1 root root  70K Sep 30  2017 php.ini-oldversion_300917-175459
    drwxr-xr-x   2 root root 4.0K Dec  6 19:18 pkgconfig
    drwxr-xr-x   4 root root   51 Nov 11  2016 sproxy



    No such text inside /usr/local/src/centminmod/addons/wget.sh

    Code (Text):
    #!/bin/bash
    ###########################################################
    # set locale temporarily to english
    # for wget compile due to some non-english
    # locale issues
    export LC_ALL=en_US.UTF-8
    export LANG=en_US.UTF-8
    export LANGUAGE=en_US.UTF-8
    export LC_CTYPE=en_US.UTF-8
    ###########################################################
    # wget source installer to /usr/local/bin/wget path for
    # centminmod.com LEMP stacks
    # installs newer wget version than available via centos RPM
    # repos but does not interfere with YUM installed wget as it
    # is just an alias wget command setup
    ###########################################################
    DT=$(date +"%d%m%y-%H%M%S")
    DNF_ENABLE='n'
    DNF_COPR='y'
    CENTMINLOGDIR='/root/centminlogs'
    DIR_TMP='/svr-setup'
    LOCALCENTMINMOD_MIRROR='https://centminmod.com'
    
    ALTPCRE_VERSION='8.42'
    ALTPCRELINKFILE="pcre-${ALTPCRE_VERSION}.tar.gz"
    ALTPCRELINK="${LOCALCENTMINMOD_MIRROR}/centminmodparts/pcre/${ALTPCRELINKFILE}"
    
    WGET_VERSION='1.20'
    WGET_FILENAME="wget-${WGET_VERSION}.tar.gz"
    WGET_LINK="https://centminmod.com/centminmodparts/wget/${WGET_FILENAME}"
    WGET_LINKLOCAL="${LOCALCENTMINMOD_MIRROR}/centminmodparts/wget/${WGET_FILENAME}"
    WGET_STRACE='n'
    FORCE_IPVFOUR='y' # curl/wget commands through script force IPv4
    ###########################################################
    shopt -s expand_aliases
    for g in "" e f; do
        alias ${g}grep="LC_ALL=C ${g}grep"  # speed-up grep, egrep, fgrep
    done
    
    CENTOSVER=$(awk '{ print $3 }' /etc/redhat-release)
    
    if [ -f "/etc/centminmod/custom_config.inc" ]; then
      # default is at /etc/centminmod/custom_config.inc
      dos2unix -q "/etc/centminmod/custom_config.inc"
      . "/etc/centminmod/custom_config.inc"
    fi
    
    if [ ! -d "$CENTMINLOGDIR" ]; then
      mkdir -p "$CENTMINLOGDIR"
    fi
    
    if [ "$CENTOSVER" == 'release' ]; then
        CENTOSVER=$(awk '{ print $4 }' /etc/redhat-release | cut -d . -f1,2)
        if [[ "$(cat /etc/redhat-release | awk '{ print $4 }' | cut -d . -f1)" = '7' ]]; then
            CENTOS_SEVEN='7'
        fi
    fi
    
    if [[ "$(cat /etc/redhat-release | awk '{ print $3 }' | cut -d . -f1)" = '6' ]]; then
        CENTOS_SIX='6'
    fi
    
    # Check for Redhat Enterprise Linux 7.x
    if [ "$CENTOSVER" == 'Enterprise' ]; then
        CENTOSVER=$(awk '{ print $7 }' /etc/redhat-release)
        if [[ "$(awk '{ print $1,$2 }' /etc/redhat-release)" = 'Red Hat' && "$(awk '{ print $7 }' /etc/redhat-release | cut -d . -f1)" = '7' ]]; then
            CENTOS_SEVEN='7'
            REDHAT_SEVEN='y'
        fi
    fi
    
    if [[ -f /etc/system-release && "$(awk '{print $1,$2,$3}' /etc/system-release)" = 'Amazon Linux AMI' ]]; then
        CENTOS_SIX='6'
    fi
    
    if [ -f /proc/user_beancounters ]; then
        # CPUS='1'
        # MAKETHREADS=" -j$CPUS"
        # speed up make
        CPUS=$(grep -c "processor" /proc/cpuinfo)
        if [[ "$CPUS" -gt '8' ]]; then
            if [[ "$(grep -o 'AMD EPYC 7601' /proc/cpuinfo | sort -u)" = 'AMD EPYC 7601' ]]; then
                # 7601 at 12 cpu cores has 3.20hz clock frequency https://en.wikichip.org/wiki/amd/epyc/7601
                # while greater than 12 cpu cores downclocks to 2.70Ghz
                CPUS=12
            elif [[ "$(grep -o 'AMD EPYC 7551' /proc/cpuinfo | sort -u)" = 'AMD EPYC 7551' ]]; then
                # 7551P at 12 cpu cores has 3.0Ghz clock frequency https://en.wikichip.org/wiki/amd/epyc/7551p
                # while greater than 12 cpu cores downclocks to 2.55Ghz
                CPUS=12
            elif [[ "$(grep -o 'AMD EPYC 7401' /proc/cpuinfo | sort -u)" = 'AMD EPYC 7401' ]]; then
                # 7401P at 12 cpu cores has 3.0Ghz clock frequency https://en.wikichip.org/wiki/amd/epyc/7401p
                # while greater than 12 cpu cores downclocks to 2.8Ghz
                CPUS=12
            elif [[ "$(grep -o 'AMD EPYC 7371' /proc/cpuinfo | sort -u)" = 'AMD EPYC 7371' ]]; then
                # 7371 at 8 cpu cores has 3.8Ghz clock frequency https://en.wikichip.org/wiki/amd/epyc/7371
                # while greater than 8 cpu cores downclocks to 3.6Ghz
                CPUS=8
            else
                CPUS=$(echo $(($CPUS+2)))
            fi
        else
            CPUS=$(echo $(($CPUS+1)))
        fi
        MAKETHREADS=" -j$CPUS"
    else
        # speed up make
        CPUS=$(grep -c "processor" /proc/cpuinfo)
        if [[ "$CPUS" -gt '8' ]]; then
            if [[ "$(grep -o 'AMD EPYC 7601' /proc/cpuinfo | sort -u)" = 'AMD EPYC 7601' ]]; then
                # 7601 at 12 cpu cores has 3.20hz clock frequency https://en.wikichip.org/wiki/amd/epyc/7601
                # while greater than 12 cpu cores downclocks to 2.70Ghz
                CPUS=12
            elif [[ "$(grep -o 'AMD EPYC 7551' /proc/cpuinfo | sort -u)" = 'AMD EPYC 7551' ]]; then
                # 7551P at 12 cpu cores has 3.0Ghz clock frequency https://en.wikichip.org/wiki/amd/epyc/7551p
                # while greater than 12 cpu cores downclocks to 2.55Ghz
                CPUS=12
            elif [[ "$(grep -o 'AMD EPYC 7401' /proc/cpuinfo | sort -u)" = 'AMD EPYC 7401' ]]; then
                # 7401P at 12 cpu cores has 3.0Ghz clock frequency https://en.wikichip.org/wiki/amd/epyc/7401p
                # while greater than 12 cpu cores downclocks to 2.8Ghz
                CPUS=12
            elif [[ "$(grep -o 'AMD EPYC 7371' /proc/cpuinfo | sort -u)" = 'AMD EPYC 7371' ]]; then
                # 7371 at 8 cpu cores has 3.8Ghz clock frequency https://en.wikichip.org/wiki/amd/epyc/7371
                # while greater than 8 cpu cores downclocks to 3.6Ghz
                CPUS=8
            else
                CPUS=$(echo $(($CPUS+4)))
            fi
        elif [[ "$CPUS" -eq '8' ]]; then
            CPUS=$(echo $(($CPUS+2)))
        else
            CPUS=$(echo $(($CPUS+1)))
        fi
        MAKETHREADS=" -j$CPUS"
    fi
    
    if [[ "$CENTOS_SEVEN" = '7' && "$DNF_ENABLE" = [yY] ]]; then
      # yum -y -q install epel-release
      if [[ ! -f /usr/bin/dnf ]]; then
        yum -y -q install dnf
      fi
      if [ -f /etc/yum.repos.d/rpmforge.repo ]; then
          sed -i 's|enabled .*|enabled = 0|g' /etc/yum.repos.d/rpmforge.repo
          DISABLEREPO_DNF=' --disablerepo=rpmforge'
          YUMDNFBIN="dnf${DISABLEREPO_DNF}"
      else
          DISABLEREPO_DNF=""
          YUMDNFBIN='dnf'
      fi
    else
      YUMDNFBIN='yum'
      if [ -f /etc/yum.repos.d/rpmforge.repo ]; then
        DISABLEREPO_DNF=' --disablerepo=rpmforge'
      else
        DISABLEREPO_DNF=""
      fi
    fi
    
    if [ ! -f /usr/bin/sar ]; then
      time $YUMDNFBIN -y -q install sysstat${DISABLEREPO_DNF}
      if [[ "$(uname -m)" = 'x86_64' || "$(uname -m)" = 'aarch64' ]]; then
        SARCALL='/usr/lib64/sa/sa1'
      else
        SARCALL='/usr/lib/sa/sa1'
      fi
      if [[ "$CENTOS_SEVEN" != '7' ]]; then
        sed -i 's|10|5|g' /etc/cron.d/sysstat
        service sysstat restart
        chkconfig sysstat on
      else
        sed -i 's|10|5|g' /etc/cron.d/sysstat
        systemctl restart sysstat.service
        systemctl enable sysstat.service
      fi
    elif [ -f /usr/bin/sar ]; then
      if [[ "$(uname -m)" = 'x86_64' || "$(uname -m)" = 'aarch64' ]]; then
        SARCALL='/usr/lib64/sa/sa1'
      else
        SARCALL='/usr/lib/sa/sa1'
      fi
      if [[ "$CENTOS_SEVEN" != '7' ]]; then
        sed -i 's|10|5|g' /etc/cron.d/sysstat
        service sysstat restart
        chkconfig sysstat on
      else
        sed -i 's|10|5|g' /etc/cron.d/sysstat
        systemctl restart sysstat.service
        systemctl enable sysstat.service
      fi
    fi
    ###########################################################
    # Setup Colours
    black='\E[30;40m'
    red='\E[31;40m'
    green='\E[32;40m'
    yellow='\E[33;40m'
    blue='\E[34;40m'
    magenta='\E[35;40m'
    cyan='\E[36;40m'
    white='\E[37;40m'
    
    boldblack='\E[1;30;40m'
    boldred='\E[1;31;40m'
    boldgreen='\E[1;32;40m'
    boldyellow='\E[1;33;40m'
    boldblue='\E[1;34;40m'
    boldmagenta='\E[1;35;40m'
    boldcyan='\E[1;36;40m'
    boldwhite='\E[1;37;40m'
    
    Reset="tput sgr0"      #  Reset text attributes to normal
                           #+ without clearing screen.
    
    cecho ()                     # Coloured-echo.
                                 # Argument $1 = message
                                 # Argument $2 = color
    {
    message=$1
    color=$2
    echo -e "$color$message" ; $Reset
    return
    }
    
    ###########################################################
    sar_call() {
      $SARCALL 1 1
    }
    
    scl_install() {
      # if gcc version is less than 4.7 (407) install scl collection yum repo
      if [[ "$CENTOS_SIX" = '6' ]]; then
        # if devtoolset exists, enable it first before checking gcc versions
        if [[ "$DEVTOOLSETSIX" = [yY] ]]; then
          if [[ -f /opt/rh/devtoolset-7/root/usr/bin/gcc && -f /opt/rh/devtoolset-7/root/usr/bin/g++ ]]; then
            source /opt/rh/devtoolset-7/enable
          fi
        else
          if [[ -f /opt/rh/devtoolset-7/root/usr/bin/gcc && -f /opt/rh/devtoolset-7/root/usr/bin/g++ ]]; then
            source /opt/rh/devtoolset-7/enable
          fi
        fi
        if [[ "$(gcc --version | head -n1 | awk '{print $3}' | cut -d . -f1,2 | sed "s|\.|0|")" -lt '407' ]]; then
          echo "install centos-release-scl for newer gcc and g++ versions"
          if [[ -z "$(rpm -qa | grep rpmforge)" ]]; then
            if [[ "$(rpm -ql centos-release-scl >/dev/null 2>&1; echo $?)" -ne '0' ]]; then
              time $YUMDNFBIN -y -q install centos-release-scl
            fi
            sar_call
          else
            if [[ "$(rpm -ql centos-release-scl >/dev/null 2>&1; echo $?)" -ne '0' ]]; then
              time $YUMDNFBIN -y -q install centos-release-scl --disablerepo=rpmforge
            fi
            sar_call
          fi
          if [[ "$DEVTOOLSETSIX" = [yY] ]]; then
            if [[ -z "$(rpm -qa | grep rpmforge)" ]]; then
              if [[ "$(rpm -ql devtoolset-7-gcc >/de6/null 2>&1; echo $?)" -ne '0' ]] || [[ "$(rpm -ql devtoolset-7-gcc-c++ 6/dev/null 2>&1; echo $?)" -ne '0' ]] || [[ "$(rpm -ql devtoolset-7-binutils6>/dev/null 2>&1; echo $?)" -ne '0' ]]; then
                time $YUMDNFBIN -y -q install devtoolset-7-gcc devtoolset-7-gcc-c++ devtoolset-7-binutils
              fi
              sar_call
            else
              if [[ "$(rpm -ql devtoolset-7-gcc >/de6/null 2>&1; echo $?)" -ne '0' ]] || [[ "$(rpm -ql devtoolset-7-gcc-c++ 6/dev/null 2>&1; echo $?)" -ne '0' ]] || [[ "$(rpm -ql devtoolset-7-binutils6>/dev/null 2>&1; echo $?)" -ne '0' ]]; then
                time $YUMDNFBIN -y -q install devtoolset-7-gcc devtoolset-7-gcc-c++ devtoolset-7-binutils --disablerepo=rpmforge
              fi
              sar_call
            fi
            echo
            /opt/rh/devtoolset-7/root/usr/bin/gcc --version
            /opt/rh/devtoolset-7/root/usr/bin/g++ --version
          else
            if [[ -z "$(rpm -qa | grep rpmforge)" ]]; then
              if [[ "$(rpm -ql devtoolset-7-gcc >/dev/null 2>&1; echo $?)" -ne '0' ]] || [[ "$(rpm -ql devtoolset-7-gcc-c++ >/dev/null 2>&1; echo $?)" -ne '0' ]] || [[ "$(rpm -ql devtoolset-7-binutils >/dev/null 2>&1; echo $?)" -ne '0' ]]; then
                time $YUMDNFBIN -y -q install devtoolset-7-gcc devtoolset-7-gcc-c++ devtoolset-7-binutils
              fi
              sar_call
            else
              if [[ "$(rpm -ql devtoolset-7-gcc >/dev/null 2>&1; echo $?)" -ne '0' ]] || [[ "$(rpm -ql devtoolset-7-gcc-c++ >/dev/null 2>&1; echo $?)" -ne '0' ]] || [[ "$(rpm -ql devtoolset-7-binutils >/dev/null 2>&1; echo $?)" -ne '0' ]]; then
                time $YUMDNFBIN -y -q install devtoolset-7-gcc devtoolset-7-gcc-c++ devtoolset-7-binutils --disablerepo=rpmforge
              fi
              sar_call
            fi
            echo
            /opt/rh/devtoolset-7/root/usr/bin/gcc --version
            /opt/rh/devtoolset-7/root/usr/bin/g++ --version
          fi
        fi
      elif [[ "$CENTOS_SEVEN" = '7' ]]; then
          if [[ -z "$(rpm -qa | grep rpmforge)" ]]; then
            if [[ "$(rpm -ql centos-release-scl >/dev/null 2>&1; echo $?)" -ne '0' ]]; then
              time $YUMDNFBIN -y -q install centos-release-scl
            fi
            sar_call
          else
            if [[ "$(rpm -ql centos-release-scl >/dev/null 2>&1; echo $?)" -ne '0' ]]; then
              time $YUMDNFBIN -y -q install centos-release-scl --disablerepo=rpmforge
            fi
            sar_call
          fi
          if [[ "$DEVTOOLSETSIX" = [yY] ]]; then
            if [[ -z "$(rpm -qa | grep rpmforge)" ]]; then
              if [[ "$(rpm -ql devtoolset-7-gcc >/de6/null 2>&1; echo $?)" -ne '0' ]] || [[ "$(rpm -ql devtoolset-7-gcc-c++ 6/dev/null 2>&1; echo $?)" -ne '0' ]] || [[ "$(rpm -ql devtoolset-7-binutils6>/dev/null 2>&1; echo $?)" -ne '0' ]]; then
                time $YUMDNFBIN -y -q install devtoolset-7-gcc devtoolset-7-gcc-c++ devtoolset-7-binutils
              fi
              sar_call
            else
              if [[ "$(rpm -ql devtoolset-7-gcc >/de6/null 2>&1; echo $?)" -ne '0' ]] || [[ "$(rpm -ql devtoolset-7-gcc-c++ 6/dev/null 2>&1; echo $?)" -ne '0' ]] || [[ "$(rpm -ql devtoolset-7-binutils6>/dev/null 2>&1; echo $?)" -ne '0' ]]; then
                time $YUMDNFBIN -y -q install devtoolset-7-gcc devtoolset-7-gcc-c++ devtoolset-7-binutils --disablerepo=rpmforge
              fi
              sar_call
            fi
            echo
            /opt/rh/devtoolset-7/root/usr/bin/gcc --version
            /opt/rh/devtoolset-7/root/usr/bin/g++ --version
          else
            if [[ -z "$(rpm -qa | grep rpmforge)" ]]; then
              if [[ "$(rpm -ql devtoolset-7-gcc >/dev/null 2>&1; echo $?)" -ne '0' ]] || [[ "$(rpm -ql devtoolset-7-gcc-c++ >/dev/null 2>&1; echo $?)" -ne '0' ]] || [[ "$(rpm -ql devtoolset-7-binutils >/dev/null 2>&1; echo $?)" -ne '0' ]]; then
                time $YUMDNFBIN -y -q install devtoolset-7-gcc devtoolset-7-gcc-c++ devtoolset-7-binutils
              fi
              sar_call
            else
              if [[ "$(rpm -ql devtoolset-7-gcc >/dev/null 2>&1; echo $?)" -ne '0' ]] || [[ "$(rpm -ql devtoolset-7-gcc-c++ >/dev/null 2>&1; echo $?)" -ne '0' ]] || [[ "$(rpm -ql devtoolset-7-binutils >/dev/null 2>&1; echo $?)" -ne '0' ]]; then
                time $YUMDNFBIN -y -q install devtoolset-7-gcc devtoolset-7-gcc-c++ devtoolset-7-binutils --disablerepo=rpmforge
              fi
              sar_call
            fi
            echo
            /opt/rh/devtoolset-7/root/usr/bin/gcc --version
            /opt/rh/devtoolset-7/root/usr/bin/g++ --version
          fi
      fi # centos 6 only needed
    }
    
    gccdevtools() {
      if [[ ! -f /opt/rh/devtoolset-7/root/usr/bin/gcc || ! -f /opt/rh/devtoolset-7/root/usr/bin/g++ ]] && [[ "$CENTOS_SIX" = '6' ]]; then
        scl_install
        unset CC
        unset CXX
        if [[ "$DEVTOOLSETSEVEN" = [yY] ]]; then
          export CC="/opt/rh/devtoolset-7/root/usr/bin/gcc"
          export CXX="/opt/rh/devtoolset-7/root/usr/bin/g++"
          export CFLAGS="-Wimplicit-fallthrough=0"
          export CXXFLAGS="${CFLAGS}"
        else
          export CC="/opt/rh/devtoolset-7/root/usr/bin/gcc"
          export CXX="/opt/rh/devtoolset-7/root/usr/bin/g++"
          export CFLAGS="-Wimplicit-fallthrough=0"
          export CXXFLAGS="${CFLAGS}"
        fi
      elif [[ "$DEVTOOLSETSEVEN" = [yY] && -f /opt/rh/devtoolset-7/root/usr/bin/gcc && -f /opt/rh/devtoolset-7/root/usr/bin/g++ ]] && [[ "$(gcc --version | head -n1 | awk '{print $3}' | cut -d . -f1,2 | sed "s|\.|0|")" -lt '407' ]]; then
        unset CC
        unset CXX
        export CC="/opt/rh/devtoolset-7/root/usr/bin/gcc"
        export CXX="/opt/rh/devtoolset-7/root/usr/bin/g++"
        export CFLAGS="-Wimplicit-fallthrough=0"
        export CXXFLAGS="${CFLAGS}"
      elif [[ -f /opt/rh/devtoolset-7/root/usr/bin/gcc && -f /opt/rh/devtoolset-7/root/usr/bin/g++ ]] && [[ "$(gcc --version | head -n1 | awk '{print $3}' | cut -d . -f1,2 | sed "s|\.|0|")" -lt '407' ]]; then
        unset CC
        unset CXX
        export CC="/opt/rh/devtoolset-7/root/usr/bin/gcc"
        export CXX="/opt/rh/devtoolset-7/root/usr/bin/g++"
        export CFLAGS="-Wimplicit-fallthrough=0"
        export CXXFLAGS="${CFLAGS}"
      fi
    }
    
    source_pcreinstall() {
      if [[ "$(/usr/local/bin/pcre-config --version 2>&1 | grep -q ${ALTPCRE_VERSION} >/dev/null 2>&1; echo $?)" != '0' ]] || [[ -f /usr/local/bin/pcretest && "$(/usr/local/bin/pcretest -C | grep 'No UTF-8 support' >/dev/null 2>&1; echo $?)" = '0' ]] || [[ -f /usr/local/bin/pcretest && "$(/usr/local/bin/pcretest -C | grep 'No just-in-time compiler support' >/dev/null 2>&1; echo $?)" = '0' ]]; then
      cd "$DIR_TMP"
      cecho "Download $ALTPCRELINKFILE ..." $boldyellow
      if [ -s "$ALTPCRELINKFILE" ]; then
        cecho "$ALTPCRELINKFILE Archive found, skipping download..." $boldgreen
      else
        wget -c${ipv_forceopt} --progress=bar "$ALTPCRELINK" --tries=3
        ERROR=$?
        if [[ "$ERROR" != '0' ]]; then
          cecho "Error: $ALTPCRELINKFILE download failed." $boldgreen
          exit #$ERROR
        else
          cecho "Download done." $boldyellow
        fi
      fi
     
      tar xzf "$ALTPCRELINKFILE"
      ERROR=$?
      if [[ "$ERROR" != '0' ]]; then
        cecho "Error: $ALTPCRELINKFILE extraction failed." $boldgreen
        exit #$ERROR
      else
        cecho "$ALTPCRELINKFILE valid file." $boldyellow
        echo ""
      fi
      cd "pcre-${ALTPCRE_VERSION}"
      make clean >/dev/null 2>&1
      ./configure --enable-utf8 --enable-unicode-properties --enable-pcre16 --enable-pcre32 --enable-pcregrep-libz --enable-pcregrep-libbz2 --enable-pcretest-libreadline --enable-jit
      sar_call
      if [[ "$WGET_STRACE" = [yY] ]]; then
        strace -o "${CENTMINLOGDIR}/strace_pcre_make_$DT.log" -f -s256 -tt -T -q make${MAKETHREADS}
      else
        make${MAKETHREADS}
      fi
      sar_call
      if [[ "$WGET_STRACE" = [yY] ]]; then
        strace -o "${CENTMINLOGDIR}/strace_pcre_make_install_$DT.log" -f -s256 -tt -T -q make install
      else 
        make install
      fi
      sar_call
      /usr/local/bin/pcre-config --version
      fi
    }
    
    source_wgetinstall() {
      if [[ "$(/usr/local/bin/wget -V | head -n1 | awk '{print $3}' | grep -q ${WGET_VERSION} >/dev/null 2>&1; echo $?)" != '0' ]]; then
      WGET_FILENAME="wget-${WGET_VERSION}.tar.gz"
      WGET_LINK="https://centminmod.com/centminmodparts/wget/${WGET_FILENAME}"
      cd "$DIR_TMP"
      cecho "Download $WGET_FILENAME ..." $boldyellow
      if [ -s "$WGET_FILENAME" ]; then
        cecho "$WGET_FILENAME Archive found, skipping download..." $boldgreen
      else
    
        curl -${ipv_forceopt}Is --connect-timeout 5 --max-time 5 "$WGET_LINK" | grep 'HTTP\/' | grep '200'
        WGET_CURLCHECK=$?
        if [[ "$WGET_CURLCHECK" = '0' ]]; then
          wget -c${ipv_forceopt} --progress=bar "$WGET_LINK" -O "$WGET_FILENAME" --tries=3
        else
          WGET_LINK="$WGET_LINKLOCAL"
          echo "wget -c${ipv_forceopt} --progress=bar "$WGET_LINK" -O "$WGET_FILENAME" --tries=3"
          wget -c${ipv_forceopt} --progress=bar "$WGET_LINK" -O "$WGET_FILENAME" --tries=3
        fi
        ERROR=$?
        if [[ "$ERROR" != '0' ]]; then
          cecho "Error: $WGET_FILENAME download failed." $boldgreen
          exit #$ERROR
        else
          cecho "Download done." $boldyellow
        fi
      fi
     
      tar xzf "$WGET_FILENAME"
      ERROR=$?
      if [[ "$ERROR" != '0' ]]; then
        cecho "Error: $WGET_FILENAME extraction failed." $boldgreen
        exit #$ERROR
      else
        cecho "$WGET_FILENAME valid file." $boldyellow
        echo ""
      fi
      cd "wget-${WGET_VERSION}"
      gccdevtools
      if [ -f config.status ]; then
        make clean
      fi
      if [[ "$(uname -m)" = 'x86_64' ]]; then
        export CFLAGS="-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic"
        export PCRE_CFLAGS="-I /usr/local/include"
        export PCRE_LIBS="-L /usr/local/lib -lpcre"
      else
        export CFLAGS="-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -mtune=generic"
        export PCRE_CFLAGS="-I /usr/local/include"
        export PCRE_LIBS="-L /usr/local/lib -lpcre"
        if [ -f /root/.wgetrc ]; then
          \cp -fp /root/.wgetrc /root/.wgetrc-bak
          echo "ca_certificate=/etc/pki/tls/certs/ca-bundle.crt" > /root/.wgetrc
        else
          echo "ca_certificate=/etc/pki/tls/certs/ca-bundle.crt" > /root/.wgetrc
        fi
      fi
      # ./configure --with-ssl=openssl PCRE_CFLAGS="-I /usr/local/include" PCRE_LIBS="-L /usr/local/lib -lpcre"
      ./configure --with-ssl=openssl
      sar_call
      if [[ "$WGET_STRACE" = [yY] ]]; then
        make check
        make distcheck
        strace -o "${CENTMINLOGDIR}/strace_wget_make_$DT.log" -f -s256 -tt -T -q make${MAKETHREADS}
      else
        make${MAKETHREADS}
      fi
      sar_call
      if [[ "$WGET_STRACE" = [yY] ]]; then
        strace -o "${CENTMINLOGDIR}/strace_wget_make_install_$DT.log" -f -s256 -tt -T -q make install
      else
        make install
      fi
      sar_call
      echo "/usr/local/lib/" > /etc/ld.so.conf.d/wget.conf
      ldconfig
      if [[ ! "$(grep '^alias wget' /root/.bashrc)" ]] && [[ "$(wget -V | head -n1 | awk '{print $3}' | grep -q ${WGET_VERSION} >/dev/null 2>&1; echo $?)" = '0' ]]; then
        echo "alias wget='/usr/local/bin/wget'" >> /root/.bashrc
      fi
      . /root/.bashrc
    
      echo
      cecho "--------------------------------------------------------" $boldgreen
      echo "ldconfig -p | grep libpcre.so.1"
      ldconfig -p | grep libpcre.so.1
      echo
      echo "ldd $(which wget)"
      ldd $(which wget)
      cecho "--------------------------------------------------------" $boldgreen
      cecho "wget -V" $boldyellow
      wget -V
      cecho "--------------------------------------------------------" $boldgreen
      if [[ "$(wget -V | head -n1 | awk '{print $3}' | grep -q ${WGET_VERSION} >/dev/null 2>&1; echo $?)" = '0' ]]; then
        cecho "wget ${WGET_VERSION} installed at /usr/local/bin/wget" $boldyellow
        if [[ "$WGET_STRACE" = [yY] ]]; then
          # ls -lah ${CENTMINLOGDIR} | grep $DT
          if [ -f "${CENTMINLOGDIR}/strace_wget_make_$DT.log" ]; then
            gzip -6 "${CENTMINLOGDIR}/strace_wget_make_$DT.log"
            cecho "strace make log (gzip compressed): ${CENTMINLOGDIR}/strace_wget_make_$DT.log.gz" $boldyellow
          fi
          if [ -f "${CENTMINLOGDIR}/strace_wget_make_install_$DT.log" ]; then
            gzip -6 "${CENTMINLOGDIR}/strace_wget_make_install_$DT.log"
            cecho "strace make install log (gzip compressed): ${CENTMINLOGDIR}/strace_wget_make_install_$DT.log.gz" $boldyellow
          fi
        fi
      else
        cecho "wget ${WGET_VERSION} failed to update, still using system wget" $boldyellow
        cecho "install log: ${CENTMINLOGDIR}/wget_source_install_${DT}.log" $boldyellow
        if [[ "$WGET_STRACE" = [yY] ]]; then
          if [ -f "${CENTMINLOGDIR}/strace_wget_make_$DT.log" ]; then
            gzip -6 "${CENTMINLOGDIR}/strace_wget_make_$DT.log"
            cecho "strace make log (gzip compressed): ${CENTMINLOGDIR}/strace_wget_make_$DT.log.gz" $boldyellow
          fi
          if [ -f "${CENTMINLOGDIR}/strace_wget_make_install_$DT.log" ]; then
            gzip -6 "${CENTMINLOGDIR}/strace_wget_make_install_$DT.log"
            cecho "strace make install log (gzip compressed): ${CENTMINLOGDIR}/strace_wget_make_install_$DT.log.gz" $boldyellow
          fi
        fi
      fi
      # clean up strace logs older than 14 days
      find "${CENTMINLOGDIR}" -type f -mtime +14 \( -name 'strace_wget_make*' ! -name "strace_pcre_make*" \) -print
      find "${CENTMINLOGDIR}" -type f -mtime +14 \( -name 'strace_wget_make*' ! -name "strace_pcre_make*" \) -exec rm -rf {} \;
      cecho "--------------------------------------------------------" $boldgreen
      echo
      fi
    }
    
    ###########################################################################
    case $1 in
      install)
    starttime=$(TZ=UTC date +%s.%N)
    {
      # devtoolset SCL repo only supports 64bit OSes
      if [[ "$LOWMEM_INSTALL" != [yY] && "$(uname -m)" = 'x86_64' ]]; then
        source_pcreinstall
        source_wgetinstall
      fi
    } 2>&1 | tee "${CENTMINLOGDIR}/wget_source_install_${DT}.log"
    
    endtime=$(TZ=UTC date +%s.%N)
    
    INSTALLTIME=$(echo "scale=2;$endtime - $starttime"|bc )
    echo "" >> "${CENTMINLOGDIR}/wget_source_install_${DT}.log"
    echo "Total wget Install Time: $INSTALLTIME seconds" >> "${CENTMINLOGDIR}/wget_source_install_${DT}.log"
    tail -1 "${CENTMINLOGDIR}/wget_source_install_${DT}.log"
      ;;
      pcre)
    starttime=$(TZ=UTC date +%s.%N)
    {
      # devtoolset SCL repo only supports 64bit OSes
      if [[ "$LOWMEM_INSTALL" != [yY] && "$(uname -m)" = 'x86_64' ]]; then
        source_pcreinstall
      fi
    } 2>&1 | tee "${CENTMINLOGDIR}/wget_source_install_pcre_${DT}.log"
    
    endtime=$(TZ=UTC date +%s.%N)
    
    INSTALLTIME=$(echo "scale=2;$endtime - $starttime"|bc )
    echo "" >> "${CENTMINLOGDIR}/wget_source_install_pcre_${DT}.log"
    echo "Total wget pcre Install Time: $INSTALLTIME seconds" >> "${CENTMINLOGDIR}/wget_source_install_pcre_${DT}.log"
    tail -1 "${CENTMINLOGDIR}/wget_source_install_pcre_${DT}.log"
      ;;
      *)
        echo "$0 install"
      ;;
    esac
    exit
     
  14. eva2000

    eva2000 Administrator Staff Member

    39,216
    8,655
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +13,309
    Local Time:
    1:59 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    i see the lines exist in your posted code - 3rd and 4th lines below
    Code (Text):
      if [[ "$(uname -m)" = 'x86_64' ]]; then
        export CFLAGS="-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic"
        export PCRE_CFLAGS="-I /usr/local/include"
        export PCRE_LIBS="-L /usr/local/lib -lpcre"
      else
    

    change to become
    Code (Text):
      if [[ "$(uname -m)" = 'x86_64' ]]; then
        export CFLAGS="-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic"
        export PCRE_CFLAGS="-I /usr/local/include"
        export PCRE_LIBS="-L /usr/local/lib -lpcre"
        # ensure wget.sh installer utilises system openssl
        export OPENSSL_CFLAGS="-I /usr/include"
        export OPENSSL_LIBS="-L /usr/lib64 -lssl -lcrypto"
      else
    
     
  15. eva2000

    eva2000 Administrator Staff Member

    39,216
    8,655
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +13,309
    Local Time:
    1:59 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    indeed i see May 9, 2018 for libssl.a and libcrypto.a - centmin mod 123.09beta01 hasn't installed these here in many months after fixing it up

    though trying the workaround wget.sh edits should bypass the issue for wget failing to update
     
  16. eva2000

    eva2000 Administrator Staff Member

    39,216
    8,655
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +13,309
    Local Time:
    1:59 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    You can also check your command history and grep filter for May 9, 2018 to see what commands you were running at the time
    Code (Text):
    history | grep '09.05.18'
    

    also check the 10th
    Code (Text):
    history | grep '10.05.18'
    

    don't post output on this public forum as it may reveal sensitive info, you can private message me the output.
     
  17. Sunka

    Sunka Well-Known Member

    1,097
    297
    83
    Oct 31, 2015
    Rijeka, Croatia
    Ratings:
    +478
    Local Time:
    5:59 AM
    Nginx 1.15.8
    MariaDB 10.3.12
    After updating centminmod I see that those lines are inserted automatically into file, so no need to add them manually.
    After that I tried to update wget (through centmin) same error
     
  18. Sunka

    Sunka Well-Known Member

    1,097
    297
    83
    Oct 31, 2015
    Rijeka, Croatia
    Ratings:
    +478
    Local Time:
    5:59 AM
    Nginx 1.15.8
    MariaDB 10.3.12
    I can not see sensitive data, so here we go...

    Code (Text):
    [[email protected] ~]# history | grep '09.05.18'
     8700  [09.05.18] 21:49:20   centmin
     8701  [09.05.18] 21:49:49   yum clean all
     8702  [09.05.18] 21:49:50   yum update
     8703  [09.05.18] 21:50:19   yum list updates --disableplugin=priorities --enablerepo=remi
     8704  [09.05.18] 21:50:26   yum list updates --enablerepo=city-fan.org --disableplugin=priorities
     8705  [09.05.18] 21:50:37   yum update --enablerepo=city-fan.org --disableplugin=priorities
     8706  [09.05.18] 21:51:08   cat /usr/local/nginx/conf/geoip.conf
     8707  [09.05.18] 21:54:13   centmin
     8708  [09.05.18] 21:55:23   nano /usr/local/nginx/conf/geoip.conf
     8709  [09.05.18] 21:56:18   centmin
     8710  [09.05.18] 21:56:37   nano /etc/centminmod/custom_config.inc
     8711  [09.05.18] 22:01:07   centmin
     8712  [09.05.18] 22:03:07   cat /usr/local/nginx/conf/geoip.conf
     8713  [09.05.18] 22:03:25   nginx -v
     8714  [09.05.18] 22:03:33   centmin
     8715  [09.05.18] 22:08:09   nginx -t
     8716  [09.05.18] 22:08:21   yum update
    10000  [15.12.18] 02:26:38   history | grep '09.05.18'
    You have new mail in /var/spool/mail/root
    [[email protected] ~]# history | grep '10.05.18'
     8717  [10.05.18] 06:30:05   centmin
     8718  [10.05.18] 06:30:32   yum clean all
     8719  [10.05.18] 06:30:33   yum update
     8720  [10.05.18] 06:35:56   systemctl daemon-reload
     8721  [10.05.18] 06:36:01   /usr/local/src/centminmod/tools/setio.sh set
     8722  [10.05.18] 06:36:11   mysqlrestart
     8723  [10.05.18] 06:40:35   centmin
     8724  [10.05.18] 06:40:46   yum clean all
     8725  [10.05.18] 06:40:47   yum update
     8726  [10.05.18] 06:41:21   yum list updates --disableplugin=priorities --enablerepo=remi
     8727  [10.05.18] 06:41:28   yum list updates --enablerepo=city-fan.org --disableplugin=priorities
     8728  [10.05.18] 16:50:37   centmin
     8729  [10.05.18] 16:51:05   yum clean all
     8730  [10.05.18] 16:51:06   yum update
     8731  [10.05.18] 16:54:51   cd /usr/lib/python2.7/site-packages/
     8732  [10.05.18] 16:55:13   ls -la
     8733  [10.05.18] 16:55:55   rm -rf /usr/lib/python2.7/site-packages/backports.ssl_match_hostname-3.*
     8734  [10.05.18] 16:56:03   ls -la
     8735  [10.05.18] 16:56:22   yum reinstall python-backports-ssl_match_hostname
     8736  [10.05.18] 16:56:38   yum clean all
     8737  [10.05.18] 16:56:43   yum update
     8738  [10.05.18] 16:57:39   cd /
     8739  [10.05.18] 16:57:43   yum list updates --disableplugin=priorities --enablerepo=remi
     8740  [10.05.18] 16:57:49   yum list updates --enablerepo=city-fan.org --disableplugin=priorities
     8741  [10.05.18] 16:57:53   centmin
     8742  [10.05.18] 22:09:30   yum clean all
     8743  [10.05.18] 22:09:31   yum update
     8744  [10.05.18] 22:39:00   yum clean all
     8745  [10.05.18] 22:39:01   yum update
     8746  [10.05.18] 22:39:26   yum list updates --disableplugin=priorities --enablerepo=remi
     8747  [10.05.18] 22:39:32   yum list updates --enablerepo=city-fan.org --disableplugin=priorities
     8748  [10.05.18] 22:39:53   centmin
    10001  [15.12.18] 02:26:50   history | grep '10.05.18'
     
  19. Sunka

    Sunka Well-Known Member

    1,097
    297
    83
    Oct 31, 2015
    Rijeka, Croatia
    Ratings:
    +478
    Local Time:
    5:59 AM
    Nginx 1.15.8
    MariaDB 10.3.12
    Code (Text):
    # cat /usr/local/src/centminmod/addons/wget.sh
    #!/bin/bash
    ###########################################################
    # set locale temporarily to english
    # for wget compile due to some non-english
    # locale issues
    export LC_ALL=en_US.UTF-8
    export LANG=en_US.UTF-8
    export LANGUAGE=en_US.UTF-8
    export LC_CTYPE=en_US.UTF-8
    ###########################################################
    # wget source installer to /usr/local/bin/wget path for
    # centminmod.com LEMP stacks
    # installs newer wget version than available via centos RPM
    # repos but does not interfere with YUM installed wget as it
    # is just an alias wget command setup
    ###########################################################
    DT=$(date +"%d%m%y-%H%M%S")
    DNF_ENABLE='n'
    DNF_COPR='y'
    CENTMINLOGDIR='/root/centminlogs'
    DIR_TMP='/svr-setup'
    LOCALCENTMINMOD_MIRROR='https://centminmod.com'
    
    ALTPCRE_VERSION='8.42'
    ALTPCRELINKFILE="pcre-${ALTPCRE_VERSION}.tar.gz"
    ALTPCRELINK="${LOCALCENTMINMOD_MIRROR}/centminmodparts/pcre/${ALTPCRELINKFILE}"
    
    WGET_VERSION='1.20'
    WGET_FILENAME="wget-${WGET_VERSION}.tar.gz"
    WGET_LINK="https://centminmod.com/centminmodparts/wget/${WGET_FILENAME}"
    WGET_LINKLOCAL="${LOCALCENTMINMOD_MIRROR}/centminmodparts/wget/${WGET_FILENAME}"
    WGET_STRACE='n'
    FORCE_IPVFOUR='y' # curl/wget commands through script force IPv4
    ###########################################################
    shopt -s expand_aliases
    for g in "" e f; do
        alias ${g}grep="LC_ALL=C ${g}grep"  # speed-up grep, egrep, fgrep
    done
    
    CENTOSVER=$(awk '{ print $3 }' /etc/redhat-release)
    
    if [ -f "/etc/centminmod/custom_config.inc" ]; then
      # default is at /etc/centminmod/custom_config.inc
      dos2unix -q "/etc/centminmod/custom_config.inc"
      . "/etc/centminmod/custom_config.inc"
    fi
    
    if [ ! -d "$CENTMINLOGDIR" ]; then
      mkdir -p "$CENTMINLOGDIR"
    fi
    
    if [ "$CENTOSVER" == 'release' ]; then
        CENTOSVER=$(awk '{ print $4 }' /etc/redhat-release | cut -d . -f1,2)
        if [[ "$(cat /etc/redhat-release | awk '{ print $4 }' | cut -d . -f1)" = '7' ]]; then
            CENTOS_SEVEN='7'
        fi
    fi
    
    if [[ "$(cat /etc/redhat-release | awk '{ print $3 }' | cut -d . -f1)" = '6' ]]; then
        CENTOS_SIX='6'
    fi
    
    # Check for Redhat Enterprise Linux 7.x
    if [ "$CENTOSVER" == 'Enterprise' ]; then
        CENTOSVER=$(awk '{ print $7 }' /etc/redhat-release)
        if [[ "$(awk '{ print $1,$2 }' /etc/redhat-release)" = 'Red Hat' && "$(awk '{ print $7 }' /etc/redhat-release | cut -d . -f1)" = '7' ]]; then
            CENTOS_SEVEN='7'
            REDHAT_SEVEN='y'
        fi
    fi
    
    if [[ -f /etc/system-release && "$(awk '{print $1,$2,$3}' /etc/system-release)" = 'Amazon Linux AMI' ]]; then
        CENTOS_SIX='6'
    fi
    
    if [ -f /proc/user_beancounters ]; then
        # CPUS='1'
        # MAKETHREADS=" -j$CPUS"
        # speed up make
        CPUS=$(grep -c "processor" /proc/cpuinfo)
        if [[ "$CPUS" -gt '8' ]]; then
            if [[ "$(grep -o 'AMD EPYC 7601' /proc/cpuinfo | sort -u)" = 'AMD EPYC 7601' ]]; then
                # 7601 at 12 cpu cores has 3.20hz clock frequency https://en.wikichip.org/wiki/amd/epyc/7601
                # while greater than 12 cpu cores downclocks to 2.70Ghz
                CPUS=12
            elif [[ "$(grep -o 'AMD EPYC 7551' /proc/cpuinfo | sort -u)" = 'AMD EPYC 7551' ]]; then
                # 7551P at 12 cpu cores has 3.0Ghz clock frequency https://en.wikichip.org/wiki/amd/epyc/7551p
                # while greater than 12 cpu cores downclocks to 2.55Ghz
                CPUS=12
            elif [[ "$(grep -o 'AMD EPYC 7401' /proc/cpuinfo | sort -u)" = 'AMD EPYC 7401' ]]; then
                # 7401P at 12 cpu cores has 3.0Ghz clock frequency https://en.wikichip.org/wiki/amd/epyc/7401p
                # while greater than 12 cpu cores downclocks to 2.8Ghz
                CPUS=12
            elif [[ "$(grep -o 'AMD EPYC 7371' /proc/cpuinfo | sort -u)" = 'AMD EPYC 7371' ]]; then
                # 7371 at 8 cpu cores has 3.8Ghz clock frequency https://en.wikichip.org/wiki/amd/epyc/7371
                # while greater than 8 cpu cores downclocks to 3.6Ghz
                CPUS=8
            else
                CPUS=$(echo $(($CPUS+2)))
            fi
        else
            CPUS=$(echo $(($CPUS+1)))
        fi
        MAKETHREADS=" -j$CPUS"
    else
        # speed up make
        CPUS=$(grep -c "processor" /proc/cpuinfo)
        if [[ "$CPUS" -gt '8' ]]; then
            if [[ "$(grep -o 'AMD EPYC 7601' /proc/cpuinfo | sort -u)" = 'AMD EPYC 7601' ]]; then
                # 7601 at 12 cpu cores has 3.20hz clock frequency https://en.wikichip.org/wiki/amd/epyc/7601
                # while greater than 12 cpu cores downclocks to 2.70Ghz
                CPUS=12
            elif [[ "$(grep -o 'AMD EPYC 7551' /proc/cpuinfo | sort -u)" = 'AMD EPYC 7551' ]]; then
                # 7551P at 12 cpu cores has 3.0Ghz clock frequency https://en.wikichip.org/wiki/amd/epyc/7551p
                # while greater than 12 cpu cores downclocks to 2.55Ghz
                CPUS=12
            elif [[ "$(grep -o 'AMD EPYC 7401' /proc/cpuinfo | sort -u)" = 'AMD EPYC 7401' ]]; then
                # 7401P at 12 cpu cores has 3.0Ghz clock frequency https://en.wikichip.org/wiki/amd/epyc/7401p
                # while greater than 12 cpu cores downclocks to 2.8Ghz
                CPUS=12
            elif [[ "$(grep -o 'AMD EPYC 7371' /proc/cpuinfo | sort -u)" = 'AMD EPYC 7371' ]]; then
                # 7371 at 8 cpu cores has 3.8Ghz clock frequency https://en.wikichip.org/wiki/amd/epyc/7371
                # while greater than 8 cpu cores downclocks to 3.6Ghz
                CPUS=8
            else
                CPUS=$(echo $(($CPUS+4)))
            fi
        elif [[ "$CPUS" -eq '8' ]]; then
            CPUS=$(echo $(($CPUS+2)))
        else
            CPUS=$(echo $(($CPUS+1)))
        fi
        MAKETHREADS=" -j$CPUS"
    fi
    
    if [[ "$CENTOS_SEVEN" = '7' && "$DNF_ENABLE" = [yY] ]]; then
      # yum -y -q install epel-release
      if [[ ! -f /usr/bin/dnf ]]; then
        yum -y -q install dnf
      fi
      if [ -f /etc/yum.repos.d/rpmforge.repo ]; then
          sed -i 's|enabled .*|enabled = 0|g' /etc/yum.repos.d/rpmforge.repo
          DISABLEREPO_DNF=' --disablerepo=rpmforge'
          YUMDNFBIN="dnf${DISABLEREPO_DNF}"
      else
          DISABLEREPO_DNF=""
          YUMDNFBIN='dnf'
      fi
    else
      YUMDNFBIN='yum'
      if [ -f /etc/yum.repos.d/rpmforge.repo ]; then
        DISABLEREPO_DNF=' --disablerepo=rpmforge'
      else
        DISABLEREPO_DNF=""
      fi
    fi
    
    if [ ! -f /usr/bin/sar ]; then
      time $YUMDNFBIN -y -q install sysstat${DISABLEREPO_DNF}
      if [[ "$(uname -m)" = 'x86_64' || "$(uname -m)" = 'aarch64' ]]; then
        SARCALL='/usr/lib64/sa/sa1'
      else
        SARCALL='/usr/lib/sa/sa1'
      fi
      if [[ "$CENTOS_SEVEN" != '7' ]]; then
        sed -i 's|10|5|g' /etc/cron.d/sysstat
        service sysstat restart
        chkconfig sysstat on
      else
        sed -i 's|10|5|g' /etc/cron.d/sysstat
        systemctl restart sysstat.service
        systemctl enable sysstat.service
      fi
    elif [ -f /usr/bin/sar ]; then
      if [[ "$(uname -m)" = 'x86_64' || "$(uname -m)" = 'aarch64' ]]; then
        SARCALL='/usr/lib64/sa/sa1'
      else
        SARCALL='/usr/lib/sa/sa1'
      fi
      if [[ "$CENTOS_SEVEN" != '7' ]]; then
        sed -i 's|10|5|g' /etc/cron.d/sysstat
        service sysstat restart
        chkconfig sysstat on
      else
        sed -i 's|10|5|g' /etc/cron.d/sysstat
        systemctl restart sysstat.service
        systemctl enable sysstat.service
      fi
    fi
    ###########################################################
    # Setup Colours
    black='\E[30;40m'
    red='\E[31;40m'
    green='\E[32;40m'
    yellow='\E[33;40m'
    blue='\E[34;40m'
    magenta='\E[35;40m'
    cyan='\E[36;40m'
    white='\E[37;40m'
    
    boldblack='\E[1;30;40m'
    boldred='\E[1;31;40m'
    boldgreen='\E[1;32;40m'
    boldyellow='\E[1;33;40m'
    boldblue='\E[1;34;40m'
    boldmagenta='\E[1;35;40m'
    boldcyan='\E[1;36;40m'
    boldwhite='\E[1;37;40m'
    
    Reset="tput sgr0"      #  Reset text attributes to normal
                           #+ without clearing screen.
    
    cecho ()                     # Coloured-echo.
                                 # Argument $1 = message
                                 # Argument $2 = color
    {
    message=$1
    color=$2
    echo -e "$color$message" ; $Reset
    return
    }
    
    ###########################################################
    sar_call() {
      $SARCALL 1 1
    }
    
    scl_install() {
      # if gcc version is less than 4.7 (407) install scl collection yum repo
      if [[ "$CENTOS_SIX" = '6' ]]; then
        # if devtoolset exists, enable it first before checking gcc versions
        if [[ "$DEVTOOLSETSIX" = [yY] ]]; then
          if [[ -f /opt/rh/devtoolset-7/root/usr/bin/gcc && -f /opt/rh/devtoolset-7/root/usr/bin/g++ ]]; then
            source /opt/rh/devtoolset-7/enable
          fi
        else
          if [[ -f /opt/rh/devtoolset-7/root/usr/bin/gcc && -f /opt/rh/devtoolset-7/root/usr/bin/g++ ]]; then
            source /opt/rh/devtoolset-7/enable
          fi
        fi
        if [[ "$(gcc --version | head -n1 | awk '{print $3}' | cut -d . -f1,2 | sed "s|\.|0|")" -lt '407' ]]; then
          echo "install centos-release-scl for newer gcc and g++ versions"
          if [[ -z "$(rpm -qa | grep rpmforge)" ]]; then
            if [[ "$(rpm -ql centos-release-scl >/dev/null 2>&1; echo $?)" -ne '0' ]]; then
              time $YUMDNFBIN -y -q install centos-release-scl
            fi
            sar_call
          else
            if [[ "$(rpm -ql centos-release-scl >/dev/null 2>&1; echo $?)" -ne '0' ]]; then
              time $YUMDNFBIN -y -q install centos-release-scl --disablerepo=rpmforge
            fi
            sar_call
          fi
          if [[ "$DEVTOOLSETSIX" = [yY] ]]; then
            if [[ -z "$(rpm -qa | grep rpmforge)" ]]; then
              if [[ "$(rpm -ql devtoolset-7-gcc >/de6/null 2>&1; echo $?)" -ne '0' ]] || [[ "$(rpm -ql devtoolset-7-gcc-c++ 6/dev/null 2>&1; echo $?)" -ne '0' ]] || [[ "$(rpm -ql devtoolset-7-binutils6>/dev/null 2>&1; echo $?)" -ne '0' ]]; then
                time $YUMDNFBIN -y -q install devtoolset-7-gcc devtoolset-7-gcc-c++ devtoolset-7-binutils
              fi
              sar_call
            else
              if [[ "$(rpm -ql devtoolset-7-gcc >/de6/null 2>&1; echo $?)" -ne '0' ]] || [[ "$(rpm -ql devtoolset-7-gcc-c++ 6/dev/null 2>&1; echo $?)" -ne '0' ]] || [[ "$(rpm -ql devtoolset-7-binutils6>/dev/null 2>&1; echo $?)" -ne '0' ]]; then
                time $YUMDNFBIN -y -q install devtoolset-7-gcc devtoolset-7-gcc-c++ devtoolset-7-binutils --disablerepo=rpmforge
              fi
              sar_call
            fi
            echo
            /opt/rh/devtoolset-7/root/usr/bin/gcc --version
            /opt/rh/devtoolset-7/root/usr/bin/g++ --version
          else
            if [[ -z "$(rpm -qa | grep rpmforge)" ]]; then
              if [[ "$(rpm -ql devtoolset-7-gcc >/dev/null 2>&1; echo $?)" -ne '0' ]] || [[ "$(rpm -ql devtoolset-7-gcc-c++ >/dev/null 2>&1; echo $?)" -ne '0' ]] || [[ "$(rpm -ql devtoolset-7-binutils >/dev/null 2>&1; echo $?)" -ne '0' ]]; then
                time $YUMDNFBIN -y -q install devtoolset-7-gcc devtoolset-7-gcc-c++ devtoolset-7-binutils
              fi
              sar_call
            else
              if [[ "$(rpm -ql devtoolset-7-gcc >/dev/null 2>&1; echo $?)" -ne '0' ]] || [[ "$(rpm -ql devtoolset-7-gcc-c++ >/dev/null 2>&1; echo $?)" -ne '0' ]] || [[ "$(rpm -ql devtoolset-7-binutils >/dev/null 2>&1; echo $?)" -ne '0' ]]; then
                time $YUMDNFBIN -y -q install devtoolset-7-gcc devtoolset-7-gcc-c++ devtoolset-7-binutils --disablerepo=rpmforge
              fi
              sar_call
            fi
            echo
            /opt/rh/devtoolset-7/root/usr/bin/gcc --version
            /opt/rh/devtoolset-7/root/usr/bin/g++ --version
          fi
        fi
      elif [[ "$CENTOS_SEVEN" = '7' ]]; then
          if [[ -z "$(rpm -qa | grep rpmforge)" ]]; then
            if [[ "$(rpm -ql centos-release-scl >/dev/null 2>&1; echo $?)" -ne '0' ]]; then
              time $YUMDNFBIN -y -q install centos-release-scl
            fi
            sar_call
          else
            if [[ "$(rpm -ql centos-release-scl >/dev/null 2>&1; echo $?)" -ne '0' ]]; then
              time $YUMDNFBIN -y -q install centos-release-scl --disablerepo=rpmforge
            fi
            sar_call
          fi
          if [[ "$DEVTOOLSETSIX" = [yY] ]]; then
            if [[ -z "$(rpm -qa | grep rpmforge)" ]]; then
              if [[ "$(rpm -ql devtoolset-7-gcc >/de6/null 2>&1; echo $?)" -ne '0' ]] || [[ "$(rpm -ql devtoolset-7-gcc-c++ 6/dev/null 2>&1; echo $?)" -ne '0' ]] || [[ "$(rpm -ql devtoolset-7-binutils6>/dev/null 2>&1; echo $?)" -ne '0' ]]; then
                time $YUMDNFBIN -y -q install devtoolset-7-gcc devtoolset-7-gcc-c++ devtoolset-7-binutils
              fi
              sar_call
            else
              if [[ "$(rpm -ql devtoolset-7-gcc >/de6/null 2>&1; echo $?)" -ne '0' ]] || [[ "$(rpm -ql devtoolset-7-gcc-c++ 6/dev/null 2>&1; echo $?)" -ne '0' ]] || [[ "$(rpm -ql devtoolset-7-binutils6>/dev/null 2>&1; echo $?)" -ne '0' ]]; then
                time $YUMDNFBIN -y -q install devtoolset-7-gcc devtoolset-7-gcc-c++ devtoolset-7-binutils --disablerepo=rpmforge
              fi
              sar_call
            fi
            echo
            /opt/rh/devtoolset-7/root/usr/bin/gcc --version
            /opt/rh/devtoolset-7/root/usr/bin/g++ --version
          else
            if [[ -z "$(rpm -qa | grep rpmforge)" ]]; then
              if [[ "$(rpm -ql devtoolset-7-gcc >/dev/null 2>&1; echo $?)" -ne '0' ]] || [[ "$(rpm -ql devtoolset-7-gcc-c++ >/dev/null 2>&1; echo $?)" -ne '0' ]] || [[ "$(rpm -ql devtoolset-7-binutils >/dev/null 2>&1; echo $?)" -ne '0' ]]; then
                time $YUMDNFBIN -y -q install devtoolset-7-gcc devtoolset-7-gcc-c++ devtoolset-7-binutils
              fi
              sar_call
            else
              if [[ "$(rpm -ql devtoolset-7-gcc >/dev/null 2>&1; echo $?)" -ne '0' ]] || [[ "$(rpm -ql devtoolset-7-gcc-c++ >/dev/null 2>&1; echo $?)" -ne '0' ]] || [[ "$(rpm -ql devtoolset-7-binutils >/dev/null 2>&1; echo $?)" -ne '0' ]]; then
                time $YUMDNFBIN -y -q install devtoolset-7-gcc devtoolset-7-gcc-c++ devtoolset-7-binutils --disablerepo=rpmforge
              fi
              sar_call
            fi
            echo
            /opt/rh/devtoolset-7/root/usr/bin/gcc --version
            /opt/rh/devtoolset-7/root/usr/bin/g++ --version
          fi
      fi # centos 6 only needed
    }
    
    gccdevtools() {
      if [[ ! -f /opt/rh/devtoolset-7/root/usr/bin/gcc || ! -f /opt/rh/devtoolset-7/root/usr/bin/g++ ]] && [[ "$CENTOS_SIX" = '6' ]]; then
        scl_install
        unset CC
        unset CXX
        if [[ "$DEVTOOLSETSEVEN" = [yY] ]]; then
          export CC="/opt/rh/devtoolset-7/root/usr/bin/gcc"
          export CXX="/opt/rh/devtoolset-7/root/usr/bin/g++"
          export CFLAGS="-Wimplicit-fallthrough=0"
          export CXXFLAGS="${CFLAGS}"
        else
          export CC="/opt/rh/devtoolset-7/root/usr/bin/gcc"
          export CXX="/opt/rh/devtoolset-7/root/usr/bin/g++"
          export CFLAGS="-Wimplicit-fallthrough=0"
          export CXXFLAGS="${CFLAGS}"
        fi
      elif [[ "$DEVTOOLSETSEVEN" = [yY] && -f /opt/rh/devtoolset-7/root/usr/bin/gcc && -f /opt/rh/devtoolset-7/root/usr/bin/g++ ]] && [[ "$(gcc --version | head -n1 | awk '{print $3}' | cut -d . -f1,2 | sed "s|\.|0|")" -lt '407' ]]; then
        unset CC
        unset CXX
        export CC="/opt/rh/devtoolset-7/root/usr/bin/gcc"
        export CXX="/opt/rh/devtoolset-7/root/usr/bin/g++"
        export CFLAGS="-Wimplicit-fallthrough=0"
        export CXXFLAGS="${CFLAGS}"
      elif [[ -f /opt/rh/devtoolset-7/root/usr/bin/gcc && -f /opt/rh/devtoolset-7/root/usr/bin/g++ ]] && [[ "$(gcc --version | head -n1 | awk '{print $3}' | cut -d . -f1,2 | sed "s|\.|0|")" -lt '407' ]]; then
        unset CC
        unset CXX
        export CC="/opt/rh/devtoolset-7/root/usr/bin/gcc"
        export CXX="/opt/rh/devtoolset-7/root/usr/bin/g++"
        export CFLAGS="-Wimplicit-fallthrough=0"
        export CXXFLAGS="${CFLAGS}"
      fi
    }
    
    source_pcreinstall() {
      if [[ "$(/usr/local/bin/pcre-config --version 2>&1 | grep -q ${ALTPCRE_VERSION} >/dev/null 2>&1; echo $?)" != '0' ]] || [[ -f /usr/local/bin/pcretest && "$(/usr/local/bin/pcretest -C | grep 'No UTF-8 support' >/dev/null 2>&1; echo $?)" = '0' ]] || [[ -f /usr/local/bin/pcretest && "$(/usr/local/bin/pcretest -C | grep 'No just-in-time compiler support' >/dev/null 2>&1; echo $?)" = '0' ]]; then
      cd "$DIR_TMP"
      cecho "Download $ALTPCRELINKFILE ..." $boldyellow
      if [ -s "$ALTPCRELINKFILE" ]; then
        cecho "$ALTPCRELINKFILE Archive found, skipping download..." $boldgreen
      else
        wget -c${ipv_forceopt} --progress=bar "$ALTPCRELINK" --tries=3
        ERROR=$?
        if [[ "$ERROR" != '0' ]]; then
          cecho "Error: $ALTPCRELINKFILE download failed." $boldgreen
          exit #$ERROR
        else
          cecho "Download done." $boldyellow
        fi
      fi
     
      tar xzf "$ALTPCRELINKFILE"
      ERROR=$?
      if [[ "$ERROR" != '0' ]]; then
        cecho "Error: $ALTPCRELINKFILE extraction failed." $boldgreen
        exit #$ERROR
      else
        cecho "$ALTPCRELINKFILE valid file." $boldyellow
        echo ""
      fi
      cd "pcre-${ALTPCRE_VERSION}"
      make clean >/dev/null 2>&1
      ./configure --enable-utf8 --enable-unicode-properties --enable-pcre16 --enable-pcre32 --enable-pcregrep-libz --enable-pcregrep-libbz2 --enable-pcretest-libreadline --enable-jit
      sar_call
      if [[ "$WGET_STRACE" = [yY] ]]; then
        strace -o "${CENTMINLOGDIR}/strace_pcre_make_$DT.log" -f -s256 -tt -T -q make${MAKETHREADS}
      else
        make${MAKETHREADS}
      fi
      sar_call
      if [[ "$WGET_STRACE" = [yY] ]]; then
        strace -o "${CENTMINLOGDIR}/strace_pcre_make_install_$DT.log" -f -s256 -tt -T -q make install
      else 
        make install
      fi
      sar_call
      /usr/local/bin/pcre-config --version
      fi
    }
    
    source_wgetinstall() {
      if [[ "$(/usr/local/bin/wget -V | head -n1 | awk '{print $3}' | grep -q ${WGET_VERSION} >/dev/null 2>&1; echo $?)" != '0' ]]; then
      WGET_FILENAME="wget-${WGET_VERSION}.tar.gz"
      WGET_LINK="https://centminmod.com/centminmodparts/wget/${WGET_FILENAME}"
      cd "$DIR_TMP"
      cecho "Download $WGET_FILENAME ..." $boldyellow
      if [ -s "$WGET_FILENAME" ]; then
        cecho "$WGET_FILENAME Archive found, skipping download..." $boldgreen
      else
    
        curl -${ipv_forceopt}Is --connect-timeout 5 --max-time 5 "$WGET_LINK" | grep 'HTTP\/' | grep '200'
        WGET_CURLCHECK=$?
        if [[ "$WGET_CURLCHECK" = '0' ]]; then
          wget -c${ipv_forceopt} --progress=bar "$WGET_LINK" -O "$WGET_FILENAME" --tries=3
        else
          WGET_LINK="$WGET_LINKLOCAL"
          echo "wget -c${ipv_forceopt} --progress=bar "$WGET_LINK" -O "$WGET_FILENAME" --tries=3"
          wget -c${ipv_forceopt} --progress=bar "$WGET_LINK" -O "$WGET_FILENAME" --tries=3
        fi
        ERROR=$?
        if [[ "$ERROR" != '0' ]]; then
          cecho "Error: $WGET_FILENAME download failed." $boldgreen
          exit #$ERROR
        else
          cecho "Download done." $boldyellow
        fi
      fi
     
      tar xzf "$WGET_FILENAME"
      ERROR=$?
      if [[ "$ERROR" != '0' ]]; then
        cecho "Error: $WGET_FILENAME extraction failed." $boldgreen
        exit #$ERROR
      else
        cecho "$WGET_FILENAME valid file." $boldyellow
        echo ""
      fi
      cd "wget-${WGET_VERSION}"
      gccdevtools
      if [ -f config.status ]; then
        make clean
      fi
      if [[ "$(uname -m)" = 'x86_64' ]]; then
        export CFLAGS="-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic"
        export PCRE_CFLAGS="-I /usr/local/include"
        export PCRE_LIBS="-L /usr/local/lib -lpcre"
        # ensure wget.sh installer utilises system openssl
        export OPENSSL_CFLAGS="-I /usr/include"
        export OPENSSL_LIBS="-L /usr/lib64 -lssl -lcrypto"
      else
        export CFLAGS="-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -mtune=generic"
        export PCRE_CFLAGS="-I /usr/local/include"
        export PCRE_LIBS="-L /usr/local/lib -lpcre"
        if [ -f /root/.wgetrc ]; then
          \cp -fp /root/.wgetrc /root/.wgetrc-bak
          echo "ca_certificate=/etc/pki/tls/certs/ca-bundle.crt" > /root/.wgetrc
        else
          echo "ca_certificate=/etc/pki/tls/certs/ca-bundle.crt" > /root/.wgetrc
        fi
      fi
      # ./configure --with-ssl=openssl PCRE_CFLAGS="-I /usr/local/include" PCRE_LIBS="-L /usr/local/lib -lpcre"
      ./configure --with-ssl=openssl
      sar_call
      if [[ "$WGET_STRACE" = [yY] ]]; then
        make check
        make distcheck
        strace -o "${CENTMINLOGDIR}/strace_wget_make_$DT.log" -f -s256 -tt -T -q make${MAKETHREADS}
      else
        make${MAKETHREADS}
      fi
      sar_call
      if [[ "$WGET_STRACE" = [yY] ]]; then
        strace -o "${CENTMINLOGDIR}/strace_wget_make_install_$DT.log" -f -s256 -tt -T -q make install
      else
        make install
      fi
      sar_call
      echo "/usr/local/lib/" > /etc/ld.so.conf.d/wget.conf
      ldconfig
      if [[ ! "$(grep '^alias wget' /root/.bashrc)" ]] && [[ "$(wget -V | head -n1 | awk '{print $3}' | grep -q ${WGET_VERSION} >/dev/null 2>&1; echo $?)" = '0' ]]; then
        echo "alias wget='/usr/local/bin/wget'" >> /root/.bashrc
      fi
      . /root/.bashrc
    
      echo
      cecho "--------------------------------------------------------" $boldgreen
      echo "ldconfig -p | grep libpcre.so.1"
      ldconfig -p | grep libpcre.so.1
      echo
      echo "ldd $(which wget)"
      ldd $(which wget)
      cecho "--------------------------------------------------------" $boldgreen
      cecho "wget -V" $boldyellow
      wget -V
      cecho "--------------------------------------------------------" $boldgreen
      if [[ "$(wget -V | head -n1 | awk '{print $3}' | grep -q ${WGET_VERSION} >/dev/null 2>&1; echo $?)" = '0' ]]; then
        cecho "wget ${WGET_VERSION} installed at /usr/local/bin/wget" $boldyellow
        if [[ "$WGET_STRACE" = [yY] ]]; then
          # ls -lah ${CENTMINLOGDIR} | grep $DT
          if [ -f "${CENTMINLOGDIR}/strace_wget_make_$DT.log" ]; then
            gzip -6 "${CENTMINLOGDIR}/strace_wget_make_$DT.log"
            cecho "strace make log (gzip compressed): ${CENTMINLOGDIR}/strace_wget_make_$DT.log.gz" $boldyellow
          fi
          if [ -f "${CENTMINLOGDIR}/strace_wget_make_install_$DT.log" ]; then
            gzip -6 "${CENTMINLOGDIR}/strace_wget_make_install_$DT.log"
            cecho "strace make install log (gzip compressed): ${CENTMINLOGDIR}/strace_wget_make_install_$DT.log.gz" $boldyellow
          fi
        fi
      else
        cecho "wget ${WGET_VERSION} failed to update, still using system wget" $boldyellow
        cecho "install log: ${CENTMINLOGDIR}/wget_source_install_${DT}.log" $boldyellow
        if [[ "$WGET_STRACE" = [yY] ]]; then
          if [ -f "${CENTMINLOGDIR}/strace_wget_make_$DT.log" ]; then
            gzip -6 "${CENTMINLOGDIR}/strace_wget_make_$DT.log"
            cecho "strace make log (gzip compressed): ${CENTMINLOGDIR}/strace_wget_make_$DT.log.gz" $boldyellow
          fi
          if [ -f "${CENTMINLOGDIR}/strace_wget_make_install_$DT.log" ]; then
            gzip -6 "${CENTMINLOGDIR}/strace_wget_make_install_$DT.log"
            cecho "strace make install log (gzip compressed): ${CENTMINLOGDIR}/strace_wget_make_install_$DT.log.gz" $boldyellow
          fi
        fi
      fi
      # clean up strace logs older than 14 days
      find "${CENTMINLOGDIR}" -type f -mtime +14 \( -name 'strace_wget_make*' ! -name "strace_pcre_make*" \) -print
      find "${CENTMINLOGDIR}" -type f -mtime +14 \( -name 'strace_wget_make*' ! -name "strace_pcre_make*" \) -exec rm -rf {} \;
      cecho "--------------------------------------------------------" $boldgreen
      echo
      fi
    }
    
    ###########################################################################
    case $1 in
      install)
    starttime=$(TZ=UTC date +%s.%N)
    {
      # devtoolset SCL repo only supports 64bit OSes
      if [[ "$LOWMEM_INSTALL" != [yY] && "$(uname -m)" = 'x86_64' ]]; then
        source_pcreinstall
        source_wgetinstall
      fi
    } 2>&1 | tee "${CENTMINLOGDIR}/wget_source_install_${DT}.log"
    
    endtime=$(TZ=UTC date +%s.%N)
    
    INSTALLTIME=$(echo "scale=2;$endtime - $starttime"|bc )
    echo "" >> "${CENTMINLOGDIR}/wget_source_install_${DT}.log"
    echo "Total wget Install Time: $INSTALLTIME seconds" >> "${CENTMINLOGDIR}/wget_source_install_${DT}.log"
    tail -1 "${CENTMINLOGDIR}/wget_source_install_${DT}.log"
      ;;
      pcre)
    starttime=$(TZ=UTC date +%s.%N)
    {
      # devtoolset SCL repo only supports 64bit OSes
      if [[ "$LOWMEM_INSTALL" != [yY] && "$(uname -m)" = 'x86_64' ]]; then
        source_pcreinstall
      fi
    } 2>&1 | tee "${CENTMINLOGDIR}/wget_source_install_pcre_${DT}.log"
    
    endtime=$(TZ=UTC date +%s.%N)
    
    INSTALLTIME=$(echo "scale=2;$endtime - $starttime"|bc )
    echo "" >> "${CENTMINLOGDIR}/wget_source_install_pcre_${DT}.log"
    echo "Total wget pcre Install Time: $INSTALLTIME seconds" >> "${CENTMINLOGDIR}/wget_source_install_pcre_${DT}.log"
    tail -1 "${CENTMINLOGDIR}/wget_source_install_pcre_${DT}.log"
      ;;
      *)
        echo "$0 install"
      ;;
    esac
     
  20. eva2000

    eva2000 Administrator Staff Member

    39,216
    8,655
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +13,309
    Local Time:
    1:59 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    yeah i updated 123.09beta01 with the workaround.. there's a 2nd part that is in nginx update routine for the fix so try recompile nginx via centmin.sh menu option 4 after you have done 123.09beta01 update via cmupdate command.
     
    • Informative Informative x 1
..