Install Apache MySQL PHP phpmyadmin (LAMP) on Ubuntu 10.10

1 Star2 Stars3 Stars4 Stars5 Stars (8 votes, average: 4.50 out of 5)
Loading ... Loading ...

Installing Apache MySQL, PHP and phpmyadmin on Ubuntu10.10 Maverick Meerkat is far easier and less complicated than doing the same on Fedora 13, (my own experience).

you can install Apache2, php, MySQL all in one shot using the following command:

sudo apt-get install tasksel

This would install tasksel installer, now launch it and then choose to install lamp server by pressing space bar (you would be able to see a * in front of selected package) to select the software group to be installed. Launch tasksel by doing this

sudo tasksel

You would be asked for the MySQL root password, and then asked to repeat it.

Wait till the installation gets over, after which you can launch Firefox to check if apache and php installed correctly by following instruction in steps 2 and 3 below.

However, you would still need to install additional php libraries and phpmyadmin, as described in steps 4 and 5 below.

Step 1: You start by installing mysql

sudo apt-get install mysql-client mysql-server

Specify new password for the MySQl “root” user when prompted. Repeat it for a second time and you would have MySQL server and client installed.

Step 2: Next, install Apache2:

sudo apt-get install apache2

And you get apache2 installed as well. To double check, point your browser to http://localhost, and you should see the Apache2 placeholder page like this.

Step 3: To install support for PHP, do the usual

sudo apt-get install php5 libapache2-mod-php5

To verify that everything installed correctly and php support is enabled, you need to restart apache by doing this

sudo /etc/init.d/apache2 restart

Create a test php file called info.php, using a text editor of your choice (say gedit)

sudo gedit /var/www/info.php

and paste the following content and save the file

<?php
phpinfo();
?>

Now open the following page http://localhost/info.php and you should see something like this

Step 4: To make MySQL, php and apache talk among themselves, you would have to install php5-mysql, below I am listing some more useful packages that you might want to install

sudo apt-get install php5-mysql php5-curl php5-gd php5-idn php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-ming php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl php5-common

Now refresh the info.php page that you have open in your browser and you should be able to see the support for mysql if you search for it by doing Ctrl+f, but before that don’t forget to restart apache again (sudo /etc/init.d/apache2 restart)

Step 5: Finally install phpmyadmin

sudo apt-get install phpmyadmin

