Skip to content

Development Environment Configuration

amalvagomes edited this page Oct 12, 2012 · 13 revisions

Download and Install

The OS of choice is Ubuntu 12.04 LTS. It can be downloaded here.

Next, download VirtualBox here.

L

Now, start working with VirtualBox. Click "New" and name your VM.

Name the VM

The defaults should do fine.

Config Summary

Select Settings for the new VM and navigate to the Storage menu. Here, select the disk drive and choose the downloaded Ubuntu ISO file from your hard drive.

Storage Set-up

Finally, configure the network adapter so that you'll be able to have an IP on your VM and still maintain a separate IP on your host.

Network Set-up

Just start it up now and follow the installation instructions until Ubuntu is installed on the VM. Then bounce it and boot from hard disk.

Installing the Packages

The username is: tectern

The password is: developer

A

Now install Apache2, the web server. This program will listen on port 80 for incoming HTTP requests and handle them according to the specifications of the .conf files that will live in /etc/apache2/.

$ sudo apt-get install apache2

If this works out, the VM should now display something like this when an HTTP request is sent. To get the IP of the VM, run this.

$ ifconfig

Here's a successful default response.

It works

M

Then, install mysql-server. This will also install mysql-client and help get the database set up.

$ sudo apt-get install mysql-server

The root password is developer.

Test it out now.

$ mysql -uroot -p
Enter password:
mysql> show databases;
mysql> exit;

Should look like this:

MySQL works...

P

Now, install PHP5.

$ sudo apt-get install php5

You don't have to do this next one, but vim helps out for editing text on the terminal (Or transcending the shackles of an IDE...)

$ sudo apt-get install vim

Now test the newly installed PHP5.

$ sudo vim /var/www/testphp.php

In this file, write:

<?php phpinfo(); ?>

Save it and exit. Then point your browser to http://localhost/testphp.php and you should see something like this:

Working PHP5

And that's how you spell LAMP