Welcome to Centmin Mod Community
Register Now

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

    35,559
    7,841
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +12,085
    Local Time:
    1:27 AM
    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 2
  2. Jon Snow

    Jon Snow Active Member

    369
    60
    28
    Jun 30, 2017
    Ratings:
    +90
    Local Time:
    12:27 PM
    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

    93
    8
    8
    Dec 21, 2017
    Ratings:
    +29
    Local Time:
    6:27 PM
    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

    32
    9
    8
    Sep 10, 2017
    Ratings:
    +15
    Local Time:
    11:27 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

    35,559
    7,841
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +12,085
    Local Time:
    1:27 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    Always nice to read how other folks are installing Centmin Mod :)
     
..