Want to subscribe to topics you're interested in?
Become a Member

PHP-FPM Unable to Install/reinstall Redis after php Upgrade

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by Tinkerd10, Mar 25, 2018.

  1. Tinkerd10

    Tinkerd10 New Member

    21
    3
    3
    Sep 28, 2016
    Ratings:
    +13
    Local Time:
    4:17 AM
    1.11
    5.5
    Please fill in any relevant information that applies to you:
    • CentOS Version: i.e. CentOS 7 64bit ?
    • Centmin Mod Version Installed: 123.09beta01
    • Nginx Version Installed: 1.13.10
    • PHP Version Installed: 7.0.15
    • MariaDB MySQL Version Installed: 10.1.21
    • When was last time updated Centmin Mod code base ? : Today
    • Persistent Config: /etc/centminmod/custom_config.inc

      I just installed centminmod on a fresh server and Upgraded php to 7.1
      Installed fail2ban and that's where i started see problems with the server
      While going through the logs i noticed redis is not found

      So when i tried to check service redis status it kept returning Not found
      tried Install/reinstall form menu 13, the same thing it ends with error

      am i doing something wrong here ?

      Code:
      DEVTOOLSETSEVEN='y'
      CLANG='n'
      DEVTOOLSETSIX='n'
      LIBRESSL_SWITCH='n'
      DEVTOOLSETEIGHT='n'
      NGINX_DEVTOOLSETGCC='y'
      CLOUDFLARE_ZLIB='y'
      OPENSSLECDSA_PATCH='y'
      NGINX_PATCH='y'
      NGINX_HPACK='y'
      NGINX_DYNAMICTLS='y'
      PHPFINFO='y'
      NGXDYNAMIC_BROTLI='y'
      NGINX_LIBBROTLI=y
      PHP_PGO='y'
      NGXDYNAMIC_NGXPAGESPEED='y'
      NGINX_PAGESPEED='y'
      NGnix.conf

      Code:
      user              nginx nginx;
      worker_processes 10;
      worker_priority -10;
      
      worker_rlimit_nofile 520000;
      timer_resolution 100ms;
      
      pcre_jit on;
      include /usr/local/nginx/conf/dynamic-modules.conf;
      
      
      pid         logs/nginx.pid;
      
      events {
          worker_connections  50000;
          accept_mutex off;
          accept_mutex_delay 200ms;
          use epoll;
          #multi_accept on;
      }
      
      http {
      limit_req_zone $binary_remote_addr zone=xwprpc:10m rate=30r/s;
      limit_req_zone $binary_remote_addr zone=flood:10m rate=30r/m;
      limit_conn_zone $binary_remote_addr zone=limit_conn:10m;
       
       include /usr/local/nginx/conf/brotli_inc.conf;
       map_hash_bucket_size 128;
       map_hash_max_size 4096;
       server_names_hash_bucket_size 128;
       server_names_hash_max_size 2048;
       variables_hash_max_size 2048;
      
      fastcgi_cache_path /var/lib/php/ncache levels=1:2 keys_zone=microcache:10m max_size=1024m inactive=60m use_temp_path=off;
      fastcgi_cache_key $scheme$request_method$host$request_uri;
      
      limit_req_zone $binary_remote_addr zone=xwplogin:16m rate=40r/m;
      limit_conn_zone $binary_remote_addr zone=xwpconlimit:16m;
      
      
      # sets Centmin Mod headers via headers more nginx module
      # https://github.com/openresty/headers-more-nginx-module
      # don't remove the first 2 lines as centmin mod checks to see if they're
      # missing and re-adds them anyway. Just uncomment the 3rd & 4th lines
      # which is used to override the Server header to what you want = nginx
      # and remove the X-Powered-By header + restart nginx service
      # do not disable headers more nginx module itself as it's required for
      # other centmin mod features like redis nginx level caching & letsencrypt
      # integration in vhosts created by addons/acmetool.sh
      more_set_headers "Server: nginx centminmod";
      more_set_headers "X-Powered-By: centminmod";
      #more_set_headers "Server: nginx";
      #more_clear_headers "X-Powered-By";
      
      # uncomment cloudflare.conf include if using cloudflare for
      # server and/or vhost site + setup cron job for command
      # /usr/local/src/centminmod/tools/csfcf.sh auto
      # run the auto command once to populate cloudflare ips
      #include /usr/local/nginx/conf/cloudflare.conf;
      # uncomment incapsula.conf include if using incapsula for
      # server and/or vhost site + setup cron job for command
      # /usr/local/src/centminmod/tools/csfincapsula.sh auto
      # run the auto command once to popular incapsula ips
      #include /usr/local/nginx/conf/incapsula.conf;
      include /usr/local/nginx/conf/maintenance.conf;
      #include /usr/local/nginx/conf/vts_http.conf;
      include /usr/local/nginx/conf/geoip.conf;
      include /usr/local/nginx/conf/webp.conf;
      include /usr/local/nginx/conf/pagespeedadmin.conf;
      include /usr/local/nginx/conf/fastcgi_param_https_map.conf;
      include /usr/local/nginx/conf/redisupstream.conf;
      include /usr/local/nginx/conf/wpcacheenabler_map.conf;
      
      log_format  main  '$remote_addr - $remote_user [$time_local] $request '
                      '"$status" $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for" "$gzip_ratio"'
                      ' "$connection" "$connection_requests" "$request_time"';
      
      log_format  ddos-proxy '$remote_addr for $http_x_real_ip - $remote_user [$time_local] $request '
                      '"$status" $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for" "$gzip_ratio"'
                      ' "$connection" "$connection_requests" "$request_time"';
      
      log_format  main_ext '$remote_addr - $remote_user [$time_local] "$request" '
                               '$status $body_bytes_sent "$http_referer" '
                               '"$http_user_agent" "$http_x_forwarded_for" '
                               'rt=$request_time ua="$upstream_addr" '
                               'us="$upstream_status" ut="$upstream_response_time" '
                               'ul="$upstream_response_length" '
                               'cs=$upstream_cache_status' ;
      
      access_log  off;
      error_log   logs/error.log warn;
      
          index  index.php index.html index.htm;
          include       mime.types;
          default_type  application/octet-stream;
          charset utf-8;
      
              sendfile on;
              sendfile_max_chunk 512k;
              tcp_nopush  on;
              tcp_nodelay on;
              server_tokens off;
              server_name_in_redirect off;
              
              keepalive_timeout  6;
              keepalive_requests 500;
              lingering_time 20s;
              lingering_timeout 5s;
              keepalive_disable msie6;
      
          gzip on;
          gzip_vary   on;
          gzip_disable "MSIE [1-6]\.";
              gzip_static on;
              gzip_min_length   1400;
              gzip_buffers      1024 8k;
              gzip_http_version 1.0;
              gzip_comp_level 5;
              gzip_proxied    any;
              gzip_types text/plain text/css text/xml application/javascript application/x-javascript application/xml application/xml+rss application/ecmascript application/json image/svg+xml;
      
       client_body_buffer_size 256k;
       client_body_in_file_only off;
       client_body_timeout 60s;
       client_header_buffer_size 64k;
      ## how long a connection has to complete sending
      ## it's headers for request to be processed
       client_header_timeout  10s;
       client_max_body_size 1024m;
       connection_pool_size  512;
       directio  4m;
       directio_alignment 512;
       ignore_invalid_headers on;       
       large_client_header_buffers 8 64k;
       output_buffers   1 512k;
       postpone_output  1460;
       proxy_temp_path  /tmp/nginx_proxy/;
       request_pool_size  32k;
       reset_timedout_connection on;
       send_timeout     60s;
       types_hash_max_size 2048;
      
      # for nginx proxy backends to prevent redirects to backend port
      # port_in_redirect off;
      
      open_file_cache max=50000 inactive=60s;
      open_file_cache_valid 120s;
      open_file_cache_min_uses 2;
      open_file_cache_errors off;
      open_log_file_cache max=10000 inactive=30s min_uses=2;
      
      ## limit number of concurrency connections per ip to 16
      ## add to your server {} section the next line
      ## limit_conn limit_per_ip 16;
      ## uncomment below line allows 500K sessions
      # limit_conn_log_level error;
      #######################################
      # use limit_zone for Nginx <v1.1.7 and lower
      # limit_zone $binary_remote_addr zone=limit_per_ip:16m;
      #######################################
      # use limit_conn_zone for Nginx >v1.1.8 and higher
      # limit_conn_zone $binary_remote_addr zone=limit_per_ip:16m;
      #######################################
      
       include /usr/local/nginx/conf/conf.d/*.conf;
      }
      Redis install log from menu 13

      redis log - Pastebin.com

      Redis reinstall from menu 13

      ************************************************* [1;32;40m* Installing redis - Pastebin.com

      Code:
      ls -lArt /root/centminlogs :
      ls -lArt /root/centminlogs total 23836 -rw-r--r-- 1 root root 15995 Mar 22 - Pastebin.com

      First install of centmin:
      http://termbin.com/8mfc

      Upgrade from 5.6 to 7.1
      http://termbin.com/ough
     
  2. eva2000

    eva2000 Administrator Staff Member

    36,055
    7,910
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +12,192
    Local Time:
    1:17 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    Redis server isn't installed on centmin mod 123.09beta01 by default. You need to install it yourself as per instructions at Upgrade - Nginx - Redis - Insight Guide - How to install Redis server on Centmin Mod LEMP stack. Only time Centmin Mod will install redis for you is when you use centmin.sh menu option 22 wordpress auto installer and select redis nginx level wordpress caching option.

    centmin.sh menu option 13 is for redis php extension not redis server. Redis php extension is what allows PHP to talk to redis server which you can verify redis php extension is installed via command
    Code (Text):
    php --ri redis
    
     
    • Informative Informative x 1
  3. Tinkerd10

    Tinkerd10 New Member

    21
    3
    3
    Sep 28, 2016
    Ratings:
    +13
    Local Time:
    4:17 AM
    1.11
    5.5
    Thank you

    I just remembered that i always choose redis over keycdn when i install wordpress.
    So i found it weird when i didn't find redis.

    Is it normal that when i restart the server i can't access the website through http unless i turn on csf ?
     
  4. eva2000

    eva2000 Administrator Staff Member

    36,055
    7,910
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +12,192
    Local Time:
    1:17 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    Yes normal, CSF Firewall config that Centmin Mod installs whitelists and opens port 80, 443 etc for HTTP/HTTPS access. Disabling CSF Firewall, will remove that whitelisting blocking access. You should always use and enable CSF Firewall CSF Firewall - CentminMod.com LEMP Nginx web stack for CentOS
     
..