Welcome to Centmin Mod Community
Become a Member

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. EckyBrazzz

    EckyBrazzz Active Member

    896
    187
    43
    Mar 28, 2018
    >>>>Click here<<<< i'm nearby......
    Ratings:
    +350
    Local Time:
    1:11 AM
    Latest
    Latest
    @tininho to make it more to shine as @eva2000 tells (I rather say preform) make sure you have this in your /etc/centminmod/custom_config.inc
    Code (Text):
    NGINX_IOURING_PATCH='y'  

    Recompile nginx and see it "shine more":)

     
  2. hardousse

    hardousse Active Member

    154
    35
    28
    Dec 15, 2015
    Sweden
    Ratings:
    +53
    Local Time:
    7:11 AM
    1.11.*
    10.1*
    Hi
    I use Securecrt can you Share your script Please i was try to make my self but fail
     
  3. adamus007p

    adamus007p Member

    254
    17
    18
    Feb 8, 2019
    Ratings:
    +28
    Local Time:
    6:11 AM
    Any post config setup?
    For example when I want use Wordpress and Cloudflare?

    Any further links?
    It would be helpful for beginners :)
     
  4. eva2000

    eva2000 Administrator Staff Member

    46,648
    10,590
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,435
    Local Time:
    2:11 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    Official Getting Started Guide outlines everything you should do (where it applies) after initial install Getting Started Guide - CentminMod.com LEMP Nginx web stack for CentOS

    Last part of guide at https://servermanager.guide/122/how-to-install-wordpress-on-centmin-mod-lemp-stack-guide/ shows how Cloudflare is setup which is same for any site/web app regardless if it's Wordpress.

    If you have specific questions, best to start a new thread on the forum as this thread is for discussing how members install/setup their servers in general.
     
  5. Kuro

    Kuro Member

    83
    12
    8
    Feb 8, 2018
    Ratings:
    +19
    Local Time:
    11:11 AM
    1.15.10
    10.3
    @eva Keep going :D
    Every time I install a new server, I configure it like you.
     
  6. jeparamedia

    jeparamedia New Member

    29
    8
    3
    May 9, 2019
    Ratings:
    +15
    Local Time:
    11:11 AM
    1.15.12
    MariaDB 10.3.15
    Hello Sir,
    Is this still working or up to date ?
    i setup 2 times with this but "after couple setting of wordpres the page is showing CF error "host error". thanks
     
  7. eva2000

    eva2000 Administrator Staff Member

    46,648
    10,590
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,435
    Local Time:
    2:11 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    should be, there's also version at https://servermanager.guide/117/centmin-mod-advanced-customised-installation-guide/

    If you're using centmin mod nginx default HTTPS with letsencrypt, then Cloudflare needs switching from Flexible SSL to Full SSL (non-strict)

    see what I did with centmin.sh menu option 22 wordpress + cloudflare at https://servermanager.guide/122/how-to-install-wordpress-on-centmin-mod-lemp-stack-guide/
     
  8. jeparamedia

    jeparamedia New Member

    29
    8
    3
    May 9, 2019
    Ratings:
    +15
    Local Time:
    11:11 AM
    1.15.12
    MariaDB 10.3.15
    aah okay thank you Eva.. will try and read again.
     
  9. David Coate

    David Coate Premium Member Premium Member

    8
    2
    3
    Jun 20, 2020
    Pensacola, Florida, US
    Ratings:
    +6
    Local Time:
    11:11 PM
    I just installed using the Linode centminmod stack script to create a new linode instance with centminmod fully installed, takes about 35 minutes to install on a 5$ single core nanode plan. I've created some before without problems. This time I opted for most of the options but nginx fails to start due to missing lua files since I selected LUA=yes. I don't need lua, was just seeing how well the script worked and the time to install if all options included.
     
  10. R0rke

    R0rke Member

    163
    20
    18
    Jun 2, 2016
    Iran
    Ratings:
    +34
    Local Time:
    9:11 PM
    1.11.1
    10.1
    Code (Text):
    mkdir -p /etc/centminmod
    touch /etc/centminmod/custom_config.inc
    email=alikarimy3@gmail.com
    echo "NSD_INSTALL='n'" >> /etc/centminmod/custom_config.inc
    echo "NSD_DISABLED='y'" >> /etc/centminmod/custom_config.inc
    echo "LIBRESSL_SWITCH='n'" >> /etc/centminmod/custom_config.inc
    echo "MARIADB_INSTALLTENFOUR='y'" >> /etc/centminmod/custom_config.inc
    echo "VHOSTCTRL_CLOUDFLAREINC='y'" >> /etc/centminmod/custom_config.inc
    echo "PUREFTPD_DISABLED='y'" >> /etc/centminmod/custom_config.inc
    echo "PUREFTPD_INSTALL='n'" >> /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='gkd5bv178p@pomail.net'" >> /etc/centminmod/custom_config.inc
    echo "NGINX_IOURING_PATCH='y'" >> /etc/centminmod/custom_config.inc
    echo "WPPLUGINS_ALL='n'" >> /etc/centminmod/custom_config.inc
    echo "NGINX_STAPLE_CACHE_OVERRIDE='y'" >> /etc/centminmod/custom_config.inc
    echo "NGINX_STAPLE_CACHE_TTL='86400'" >> /etc/centminmod/custom_config.inc
    echo "NGINX_SSLCACHE_ALLOWOVERRIDE='y'" >> /etc/centminmod/custom_config.inc
    echo "SET_DEFAULT_MYSQLCHARSET='utf8mb4'" >> /etc/centminmod/custom_config.inc
    echo "AUTOHARDTUNE_NGINXBACKLOG='y'" >> /etc/centminmod/custom_config.inc
    echo "ZSTD_LOGROTATE_NGINX='y'" >> /etc/centminmod/custom_config.inc
    echo "ZSTD_LOGROTATE_PHPFPM='y'" >> /etc/centminmod/custom_config.inc
    echo "SELFSIGNEDSSL_ECDSA='y'" >> /etc/centminmod/custom_config.inc
    echo "PHP_PGO_ALWAYS='y'" >> /etc/centminmod/custom_config.inc
    echo "PHP_PGO='y'" >> /etc/centminmod/custom_config.inc
    echo "NGINX_LIBBROTLI='y'" >> /etc/centminmod/custom_config.inc
    echo "NGXDYNAMIC_BROTLI='y'" >> /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
    yum -y update; curl -O https://centminmod.com/betainstaller74.sh && chmod 0700 betainstaller74.sh && bash betainstaller74.sh
    echo "LETSENCRYPT_DETECT='y'" >> /etc/centminmod/custom_config.inc
    echo "DUALCERTS='y'" >> /etc/centminmod/custom_config.inc
    echo "AUDITD_ENABLE='y'" >> /etc/centminmod/custom_config.inc
    echo "WPCLI_CE_QUERYSTRING_INCLUDED='y'" >> /etc/centminmod/custom_config.inc
    /usr/local/src/centminmod/tools/auditd.sh setup
    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
    sed -i "s|EMAIL=.*|EMAIL='$EMAIL'|" /etc/cron.daily/diskalert
    

    this is mine, any suggestion for more performance and stability :D?
     
    Last edited: Sep 28, 2020
  11. tininho

    tininho Active Member

    143
    36
    28
    May 22, 2019
    Nordic
    Ratings:
    +106
    Local Time:
    7:11 AM
    Kernel 5
    Code:
    #!/bin/bash
    rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
    yum -y install https://www.elrepo.org/elrepo-release-7.el7.elrepo.noarch.rpm
    yum -y --enablerepo=elrepo-kernel install kernel-ml
    grub2-set-default 0
    grub2-mkconfig -o /boot/grub2/grub.cfg
    reboot
    
    Centminmod
    Code:
    #!/bin/bash
    # create initial persistent config file to override centmin.sh defaults
    # https://centminmod.com/upgrade.html#persistent
    mkdir -p /etc/centminmod
    yum -y install nano
    wget xx/custom_config.inc -O /etc/centminmod/custom_config.inc
    # install centmin mod latest beta with php-fpm 7.4 default
    yum -y update; curl -O https://raw.githubusercontent.com/centminmod/centminmod/123.09beta01/installer74.sh && chmod 0700 installer74.sh && bash installer74.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
    # MALDET
    wget xx/maldet.sh -O /usr/local/src/centminmod/addons/maldet.sh
    /usr/local/src/centminmod/addons/maldet.sh
    echo "Done!"
    
    Custom_config
    Code:
    WPPLUGINS_ALL='n'
    VHOSTCTRL_CLOUDFLAREINC='y'
    ENABLEMOTD_CSFMSG='n' # motd banner csf message alert disaply
    ENABLEMOTD_LINKSMSG='n' # motd centminmod.com links bookmark alert display
    DISABLE_IPVSIX='y'
    AUTOTUNE_CLIENTMAXBODY='y'
    ## FOR PHP 7.4+
    FPM_WAKEUP_PATCH='y'
    AUTODETECPHP_OVERRIDE='y'
    ##For Linux Kernel > 5.1.x
    NGINX_IOURING_PATCH_BETA='y'
    ##Upgrading NGINX. Disable, if custom configs
    NGINX_ALLOWOVERRIDE='y'
    #NGINX_FATLTO_OBJECTS='n' # enable -ffat-lto-objects flag for nginx builds - much slower compile times
    #NGINX_NOFATLTO_OBJECTS='n' # enable -fno-fat-lto-objects flag for nginx builds - much slower compile times
    NGINX_DYNAMICTLS='y'
    NGINX_SSLCACHE_ALLOWOVERRIDE='y'
    NGXDYNAMIC_BROTLI='y'
    NGINX_LIBBROTLI='y'
    AUTOHARDTUNE_NGINXBACKLOG='y'
    MARIADB_INSTALLTENFOUR='y'
    SET_DEFAULT_MYSQLCHARSET='utf8mb4'
    LETSENCRYPT_DETECT='n'
    DUALCERTS='y'
    NGINX_HPACK='y'
    GCC_FALIGN_FUNCTION='y'
    LIBRESSL_SWITCH='n'
    CLANG='n'
    DEVTOOLSETSIX='n'
    DEVTOOLSETSEVEN='n'
    DEVTOOLSETEIGHT='n'
    DEVTOOLSETNINE='y'
    NGINX_DEVTOOLSETGCC='y'
    GENERAL_DEVTOOLSETGCC='y'
    CRYPTO_DEVTOOLSETGCC='y'
    CUSTOM_CURLRPM='y'
    CUSTOM_CURLRPMVER='7.69.0' # custom curl/libcurl version
    PHP_PGO='y'
    PHP_PGO_ALWAYS='y'
    #PHPPGO_INDEXPATH='/home/nginx/domains/XX/public/index.php'
    #PHPPGO_INDEXPATH_TWO='/home/nginx/domains/XX/public/index.php'
    PHP_TUNING='y'
    PHP_BROTLI='y'
    PHP_LZFOUR='y'
    PHP_LZF='y'
    PHP_ZSTD='y'
    ZSTD_LOGROTATE_NGINX='y'
    ZSTD_LOGROTATE_PHPFPM='y'
    PHP_MEMCACHE='n'
    PHP_MEMCACHED='n'
    MEMCACHED_INSTALL='n'
    MEMCACHED_DISABLED='y'
    NSD_INSTALL='n'
    NSD_DISABLED='y'
    MARCH_TARGETNATIVE_ALWAYS='y'
    PHPFINFO='y'
    #WP_FASTCGI_CACHE='y'
    LETSENCRYPT_DETECT='y'
    #NGINX_ZERODT='y'
    PHP_UPDATEMAINTENANCE='y'
    MARIADB_UPDATEMAINTENANCE='y'
    SSL_PROTOCOL_MODERN='y'
    NGINX_MODSECURITY_MAXMIND='y'
    NGINX_MODSECURITY='y'
    WPCLI_CE_QUERYSTRING_INCLUDED='y'
    NGINX_STAPLE_CACHE_OVERRIDE='y'
    NGINX_STAPLE_CACHE_TTL='86400'
    
    Post-install
    Code:
    package-cleanup --oldkernels --count=1
    echo "CF_DNSAPI='y'" >> /etc/centminmod/custom_config.inc
    echo "CF_KEY='xxx'" >> /etc/centminmod/custom_config.inc
    echo "CF_EMAIL='xxx'" >> /etc/centminmod/custom_config.inc
    git config --global user.email "xx"
    git config --global user.name "xx"
    wget xx/email.ini -O /etc/centminmod/email-primary.ini
    wget xx/email.ini -O /etc/centminmod/email-secondary.ini
    openssl dhparam -out /usr/local/nginx/conf/ssl/dhparam.pem 2048
    cpupower frequency-set --governor performance
    
     
    Last edited: Sep 28, 2020
  12. R0rke

    R0rke Member

    163
    20
    18
    Jun 2, 2016
    Iran
    Ratings:
    +34
    Local Time:
    9:11 PM
    1.11.1
    10.1
    by disabling Memcached what are you using instead?
     
  13. tininho

    tininho Active Member

    143
    36
    28
    May 22, 2019
    Nordic
    Ratings:
    +106
    Local Time:
    7:11 AM
    I am using only Wordpress and NodeJS with Centminmod, so no need for object cache? Or to rephrase it - I don't know how to use it efficiently for my purposes.
     
  14. jeparamedia

    jeparamedia New Member

    29
    8
    3
    May 9, 2019
    Ratings:
    +15
    Local Time:
    11:11 AM
    1.15.12
    MariaDB 10.3.15
    follow this guide= https://servermanager.guide/117/centmin-mod-advanced-customised-installation-guide/

    ---------------------------------------------------------------------------
    Total Curl Installer YUM or DNF Time: 204.2754 seconds
    Total YUM Time: 22.250878272 seconds
    Total YUM or DNF + Source Download Time: 83.8164
    Total Nginx First Time Install Time: 638.9796
    Total PHP First Time Install Time: 1463.2570
    Download From Github Time: 5.3778
    Total Time Other eg. source compiles: 785.4264
    Total Centmin Mod Install Time: 2971.4794
    ---------------------------------------------------------------------------
    Total Install Time (curl yum + cm install + zip download): 3181.1326 seconds
    ---------------------------------------------------------------------------
    1 Intel Core Processor (Skylake, IBRS)
    1 3696.000
    -------------------------------------------------------------------------

    install date: 23-04-2021 on Vultr $6 high frequency