Join the community today
Become a Member

Install Nginx PHP-FPM Nginx and PHP-FPM failed to install

Discussion in 'Install & Upgrades or Pre-Install Questions' started by Matt Williams, May 6, 2021.

  1. Matt Williams

    Matt Williams WordPress Fanatic

    494
    96
    28
    Nov 22, 2014
    Virginia, USA
    Ratings:
    +143
    Local Time:
    4:34 AM
    latest
    10
    Please fill in any relevant information that applies to you:
    • CentOS Version: CentOS 7 64bit
    • Centmin Mod Version Installed: 123.09beta01
    • Nginx Version Installed: FAILED
    • PHP Version Installed: FAILED
    • MariaDB MySQL Version Installed: 10.2.xx
    • When was last time updated Centmin Mod code base ? : i.e. run centmin.sh menu option 23 submenu option 2 or cmupdate command
    • Persistent Config: Do you have any persistent config file options set in /etc/centminmod/custom_config.inc ? You can check via this command:
      Code (Text):
      cat /etc/centminmod/custom_config.inc
      

      Post output in CODE tags.
    Code:
    ALERTEMAIL='me@mydomain.com'
    DUALCERTS=’y’
    WP_FASTCGI_CACHE='y'
    NGXDYNAMIC_BROTLI='y'
    NGINX_LIBBROTLI='y'
    NGINX_HPACK='y'
    CLOUDFLARE_ZLIB='y'
    NGINX_DYNAMICTLS='y'
    PHP_PGO='y'
    PHPIONCUBE='y'
    ENABLE_MARIADBTENTWOUPGRADE='y'
    ENABLE_MARIADBTENTHREEUPGRADE='y'
    ENABLE_MARIADBTENFOURUPGRADE='y'
    PHP_LIBZIP='y'
    PHP_ARGON='y'
    PHP_BROTLI='y'
    PHP_LZFOUR='y'
    PHP_LZF='y'
    PHP_ZSTD='y'
    AUTODETECPHP_OVERRIDE='y'
    LETSENCRYPT_DETECT='y'
    ACMEDEBUG='y'
    PHPFINFO='y'
    MARCH_TARGETNATIVE='n'
    NGINX_IOURING_PATCH='y'
    I've tried to install 3 times now ( New Install ) and each time have failed with...


    Code:
    Check Nginx Version:
    --------------------------------------------------------
    which: no nginx in (/opt/rh/devtoolset-8/root/usr/bin:/opt/rh/devtoolset-8/root/usr/bin:/opt/rh/devtoolset-8/root/usr/bin:/opt/rh/devtoolset-8/root/usr/bin:/opt/rh/devtoolset-8/root/usr/bin:/opt/rh/devtoolset-8/root/usr/bin:/opt/rh/devtoolset-8/root/usr/bin:/opt/rh/devtoolset-8/root/usr/bin:/opt/rh/devtoolset-8/root/usr/bin:/opt/rh/devtoolset-8/root/usr/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin)
    can not find nginx binary.. install failed
    
    --------------------------------------------------------
    Check PHP-FPM Version:
    --------------------------------------------------------
    which: no php in (/opt/rh/devtoolset-8/root/usr/bin:/opt/rh/devtoolset-8/root/usr/bin:/opt/rh/devtoolset-8/root/usr/bin:/opt/rh/devtoolset-8/root/usr/bin:/opt/rh/devtoolset-8/root/usr/bin:/opt/rh/devtoolset-8/root/usr/bin:/opt/rh/devtoolset-8/root/usr/bin:/opt/rh/devtoolset-8/root/usr/bin:/opt/rh/devtoolset-8/root/usr/bin:/opt/rh/devtoolset-8/root/usr/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin)
    inc/centminfinish.inc: line 103: -v: command not found
    
    --------------------------------------------------------
    
    Doing
    then running
    shows:
    Code:
    May 05 21:20:13 brooklyn.domain.com systemd[1]: Unit php-fpm.service entered failed state.
    May 05 21:20:13 brooklyn.domain.com systemd[1]: php-fpm.service failed.
    May 05 21:20:13 brooklyn.domain.com polkitd[417]: Unregistered Authentication Agent for unix-process:51209:285796 (system bus name :1.152, object pat
    May 05 21:20:15 brooklyn.domain.com kernel: Firewall: *TCP_IN Blocked* IN=eth0 OUT= MAC=56:00:03:57:45:7c:fe:00:03:57:45:7c:08:00 SRC=89.248.165.78 D
    May 05 21:20:16 brooklyn.domain.com kernel: Firewall: *TCP_IN Blocked* IN=eth0 OUT= MAC=56:00:03:57:45:7c:fe:00:03:57:45:7c:08:00 SRC=42.194.167.162
    lines 1613-1635/1635 (END)
    
    Have any idea why?
     
  2. Matt Williams

    Matt Williams WordPress Fanatic

    494
    96
    28
    Nov 22, 2014
    Virginia, USA
    Ratings:
    +143
    Local Time:
    4:34 AM
    latest
    10
    Got nginx to load but now it says this:

    Code:
    ● php-fpm.service - PHP FastCGI Process Manager
       Loaded: loaded (/usr/lib/systemd/system/php-fpm.service; enabled; vendor preset: disabled)
      Drop-In: /etc/systemd/system/php-fpm.service.d
               └─limit.conf
       Active: failed (Result: exit-code) since Wed 2021-05-05 21:43:25 UTC; 12s ago
      Process: 59323 ExecStart=/usr/local/sbin/php-fpm --daemonize --fpm-config /usr/local/etc/php-fpm.conf --pid /var/run/php-fpm/php-fpm.pid (code=exited, status=203/EXEC)
    
    May 05 21:43:25 brooklyn.domain.com systemd[1]: Starting PHP FastCGI Process Manager...
    May 05 21:43:25 brooklyn.domain.com systemd[1]: php-fpm.service: control process exited, code=exited status=203
    May 05 21:43:25 brooklyn.domain.com systemd[1]: Failed to start PHP FastCGI Process Manager.
    May 05 21:43:25 brooklyn.domain.com systemd[1]: Unit php-fpm.service entered failed state.
    May 05 21:43:25 brooklyn.domain.com systemd[1]: php-fpm.service failed.
    
    That came up when I ran
     
  3. Matt Williams

    Matt Williams WordPress Fanatic

    494
    96
    28
    Nov 22, 2014
    Virginia, USA
    Ratings:
    +143
    Local Time:
    4:34 AM
    latest
    10
    I did delete
    out of custom_config.inc and rebuilt nginx then tried to rebuild php but the above error came up along with

    Code:
    HTTP/1.1 200 OK
    Initializing download: https://www.php.net/distributions/php-7.4.16.tar.gz
    HTTP/1.1 503 Service Temporarily Unavailable
    Error: php-7.4.16.tar.gz download failed.
    
     
  4. eva2000

    eva2000 Administrator Staff Member

    46,851
    10,627
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,493
    Local Time:
    6:34 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    I'd get your local DNS resolvers on your server - sounds like it ain't working 100% and not all required dependencies and YUM packages are being properly downloaded.

    But to troubleshoot initial installs, need all info asked at Install - How to troubleshoot Centmin Mod initial install issues

    If you run centmin.sh menu option 4 and 5 for nginx and php-fpm recompiles and have issues also look at Install - Nginx - How to troubleshoot Nginx installs/upgrades and PHP-FPM - How to troubleshoot PHP installs/upgrades
     
  5. eva2000

    eva2000 Administrator Staff Member

    46,851
    10,627
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,493
    Local Time:
    6:34 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    looks like for PHP at least, their download system is having issues. Tried updating PHP on 5 servers simultaneously and one of the servers got same error
    Code (Text):
    HTTP/1.1 200 OK
    Initializing download: https://www.php.net/distributions/php-7.3.28.tar.gz
    HTTP/1.1 503 Service Temporarily Unavailable
    Error: php-7.3.28.tar.gz download failed.
    

    while other 4 servers downloaded fine. Wonder if it's a rate limiting in place for php.net ?

    edit: Interesting part is the centmin mod internal PHP download curl check for 404/503 status is returning 200 status but the actual php.net download is coming back 503 when downloaded. This suggests the initial curl check is hitting one CDN edge server but the download maybe hitting another CDN edge server which returns a 503 error
     
  6. eva2000

    eva2000 Administrator Staff Member

    46,851
    10,627
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,493
    Local Time:
    6:34 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
  7. Matt Williams

    Matt Williams WordPress Fanatic

    494
    96
    28
    Nov 22, 2014
    Virginia, USA
    Ratings:
    +143
    Local Time:
    4:34 AM
    latest
    10
    I'm almost wondering if it's a Vultr thing. Im currently trying the install on Linode to see if that has anything to do with it
     
  8. eva2000

    eva2000 Administrator Staff Member

    46,851
    10,627
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,493
    Local Time:
    6:34 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    could be for Nginx but PHP is probably something with PHP.net CDN system as it's starting to happen on other servers too but my latest 123.09beta01 workaround fix has it covered now Beta Branch - re-enable PHP local download mirror fallback in 123.09beta01 :)
     
  9. Matt Williams

    Matt Williams WordPress Fanatic

    494
    96
    28
    Nov 22, 2014
    Virginia, USA
    Ratings:
    +143
    Local Time:
    4:34 AM
    latest
    10
    Looks like it's all good now! Works everywhere now. Thank you for your help @eva2000
     
  10. eva2000

    eva2000 Administrator Staff Member

    46,851
    10,627
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,493
    Local Time:
    6:34 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    Great to hear. Looking at my Cloudflare analytics, the local fallback mirror had 120+ downloads from 12 countries, so must be a php.net wider CDN 503 issue if that many Centmin Mod server's PHP upgrades were forced to use the local fallback mirror.