How To Setup LAMP on uBuntu 11.04 – Also, WordPress

In this article, we will work on setting up a LAMP environment for uBuntu 11.04. As an added bonus, I will setup WordPress 3.2 in the environment for you nerds. As you may notice in previous posts, I have a nice little lappy which allows me to dev on the run.

Installing LAMP onto uBuntu 11.04

First thing is first, we need to install tasksel then run it via terminal.

sudo apt-get install tasksel
sudo tasksel

Select LAMP Server and proceed to install it!

While you are installing LAMP, you will be prompted to set a password for MySQL root.

First of all, /var/www/ directory is set for root user only. We want to allow our IDE’s, such as Netbeans or Vi/Vim/Nano have permissions to write to this directory. So let’s sudo su and chown /var/www/

sudo su
chown yourusername:yourusername /var/www/
exit

At this point, let’s test to see if LAMP is running.

sudo vi /var/www/index.php

Within index.php just enter phpinfo(); to check if the PHP core fires an output!

<?php phpinfo(); ?>

Save index.php and exit.

When you visit http://localhost/index.php you should get an output. If you do not, you can try restarting apache2 with the following command:

sudo /etc/init.d/apache2 restart

Installing phpMyAdmin To Manage Your MySQL Databases on uBuntu 11.04

sudo apt-get install phpmyadmin

WordPress: World Famous 5 Minute Installation

Head over to WordPress.org and grab the latest version of WordPress. Extract the zip file to /var/www/wordpress

Visit http://localhost/phpmyadmin and create a database.

Under the Privileges tab, goto Add New User. Make sure under Global Privileges click Check All and hit Go.

Visit http://localhost/wordpress and setup your WordPress install! Bam! Your done!

Published by

CodeSleepShred

Born and raised in the Pacific Northwest, there are only a few things to do during the rainy season: code, sleep, shred.

One thought on “How To Setup LAMP on uBuntu 11.04 – Also, WordPress”

  1. Just followed a guide on 10.04 using a really simple ‘sudo apt-get install lamp-server’ or something…this one seems to be even more straightforward.

    Nice write-up. Thanks for sharing!

Comments are closed.