Skip to content

Instantly share code, notes, and snippets.

@irazasyed
Last active August 29, 2015 13:57
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save irazasyed/9732658 to your computer and use it in GitHub Desktop.
Save irazasyed/9732658 to your computer and use it in GitHub Desktop.
How-To: Install LEMP on CentOS 6.5 x64 using Centmin Mod - http://centminmod.com/download.html

How To Install Linux, NginX, MariaDB, PHP5 (LEMP) stack on CentOS 6.5 x64 using Centmin Mod

Quick start


For this tut, You'll need a VPS or dedicated server with full root user + SSH2 telnet access to install Centmin Mod (For LEMP installation and Management). I'll be using a 1GB memory VPS from DigitalOcean as they got Cheap VPS hosting which are awesome!

In this tut, We'll be setting up latest version of NginX, MariaDB, PageSpeed and PHP. At the time of writing this tut, the latest versions are as follows:

  • NginX - v1.7.0
  • PageSpeed - v1.8.31.2-beta
  • PHP5 - v5.5.12

So the first step is to create a new droplet with CentOS 6.5 x64 linux distro.

Assuming you know how to create the droplet and SSH, we'll move forward to the pre-installation and Centmin Mod steps.

Pre-Install


Log into your VPS as root user via SSH2 telnet and follow the steps.

Before we can get to the installation, we first need to update and install few things.

  1. Update: $ yum -y update
  2. Install: $ yum -y install bc wget unzip vim yum-plugin-fastestmirror
  3. Clean: $ yum clean all

Alright, So if everything went good, we're all set to download and run Centmin Mod.

Downloading and Installing with Centmin Mod


  1. Download the latest version of Centmin Mod's zip file using wget command in SSH telnet by firing the command:

Note: In example below, zip is downloaded to /usr/local/src. DO NOT download to /tmp and run centmin.sh from /tmp as Centmin Mod removes the ability to execute scripts from /tmp as a security precaution. Also the downloaded contents must NOT be deleted or removed as subsequent runs of centmin.sh to use menu options require certain files and scripts in place. - Quoted from the site

$ cd /usr/local/src
$ wget http://centminmod.com/download/centmin-v1.2.3-eva2000.06.zip
  1. Extract files and change directory to centmin-v1.2.3mod directory and chmod +x centmin.sh bash script.
$ unzip centmin-v1.2.3-eva2000.06.zip
$ rm -rf centmin-v1.2.3-eva2000.06.zip
$ cd centmin-v1.2.3mod
$ chmod +x centmin.sh
  1. Edit centmin.sh to update the version of NginX, PageSpeed and PHP before installation.
$ vim centmin.sh
  • Update PageSpeed Version

Update NGXPGSPEED_VER and NGINX_PAGESPEEDPSOL_VER vars to 1.8.31.2 and 1.8.31.2. So it should look like this:

...
NGXPGSPEED_VER='1.8.31.2-beta'
NGINX_PAGESPEEDPSOL_VER='1.8.31.2'
...
  • Update Nginx Version

Update NGINX_VERSION var to 1.7.0:

...
NGINX_VERSION='1.7.0'        # Use this version of Nginx
...
  • Update PHP Version

Update PHP_VERSION var to 5.5.12:

...
PHP_VERSION='5.5.12'          # Use this version of PHP
...

Now save and exit from the editor (ESC, :wq).

Run centmin.sh menu:

$ ./centmin.sh

Select option #1 and you're done mostly! Now sit back and grab a cup of coffee while Centmin Mod takes care of installation for you!

While installation it'll ask you to enter MySQL password and couple of other prompts which you can answer easily as it'll show on-screen instructions which are easy to understand.

Once done, you can start adding vhost using centmin mod easy menu and continue the config.

Hope this helped you. Enjoy!

Author


Follow on twitter @irazasyed | Follow on Github

Copyright


© 2014 Syed I.R - All Rights Reserved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment