126 Comments

  1. LucidLynx

    Nope... Couldn't find package lamp-server. you fail.
    ~Lucid Lynx

    Reply

    • Read the tutorial again. The command is NOT

      sudo apt-get install lamp-server

      The correct command is

      sudo apt-get install lamp-server^

      Sorry, you fail...

      Reply

  2. Greate article. thank you so much. before i installed XAMPP but i just remove it and go step by step on this post. thank man again

    Reply

    • For me it worked up to this command:
      $ sudo apt-get install libapache2-mod-auth-mysql phpmyadmin

      [outuput supressed]

      Package libapache2-mod-auth-mysql is not available, but is referred to by other package
      This might mean that package is missing, is outdated or is available only from another source

      E: Package 'libapache2-mod-auth-mysql' does not have a candidate for installation

      (Since my installation is in Portuguese, I had to translate the above text back to English. This means
      the wording might not be the same one you would see under an original English installation. Nevertheless,
      the meaning is similar enough).

      In a nutshell, I cannot finish the configuration because I can't find the fingered package.

      Any hints, please?

      - fernando

      Reply

      • Did you try running

        sudo apt-get update

        Then try running the command to install phpmyadmin.

        Are you using Ubuntu 12.04 or another version?

        Reply
  3. abas

    Hi

    followed your easy setup but a few questions.

    1.
    Is there an upgrade path? Currently php version running is 5.3.x?

    2.
    Is there a way to remove/delete this task, lamp-server?

    Thanks.

    Reply
    • Linerd

      The php version installed should be the latest one that's available in the repositories. As that gets updated, you should get the updates with your regular system updates.

      I have written a tutorial to remove LAMP. Make sure to do the dry run first to make sure that no packages you need will be removed. I've had some comments that certain developer packages get removed. Also, if you're running Kubuntu you'll have to reinstall the kubuntu-desktop package.

      http://tuxtweaks.com/2010/10/remove-lamp-in-ubuntu/

      Reply
  4. really delighted!

    Fantastic! Awesome! over the past decade ... off and on I tinker with various distros.. lots of them.. for me it has been really big headache installing LAMP on linux -- following these steps is like surfing the waves under sunny summer evening.. already finished 6 installations with happy smiles...

    Reply
  5. keya

    Phew! Thanks! I kept getting stuck at phpmyadmin because right at that point we were getting a flash flood warning, so I wasn't really concentrating and kept getting the black and white screen without login info.

    I had to reset the mysql password,

    https://help.ubuntu.com/community/MysqlPasswordReset

    uninstalled phpmyadmin, then reinstalled it, and REALLY READ the instructions on selecting the Apache2 server, and now everything seems to be working. Thank you for your fabulous instructions. I've spent a week with command line stuff, and it's really quite fun.

    Reply
  6. Dipak Chakraborty

    Most useful article. Thank You very much.

    Reply

  7. Nice tutorial, I've done this the hard way many times before. I have a couple of suggestions:

    1.) Don't use your root password for phpmyadmin for security reasons, have it generate the random one. You don't need to know it, it's used by the program.

    2.) After installing phpmyadmin, I have a habit of editing the configuration file in /etc/phpmyadmin/apache.conf and changing the /phpmyadmin alias to something less common like /webdata6, that helps to keep bad guys from discovering that phpmyadmin is in use just in case an exploit becomes available.

    3.) In general, restarting apache shouldn't be necessary when creating and testing php. If it doesn't work, then restart.

    Great tutorial, thanks.

    Reply
    • Linerd

      Bill, thanks for your tips. I've never been too concerned about security since I've only used this LAMP setup for development on my local machine, but I also know that some people have used this for their VPS setup, so these are definitely some good security tips. As for the Apache restart, it seems like every other version needs it so I keep it in the tutorial to keep it foolproof.

      Reply
  8. Paul Aphivantrakul

    This walkthrough is awesome. Thank you so much.

    Reply
  9. snoozer

    I echo comments by Rich..... OUTSTANDING LAMPP GUIDE. Follow carefully and click on the images provided for clarification.

    The only thing I would like to see in this tutorial is the command to change ownership of the web root folder.

    I followed this tutorial and it worked a treat in Linux Mint 15

    Reply
  10. Marsup

    I placed the following file (test.php) in /var/www after installing LAMP through the procedures given above.
    the http://localhost is working but why the http://localhost/test.php is not showing any output. It is just blank, no error. Am I missing something here ?

    PHP Testing

    <?php
    echo “If this works, we really did it!”;
    ?>

    Reply
    • Linerd

      Did you restart Apache?

      sudo service apache2 restart
      Reply
      • Marsup

        Yes I did. The installation is ok and the samples given in the installation procedure is working. But why a simple
        different example is not working? When one line php program like this is working, why
        not the one with echo? I am really puzzled, if someone can help me?.. I use Linux Mint 14. Thanks.

        Marsup

        Reply
        • Linerd

          I'm far from being a php expert. Did you try your program without the italics tags? If the tests in the tutorial worked, then maybe there is a syntax error in your program. Like I said, I'm no php expert. It's just a shot in the dark.

          I understand that there are some significant differences between php4 and php5. Maybe the version installed doesn't support the formatting tags?

          Reply
      • Marsup

        When I restart Apache with the sudo service apache2 restart command no error and no display
        to my above simple .php file. Now, when I stopped sudo service apache2 stop, it definitely giving error like

        Unable to connect Firefox can't establish a connection to the server at site1.
        (Same behavious with google chrome: could not connect to ..)

        What is missing in the code above?

        -Masup

        Reply
        • Linerd

          Apache2 is your web server, so when you stop it, of course it's no longer serving web pages. Just start it up again with

          sudo service apache2 start
          Reply
      • Marsup

        Sorry, I have intervene again for the third time today, as I was deliberate to get it. First thanks to Linerd for
        giving the suggestion to restart apache2. But other thing is that i copied and pasted the " character, from a
        .pdf text book. That was the culprit, and when I did on my key board, all is fine.

        Thanks again. I come back again as I move forward. very kind of you all.

        -Marsup

        Reply
        • Linerd

          Thanks for letting us know what solved your problem. Thanks also for visiting my site.

          Reply
  11. Moi

    Flawless...Thanks a lot

    Reply
  12. jl

    I have a problem

    Reply
  13. brian

    Perfect tutorial. You are best.

    Reply
  14. Issa

    Thank's a lot!!!
    great job........
    It's very helpfull.

    Reply
  15. Den

    Many thanks! You are the best!

    Reply

  16. This worked perfectly for me :) Thanks so much.

    Reply

  17. Not sure if my case was an isolated case, but I needed to manually add the line "Include /etc/phpmyadmin/apache.conf" in the /etc/apache2/apache2.conf (as per https://help.ubuntu.com/community/ApacheMySQLPHP) in order to get the myPhpAdmin running

    Reply
    • pete

      thanks! did the trick

      Reply
    • Mark H

      Had the same issue, thanks for the fix

      Reply
  18. Ed

    Very nice! Thank you. Works great!

    Reply

  19. Outstanding, simple, easy to follow instructions that just works. Thanks! It looks like a number of people have had the same problem I did with the phpMyAdmin installation. I thought apache 2 was selected because it had a red mark, but this just meant the cursor was positioned there to allow it to be selected. I think this could be avoided with a small addition to the instructions. Just say that if an asterisk ("*") does not appear within the apache2 selection, it has not been properly selected.

    Reply
    • kc

      This happened to me - to fix this I had to purge the install:
      sudo apt-get purge libapache2-mod-auth-mysql phpmyadmin

      Reply
  20. Amit ghosh

    i have install lamp but how can i use php code.i insert php code in html but its not showing,what can i do,please tell me

    Reply
    • Brandon

      Create a PHP file instead of HTML. You can put HTML in it and the PHP extension instructs the server to process the PHP code in your file. Hope that helps!

      Reply

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>