WordPress 1 2 3 (… 4 5 6?)

I thought I would add a quick How-To on installing WordPress where it is not already present… Redundant? Well that’s OK… It can be a lot of fun to mess around with WordPress (designing), especially if you don’t know PHP (like me).   So this tutorial… if you can even call it that… will get you started on basically any linux server, however I am partial to centOS (currently centOS5.4) so these steps are tested and certified to work on only CentOS release 5.4 (Final).  Shouldn’t take more than 10 minutes to do this so that is not so bad right?  Oh and my base install is basically CD1 (.iso1) of the centOS release with no options selected… so this is a totally bare bones OS, no GUI no nuttin’.  That being said, I have really lost track of what I have on the system (which is silly because that was the purpose of doing this as a ‘bare-bones’ build… I guess that’s what you get when you don’t have a specific purpose in mind BEFORE you build a system) that was a pre-req for WordPress so I will just spew out an RPM listing for you… although the install will certainly complain if you don’t have anything beyond what I am listing in the body of the guide.  Maybe I will put that list @ the bottom of the post… Hmmm.. why can’t I add scroll bars here??? Odd, well anyway…

Here we go…

wordpress setup:

# Create a local non-root user (if not already present)
# Check defaults first:
[root@centOS54 wordpress]# useradd -D
# now add the user:
useradd -c ‘Garot Conklin’ gmc <– Hey, that’s me 🙂 This can obviously be anything you want
passwd gmc
# Navigate to /var/www/html/
# create dir /wordpress
mkdir wordpress
Install required packages:
yum install httpd php mysql mysql-server php-mysql perl-Net-SSLeay <– Oops forgot one… perl-Net-SSLeay
# start and test apache2
start mysql:

service mysqld start

I know basically nothing about database installations so just follow these directions and you will be fine as well, what I mean is that WordPress will function, LOL.  That being said, this config certainly works, but may not be correct or the ‘optimal’ configuration.

# configure mysql:
mysqladmin -u root password ‘XXXXXX’ <– ya this may not be very secure… and may defeat the purpose of setting up the non-root user… LOL (maybe that’s not funny?)

This next command gets you into the database admin role: (That may not have been entirely clear)
[root@centOS54 wordpress]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.0.77 Source distribution

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

mysql> use mysql;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> insert into
-> host(host,db,Select_priv, Insert_priv, Update_priv, Delete_priv, Create_priv, Drop_priv)
-> values(‘linuxbox’, ‘%’,’Y’,’Y’,’Y’,’Y’,’Y’,’Y’);
Query OK, 1 row affected (0.00 sec)

mysql> insert into
-> user (host, user, password)
-> values(‘localhost’, ‘gmc’, password(‘XXXXXXXX’));
Query OK, 1 row affected, 3 warnings (0.00 sec)

mysql> quit
# Create the database and name it ‘wordpress’
[root@centOS54 wordpress]# mysqladmin -u root -p create wordpress <– You can name the database whatever you want here
Enter password:
[root@centOS54 wordpress]# mysqladmin -u root -p reload
Enter password:

# Fetch wordpress
wget http://wordpress.org/latest.tar.gz
extract it into /var/www/html/wordpress
# Edit wp-config-sample.php:
vi wp-config-sample.php

// ** MySQL settings – You can get this info from your web host ** //
/** The name of the database for WordPress */
define(‘DB_NAME’, ‘wordpress’);

/** MySQL database username */
define(‘DB_USER’, ‘root’);

/** MySQL database password */
define(‘DB_PASSWORD’, ‘XXXXXXXX’); <– replace all the XXXXXXX’s with the real password (in case that was not obvious?)

/** MySQL hostname */
define(‘DB_HOST’, ‘localhost’);

Re-name it:
cp wp-config-sample.php wp-config.php

# Reload/re-start daemons <– I don’t recall if these last 2 reloads were even necessary… doesn’t hurt though
mysqladmin -u root -p reload
service httpd restart

Done !

Navigate to http://<IP/hostname>/wordpress/wp-admin and off you go WordPress-ing !! 🙂

Oops.. almost forgot the RPM listing — Nope it is just too big of a list without the scroll bars… that are oddly stripped out of my code when I ‘update’ the page??? Maybe that is restriction of the free hosted blog? Anyway, it is not really necessary… you will know what you need outside of anything listed here… Hope this helped at least someone… LOL 🙂


, , , , , , , , ,

  1. Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: