May 6, 2009 · Server · Email This Post

Sponsored Link
In around 15 minutes, the time it takes to install Ubuntu Server Edition, you can have a LAMP (Linux, Apache, MySQL and PHP) server up and ready to go. This feature, exclusive to Ubuntu Server Edition, is available at the time of installation.The LAMP option means you don’t have to install and integrate 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. Instead, you get increased security, reduced time-to-install, and reduced risk of misconfiguration, all of which results in a lower cost of ownership.New pre-configured installation options have been added to the Ubuntu Server. Mail Server, Open SSH Server,Samba File Server, Print Server, Tomcat Java Server,Virtual Machine Host and Database Server options join existing LAMP and DNS options for pre-configured installations, easing the deployment of common server configurations.

Ubuntu LAMP server Install the following Versions

Ubuntu 9.04 (Jaunty Jackalope)
Apache 2.2.11
Mysql 5.1.30
PHP 5.2.6-3

First you need to download server version of Ubuntu version from here after that 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 your language and press enter

Now you need to select “Install Ubuntu Server” and press enter

Select your language and press enter

Select your location and press enter

If you want to try to have your keyboard layout detected by pressing a series of keys you need to select yes option.If you want to choose from a list click no

Select Origin of keyboard and press enter

Select keyboard layout and press enter

Detecting hardware to find CD-ROM Drivers in progress

Loading additional components in progress

Detecting Network hardware in progress

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

Enter your server Hostname

Clock setup is in progress

Starting up the partitioner in progress

You have to partition your hard disk in this example i have selected use entire disk option.If you want to do manually you can choose manual option and press enter.Make sure you have swap partition in place

Warning message about data lost on your hard disk

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

Creating ext3 file system in progress

Installing base system in progress

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

Enter your user account name here

Entered the password for ruchi user select continue and press enter

Confirm password for ruchi user

If you choose weak password this will prompt similar to the following screen

If you want to configure encrypted private directory select yes and press enter

Configuring the package manager select continue and press enter

Configuring package mirror this will be related to your country option

Select how do you want to configure automatic update press enter

Now it will start Installing software and here you need to select the server options here i have selected as LAMP for our LAMP server installation.If you want to select each package separately select "Manual package selection" option (This is new in jaunty server)

At the time of software installation it will prompt for mysql server root password enter root password of your choice and select continue

Confirm mysql server root password and select continue

Software installation is in progress

Installing GRUB Boot loader in progress

Finishing installation 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 Jaunty LAMP Server Installation and your server is ready for installing applications which supports apache,mysql and php.

One more new feature i really like was after logging in it shows you system stats like CPU,Memory,Disk,Swap,No.of processes,No.of users logged in and no.of security updates available

Configuring Static ip address in Ubuntu server

If you want to install vim editor use the following command

sudo apt-get install vim-full

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):

sudo vi /etc/network/interfaces

