Join the community today
Register Now

Install Nginx MariaDB Letsencrypt Quick Centmin Mod Install + Nginx Vhost Site + MySQL Database Setup

Discussion in 'Install & Upgrades or Pre-Install Questions' started by eva2000, Sep 20, 2017.

Thread Status:
Not open for further replies.
  1. eva2000

    eva2000 Administrator Staff Member

    May 24, 2014
    Brisbane, Australia
    Local Time:
    9:55 AM
    Nginx 1.13.x
    MariaDB 5.5
    Centmin Mod has a lot of documentation on official site and forums which is highly suggested reading if you want to learn about and use Centmin Mod LEMP stacks. But here's a quick guide to installing Centmin Mod 123.09beta01 on recommended CentOS 7.x 64bit fresh virgin OS.

    Quick Links

    Quick Install & Setup

    Install Centmin Mod latest beta + set nginx vhost domain = with letsencrypt ssl certificate and http/2 https default (with http to https redirect can be done in a few SSH commands.

    Centmin Mod Install
    Code (Text):
    yum -y update; curl -O && chmod 0700 && bash

    Enable Letsencrypt integration
    Code (Text):
    touch /etc/centminmod/
    echo "LETSENCRYPT_DETECT='y'" >> /etc/centminmod/

    Create a new Nginx vhost site with letsencrypt free ssl certificate where and DNS A record point to server IP using either addons/ outlined at
    Code (Text):
    cd /usr/local/src/centminmod/addons
    ./ issue lived

    or nv command line
    Code (Text):
    nv -d -s lelived -u ftpusername

    nv command help examples
    Code (Text):
    Usage: /usr/bin/nv [-d] [-s y|n|yd|le|led|lelive|lelived] [-u ftpusername]
      -d or
      -s  ssl self-signed create = y or n or https only vhost = yd
      -s  le - letsencrypt test cert or led test cert with https default
      -s  lelive - letsencrypt live cert or lelived live cert with https default
      -u  your FTP username
      /usr/bin/nv -d -s y -u ftpusername
      /usr/bin/nv -d -s n -u ftpusername
      /usr/bin/nv -d -s yd -u ftpusername
      /usr/bin/nv -d -s le -u ftpusername
      /usr/bin/nv -d -s led -u ftpusername
      /usr/bin/nv -d -s lelive -u ftpusername
      /usr/bin/nv -d -s lelived -u ftpusername

    or via shell menu option 2
    Code (Text):
         Centmin Mod Menu 123.09beta01  
    1).  Centmin Install
    2).  Add Nginx vhost domain
    3).  NSD setup domain name DNS
    4).  Nginx Upgrade / Downgrade
    5).  PHP Upgrade / Downgrade
    6).  XCache Re-install
    7).  APC Cache Re-install
    8).  XCache Install
    9).  APC Cache Install
    10). Memcached Server Re-install
    11). MariaDB MySQL Upgrade & Management
    12). Zend OpCache Install/Re-install
    13). Install/Reinstall Redis PHP Extension
    14). SELinux disable
    15). Install/Reinstall ImagicK PHP Extension
    16). Change SSHD Port Number
    17). Multi-thread compression: pigz,pbzip2,lbzip2...
    18). Suhosin PHP Extension install
    19). Install FFMPEG and FFMPEG PHP Extension
    20). NSD Install/Re-Install
    21). Update - Nginx + PHP-FPM + Siege
    22). Add Wordpress Nginx vhost + Cache Plugin
    23). Update Centmin Mod Code Base
    24). Exit
    Enter option [ 1 - 24 ] 2

    Code (Text):
    Important Information
    You are about to create an Nginx vhost site account with/without
    HTTPS/SSL support. Details of this process are outlined on site
    at Also read the
    continually updated Getting Started Guide for Centmin Mod usage
    at which covers the pure-ftpd
    ftp username that is auto generated with the Nginx vhost site.
    403 Permission denied message handling
    if after vhost site setup you encounter 403 permission denied errors,
    check to see if your
    site needs tools/ tweaking/whitelisting
    Do you want to continue with Nginx vhost site creation ? [y/n] y
    Enter vhost domain name to add (without www. prefix):
    Create a self-signed SSL certificate Nginx vhost? [y/n]: n
    Get Letsencrypt SSL certificate Nginx vhost? [y/n]: y

    Code (Text):
    To get Letsencrypt SSL certificate, you must already have updated intended
    domain vhost name's DNS A record to this server's IP addresss.
    If top level domain, DNS A record is needed also for www. version of domain
    otherwise, Letsencrypt domain name validation will fail.
    continue [y/n] ? y
    You have 4 options:
    1. issue staging test cert with HTTP + HTTPS (untrusted)
    2. issue staging test cert with HTTPS default (untrusted)
    3. issue live cert with HTTP + HTTPS (trusted)
    4. issue live cert with HTTPS default (trusted)
    Enter option number 1-4:

    Create MySQL database named = mydb with username = myadmin and password = mypass using addons/ Shell based Addon

    Code (Text):
    /usr/local/src/centminmod/addons/ createuserdb mydb myadmin mypass
    Basic MySQL Admin - create mysql user & databases
    Grants for myadmin@localhost
    GRANT USAGE ON *.* TO 'myadmin'@'localhost' IDENTIFIED BY PASSWORD '*6C8989366EAF75BB670AD8EA7A7FC1176A95CEF4'
    Ok: MySQL user: myadmin MySQL database: mydb created successfully

    If that is too much for install, I also have official Linode stackscript for automated Centmin Mod installs at Linode - official centmin mod Linode stackscript

    So there's various ways to create domain nginx vhosts and mysql databases etc so you can script or automate your own setups. But yes, you're not going to know all this without reading and practicing :)
    • Like Like x 1
Thread Status:
Not open for further replies.