User loginZoho |
Ubuntu LAMP Server - Setup Guide with Desktop GUIUbuntu (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
netcfg/disable_dhcp=true
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. 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.
sudo passwd root
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
sudo vi /etc/network/interfaces
If DHCP was enabled during installation, a chunk of this file should look like the following:
auto eth0
iface eth0 inet dhcp
Change
auto eth0
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
sudo vi /etc/resolv.conf
Replace the
sudo /etc/init.d/networking restart
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
sudo aptitude update
Then install the openssh-server package.
sudo aptitude install openssh-server
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 update
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.
sudo /etc/init.d/gdm start
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. |
Vmware AppliancesExpert VillageTechnologyLinuxRecent FAQs |