and enter the following save the file and exit (In vi, ESC, then ZZ to save 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

sudo /etc/init.d/networking restart

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

sudo vi /etc/resolv.conf

You need to add look something like this

search domain.com
nameserver xxx.xxx.xxx.xxx

Sponsored Link

Incoming search terms:

Related posts

33 Comments to “Step By Step Ubuntu 9.04 (Jaunty) LAMP Server Setup”

  1. nbensa says:

    Or you can do it like this:

    sudo aptitude install mysql-server phpmyadmin

    [Reply]

  2. TJ says:

    Funny thing happened, I hit the Lamp option while installing but was never promted for mysql root password and lamp wasnt actually installed when the server install was done. wierd

    [Reply]

  3. TJ says:

    AHHH crap, I was hitting enter thinking I was choosing the selection…when i was actually selecting nothing. DOH

    [Reply]

  4. jason says:

    Or from an existing system just…

    # sudo apt-get update
    # sudo tasksel

    Which shows you a similar menu as the installation software selection

    and select LAMP Server from the list

    [Reply]

  5. Mr.Walker says:

    Thanks, Jason

    That saved me a lot of time.

    [Reply]

  6. Andi says:

    What’s the command to get the same system stats after login?

    [Reply]

  7. M. Jawaid says:

    Need help in installing LAMP server on Ubuntu 9.04 Desktop. I have installed the Jaunty Desktop OS on my old PC. My purpose is to use this PC as a local host and printserver. Just getting my feet wet in the Linux OS field. Need your assistance step-by-step to configure this PC. Thanks in advance
    for all the help.

    M.Jawaid

    [Reply]

  8. Gregory says:

    @M.Jawaid

    1. Open command prompt:

    2. Type: sudo tasksel

    3. Click “LAMP”

    [Reply]

  9. LBizzle says:

    Is there a GUI to this? Or better yet how do I get to it? My buddy stated his version 8x boots right in to it and that I needed to find . –name gnome most likely… Is this the case with Jaunty? New to using Linux if you couldn’t tell.

    [Reply]

  10. xtrigit says:

    Where the heck do I look for my ip address if I dont know it!!!

    and what are the other numbers for and how do I get them? DO i just make them up or something?

    Its very frustrating, im setting up a webserver but this is keeping me from accomplishing iit. :S

    Please help me!!!! :(

    [Reply]

    admin Reply:

    Use the following command to get your server ip address

    [Reply]

  11. xtrigit says:

    I’m stuck on the last step…
    “You need to setup manually DNS servers in resolv.conf file when you are not using DHCP.

    sudo vi /etc/resolv.conf

    You need to add look something like this

    search domain.com
    nameserver xxx.xxx.xxx.xxx ”

    where it says:
    “search domain.com
    nameserver xxx.xx.xxx.xxx.” do I replace domain.com with something? and what do I put on xxxxxxxxxxxx ? Thanks :)

    [Reply]

    admin Reply:

    Search domain.com

    You can replace domain.com with your ISP domain name

    Nameserver xxxxxxxxxxxxx

    xxxxxxxxxxxx – DNS servers from your ISP

    If you want to use internally enter your DNS server details and domain

    [Reply]

  12. xtrigit says:

    Awesome! “It works” lol That’s the message I get when I put my server’s ip in the address bar.

    It took me 9 long hours to get it done. A mixture of 3 tutorials lol. I will be donating to this site, it helped me a lot. Had i not confused the ip addresses, I would’ve been done in half the time.

    One last question, Admin; How do I check to make sure I installed everyhthing correctly? and How do I go about installing a Cpanel and is it safe to access the server via it’s ip ? I have plenty of domains I just dont know how to add them or idont know. If i redirect the domain name’s to my isp’s nameservers , will it work? or do I need to install something else?

    Thanks again!

    [Reply]

  13. Iqbal Sajid says:

    Thanks guys. Thank you very much.
    I’m able to install LAMP using the foll 2 commands.
    # sudo apt-get update
    # sudo tasksel

    after its completion when i point to 127.0.0.1 I see a messege:

    It Works!

    also when i browse my ip 192.168.1.33 messege is same; I got my IP by command ifconfig my eth0 has this ip
    Now another question from you genius ppl who always here to help ppl like me.

    My question is like xtrigit, as I also want to install cpanel on my machine so that i can work on my pc and then do it on the internet servers.

    I installed LAMP ‘coz i wanted to install and config WordPress on my system as internet is too slow from my home. :(. so i’ll make a site for my customer and upload that on the internet.

    I don’t know how to access apachi, mysql or any other things.

    Thanks again for the great help.

    [Reply]

  14. Sarah Samplonius says:

    Thank you. Tutorial and follow up comments all saved me a ton of time. Made same mistake in install with LAMP and fixed with Iqbal Sajid’s comments. Perfect. Up and running in less than half an hour.

    [Reply]

  15. kianoo says:

    Hi there, Juss installed 9.04 Server ed. – After rebooting it boots into Terminal rather than Desktop/gnome_graphical_interface..? Any Ideas – On how to boot into Desktop rather than terminal…!!!

    btw, i’ve tried starting ‘startx’ or /etc/init.d/xdm all of these doesn’t work…

    Thanks Heaps…!

    [Reply]

    admin Reply:

    @Kianoo

    Did you install ubuntu desktop package in your server or not use the following command to install

    sudo apt-get install ubuntu-desktop

    After installing try to run the startx command if you still having problems it is someting related to your graphic card drivers

    [Reply]

  16. shubho says:

    hi,

    i installed lamp and open ssh server. everything is working fine.

    i just want to know how do i install phpmyadmin. i do not have an internet connection on this server, so please suggest me an alternative.

    thanks.

    [Reply]

  17. adek2kn says:

    nice tutorial i have try it and work fine..so far so good thx for tutorial

    [Reply]

  18. Skyler says:

    where can I find

    auto eth0
    iface eth0 inet static
    address 172.19.0.10
    netmask 255.255.255.0

    >>>>>>>network 172.19.0.0<<<<<< This

    broadcast 172.19.0.255
    gateway 172.19.0.1

    i know where to find the rest, but what is this address for? my gateway is 192.168.1.1, so i put my network as 192.168.1.0. so its slightly different. Im afraid this is why i cant connect.

    Also if this is not the cause, what do I do to get into my server? i tried its IP address from run.. and the browser, but i get a "problem loading page" error.

    [Reply]

  19. Fashionics says:

    Hi,
    How to show the system information at startup?

    [Reply]

  20. mohamed says:

    i need to know how to install squid server at this operating system ,
    and how to comunicate with mikrotik ?
    what is the lamp server in ubuntu ?
    thank u

    [Reply]

  21. Matt says:

    A not for newbies like me.

    When you use: sudo tasksel to bring up the software install screen, you use the space bar to select the items that you want to install. I started with the keys at the top of the keyboard, so it took me a while to get all the way down there to find it.

    [Reply]

  22. Hani Hammon says:

    Thanks for the great tutorial! Personally I prefer nano to vi but, the rest is great!

    [Reply]

  23. William says:

    This is a note to all you linux newbies trying to set up a simple LAMP type server with this page as a guide. You might strongly think about one of the complete package on a disk installs. There are several and I dont want to mention names but they all will greatly simplify your setup time and provide a nice web based configuration system.

    A ubuntu based LAMP is a great tool for those who prefer to have cutting edge features and the freedom to configure as they see fit but it comes with the cost of requiring a great deal of linux knowledge and time setting it up. Your choice.

    [Reply]

  24. James says:

    Regarding those “Complete Package” LAMPs, I was avoiding them since some explicitly say they were setup for Development servers only.

    Security wise do I have an advantage using the Ubuntu LAMP vs the other ones? I was hoping even if the Ubuntu ones are not tied down at least they give me a chance to learn how to close the holes.

    I may be wrong on that hoping for clarification from “guru’s” here :-)

    Question: Regarding Network Settings. You said

    “# 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 already have an IIS server so I know the Static IP part, the Netmask and Gateway. What are the other two? Meaning these

    network 172.19.0.0
    broadcast 172.19.0.255

    Are they what we call
    Preferred DNS Server
    Alternate DNS Server

    In our Windoz world?

    Thanks Guys

    [Reply]

  25. Daniel says:

    how do i select when i use tasksel. somebody help me install lamp please. I am a web developer who just switched to linux —-ubuntu 9.04. I am tired of windows and virus.

    [Reply]

  26. Bjørn says:

    @Daniel – Press spacebar to select, then enter to install.

    [Reply]

  27. keith says:

    I need a bit of help with this that I cannot find elsewhere. Even after issuing ‘tasksel’ and it not reporting any errors, I get the following:

    # aptitude install mysql-client mysql-server
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    Reading extended state information
    Initializing package states… Done
    The following partially installed packages will be configured:
    mysql-server mysql-server-5.1
    0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
    Need to get 0B of archives. After unpacking 0B will be used.
    Writing extended state information… Done
    Setting up mysql-server-5.1 (5.1.37-1ubuntu5) …
    * Stopping MySQL database server mysqld [ OK ]
    * Starting MySQL database server mysqld [fail]
    invoke-rc.d: initscript mysql, action “start” failed.
    dpkg: error processing mysql-server-5.1 (–configure):
    subprocess installed post-installation script returned error exit status 1
    dpkg: dependency problems prevent configuration of mysql-server:
    mysql-server depends on mysql-server-5.1; however:
    Package mysql-server-5.1 is not configured yet.
    dpkg: error processing mysql-server (–configure):
    dependency problems – leaving unconfigured
    No apport report written because the error message indicates its a followup error from a previous failure.
    Errors were encountered while processing:
    mysql-server-5.1
    mysql-server
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    A package failed to install. Trying to recover:
    Setting up mysql-server-5.1 (5.1.37-1ubuntu5) …
    * Stopping MySQL database server mysqld [ OK ]
    091128 2:22:03 [Note] Plugin ‘FEDERATED’ is disabled.
    091128 2:22:03 [Note] Plugin ‘InnoDB’ is disabled.
    091128 2:22:03 [Warning] Forcing shutdown of 2 plugins
    * Starting MySQL database server mysqld [fail]
    invoke-rc.d: initscript mysql, action “start” failed.
    dpkg: error processing mysql-server-5.1 (–configure):
    subprocess installed post-installation script returned error exit status 1
    dpkg: dependency problems prevent configuration of mysql-server:
    mysql-server depends on mysql-server-5.1; however:
    Package mysql-server-5.1 is not configured yet.
    dpkg: error processing mysql-server (–configure):
    dependency problems – leaving unconfigured
    Errors were encountered while processing:
    mysql-server-5.1
    mysql-server
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    Reading extended state information
    Initializing package states… Done

    I’ve tried reading on the mysql web site about this, but haven’t found anything that’s of assistance. Thoughts?

    [Reply]

  28. Victor B. says:

    Hi, I had the same problem with MySQL. It happened to be a problem with the port 3306.
    In my case it was being used by another application ( a vpn tunnel to another mysql).
    The problem was solved after after I cleared the 3306 and let the local mysql use it.

    [Reply]

  29. Augustin says:

    Hi!
    We are setting up a file server with Intel S5500BC Mother Board & will have Raid 5 for storage.
    Can anyone tell us if this Board will support this things for Ubuntu 9.04 server?

    What are the things we should consider before setting up this server?

    I’m a novice & need some one’s help in this this.
    Best Rgds
    Augustin

    [Reply]

  30. Shimona says:

    Hi,
    After setting up the email server, I can check my email in squirrel mail as well as Outlook. But the problem is I have to login as [email protected]
    Is there a way by which I can login as just myname?
    I ask this because we will be migrating to this new server shortly and since the old server required just myname for logging in we will now have to go round to all the PCs to make the changes.
    Any help would be appreciated.
    Rgds,

    Shimona.

    [Reply]

Leave a Reply