Bookmark and Share

If you are new to Unixmen, you may want to subscribe :

LAMP (Linux, Apache, MySQL and PHP) is an open source Web development platform that uses Linux as operating system, Apache as the Web server, MySQL as the relational database management system and PHP as the object-oriented scripting language.

There are many methods to install lamp for example the standart one see our previous howto for ubuntu :

Howto: Install Lamp and phpmyadmin on Ubuntu

So lets show you another way to install lamp under ubuntu 9.10 karmic Koala and Ubuntu 10.04 Lucid Lynx.

First ,under Terminal type the command :

$sudo  tasksel


you will get something like :

Now you have to shoose the LAMP line and SPACE key to select LAMP Server .

After, you will asked to insert root mysql password

After the procedure will start downloading and installing needed packages for LAMP


Of  with  this  command :

sudo apt-get install php5 mysql-server apache2

Or  with :

$ sudo tasksel install lamp-server

Now lets check of its working .

Check the apache2 from your browser :

Http:Ip or hostname


Now check if your Mysql is wokring with:

Chcek if php is working :

$sudo   vi  /var/www/info.php

and add

<?php
phpinfo();
?>

save and exit

restart apache2

#/etc/init.d/apache2  restart


and browse again http://ip/info.php


Enjoy and feel free to ask


If you have a Tip, tutorial, Idea or anything you want to share with unixmen readers, you can send it to : tips[a]unixmen.com or use our contact form Thanks.


Related Articles By Tags:




Related Articles By Tags:

Comments (24)
  • Nate  - How about this
    avatar

    sudo apt-get install php5 mysql-server apache2

  • SmallBoxAdmin  - Even Easier
    avatar

    $ sudo tasksel install lamp-server

  • pirat9
    avatar

    Appreciated and add to the Tutorials
    Thanks again

  • erik witkop  - If lamp-server is missing from inside of tasksel
    avatar

    Run 'sudo apt-get update'

  • AL MUBARAK  - ABOUT LAMP
    avatar

    Hai.,

    i installed LMAP server in my ubuntu 9.10 but Linux and ajax were working fine but i can't access my phpmyadmin page and mysql database pages. when i redirected to another pages in my site it will displays like that below.,

    Not Found

    The requested URL /abs/admin was not found on this server.
    Apache/2.2.12 (Ubuntu) Server at localhost Port 80

    but i change the port no into 7900 from 80 then there is no effect in my system.

    Anyine Could help me to rectify this issue.

    Advance in Thannks

  • Pirat9
    avatar

    AL MUBARAK
    Check the firewall security
    Check the write access on the apache web directory . check if the directory is the same on apache.conf of httpd.conf
    add the hostname and ip to /etc/hosts


    restart apache
    try again

  • Anthony Nandaa  - tasksel
    avatar

    After going through a number of blogs, I had never come across such an easy way!!!

    Thank sooo much!

  • Kauê
    avatar

    What if php is not working?

  • birdy
    avatar

    This was most helpful! I've been using linux for a while and never came across tasksel command.

  • bomber  - add what?
    avatar

    Part of the instructions are to add to a info.php file:

    "Chcek if php is working :

    $sudo vi /var/www/info.php

    and add

    save and exit

    restart apache2"

    The problem is you have nothing there to add. When I restart apache and go to localhost/info.php, the computer wants to know what to do with the file.

  • Zinovsky
    avatar

    I see i can not type that code in this page it disappear, i will investigate the problem later but you can copy the code from this page
    http://kb.mediatemple.net/questions/764/ How+can+I+create+a+phpinfo.php+page%3F

    :lol:

  • Ron
    avatar

    I tried running $sudo $sudo tasksel. I used space to select LAMP and also used space to deselect the other packages that were auto selected. Was this a mistake? During the install it asked for a MySQL password and then started deleting what seemed to be necessary components of Ubuntu. The install didn't even complete and my screen went black. Now when I try to run Ubuntu it is only text based and my password no longer works. Luckily this was a fresh install so I didn't lose too much. Are you not supposed to uncheck anything? I figured I didn't need to install packages I already had installed.

  • Zinovsky
    avatar

    Perhaps you selected Edubuntu server or basic ubuntu server instead of LAMP, that`s why was deleting necessary things of Ubuntu .
    Just follow as described in the screenshots and be sure that you select the right ONE (LAMP) before to press continue.

  • Anonymous  - same thing here
    avatar

    Apparently if you de-select Ubuntu Desktop (or anything else that is already checked), it will uninstall that item.

  • Jose Oliveira
    avatar

    Received the message
    "Aptitude failed (100)"

  • Jose Oliveira
    avatar

    Received the message
    "aptitude failed (100)"

  • Pirat9
    avatar

    Jose Oliveira
    try with apt command and not with aptitude , and post your output here please

  • Troy  - Same problem as Jose Oliveira
    avatar

    Hey Pirat9,
    I had the same problem that Jose had and used the alternative input (Like you suggested):
    sudo apt-get install php5 mysql-server apache2

    and it worked perfectly, thanks.

  • Edgar  - Works like a charm
    avatar

    Thank you Pirat9. My LAMP is shining bright!

  • Sunny  - Working fine
    avatar

    I got the same screens show by you. Works like a charm. Thanks for share.

  • Joel Teixeira  - Lovely!!
    avatar

    Damn easy. Thanks a ton!

  • Yene  - Just simple
    avatar

    I love this one command line installation, make life easy and not just free :D

  • Itsano  - php problem
    avatar

    The php does not work. A dialog pops up asking what to do with the php file.. What's wrong?

Write comment
Your Contact Details:
Gravatar enabled
Comment:
[b] [i] [u] [s] [url] [quote] [code] [img]   
:D:):(:0:shock::confused:8):lol::x:P:oops::cry:
:evil::twisted::roll::wink::!::?::idea::arrow: