LAMP is an acronym for the Linux Apache MySQL PHP stack, which
is a very popular web development framework. This walkthrough will
guide you step by step the process of installing a base LAMP stack
on a clean Ubuntu 10.04 (Lucid Lynx) server. If you do not already
have an Ubuntu server, our previous walkthrough Creating a
Rackspace Ubuntu Cloud Server will take you up to the point
that this walkthrough picks up.
SSH into your Ubuntu server (see our Ubuntu setup
walkthrough if you need help with this step)
- Update the installer source repositories by typing the
following command:
sudo apt-get update (hit enter)
- Install Apache:
sudo apt-get install apache2 (hit enter)
Type Y to confirm.
- Once the Apache install is finished, you can confirm it works
by opening a new browser window and browsing to either the local or
public IP (http://ip-address) of your Ubuntu
server. You should see a page that says "It
Works!" if all went well.
- Install MySQL Server:
sudo apt-get install mysql-server-5.1 (hit
enter)
Type Y to confirm.
Enter a new password for the root MySQL user. Be sure to use a
unique password that is fairly long, contains a mix of letters,
numbers and at least one punctuation character. Save the password
in a secure location.
- Install PHP 5:
sudo apt-get install php5 (hit enter)
Type Y to confirm.
-
Install the GD library for PHP:
sudo apt-get install php5-gd (hit enter)
Restart Apache:
/etc/init.d/apache2 restart (hit enter)
- Finally we now install the MySQL module for PHP:
sudo apt-get install php5-mysql (hit enter)
Now we have a clean base install of a LAMP server running on
Ubuntu 10.04 (Lucid Lynx). If you are using a Hyper V server or the
Rackspace Cloud, now would be a great time to make a snapshot
backup of your server. We will pick up from here on the next
walkthrough with installing and configuring Drupal.