How To: Install a LAMP Server (Linux, Apache, Mysql, PHP) on Older Laptop with Ubuntu

The Purpose: Install a LAMP server (Linux, Apache, Mysql, PHP) on an older laptop to be accessed and maintained remotely (becasue the laptop has a broken monitor and unreliable video-output connections). Then, transfer web projects from the server on my PowerMac to the new linux server and free up my beast!

  1. Download Ubuntu Linux Server Package and Burn to CD
  2. Install basic LAMP package
  3. Next steps with the new server

Download Ubuntu Server & Burn Disk Image

First step is to visit http://www.ubuntu.com/download, choose a download site, and download the Server Install CD disk image (.iso file). Unless you know otherwise, you will probably need the i386 version (for Intel processors). If you have an AMD processor or a Macintosh, choose the appropriate version.

After the file has downloaded, you should verify the checksum data to ensure that the file you downloaded is actually the file that Ubuntu is trying to give you (in case you get a bogus mirror or something went screwy during the transmission).

If you scroll down the webpage of the mirror you chose above, you will see the entire list of available files for download; if you follow the link at the top of this list you can locate the checksum value for your download. A checksum will look like this:

  • 5ad76d8b380ab5be713e5daa9ea84475

To compare it to the checksum of the file you downloaded, you can do the following (supposing you are on a MacIntosh or another Linux/Unix based system). Open your terminal application (assuming you downloaded the disk image to your desktop):

  • $ openssl md5 ~/Desktop/ubuntu-6.01.1-server-i386.iso
  • MD5(ubuntu-6.06.1-server-i386.iso) = 5ad76d8b380ab5be713e5daa9ea84475

Hopefully the two numbers will match (as they do above); if not, then you ought to try another download mirror. Once you have a valid copy of the disk image, open your Disk Utility program, drag the disk image from the desktop to the left-hand column, select it once it is there, and click “Burn.”

If the disk burns successfully and verifies you’ve done it! On to the next step!

Install Ubuntu LAMP Server

Put the freshly burned CD in your CD-ROM drive and have your system boot from the CD. (How to do this will vary from system to system — some do it automatically, some you will have to hit F12, or DEL, or some other key; if your system doesn’t make it obvious by telling you in the first few seconds of the startup, try searching around online for the answer.)

At the Ubuntu welcome screen choose Check CD for defects. When the CD check has been run and passes successfully, press SPACEBAR to go back to the welcome screen. (On a side note: my CD check actually drew error messages at least once, so it may be good to run it again; in my case, I didn’t care if the installation failed so much because my system was already inoperable to begin with.)

Next, select Install LAMP Server.

Choose a Language and keyboard layout. Next, it will do some hardware detection and then ask you to choose a hostname for your server. I chose: ubuntu-server. Creative, I know.

Next, the big ne’er do return step: partition your hard disk. In my case, and probably yours if you are installing a server (since a server is usually meant to be running at all times), I wanted to completely erase and use my entire disk (second option). It will give a warning: showing you what will be happening and giving you a final chance to go back. Seeing that my IDE1 Master will be partitioned to include on ext3 partition (Linux preferred format, I believe) and one swap partition (unique to Linux, sort of like RAM — if I understand it correctly), you can go ahead with the format.

Afterwards, all that is left is to select a time zone, configure the clock (I chose to set it to UTC — I don’t see why you wouldn’t either), and then setup your first user. First, you will enter the user’s full (real or made up) name — this can include spaces. Then, you will choose the user’s username (which is what you will enter when you login). Choose a good password.

At this point, the software should begin to install. Sit back and enjoy! After a while, if all goes well, your installation should complete and you will restart to your new linux server. Congratulations.

When the restart has finished all you be faced with is a text-based command prompt asking you to login:

  • ubuntu-server login: henry
  • password:
  • henry@ubuntu-server ~$

next steps: test the server & enable the software repositories

Now your server is up and running and PHP, Mysql, and Apache should all be configured and active by default. To quickly test your server, load its IP address into a web browser on another machine on the same local network: if it works, you will be served an Apache web page saying something to the effect of: “Seeing this instead of the website you expected?” The Apache logo should be on the bottom. Things are working!

There’s not so much you can do easily, however, with the command prompt in front of you. In order to make your web page deployment simpler, consider taking some of the following steps (as I did):

  1. Enable all the available software repositories (universal)
  2. Set a static IP address for the server
  3. Redirect and use www folder from your home directory
  4. Install SSH - for secure remote access
  5. Install FTP Server - for remote access
  6. Install AFP - to share files locally with your Apple computer

Tags: , , , , ,

2 Responses to “How To: Install a LAMP Server (Linux, Apache, Mysql, PHP) on Older Laptop with Ubuntu”

  1. Richard Wren says:

    I installed vsftpd as the ftp server. How do I get it to work off the www folder?

  2. Damon says:

    Sorry … not sure how that works off hand … haven’t been using vsftpd for some time. You could probably create a symlink to the www folder … otherwise, I would have to suggest reading up more on vsftpd or doing a google search because I don’t know off hand. Sorry.

Leave a Reply