CentOS 6.5 Minimal Install

Just to document my installation of CentOS 6.5.. Maybe it’s to use for someone else ๐Ÿ™‚
It’s not complete since I kind of started to fall asleep at the end. Installing CentOS yourself is quite a hassle compared to Rackspace/DigitalOcean.

Network configuration (DHCP):

First off we want to start DHCP so we can get online. Since we have no nano (what?!) we need to use vi.. No worries, after some reading you only need to know a few things.

  • ย pressing i will get you into “insert” mode which basically means you can edit text, silly name
  • once you are done press ESC to go back to command mode
  • enter :w to write or save the file
  • enter :q to quit back to cli

So now that you know just enough vi to edit a single file we can move on to actually getting teh interwebz up! ๐Ÿ˜€

This will open the network configuration file for eth0.
Make sure BOOTPROTO=dhcp and ONBOOT=yes. Save. Exit vi. Restart network!

No you should get an ip and have internet access. If not, DHCP isn’t working and you probably have to set a static ip or configure some other kind off internet access.

Install basic tools

We’re going to install some basic tools we will need later

Install some repos


EPEL, the most common extra repo for CentOS/Red Hat/Fedora, you want this.. I’m grabbing from an NL mirror, you can find one for your country here:
Scroll down past the OS type selection to find the mirrors and edit the link below.


Another common repo. We have to enable it for yum to grab it though. So we’re off to edit the repo file, huzzah!

Edit the line which says enabled=0 to enabled=1.
Save & Exit (Ctrl+q followed by pressing y to confirm the change).


A repository created by Rackspace for more up-to-date versions of various packages, most notably PHP/MySQL.

Percona DB

If you use MySQL install this instead, enterprise tweaked version of MySQL.. Much better performance and access to special tools for recovering broken databases (god forbid)..

And voila, Percona installed!


To set up the yum repository for RHEL/CentOS, create the file named /etc/yum.repos.d/nginx.repo with the following contents:

And make it look like this:

Then we download the PGP key and install it:

Then enable it:

And change gpgcheck=0 to gpgcheck=1



Since we have all the necessary repo’s installed it’s gonna be easy as pie to get a LEMP setup going:


Create apc.ini so it gets loaded (not recommended for php54, use opcache instead)

Enable and start all services:

Allow port 80 in iptables

Huzzah, we can browse to the server and saved the rule so it comes back up after a reboot!

Remove all default settings nginx

Configure nginx:

Change worker_processes 1; to the amount of cores you have, in my case I changed it to 4.
Commend out the last line:

And add

Create the dirs for vhosts

Enable connections to port 8080

Download and install Magento

PHP-FPM user&group change

Change user=apache & group=apache to user=ngin & group=apache


  1. Sorry, I never finished this tutorial because I fell asleep ๐Ÿ˜›
    What I was trying to say at that point was you need to make sure that PHP-FPM is running as the same user as Nginx and not Apache (since we are not using Apache).
    So if you look in your /etc/php-fpm.d/www.conf you should see a section which says something like this (I have since upgraded to CentOS 7 so the comments could be different but the lines user = and group = should be there:

    So go ahead and change those to:

Leave a Reply