WordPress on Amazon Web Services (AWS) Linux EC2 Micro Instance, For Free

I’ve been wanting to get a write up done for WordPress on AWS, the fact that it is free for a year, since they’ve released the free-tier many months ago. Well I finally got around to it, however it isn’t a write up. I went ahead and put the work in to produce a video of the steps for setup & configuration. Enjoy.

The commands to install php, mysql, httpd (apache), and manipulate the config files are included below for copy and paste needs.

Create a Linux Instance on AWS – create & assign an IP Address

Login with ‘ec2-user’

sudo -i
lsof -i

yum -y install httpd

service httpd start

yum -y install php mysql
yum install mysql-server

wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
rpm -Uvh rpmforge-release-0.3.6-1.el5.rf.i386.rpm
yum install phpmyadmin

vi /etc/httpd/conf.d/phpmyadmin.conf

Hit insert hey to make changes to the conf file.

————————————————————————————
# Web application to manage MySQL

# Order Deny,Allow
# Deny from all
Allow from all

Alias /phpmyadmin /usr/share/phpmyadmin
Alias /phpMyAdmin /usr/share/phpmyadmin
Alias /mysqladmin /usr/share/phpmyadmin
————————————————————————————

service httpd restart
service mysqld start
/usr/bin/mysqladmin -u root password ‘somepassword’
vi /etc/httpd/conf.d/phpmyadmin.conf
vi /usr/share/phpmyadmin/config.inc.php

————————————————————————————
[…] /* Authentication type */
$cfg[‘Servers’][$i][‘auth_type’] = ‘http’;
[…]
————————————————————————————

Watch the video for the WordPress Database creation in mysql w/ phpmyadmin.

wget http://wordpress.org/latest.tar.gz
tar -xzvf latest.tar.gz -C /var/www/html/
cp -avr /var/www/html/wordpress/* /var/www/html/
rm -rf /var/www/html/wordpress/

cd /etc/httpd/conf
vi httpd.conf
Find the user here… it should be ‘apache’

cp /var/www/html/wp-config-sample.php /var/www/html/wp-config.php
vi /var/www/html/wp-config.php

…Add the database settings.

chown -R apache /var/www/html
chmod -R 755 /var/www/html

Sputtering Windows Instances

I had a concern about Windows OS being used for cloud computing.  The instances in Windows Azure take a significant amount of time to boot up.  In Amazon Web Services the Windows EC2 Instances also take a long time to boot up.  Compared to Linux, Windows takes 2-4x longer to spool up in the cloud.  (Compare a boot time of about ~1 minute for Linux in EC2 vs 8-15 minutes for Windows)

Before today, this just seemed like it might be a problem I was experiencing.  I tend to believe I’m doing something wrong before I go on the warpath, but today that concern that I’d done something wrong has ended.  RightScale posted a blog entry about the difficulties of Windows in EC2.  They’re seeing the same issues I was.

Another issue that they noticed, which I too noticed, was the issues around the clocks being off.  This is a similar problem to Windows being used with VMWare and setting up images.  The clock just doesn’t ync the first time, or subsequent times.  Usually a few manual attempts need to be made.

In another entry I caught another list of issues with Windows that Linux just doesn’t have.  None of these are work stoppage issues, but they are all very annoying and would push one toward using Linux instead if at all possible.

Putting Windows Azure and Amazon Web Services EC2 side by side Network World has found them to be on a collision course.

Boiling it Down, Where Does Windows Stand?

After some serious analysis by individuals of Windows running in Cloud Environments it appears that Windows just isn’t as suited to running in virtualized environments as Linux.  A number of friends have pointed out to me how much friendlier Linux is in virtualized spaces such as VMWare’s ESX Environment.

Also based on hard analysis of VMWare versus Hyper-V, the later doesn’t appear to be as sophisticated or capable of virtualized hosting.  Is this going to cause a price point issue for Windows Azure versus AWS EC2?  Just from the perspective of requiring more hardware for Hyper-V Virtualization versus VMWare & Amazon’s AMI Virtualization it makes me ponder if this could be a major competitive advantage for Linux based clouds.  Already there is the licensing price points, so how does MS own up to that?

I would be curious to see what others have experienced.  Have you seen virtualized differences that cause issues hosting Linux vs. Windows in VMWare, Hyper-V, or AWS?  Do you foresee any other problems that could become big problems?