Welcome to Centmin Mod Community
Become a Member

Install Discussion: how do you initially install & setup your Centmin Mod server?

Discussion in 'Install & Upgrades or Pre-Install Questions' started by eva2000, May 9, 2018.

  1. eva2000

    eva2000 Administrator Staff Member

    39,800
    8,778
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +13,511
    Local Time:
    4:38 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    The initial Centmin Mod install guide and the Getting Started guide outlines the normal way of installing Centmin Mod. Then there's additional steps to further customise your Centmin Mod installs.

    So Centmin Mod users, want to share how you initially install and configure your Centmin Mod servers ?

    I'll go first with my latest method outlining SSH commands I use (all run in same SSH session window):
    Code (Text):
    # set your email address you want to receive alerts and server emails
    [email protected]
    

    Code (Text):
    # create initial persistent config file to override centmin.sh defaults
    # https://centminmod.com/upgrade.html#persistent
    mkdir -p /etc/centminmod
    touch /etc/centminmod/custom_config.inc
    
    # boost PHP 7 performance by enabling Profile Guided Optimisation flag
    # https://centminmod.com/perf/
    echo "PHP_PGO='y'" >> /etc/centminmod/custom_config.inc
    
    # install centmin mod latest beta with php-fpm 7.2 default
    # https://community.centminmod.com/threads/centmin-mod-09-beta-branch-testing.4128/
    yum -y update; curl -O https://centminmod.com/betainstaller72.sh && chmod 0700 betainstaller72.sh && bash betainstaller72.sh
    
    # enable letsencrypt ssl certificate integration https://centminmod.com/acmetool/
    echo "LETSENCRYPT_DETECT='y'" >> /etc/centminmod/custom_config.inc
    
    # install and configure auditd https://community.centminmod.com/posts/37680/
    echo "AUDITD_ENABLE='y'" >> /etc/centminmod/custom_config.inc
    /usr/local/src/centminmod/tools/auditd.sh setup
    
    # setup extended CSF Firewall blocklists https://community.centminmod.com/posts/50060/
    /usr/local/src/centminmod/tools/csf-advancetweaks.sh
    
    # enable CSF Firewall native fail2ban like support
    # https://community.centminmod.com/posts/62343/
    csf --profile backup backup-b4-customregex
    cp -a /usr/local/csf/bin/regex.custom.pm /usr/local/csf/bin/regex.custom.pm.bak
    egrep 'CUSTOM1_LOG|CUSTOM2_LOG|CUSTOM3_LOG|CUSTOM4_LOG' /etc/csf/csf.conf
    sed -i "s|CUSTOM1_LOG = .*|CUSTOM1_LOG = \"/home/nginx/domains/\*/log/access.log\"|" /etc/csf/csf.conf
    sed -i "s|CUSTOM2_LOG = .*|CUSTOM2_LOG = \"/home/nginx/domains/\*/log/error.log\"|" /etc/csf/csf.conf
    sed -i "s|CUSTOM3_LOG = .*|CUSTOM3_LOG = \"/var/log/nginx/localhost.access.log\"|" /etc/csf/csf.conf
    sed -i "s|CUSTOM4_LOG = .*|CUSTOM4_LOG = \"/var/log/nginx/localhost.error.log\"|" /etc/csf/csf.conf
    egrep 'CUSTOM1_LOG|CUSTOM2_LOG|CUSTOM3_LOG|CUSTOM4_LOG' /etc/csf/csf.conf
    wget -O /usr/local/csf/bin/regex.custom.pm https://gist.github.com/centminmod/f5551b92b8aba768c3b4db84c57e756d/raw/regex.custom.pm
    csf -ra
    
    # setup email alerts for diskalert cronjob /etc/cron.daily/diskalert
    # https://community.centminmod.com/posts/59973/
    sed -i "s|EMAIL=.*|EMAIL='$EMAIL'|" /etc/cron.daily/diskalert
    


    So what's your method ?
     
    • Informative Informative x 3
  2. Jon Snow

    Jon Snow Active Member

    409
    63
    28
    Jun 30, 2017
    Ratings:
    +96
    Local Time:
    3:38 AM
    Nginx 1.13.9
    MariaDB 10.1.31
    The first thing I do is update YUM (your command takes care of that though). After, I install Centminmod and then create the custom config with whatever I want.
     
    • Informative Informative x 2
  3. Meirami

    Meirami Member

    128
    15
    18
    Dec 21, 2017
    Ratings:
    +41
    Local Time:
    9:38 AM
    This is my way. Install Nextcloud 13

    Blocklists would be nice but missing ipset because Openvz.. .
     
    • Informative Informative x 2
  4. Jay Chen

    Jay Chen Member

    78
    24
    8
    Sep 10, 2017
    Ratings:
    +40
    Local Time:
    2:38 AM
    What I do is very similar to you

    Code:
    [email protected]
    
    mkdir -p /etc/centminmod
    touch /etc/centminmod/custom_config.inc
    
    echo "PHP_PGO='y'" >> /etc/centminmod/custom_config.inc
    
    yum -y update; curl -O https://centminmod.com/betainstaller72.sh && chmod 0700 betainstaller72.sh && bash betainstaller72.sh
    
    echo "LETSENCRYPT_DETECT='y'" >> /etc/centminmod/custom_config.inc
    
    then option 22 to install wordpress
     
    • Informative Informative x 2
  5. eva2000

    eva2000 Administrator Staff Member

    39,800
    8,778
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +13,511
    Local Time:
    4:38 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    Always nice to read how other folks are installing Centmin Mod :)
     
  6. eva2000

    eva2000 Administrator Staff Member

    39,800
    8,778
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +13,511
    Local Time:
    4:38 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    Anyone else sharing their install methods ? :)
     
  7. digij

    digij New Member

    18
    7
    3
    Jan 25, 2018
    Ratings:
    +10
    Local Time:
    7:38 AM
    I use your script (thanks!) with small additions.

    First setting up the hostname on a freshly deployed VPS...
    Code:
    # set up hostname
    echo "Enter hostname e.g. server.domain.com:"
    read -p 'Hostname: ' HOSTNAME
    hostnamectl set-hostname $HOSTNAME
    
    I don't like the email prompt after setup and I use global email addresses anyways :)
    Code:
    # set your email address you want to receive alerts and server emails
    [email protected]
    [email protected]
    
    Code:
    # setup centmin email adresses to avoid prompt
    touch /etc/centminmod/email-primary.ini && touch /etc/centminmod/email-secondary.ini
    echo $EMAIL >> /etc/centminmod/email-primary.ini
    echo $EMAILALT >> /etc/centminmod/email-secondary.ini
    
    Besides that not using FTP so...
    Code:
    echo "PUREFTPD_DISABLED='y'" >> /etc/centminmod/custom_config.inc
    
     
    • Like Like x 1
  8. eva2000

    eva2000 Administrator Staff Member

    39,800
    8,778
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +13,511
    Local Time:
    4:38 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    nice @digij thanks for sharing :)

    Updated my Centmin Mod setup routine

    my latest method outlining SSH commands I use (all run in same SSH session window):
    Code (Text):
    # set your email address you want to receive alerts and server emails
    [email protected]
    

    Code (Text):
    # create initial persistent config file to override centmin.sh defaults
    # https://centminmod.com/upgrade.html#persistent
    mkdir -p /etc/centminmod
    touch /etc/centminmod/custom_config.inc
    
    # enable nginx zero downtime on the fly nginx binary upgrades https://community.centminmod.com/threads/8000/
    #echo "NGINX_ZERODT='y'" >> /etc/centminmod/custom_config.inc
    
    # enable brotli compression https://community.centminmod.com/threads/10688/
    echo "NGINX_LIBBROTLI='y'" >> /etc/centminmod/custom_config.inc
    echo "NGXDYNAMIC_BROTLI='y'" >> /etc/centminmod/custom_config.inc
    
    # boost PHP 7 performance by enabling Profile Guided Optimisation flag
    # https://centminmod.com/perf/
    echo "PHP_PGO='y'" >> /etc/centminmod/custom_config.inc
    
    # mariadb 10.3 default install for private test server testing
    #echo "MARIADB_INSTALLTENTHREE='y'" >> /etc/centminmod/custom_config.inc
    
    # install centmin mod latest beta with php-fpm 7.2 default
    # https://community.centminmod.com/threads/centmin-mod-09-beta-branch-testing.4128/
    yum -y update; curl -O https://centminmod.com/betainstaller72.sh && chmod 0700 betainstaller72.sh && bash betainstaller72.sh
    
    # enable letsencrypt ssl certificate + dual RSA+ECDSA ssl certs https://centminmod.com/acmetool/
    echo "LETSENCRYPT_DETECT='y'" >> /etc/centminmod/custom_config.inc
    echo "DUALCERTS='y'" >> /etc/centminmod/custom_config.inc
    
    # install and configure auditd https://community.centminmod.com/posts/37680/
    echo "AUDITD_ENABLE='y'" >> /etc/centminmod/custom_config.inc
    /usr/local/src/centminmod/tools/auditd.sh setup
    
    # setup extended CSF Firewall blocklists https://community.centminmod.com/posts/50060/
    /usr/local/src/centminmod/tools/csf-advancetweaks.sh
    
    # enable CSF Firewall native fail2ban like support
    # https://community.centminmod.com/posts/62343/
    csf --profile backup backup-b4-customregex
    cp -a /usr/local/csf/bin/regex.custom.pm /usr/local/csf/bin/regex.custom.pm.bak
    egrep 'CUSTOM1_LOG|CUSTOM2_LOG|CUSTOM3_LOG|CUSTOM4_LOG' /etc/csf/csf.conf
    sed -i "s|CUSTOM1_LOG = .*|CUSTOM1_LOG = \"/home/nginx/domains/\*/log/access.log\"|" /etc/csf/csf.conf
    sed -i "s|CUSTOM2_LOG = .*|CUSTOM2_LOG = \"/home/nginx/domains/\*/log/error.log\"|" /etc/csf/csf.conf
    sed -i "s|CUSTOM3_LOG = .*|CUSTOM3_LOG = \"/var/log/nginx/localhost.access.log\"|" /etc/csf/csf.conf
    sed -i "s|CUSTOM4_LOG = .*|CUSTOM4_LOG = \"/var/log/nginx/localhost.error.log\"|" /etc/csf/csf.conf
    egrep 'CUSTOM1_LOG|CUSTOM2_LOG|CUSTOM3_LOG|CUSTOM4_LOG' /etc/csf/csf.conf
    wget -O /usr/local/csf/bin/regex.custom.pm https://gist.github.com/centminmod/f5551b92b8aba768c3b4db84c57e756d/raw/regex.custom.pm
    csf -ra
    
    # setup email alerts for diskalert cronjob /etc/cron.daily/diskalert
    # https://community.centminmod.com/posts/59973/
    sed -i "s|EMAIL=.*|EMAIL='$EMAIL'|" /etc/cron.daily/diskalert
    
     
    • Informative Informative x 1
  9. eva2000

    eva2000 Administrator Staff Member

    39,800
    8,778
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +13,511
    Local Time:
    4:38 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    Updated my method so I can enable zstd compressed log rotation for Nginx and PHP-FPM logs too as outlined at Beta Branch - add zstd compression supported nginx & php-fpm log rotation in 123.09…

    my latest method outlining SSH commands I use (all run in same SSH session window):
    Code (Text):
    # set your email address you want to receive alerts and server emails
    [email protected]
    

    Code (Text):
    # create initial persistent config file to override centmin.sh defaults
    # https://centminmod.com/upgrade.html#persistent
    mkdir -p /etc/centminmod
    touch /etc/centminmod/custom_config.inc
    
    # enable zstd compressed logrotation for nginx & php-fpm https://community.centminmod.com/threads/16374/
    echo "ZSTD_LOGROTATE_NGINX='y'" >> /etc/centminmod/custom_config.inc
    echo "ZSTD_LOGROTATE_PHPFPM='y'" >> /etc/centminmod/custom_config.inc
    
    # enable nginx zero downtime on the fly nginx binary upgrades https://community.centminmod.com/threads/8000/
    #echo "NGINX_ZERODT='y'" >> /etc/centminmod/custom_config.inc
    
    # enable brotli compression https://community.centminmod.com/threads/10688/
    echo "NGINX_LIBBROTLI='y'" >> /etc/centminmod/custom_config.inc
    echo "NGXDYNAMIC_BROTLI='y'" >> /etc/centminmod/custom_config.inc
    
    # boost PHP 7 performance by enabling Profile Guided Optimisation flag
    # https://centminmod.com/perf/
    echo "PHP_PGO='y'" >> /etc/centminmod/custom_config.inc
    
    # mariadb 10.3 default install for private test server testing
    #echo "MARIADB_INSTALLTENTHREE='y'" >> /etc/centminmod/custom_config.inc
    
    # install centmin mod latest beta with php-fpm 7.2 default
    # https://community.centminmod.com/threads/centmin-mod-09-beta-branch-testing.4128/
    yum -y update; curl -O https://centminmod.com/betainstaller72.sh && chmod 0700 betainstaller72.sh && bash betainstaller72.sh
    
    # enable letsencrypt ssl certificate + dual RSA+ECDSA ssl certs https://centminmod.com/acmetool/
    echo "LETSENCRYPT_DETECT='y'" >> /etc/centminmod/custom_config.inc
    echo "DUALCERTS='y'" >> /etc/centminmod/custom_config.inc
    
    # install and configure auditd https://community.centminmod.com/posts/37680/
    echo "AUDITD_ENABLE='y'" >> /etc/centminmod/custom_config.inc
    /usr/local/src/centminmod/tools/auditd.sh setup
    
    # setup extended CSF Firewall blocklists https://community.centminmod.com/posts/50060/
    /usr/local/src/centminmod/tools/csf-advancetweaks.sh
    
    # enable CSF Firewall native fail2ban like support
    # https://community.centminmod.com/posts/62343/
    csf --profile backup backup-b4-customregex
    cp -a /usr/local/csf/bin/regex.custom.pm /usr/local/csf/bin/regex.custom.pm.bak
    egrep 'CUSTOM1_LOG|CUSTOM2_LOG|CUSTOM3_LOG|CUSTOM4_LOG' /etc/csf/csf.conf
    sed -i "s|CUSTOM1_LOG = .*|CUSTOM1_LOG = \"/home/nginx/domains/\*/log/access.log\"|" /etc/csf/csf.conf
    sed -i "s|CUSTOM2_LOG = .*|CUSTOM2_LOG = \"/home/nginx/domains/\*/log/error.log\"|" /etc/csf/csf.conf
    sed -i "s|CUSTOM3_LOG = .*|CUSTOM3_LOG = \"/var/log/nginx/localhost.access.log\"|" /etc/csf/csf.conf
    sed -i "s|CUSTOM4_LOG = .*|CUSTOM4_LOG = \"/var/log/nginx/localhost.error.log\"|" /etc/csf/csf.conf
    egrep 'CUSTOM1_LOG|CUSTOM2_LOG|CUSTOM3_LOG|CUSTOM4_LOG' /etc/csf/csf.conf
    wget -O /usr/local/csf/bin/regex.custom.pm https://gist.github.com/centminmod/f5551b92b8aba768c3b4db84c57e756d/raw/regex.custom.pm
    csf -ra
    
    # setup email alerts for diskalert cronjob /etc/cron.daily/diskalert
    # https://community.centminmod.com/posts/59973/
    sed -i "s|EMAIL=.*|EMAIL='$EMAIL'|" /etc/cron.daily/diskalert
    
     
    • Like Like x 1
  10. Jay Chen

    Jay Chen Member

    78
    24
    8
    Sep 10, 2017
    Ratings:
    +40
    Local Time:
    2:38 AM
    Time to update my CMM, I installed it roughly a year ago and didn't update the core.
    I have to read up on the CSF Firewall native fail2ban like support, I want to implement it for extra security, but don't want to block good users from accessing the site.
     
  11. eva2000

    eva2000 Administrator Staff Member

    39,800
    8,778
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +13,511
    Local Time:
    4:38 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    Yeah it can be tricky :)

    Still using my method outlined here for Centmin Mod 123.09beta01 fresh installs :)
     
  12. eva2000

    eva2000 Administrator Staff Member

    39,800
    8,778
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +13,511
    Local Time:
    4:38 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    my latest method outlining SSH commands I use (all run in same SSH session window):

    enables php compression extensions too out of the box Beta Branch - add additional php compression extensions by default in 123.09beta01

    Code (Text):
    # set your email address you want to receive alerts and server emails
    [email protected]
    

    Code (Text):
    # create initial persistent config file to override centmin.sh defaults
    # https://centminmod.com/upgrade.html#persistent
    mkdir -p /etc/centminmod
    touch /etc/centminmod/custom_config.inc
    
    # enable zstd compressed logrotation for nginx & php-fpm https://community.centminmod.com/threads/16374/
    echo "ZSTD_LOGROTATE_NGINX='y'" >> /etc/centminmod/custom_config.inc
    echo "ZSTD_LOGROTATE_PHPFPM='y'" >> /etc/centminmod/custom_config.inc
    
    # enable nginx zero downtime on the fly nginx binary upgrades https://community.centminmod.com/threads/8000/
    #echo "NGINX_ZERODT='y'" >> /etc/centminmod/custom_config.inc
    
    # enable brotli compression https://community.centminmod.com/threads/10688/
    echo "NGINX_LIBBROTLI='y'" >> /etc/centminmod/custom_config.inc
    echo "NGXDYNAMIC_BROTLI='y'" >> /etc/centminmod/custom_config.inc
    
    # boost PHP 7 performance by enabling Profile Guided Optimisation flag
    # https://centminmod.com/perf/
    echo "PHP_PGO='y'" >> /etc/centminmod/custom_config.inc
    
    # mariadb 10.3 default install for private test server testing
    echo "MARIADB_INSTALLTENTHREE='y'" >> /etc/centminmod/custom_config.inc
    
    # php compression extensions https://community.centminmod.com/posts/70777/
    echo "PHP_BROTLI='y'" >> /etc/centminmod/custom_config.inc
    echo "PHP_LZFOUR='y'" >> /etc/centminmod/custom_config.inc
    echo "PHP_LZF='y'" >> /etc/centminmod/custom_config.inc
    echo "PHP_ZSTD='y'" >> /etc/centminmod/custom_config.inc
    
    # install centmin mod latest beta with php-fpm 7.2 default
    # https://community.centminmod.com/threads/centmin-mod-09-beta-branch-testing.4128/
    yum -y update; curl -O https://centminmod.com/betainstaller72.sh && chmod 0700 betainstaller72.sh && bash betainstaller72.sh
    
    # enable letsencrypt ssl certificate + dual RSA+ECDSA ssl certs https://centminmod.com/acmetool/
    echo "LETSENCRYPT_DETECT='y'" >> /etc/centminmod/custom_config.inc
    echo "DUALCERTS='y'" >> /etc/centminmod/custom_config.inc
    
    # install and configure auditd https://community.centminmod.com/posts/37680/
    echo "AUDITD_ENABLE='y'" >> /etc/centminmod/custom_config.inc
    /usr/local/src/centminmod/tools/auditd.sh setup
    
    # setup extended CSF Firewall blocklists https://community.centminmod.com/posts/50060/
    /usr/local/src/centminmod/tools/csf-advancetweaks.sh
    
    # enable CSF Firewall native fail2ban like support
    # https://community.centminmod.com/posts/62343/
    csf --profile backup backup-b4-customregex
    cp -a /usr/local/csf/bin/regex.custom.pm /usr/local/csf/bin/regex.custom.pm.bak
    egrep 'CUSTOM1_LOG|CUSTOM2_LOG|CUSTOM3_LOG|CUSTOM4_LOG' /etc/csf/csf.conf
    sed -i "s|CUSTOM1_LOG = .*|CUSTOM1_LOG = \"/home/nginx/domains/\*/log/access.log\"|" /etc/csf/csf.conf
    sed -i "s|CUSTOM2_LOG = .*|CUSTOM2_LOG = \"/home/nginx/domains/\*/log/error.log\"|" /etc/csf/csf.conf
    sed -i "s|CUSTOM3_LOG = .*|CUSTOM3_LOG = \"/var/log/nginx/localhost.access.log\"|" /etc/csf/csf.conf
    sed -i "s|CUSTOM4_LOG = .*|CUSTOM4_LOG = \"/var/log/nginx/localhost.error.log\"|" /etc/csf/csf.conf
    egrep 'CUSTOM1_LOG|CUSTOM2_LOG|CUSTOM3_LOG|CUSTOM4_LOG' /etc/csf/csf.conf
    wget -O /usr/local/csf/bin/regex.custom.pm https://gist.github.com/centminmod/f5551b92b8aba768c3b4db84c57e756d/raw/regex.custom.pm
    csf -ra
    
    # setup email alerts for diskalert cronjob /etc/cron.daily/diskalert
    # https://community.centminmod.com/posts/59973/
    sed -i "s|EMAIL=.*|EMAIL='$EMAIL'|" /etc/cron.daily/diskalert
    
     
    • Like Like x 6
    • Informative Informative x 1
  13. R0rke

    R0rke Member

    131
    17
    18
    Jun 2, 2016
    Iran
    Ratings:
    +28
    Local Time:
    11:38 PM
    1.11.1
    10.1
    Code:
    # create initial persistent config file to override centmin.sh defaults
    # https://centminmod.com/upgrade.html#persistent
    mkdir -p /etc/centminmod
    touch /etc/centminmod/custom_config.inc
    
    # enable zstd compressed logrotation for nginx & php-fpm https://community.centminmod.com/threads/16374/
    echo "NGXDYNAMIC_NGXPAGESPEED='y'" >> /etc/centminmod/custom_config.inc
    echo "NGINX_PAGESPEED='y'" >> /etc/centminmod/custom_config.inc
    echo "CUSTOMSERVERSTRING='nginx'" >> /etc/centminmod/custom_config.inc
    echo "ZONEINFO=Asia/Tehran" >> /etc/centminmod/custom_config.inc
    echo "PUSHOVER_EMAIL='************@pomail.net'" >> /etc/centminmod/custom_config.inc
    echo "PHP_BROTLI='y'" >> /etc/centminmod/custom_config.inc
    echo "PHP_LZFOUR='y'" >> /etc/centminmod/custom_config.inc
    echo "PHP_LZF='y'" >> /etc/centminmod/custom_config.inc
    echo "PHP_ZSTD='y'" >> /etc/centminmod/custom_config.inc
    echo "PHP_LZF='y'" >> /etc/centminmod/custom_config.inc
    echo "CUSTOM_CURLRPM=y" >> /etc/centminmod/custom_config.inc
    echo "FORCE_IPVFOUR='y'" >> /etc/centminmod/custom_config.inc
    echo "EMAIL='***************'" >> /etc/centminmod/custom_config.inc
    
    
    # enable nginx zero downtime on the fly nginx binary upgrades https://community.centminmod.com/threads/8000/
    #echo "NGINX_ZERODT='y'" >> /etc/centminmod/custom_config.inc
    
    # enable brotli compression https://community.centminmod.com/threads/10688/
    echo "NGINX_LIBBROTLI='y'" >> /etc/centminmod/custom_config.inc
    echo "NGXDYNAMIC_BROTLI='y'" >> /etc/centminmod/custom_config.inc
    
    # boost PHP 7 performance by enabling Profile Guided Optimisation flag
    # https://centminmod.com/perf/
    echo "PHP_PGO='y'" >> /etc/centminmod/custom_config.inc
    
    # mariadb 10.3 default install for private test server testing
    echo "MARIADB_INSTALLTENTHREE='y'" >> /etc/centminmod/custom_config.inc
    
    # php compression extensions https://community.centminmod.com/posts/70777/
    echo "PHP_BROTLI='y'" >> /etc/centminmod/custom_config.inc
    echo "PHP_LZFOUR='y'" >> /etc/centminmod/custom_config.inc
    echo "PHP_LZF='y'" >> /etc/centminmod/custom_config.inc
    echo "PHP_ZSTD='y'" >> /etc/centminmod/custom_config.inc
    
    # install centmin mod latest beta with php-fpm 7.2 default
    # https://community.centminmod.com/threads/centmin-mod-09-beta-branch-testing.4128/
    yum -y update; curl -O https://centminmod.com/betainstaller72.sh && chmod 0700 betainstaller72.sh && bash betainstaller72.sh
    
    # enable letsencrypt ssl certificate + dual RSA+ECDSA ssl certs https://centminmod.com/acmetool/
    echo "LETSENCRYPT_DETECT='y'" >> /etc/centminmod/custom_config.inc
    echo "DUALCERTS='y'" >> /etc/centminmod/custom_config.inc
    
    # install and configure auditd https://community.centminmod.com/posts/37680/
    echo "AUDITD_ENABLE='y'" >> /etc/centminmod/custom_config.inc
    /usr/local/src/centminmod/tools/auditd.sh setup
    
    # setup extended CSF Firewall blocklists https://community.centminmod.com/posts/50060/
    /usr/local/src/centminmod/tools/csf-advancetweaks.sh
    
    # enable CSF Firewall native fail2ban like support
    # https://community.centminmod.com/posts/62343/
    csf --profile backup backup-b4-customregex
    cp -a /usr/local/csf/bin/regex.custom.pm /usr/local/csf/bin/regex.custom.pm.bak
    egrep 'CUSTOM1_LOG|CUSTOM2_LOG|CUSTOM3_LOG|CUSTOM4_LOG' /etc/csf/csf.conf
    sed -i "s|CUSTOM1_LOG = .*|CUSTOM1_LOG = \"/home/nginx/domains/\*/log/access.log\"|" /etc/csf/csf.conf
    sed -i "s|CUSTOM2_LOG = .*|CUSTOM2_LOG = \"/home/nginx/domains/\*/log/error.log\"|" /etc/csf/csf.conf
    sed -i "s|CUSTOM3_LOG = .*|CUSTOM3_LOG = \"/var/log/nginx/localhost.access.log\"|" /etc/csf/csf.conf
    sed -i "s|CUSTOM4_LOG = .*|CUSTOM4_LOG = \"/var/log/nginx/localhost.error.log\"|" /etc/csf/csf.conf
    egrep 'CUSTOM1_LOG|CUSTOM2_LOG|CUSTOM3_LOG|CUSTOM4_LOG' /etc/csf/csf.conf
    wget -O /usr/local/csf/bin/regex.custom.pm https://gist.github.com/centminmod/f5551b92b8aba768c3b4db84c57e756d/raw/regex.custom.pm
    csf -ra
    
    # setup email alerts for diskalert cronjob /etc/cron.daily/diskalert
    # https://community.centminmod.com/posts/59973/
    sed -i "s|EMAIL=.*|EMAIL='$EMAIL'|" /etc/cron.daily/diskalert
    I tried this but not installed successfully
     
  14. eva2000

    eva2000 Administrator Staff Member

    39,800
    8,778
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +13,511
    Local Time:
    4:38 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    what errors ? you can check install log for clues

    You'll need to post on the forums with the following info
    • Server or VPS details ? XEN, KVM, OpenVZ, VMWare or dedicated server ? OS ? CentOS 6.9 or 7.4 ? 32bit or 64bit ?
    • What version of Centmin Mod ? .07 stable or 08 stable or .09 beta01 or another branch version ?
    • Was it fresh install or upgrade ?
    • Method of install ? Via centmin.sh menu option 1, Git install or curl one liner install as outlined at centminmod.com/download.html ?
    • How long ago did you install Centmin Mod ?

    Troubleshooting Initial Install



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

    Example for 123.09beta01 and newer list /root/centminlogs files in date ascending order and grep for installer_*
    Code (Text):
    ls -lahrt /root/centminlogs | grep installer_*
    

    example output returns install log at /root/centminlogs both a the full log and minimal log (smaller in size with some stuff filtered out)
    Code (Text):
    ls -lahrt /root/centminlogs | grep installer_*
    -rw-r--r-- 1 root root 4.3M Jul 12 09:06 installer_120718-083445.log
    -rw-r--r-- 1 root root 826K Jul 12 10:20 installer_120718-083445_minimal.log
    


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

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

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

    for 123.08stable
    Code (Text):
    cat /root/centminlogs/centminmod_1.2.3-eva2000.09.001_111016-112321_install.log
    

    for 123.09beta01 and newer
    Code (Text):
    cat /root/centminlogs/installer_120718-083445_minimal.log
    


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

    noly Premium Member Premium Member

    95
    14
    8
    Jul 24, 2017
    Germany
    Ratings:
    +26
    Local Time:
    8:38 AM
    1.13.x
    10.x
    Just discovered this thread! Great idea! Thanks to everyone sharing his method....learned a lot today. :)

    I do have a question regarding the daily diskalert cron job though.

    If i want to use pushover as the provider for the alerts, do i have to change
    EMAIL='[email protected]' to PUSHOVER_EMAIL='[email protected]' ?
     
  16. Kuro

    Kuro Member

    58
    7
    8
    Feb 8, 2018
    Ratings:
    +10
    Local Time:
    1:38 PM
    1.15.10
    10.3
    • Informative Informative x 1
  17. eva2000

    eva2000 Administrator Staff Member

    39,800
    8,778
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +13,511
    Local Time:
    4:38 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    no just put pushover email address in EMAIL= variable instead
     
    • Like Like x 1
  18. Kuro

    Kuro Member

    58
    7
    8
    Feb 8, 2018
    Ratings:
    +10
    Local Time:
    1:38 PM
    1.15.10
    10.3
    I do not use Letsencrypt and I am using Cloudflare Dedicated SSL Certificates (5$/m like centminmod.com) I wonder if I should YES or NO. (Now: No)
    Code:
    Create a self-signed SSL certificate Nginx vhost? [y/n]:
    I have seen you ... :whistle:
    Code:
    # enable letsencrypt ssl certificate + dual RSA+ECDSA ssl certs https://centminmod.com/acmetool/
    echo "LETSENCRYPT_DETECT='y'" >> /etc/centminmod/custom_config.inc
    echo "DUALCERTS='y'" >> /etc/centminmod/custom_config.inc
     
  19. eva2000

    eva2000 Administrator Staff Member

    39,800
    8,778
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +13,511
    Local Time:
    4:38 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    You should still use letsencrypt or ssl on Centmin Mod Nginx when behind Cloudflare as Cloudflare can now speak HTTPS TLS 1.3 with your Centmin Mod origin Nginx server when you set Cloudflare to Strict SSL see https://community.centminmod.com/th...s-tls-1-3-backend-origin-communication.16795/
     
    • Like Like x 1
    • Informative Informative x 1
  20. R0rke

    R0rke Member

    131
    17
    18
    Jun 2, 2016
    Iran
    Ratings:
    +28
    Local Time:
    11:38 PM
    1.11.1
    10.1
    I used
    but not installed curl rpm

    i simply want to fresh install Centminmod with PHP 7.3 + latest curl/libcurl
    @eva2000
     
..