Ubuntu LAMP Server Installation With Screenshots

Automatic LAMP (Linux, Apache, MySQL and PHP) In about 15 minutes, the time it takes to install Ubuntu Server Edition, you can have a LAMP server up and ready to go. This feature, exclusive to Ubuntu Server Edition, is available at the time of installation.

The LAMP option saves the trouble of installing and integrating each of the four separate LAMP components, a process which can take hours and requires someone who is skilled in the installation and configuration of the individual applications. You get increased security, reduced time to install, and reduced risk of misconfiguration, all of which results in a lower cost of ownership.

Ubuntu LAMP server Install the following Versions

Ubuntu Dapper drake 6.06

First you need to download server version of Ubuntu version from here after that you create a CD and start booting with the CD Once it starts booting you should see the following screen in this you need to select second option “Install a LAMP Server Option” and press enter

Choose you language and press enter you can see we have selected english in the follwoing screen

Choose your location and press enter you can see we have have selected United Kingdom in the follwoing screen

Select keyboard layout and press enter

Detecting hardware to find CD-ROM Drivers in progress

Loading additional components progress bar

Configures the network with DHCP if there is a DHCP server in the network

Enter the Hostname of the system so in this example i enter here as lamp

Detecting Disks and Hardware in progress

Startingup the partitioner in progress

you have to partition your hard disk in this i have selected manually edit the partition table and press enter

It will show you the hard disk space and press enter here i am using vmware with 10.7GB of space

Create a New partition table on the device select yes and press enter

Now you can see the freespace and press enter

How to use this freespace select create a new partition and press enter

Enter the new patition size and press continue i have entered 100mb in this example

Select the type of the partition and press enter in this example i have selected primary

Location for the new partition as begining and press enter

Now you need to select the mount point with the following screen and press enter to change mount point

Now you can see the available mount points and here i have selected /boot mount point and press enter

Now you should see the following screen and here you need to select “Done Setting Up the Partition” option and press enter This will create the /boot mount point with 100mb of space and you can create the / mount point in the same way with the existing space.

you can see this in the following screen here you need to select “Finish partitioning and write changes to disk” option and press enter

Write the changes to disk option here you need to select yes and press enter

Creating ext3 filesystem in progress

Configuring the clock option here if you want to leave UTC Select yes otherwise no and press enter

You need enter the Full name of the user you want to create for your server in this example i have created test user select continue and press enter

username for your account in this i have entered test select continue and press enter

Entered the password for test user select continue and press enter

Confirm the password for test user select continue and press enter

Installing the base system in progress

Configuring package mirror this will be related to your country option

Selecting and Installing software in progress

Installing GRUB Boot loader in progress

Installation complete message here you need to remove your CD select continue and press enter it will reboot your server

After rebooting you can see the following screen prompt for username

This will complete the Ubuntu LAMP Server Installation and your server is ready for installing applications which supports apache,mysql and php.

Enable root Account in Ubuntu server (Not Recommended for security Reasons this is just Optional)

After the reboot you can login with your previously created username (test). Now we will enable the root account using the following command

sudo passwd root

and give root a password.

Now onwards we become root by running the following command


Configuring Static ip address in Ubuntu server

