Ubuntu (for those of you who have been living under a rock) is fast becoming the free Linux distribution of choice for home computing. Dell has even begun to ship machines with Ubuntu pre-loaded instead of Windows or Red Hat. But Ubuntu is not just for desktops. It’s also available as a super easy to install “Server Edition” that comes complete with DNS server and LAMP (Linux, Apache, MySQL, PHP) server components. Unfortunately, the “Server Edition” does not install with the pretty GUI and the bells and whistles (like OpenOffice and Firefox) that come standard with the “Desktop Edition”. But you can have the best of both worlds. Here is how you set up a Ubuntu LAMP server on your local area network and customized the installation to include the Ubuntu Desktop GUI.
Step 1: Install Ubuntu Server Edition with LAMP server components.
Download the disk image (*iso) for Ubuntu Server Edition (currently version 8.04 Hardy Heron) and burn it to a CD. Ensure that your BIOS is configured to boot from the CD-ROM drive. Restart with the Ubuntu disk in the drive and the machine should boot into the Ubuntu installation shell. If you would like to configure a static IP address, select F6 - Other Options and enter
at the end of the options string, and the install script will prompt you for network information during the installation. Otherwise, the static IP must be configured post installation as per the second part of step 2 below, and your network will be automatically configured using DHCP (as long as DHCP is enabled on your router). In either scenario, you must enter a hostname when prompted.
As you work through the installation (most of which is self explanatory), you will also be prompted to select a partitioning method. The most straightforward method is “use entire disk”, which will format a drive of your choice before installing system files to it. Finally, you will be prompted to enter a full name and a short name for a non-administrator account (separate from root). After a few more trivial questions (like “What is your time zone?”), and a plethora of file copying, the install shell will ask you to select optional software to install. Select LAMP (using the arrow keys and spacebar). If you wish to install a name server as well, you may select DNS and follow the instructions of this post. You may also elect to install an OpenSSH server at this point and bypass the first component of step 3 below. After making selections, continue the installation by pressing enter. At some point, you will be prompted to enter a mysql root user password. If you wish, this password can be left blank for now.
Step 2: Enable root access and configure a static IP address.
After installation finishes and the system reboots, log in using the non-administrator account created during installation. (Note: my system hung after reboot and I had to press enter to get the login prompt.) The first thing you will probably want to do once you log in is set the root password (by default the password is left blank). To do so, type the following at the command prompt.
Since you are planning to use the machine as a web server, you will also need to specify a static IP address (if not already configured during the installation). To do so, you must edit the interfaces configuration file (use your favorite text editor; I use vi here).
If DHCP was enabled during installation, a chunk of this file should look like the following:
iface eth0 inet dhcp
Change dhcp to static and add the lines shown below. Of course you need to use your IP address, netmask, and gateway instead of mine.
iface eth0 inet static
address 192.168.1.10
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
You also need to specify the DNS server(s) in the resolv.conf file.
Replace the xxx.xxx.xxx.xxx in the nameserver xxx.xxx.xxx.xxx line with the address of your DNS server. You can add multiple DNS servers if you like by duplicating this line using other DNS server addresses. Now restart your network components.
Ping www.zaphu.com (or some weblog of lesser quality) to make sure your network configuration is working.
Step 3: Install OpenSSH and Ubuntu Desktop components.
If you didn’t do so during the installation, you will probably want to install an SSH server at this point so you can login to your new LAMP server from other machines on your local area network. Installing packages is a snap with Ubuntu using the built in aptitude package management software. The first step is to update the packages database by typing
Then install the openssh-server package.
You need to insert the Ubuntu Server installation disk to complete the installation. Installation of the Ubuntu desktop environment (and all of the goodies that go with it) is also a snap using aptitude. Type
sudo aptitude install ubuntu-desktop
Because a significant number of files need to be downloaded, the Ubuntu GUI installation may take some time. Near the middle of the installation you will be asked to configure the Postfix mail transfer agent. Since my machine is not going to be a mail server I selected ‘no configuration’ and continued, but you may want to configure Postfix differently. Check out Ubuntu Forums for information on configuring Postfix. When the Ubuntu desktop installation finishes, fire up the GUI.
Congratulations, you now have a fully operational Ubuntu LAMP server with the niceties of the Ubuntu desktop environment. In a follow-up post, I walk you through the setup of a website on your new server and the installation of phpMyAdmin to help manage all of those mySQL databases you will be creating.
If this guide leaves you scratching your head, check out the related posts on these weblogs: Debian Admin, spoffle
If you liked this guide, show support by leaving comments and visiting our sponsors.
Update, Aug. 13, 2007: Dell has announced that they will start to ship Ubuntu-equipped machines internationally. Perhaps Microsoft’s days are numbered. Read about it here.
Update, Aug. 23, 2007: Here is a first hand account of a Ubuntu Dell by someone who bought one.
Update, Aug. 30, 2007: The next version (8.04) of Ubuntu (Hardy Heron) has been announced for release in Q2 2008.
Update, Oct. 24, 2007: Ubuntu 7.10 has been released and is receiving great reviews.
Update, Apr. 27, 2008: I updated this post for Ubuntu 8.04 Hardy Heron.

Add New Comment
Viewing 74 Comments
Thanks. Your comment is awaiting approval by a moderator.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Add New Comment
Trackbacks
(Trackback URL)
August 8, 2007 at 7:28 pm
[...] Ubuntu LAMP Server - Setup Guide with Desktop GUI : Zaphu (tags: ubuntu linux server tutorial lamp gui) [...]
August 21, 2007 at 12:02 pm
[...] a previous post, I shared step-by-step instructions for setting up a Ubuntu LAMP (Linux, Apache, mySQL, PHP) server [...]
September 10, 2007 at 10:10 am
[...] previous posts, I shared instructions for setting up a Ubuntu LAMP (Linux, Apache, mySQL, PHP) server and configuring Apache ...
May 21, 2008 at 10:10 am
[...] found a great tutorial on setting up the server edition at zaphu.com, be forwarned though server edition has no ...
June 5, 2008 at 12:48 pm
[...] cannot really use a command line interface effectively anymore. However, I did find a blog post on how to ...
August 21, 2008 at 10:36 am
[...] Ubuntu LAMP Server-Setup Guide with Desktop GUI: Follow this guide to learn how to create an Ubuntu LAMP server. ...
August 21, 2008 at 11:36 am
[...] Ubuntu LAMP Server-Setup Guide with Desktop GUI: Follow this guide to learn how to create an Ubuntu LAMP server. ...
August 26, 2008 at 9:15 am
[...] Ubuntu LAMP Server-Setup Guide with Desktop GUI: Follow this guide to learn how to create an Ubuntu LAMP server. ...
September 19, 2008 at 11:43 pm
[...] I find it is easier and faster to use a local web server, with all the bells and whistles. ...
October 14, 2008 at 3:13 pm
[...] Ubuntu LAMP Server setup [...]
October 15, 2008 at 8:00 am
[...] Ubuntu LAMP Server - Setup Guide with Desktop GUI [...]
October 23, 2008 at 5:36 am
[...] Ubuntu LAMP Server-Setup Guide with Desktop GUI: Follow this guide to learn how to create an Ubuntu LAMP server. ...
December 4, 2008 at 9:02 am
[...] … then MySQL … then PHP. as higlighted in welho.net and the installation instructions: Zaphu part 1 Zaphu part ...
May 27, 2009 at 7:36 am
[...] ip address. Step 3: install openssh and ubuntu desktop components. Plz refer this link........ ubuntu lamp server - setup ...