Ubuntu LAMP Server Installation With Screenshots
Posted by Admin on October 15th, 2006
If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!
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
Apache2
Mysql5
PHP5
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
su
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 172.19.0.10):
#vi /etc/network/interfaces
and enter the following save the file and exit
# The primary network interface
auto eth0
iface eth0 inet static
address 172.19.0.10
netmask 255.255.255.0
network 172.19.0.0
broadcast 172.19.0.255
gateway 172.19.0.1
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.


October 16th, 2006 at 3:30 pm
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…)
October 16th, 2006 at 4:38 pm
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
October 17th, 2006 at 7:36 pm
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.
October 19th, 2006 at 12:32 am
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!
October 20th, 2006 at 9:33 pm
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?
Thanks.
October 20th, 2006 at 9:50 pm
There are some tools to manage apache,mysql from web browser like webmin and phpmyadmin.
Hope this helps
October 26th, 2006 at 6:25 am
WONDERFUL! BEAUTIFUL! MARVELOUS! (thanks!)
November 4th, 2006 at 2:27 am
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.
1)
NFS server setup.
Ubuntu-6.06.1-server-amd64
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
(copyright
(C) 1996 [email]okir@monad.swb.de[/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
address 127.0.0.1
netmask 255.0.0.0
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
127.0.0.1 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;
A)
/ubuntu *(ro,sync,no_root_squash)
/home *(rw,sync,no_root_squash)
B)
/ubuntu ubuntu(ro,sync,no_root_squash)
/home ubuntu(rw,sync,no_root_squash)
2)
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.
Tks
B.R.
satimis
November 6th, 2006 at 9:12 am
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.
Pieter
November 26th, 2006 at 1:34 pm
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.
December 28th, 2006 at 1:28 pm
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.
March 28th, 2007 at 10:55 pm
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?
April 4th, 2007 at 12:50 pm
“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)
April 13th, 2007 at 1:56 pm
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?
April 13th, 2007 at 3:07 pm
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
May 2nd, 2007 at 5:11 pm
(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?
May 2nd, 2007 at 5:42 pm
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
May 5th, 2007 at 5:58 pm
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?
May 10th, 2007 at 12:53 pm
we need some friendly tools (commands) for administartion purpose
like 1)service –status-all
2)traceroute
etc
how can i get this for ubuntu
May 12th, 2007 at 9:21 am
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!
Thanks
August 5th, 2007 at 10:16 pm
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
address 172.19.0.10
netmask 255.255.255.0
network 172.19.0.0
broadcast 172.19.0.255
gateway 172.19.0.1
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.
August 8th, 2007 at 12:06 am
@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.
August 15th, 2007 at 1:33 pm
MySql did not start after basic installation.
Symptoms:
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!
Fix:
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 “127.0.0.1″.
Add a “#” character to the beginning of the line. The line should like this:
# bind-address = 127.0.0.1
Save and exit by hitting these keys:
Ctrl+X
Y
Enter
February 2nd, 2008 at 7:29 pm
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?
March 28th, 2008 at 8:58 pm
open synaptic
-> admin -> edit -> by task
scroll down and mark LAMP.
April 12th, 2008 at 7:44 pm
hello, how to uninstall LAMP ? I installed it with synaptic (mark by task). thanks
April 18th, 2008 at 10:12 pm
a year and a half after your post – thanks!!!f it’s just what i was looking for
July 1st, 2008 at 8:44 am
What the advantages if we using the Ubunut Linux, and are this component work automaticly without any other configuration?
thanks a lot,
July 24th, 2008 at 7:12 pm
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
cheers,
pim
July 30th, 2008 at 10:09 am
Can I run the Ubuntu 8.04 LTS server in GUI mode?
August 22nd, 2008 at 3:52 pm
If you want to install GUI for Ubuntu, you have to install the ubuntu-desktop. Do this by:
sudo apt-get update
Then:
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!
September 2nd, 2008 at 1:58 pm
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
GNR
April 19th, 2009 at 10:51 am
Nice tuto thanks, i don`t know is available for the newest ubuntu 8.10
April 28th, 2009 at 10:25 am
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.
Thanks,
Mj
August 7th, 2009 at 11:33 am
MJ
Download – http://packages.ubuntu.com/dapper/i386/ubuntu-desktop/download
Presume you’re on x86, if not, select your architecture.
At the command line use dpkg to install