Ubuntu installer has configured our system to get its network settings via DHCP, Now we will change that to a static IP address for this you need to edit Edit /etc/network/interfaces and enter your ip address details (in this example setup I will use the IP address

#vi /etc/network/interfaces

and enter the following save the file and exit

# The primary network interface

auto eth0
iface eth0 inet static

Now you need to restart your network services using the following command

#/etc/init.d/networking restart

You need to setup manually DNS servers in resolv.conf file when you are not using DHCP.

#vi /etc/resolv.conf

You need to add look something like this

search domain.com

nameserver xxx.xxx.xxx.xxx

This is really simple and easy server installation for new users and who wants a quick server.

Sponsored Link

42 thoughts on “Ubuntu LAMP Server Installation With Screenshots

  1. hi there and thanks for this neat guide – i have a question in regard to expanding it – is there a way to make the server act like a wireless access point? if so would this low the server down?
    also would suggest looking at a guide to installing zoneminder to use the server as a cctv hub (i assume a home file/print/personal-webpage server that is allways on but not used much so it might as well serve some other puposes while consuming electricity…)

  2. Hi Michel,

    Thanks for your comments and Yes, you can use ubuntu server as a wireless acess point and it shouldn’t be any problem with the server and if you are looking how to setup ubuntu or debian machine as wireless access point check here

    hope this helps

  3. Nice write up. One thing you didn’t mention that you also have to setup a mail server if you want your LAMP server to be able to send e-mail via the web. This would include things like user sign up, etc.

  4. Great intro and pics!

    But Linux newbies (like myself) should be warned. The server by default is only controlled via the command line. Which was a shock to me. As a newb, I want a windowing interface — I need it.

    Hope it helps!

  5. I’m a noob too and not so comfortable with the command line/shell. Once the server is running at the completion of this tutorial, can I access and manage the server via a web broswer?


  6. There are some tools to manage apache,mysql from web browser like webmin and phpmyadmin.

    Hope this helps

  7. Hi,

    Your guide is a great work, thanks. I just came across it on googling for solution on my problems. I have the LAMP server setup last week for TEST purpose which is now running. I encountered following problems and don’t know whether you can give me some help/guide. Thanks in advance.

    NFS server setup.

    Broadband connection via ADSL modem –> telephone line
    Dynamic IP addr provided by ISP.

    I followed the “server guide” to build and config the LAMP server.

    $ sudo /etc/init.d/nfs-kernel-server start
    Unexporting directories for NFS kernel daemon … [ok]
    Exporting directories of NFS kernel ademon … [ok]
    Starting rpc rfsd …. [fail]
    * end *

    $ cat /var/log/syslog | grep nfs
    Oct 30 00:29:24 ubuntu kernel: [ 44.387818] Installing knfsd
    (C) 1996 [email][email protected][/email]).
    Oct 30 00:29:25 ubuntu kernel: [ 44.504583] NFSD: Using
    /var/lib/nfs/v4recovery as the NFSv4 state recovery directory
    Oct 30 00:29:25 ubuntu kernel: [ 44.504598] NFSD: recovery directory
    /var/lib/nfs/v4recovery doesn’t exist
    Oct 30 00:29:25 ubuntu nfsd[4074]: nfssvc: Network is unreachable
    Oct 30 00:29:26 ubuntu rpc.statd[4182]: statd running as root. chown
    /var/lib/nfs/sm to choose different user
    Oct 30 00:42:33 ubuntu kernel: [ 832.835144] NFSD: Using
    /var/lib/nfs/v4recovery as the NFSv4 state recovery directory
    Oct 30 00:42:33 ubuntu kernel: [ 832.835154] NFSD: recovery directory
    /var/lib/nfs/v4recovery doesn’t exist
    Oct 30 00:42:33 ubuntu nfsd[4427]: nfssvc: Network is unreachable
    * end *

    $ cat /etc/network/interfaces
    auto lo
    iface lo inet loopback
    auth eth0
    iface eth0 inet dhcp
    auto dsl-provider
    iface dsl-provider inet ppp
    provider dsl-provider
    # added by pppoeconf
    auto eth0
    pre-up /sbin/ifconfig eth0 up # line maintained by pppoeconf
    * end *

    $ cat /etc/hosts localhost ubuntu
    # The following lines are desirable for IPv6 capable hosts
    ::1 ip6-localhost ip6-loopback
    fe00::0 ip6-localnet
    ff00::0 ip6-mcastprefix
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters
    ff02::3 ip6-allhosts
    * end *

    Remark: also tried follows without result;
    /ubuntu *(ro,sync,no_root_squash)
    /home *(rw,sync,no_root_squash)
    /ubuntu ubuntu(ro,sync,no_root_squash)
    /home ubuntu(rw,sync,no_root_squash)

    Each time after booting PC, I have to run “sudo pppoeconf” to make broadband connection. “sudo pon dsl-provider” does not work even without complaint displayed.



  8. Great guide.

    But now someone wants to publish a website he has created with MS Frontpage. The result looks like rubbish. I think this is due to lack of frontpage extensions. Any idea on how to install frontpage extensions support on this LAMP server?

    Thanks ahead.


  9. If you want to add options to your LAMP configuration, and you don’t like editing text files I have to recommend WEBMIN.

    apt-get install webmin and with firefox goto https://webserver:10000, and point and click.

  10. HELP, I can not login and write any key from my keyboard. Ubuntu server installation is stopend in screen prompt. Thanks for your reply in advance.

  11. After finishing this guide, I end up with a cursor blinking at me. I’m a total linux noob, but the LAMP installation went fine. The installer itself is clear enough, I didn’t really need the guide except for the last two (command-line) steps.
    What I really need now, is to know how to FTP files from another computer to *whatever* directory so that those files can be accessed via http.

    I mean, it’s all good and sugar that I have a LAMP-server running now, but I don’t have a clue how to start using it?

  12. “but I don’t have a clue how to start using it?” from JV

    This case, is the case of 99% of people using Linux for the first time.
    That´s why Linux SERVER distros (Like Ubuntu) should have GUI (Graphic User Interface) by default.
    If not needed then ppl should have uninstall option, not other way.
    (If we want Linux to beat Windows then we should make Linux easy for beginners – Like myself)
    (They say GUI are waste of resources, etc… Well, i cant see bright future without GUIs, the purists can say whatever they want… Maybe its because of that Windows is a best-seller, im i wrong? I don´t think so! People just want things to work in few clicks, people dont want, and dont have, lots of time to figure out the right commands to do this and to do that…)
    Now im a medium user level in Linux, but i have spent TOO much time to arrive here (and i was a pro in Windows), i know commands are more powerfull than clicks, but if i spent minutes on a mouse clicks, why should i spent days with commands ??? i have more to do!

    Until now servers have no GUI and beginners users must install it (using terminal), it´s very easy (i know that by now) BUT… For beginners that could be hell!
    Desktop GUI, MySql GUI, etc…

    Of course i´ll not go back (for windows), i´ll be with Linux (Ubuntu) forever, but if they want to make the difference, this is the way: GUIs for everything GUIs for all! (from Desktop to Servers)

  13. I’m a total noob, but I’m working on changing that. I just installed thed Ubuntu LAMP server on a laptop, I was really trying to install the desktop. Now my problem is that I need to uninstall it and install the desktop I downloaded. How do I do this?

  14. If you want to install GUI for your LAMP Laptop you need to make sure you have enable universe and multiverse repositories in /etc/apt/sources.list file once you enable this run the following commands

    sudo apt-get update

    sudo apt-get install ubuntu-desktop

  15. (Another total noob) I want to install the GUI on ubuntu Server 7.04 LAMP.
    How do I enable universe and multiverse repositories in /etc/apt/sources.list so I can proceed to install ubuntu-desktop?

  16. first you need to install vim editor

    apt-get install vim

    after that you need to edit file using the following command

    sudo vi /etc/apt/sources.list

    uncomment universe,multiverse lines and save the file using wq!

    now run the following command

    sudo apt-get update

    sudo apt-get install ubuntu-desktop

  17. Thanks! It worked! (wq! should be :wq!)

    More questions:
    I put up a simple page in Apache2. I found that it was viewable within my home network by using a web-browser and putting in:
    http://xxx.xxx.xxx.xxx(that's the inet address listed from ifconfig)/index.html
    But when I did the same thing on a different network with Internet access, the page never loaded.
    Why? How can I fix this?

  18. we need some friendly tools (commands) for administartion purpose

    like 1)service –status-all

    how can i get this for ubuntu

  19. One more noob to join the pile. I have installed the LAMP server with the downloaded dvd iso, and everything appears to be up and running, with one major problem. Currently the computer that I have running this only has internet access via a wireless usb card (zd1211wr chipset), and I’m having a hell of a time trying to get it going via the command line! I’m seeing all kinds of how-to’s for GNOME or other gui’s, but nothing to help me get going through the server version without a gui. The AP is running on WPA-TKIP as well, so makes it even a bit tougher.

    Any suggestions? Most of the help sections I’ve seen so far want you to run an apt-get update, but I can’t do that without first having an internet connection!


  20. O.K. I really like this set up but I have never even used Linux of any kind before. I have installed this in vmware server and was trying to do this step:

    # The primary network interface

    auto eth0
    iface eth0 inet static

    I can get to the location but once i am done doing the changes how do i exit and get back to the command line. I have tried all that I can think of and I cannot go any further.

    Any help would be appreciated.

  21. @henry — if you are using VI or VIM, you would type “shift-z”,”shift-z” to save changes and quit from the editor. If all else fails type “:q!” to quit and begin again.

  22. MySql did not start after basic installation.
    My box didn’t start MySql-service after basic installation. On the console at startup was this message:
    Starting MySql Database server mysqld [fail]

    System log at /var/log/syslog had this notice:
    /usr/bin/mysqladmin: connect to server at ‘localhost’ failed
    error: ‘Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2)’
    Check that mysqld is running and that the socket: ‘/var/run/mysqld/mysqld.sock’ exists!

    Remove the localhost’s address from /etc/mysql/my.cnf using nano editor like this:
    Open my.cnf in nano by running this command at command.
    “sudo nano /etc/mysql/my.cnf”

    Search (using Ctrl+W function) for “”.
    Add a “#” character to the beginning of the line. The line should like this:

    # bind-address =

    Save and exit by hitting these keys:

  23. Hello!
    Well, I’m new to linux too and I installed OpenSSL only and forgot
    to install LAMP. How can I install it now afterwards???
    Whats the easiest way?

  24. hello, how to uninstall LAMP ? I installed it with synaptic (mark by task). thanks

  25. a year and a half after your post – thanks!!!f it’s just what i was looking for

  26. What the advantages if we using the Ubunut Linux, and are this component work automaticly without any other configuration?

    thanks a lot,

  27. hi,

    i ame a total newbie to ubuntu. i realy dont understand how to install the ip adress, does some 1 have a document whit printscreens on that ? it woeld realy help



  28. If you want to install GUI for Ubuntu, you have to install the ubuntu-desktop. Do this by:
    sudo apt-get update

    sudo apt-get install ubuntu-desktop
    which will install the gnome desktop, if you want the KDE desktop simply run:
    sudo apt-get install kubuntu-desktop
    This will take some time so go out for a movie or something! 😉

  29. Hi
    I am new to ubuntu server. I wish to configure LAN with three systems which are using windows operating system.
    could any one send procedure to achieve it. Any link or book Please

    waiting for you valuable feedback …
    Thanks in Advance


  30. Hi,
    I planning to install ubuntu-desktop but don’t have internet connection.
    Is it possible to download the package/update manually from ubuntu site and then upadate manually/locally.


  31. This is a great tutorial, but is there an update to this? This is version 6.0 from 2006. I’m about to install a LAMP server for the first time and kinda nervous bout it….

  32. Ubuntu apache server doesn’t connect in the local host..
    In drupal how to connect Ubuntu apache server?…

    Below error show in browser……….
    Failed to Connect

    Firefox can’t establish a connection to the server at localhost.

    Though the site seems valid, the browser was unable to establish a connection.

    * Could the site be temporarily unavailable? Try again later.
    * Are you unable to browse other sites? Check the computer’s network connection.
    * Is your computer or network protected by a firewall or proxy? Incorrect settings can interfere with Web browsing.

  33. Hi there:

    Thank you for this nice guide.
    Wonderful job. very neat. very helpful.
    I wish I had seen your page when I installed my ubuntu server and LAMP later.
    I used the Ubuntu Server Guide to install mine, and used command line, but I am stuck with my LAMP server now.
    I run apache2ctl configtest
    Syntax OK

    then I do
    a2ensite mansour.net
    …already enabled

    /etc/init.d/apache2 restart
    * restarting web server apache2
    … waiting [OK]
    root@ubuntu-server :~#

    so far OK. but when I type mansour.net at my Win XP browser , I get DNS error.
    I have an A Record for mansour.net in my DNS zone file exactly the same as what I type in URL.
    Why do I not have a web site then?
    I appreciate your help here.

    Thank you


  34. Good post and still relevant. What I don’t understand is after 4 years the installer still doesn’t have an option to install the GUI. I can handle the command line, but others in my company can’t and it is a hard sell to switch from a Windows server that is easy to administer to this without the GUI. Seems like a simple thing to add and like someone said, the default should be to include the GUI. Let’s start with it on-par with a Windows server and you can dumb it down if you are an expert and really want/need to.

    That’s my 2-cents.

    — Dave

  35. Hi, i would like to install a Radius server for authentication the users of a LAN, but i want to put a grafic interface to see the logs, activity and add the users easily, because my knowledge of linux is so poor, please help me….. i´m thinking to install a machine with ubuntu, and then put the freeRadius, or is better put the ubuntu server with all the apps. ¿?

Leave a comment

Your email address will not be published. Required fields are marked *