Yesterday we installed the software we’ll use to run WordPress. Today we’ll configure it all up.

The Apache web server

Let’s start with some simple stuff: PHP.

Edit /etc/php.d/ini and modify one line:

$ sudo nano /etc/php.d/apc.ini

You want to change a line to look like this:

; The mktemp-style file_mask to pass to the mmap module                                                                                             

Most config files look like “name = value”. When I say “change a line,” what I’m meaning is find the line that starts with the name and change the value.

Once you’ve changed it, save the file.

Next up need to configure Apache to serve up the directory we want.

$ sudo nano /etc/httpd/conf.d/

I like to name the configuration files after what’s being served by that configuration. You can really call it anything that ends with “.conf”. You probably don’t want to call it “”. Just sayin’. :-)

Put this in the new file:

<VirtualHost *:80>
  DocumentRoot /var/www/
  <Directory /var/www/>
    Options FollowSymLinks
    Allow from all
    AllowOverride all

Like before, replace the “” with something more useful to you. Whatever you put there will dictate what your server will respond to. (Assuming you have the DNS pointed to the server)

Before we restart Apache, let’s make the directory.

$ sudo mkdir /var/www/
$ sudo service httpd restart

As an added bonus, you can host multiple sites on one server as well, just add additional configs and make more directories.


First, let’s start up mysql with their default medium config:

$ sudo cp /usr/share/mysql/my-medium.cnf /etc/my.cnf
$ sudo chkconfig mysqld on
$ sudo service mysqld start
$ /usr/bin/mysql_secure_installation

After the last command you’ll be prompted to set your main “root” database password. Set it to something secure. The rest of options are pretty much spot on.

As an added bonus, you now know that MySQL is working just fine!

Next up: Setting up WordPress! Finally!