Ubuntu

Initial Setup

Update apt-get
apt-get update

Upgrade apt-get
apt-get upgrade

Install Apache2
apt-get install apache2

Configure Apache2
a2enmod rewrite

Install MySQL
apt-get install mysql-server php5-mysql

mysql_install_db

mysql_secure_installation

Install PHP5 with mcrypt & cURL
apt-get install php5 libapache2-mod-php5 php5-mcrypt php5-curl

php5enmod mcrypt

Configure Apache2
nano /etc/apache2/mods-enabled/dir.conf

update the DirectoryIndex to only use index.php

Restart Apache2
service apache2 restart

Install WordPress

Create a directory for your wordpress installation in this case it is /var/www/html/wordpress/public the script below will install the latest wordpress files.

[gist]3f8f2d85c0ca2c694f56[/gist]