WordPress 2.5 on a fresh CentOS 5.0 install – Part 2

Now that we have the OS ready for the wordpress install, let’s finish up…

Go to the root directory of your server

cd /

download the latest wordpress (2.5 in this case.)

wget http://wordpress.org/latest.tar.gz

Unzip it and untar it.

gunzip wordpress-2.5.tar.gz

tar xvf wordpress-2.5.tar

Now configure mysql for wordpress

mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4 to server version: 5.0.22

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.

mysql> create database blog;
Query OK, 1 row affected (0.00 sec)

mysql> grant all privileges on blog.* to “<wordpress User Name>”@”<localhost>” identified by “<your Password>”;
Query OK, 0 rows affected (0.00 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

mysql> exit
Configure the database connection for wordpress

vi /wordpress/wp-config.php

change these lines as appropriate

[root@CainManor wordpress]# cat wp-config.php
// ** MySQL settings ** //
define(‘DB_NAME’, ‘blog’); // The name of the database
define(‘DB_USER’, ‘wordpress’); // Your MySQL username
define(‘DB_PASSWORD’, ‘<your passwd>’); // …and password
define(‘DB_HOST’, ‘localhost’); // 99% chance you won’t need to change this value

I prefer to have my blog live under my cainmanor.com domain, rather than a subdirectory. To do that, you have to edit your apache conf file..

vi /etc/httpd/conf/httpd.conf

look for

# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#DocumentRoot “/var/www/html”

and change DocumentRoot to

DocumentRoot “/wordpress”


# This should be changed to whatever you set DocumentRoot to.
#<Directory “/var/www/html”>


<Directory “/wordpress”>
restart httpd to pick up the changes to Document Root

service restart httpd

Point your browser to

http://<your IP>/wp-admin/install.php

Congratulations!! You just installed WordPress from scratch.