It would ask if you want to configure it automatically for apache or lightppd choose apache (by pressing “spacebar” to display a star as shown below and then use tab to navigate to Ok and press enter.

It would be automatically configured, however it would ask if you want a database installed and configured, choose yes and press enter

On the next screen you would be asked to enter the MySQL root password, that you provided in first step

next it would ask you to enter a password to be used by phpmyadmin to register with the database (basically it would create a user called “phpmyadmin” the password is for that, most likely you won’t be needing this password ever. You can even choose to assign a random password for it.

Confirm that password on the next screen. Once you have made your choices the installation would finish and you should be able to access phpmyadmin by pointing your web browser to http://localhost/phpmyadmin/

You might need to restart apache again, for the above link to start working! (I didn’t have to restart apache, though.)

If you are getting Page NOT FOUND error, you might need to do this additional step as pointed out by Otavio Souza (thanks again)

sudo apt-get install phpmyadmin
sudo cp -R /usr/share/phpmyadmin /var/www
sudo /etc/init.d/apache2 restart

Super easy installation… :)

If you found this useful, please consider leaving a comment or liking us on Facebook or following us on Twitter or subscribing to the RSS feed to have future articles delivered to your feed reader.

You might also like

Install Apache MySQL PHP phpmyadmin (LAMP) on Ubuntu 10.04 or Mint Linux 9 Installing...
Install Apache MySQL PHP phpmyadmin (LAMP) on Ubuntu 11.04 Installing...
Install Apache MySQL PHP phpmyadmin (LAMP) on Linux Mint 11 Katya Installing...
Install Apache MySQL PHP phpmyadmin (LAMP) on Linux Mint 13 Maya Installing...

About the Author

has written 1326 posts on this blog.

Meditating towards his "nerdvana", lifehacker is a teacher by the day and a nerdy blogger by the night. He lives to learn and yearns to learn living.

21 Comments on “Install Apache MySQL PHP phpmyadmin (LAMP) on Ubuntu 10.10”

  • Fabian Knopf wrote on 20 October, 2010, 9:38

    Thx for this nice tutorial!

    Best Regards,

    Fabian

    Like or Dislike: Thumb up 1 Thumb down 0

    [Reply]

  • nikesh wrote on 21 October, 2010, 7:46

    you can do all these using simple application – Tasksel

    Like or Dislike: Thumb up 2 Thumb down 0

    [Reply]

    lifehacker Reply:

    Go and check, tasksel is not available in Ubuntu 10.10.

    Like or Dislike: Thumb up 1 Thumb down 0

    [Reply]

    Alan Reply:

    @lifehacker, sudo apt-get install tasksel

    Like or Dislike: Thumb up 1 Thumb down 0

    [Reply]

    lifehacker Reply:

    @Alan, Thanks man. I updated the post.

    Like or Dislike: Thumb up 0 Thumb down 0

    [Reply]

  • Mustafa wrote on 15 November, 2010, 12:07

    thanks, good guide

    Like or Dislike: Thumb up 0 Thumb down 2

    [Reply]

  • Abel wrote on 19 November, 2010, 5:05

    Good, very good!
    Thank you

    Like or Dislike: Thumb up 2 Thumb down 2

    [Reply]

  • Mike wrote on 30 November, 2010, 0:17

    Just want to say thank you. This worked perfectly and was so simple. I’m new to Linux so thanks for making this easy.

    Like or Dislike: Thumb up 2 Thumb down 1

    [Reply]

  • sa wrote on 3 January, 2011, 15:57

    Very good step by step instructions, which helped me in installing LAMP on Ubuntu 10.10. Thanks a lot!!!

    Like or Dislike: Thumb up 2 Thumb down 0

    [Reply]

  • mallik wrote on 4 February, 2011, 6:19

    I am having trouble running php test . script is not getting executed, it shows the text content when hit from browser and command line.

    Like or Dislike: Thumb up 0 Thumb down 0

    [Reply]

  • mallik wrote on 5 February, 2011, 6:29

    the problem was php5 not getting installed on Ubuntu 10.10 EC2 AMI I was using. did a ubuntu update and upgrade and installed php5. its working fine now.
    Mallik

    Like or Dislike: Thumb up 0 Thumb down 0

    [Reply]

  • othniel wrote on 7 April, 2011, 4:02

    I only get this each time i run the ‘sudo apt-get install tasksel’ :

    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    E: Unable to locate package taskel

    Like or Dislike: Thumb up 0 Thumb down 0

    [Reply]

  • Daniel Cruz wrote on 13 April, 2011, 14:08

    Very easy… Thanks

    Like or Dislike: Thumb up 0 Thumb down 0

    [Reply]

  • Jimenez wrote on 15 April, 2011, 21:24

    I instaled phpmyadmin (LAMP),but when I test it (http://localhost/phpmyadmin) I get:
    NOT FOUND “the requested URL/phpmyadmin was not found on this server”.
    Apache/2.2.16 (Ubuntu) server at localhost Port 80.

    Like or Dislike: Thumb up 0 Thumb down 0

    [Reply]

  • Amit wrote on 26 April, 2011, 4:29

    i install phpmyadmin (LAMP),but when I test it (http://localhost/phpmyadmin) I get:
    NOT FOUND.please help me asap.thanks

    Like or Dislike: Thumb up 0 Thumb down 0

    [Reply]

  • Otavio Souza wrote on 30 May, 2011, 14:09

    The tutorial worked perfect until and include the last command, but missed the command for copying the installed phpmyadmin:

    Then the final of the tutorial must be:

    sudo apt-get install phpmyadmin
    sudo cp -R /usr/share/phpmyadmin /var/www
    sudo /etc/init.d/apache2 restart

    Direct the browser to http://localhost/phpmyadmin/
    and phpmyadmin will appear fine.

    In my ubuntu 10.10 worked fine.

    Like or Dislike: Thumb up 0 Thumb down 0

    [Reply]

    lifehacker Reply:

    @Otavio Souza, OK, I am updating the last part of the post with this, I never had to do this, phpmyadmin works for me out of the box everytime. Thanks for letting me know.

    Like or Dislike: Thumb up 0 Thumb down 0

    [Reply]

  • Carlos wrote on 17 September, 2011, 1:33

    Thank you for the easy tutorial. Really good.

    Like or Dislike: Thumb up 1 Thumb down 0

    [Reply]

Trackbacks

  1. Ubuntu & Apache « Saavedrah's Blog
  2. 在Ubuntu 10.10中安装AMP并为Apache2.2中启用URL Rewrite | 敬一日志
  3. Apache + PHP + MySQL on Ubuntu 11.04 | Eager to Code, Enjoy to Debug ~ Embark into Each Stage with Your Heart

Write a Comment

Gravatars are small images that can show your personality. You can get your gravatar for free today!

*

Copyright © 2013 Hack Your Life!. All rights reserved.
Proudly powered by WordPress. Developed by Deluxe Themes