How to install xampp in ubuntu

XAMPP for ubuntuXampp is an application that helps to run local server in your computer.It is a tedious method to install Apache web server add MYSQL, php, perl and other application. There xampp has all the stuff in one package. Therefore xampp make it easy to install all these package from a single application. Xampp is available for all the format including windows , mac and solaris. In compare to windows and mac the installation of xampp is a bit complicated in linux. If you are searching for lampp. you are in right place because xampp is previously called lampp. To begin the installation download xampp from official website. or download via terminal

wget http://www.apachefriends.org/download.php?xampp-linux-1.7.3a.tar.gz

Also see 4 ways of using wget command in Linux 

After downloading place the file in desktop. Don’t extract the file. Put as you have downloaded it.

Step1: login into root directory

To install the xampp you have to log in into the root directory to log into root directory run the following command into terminal one by one

cd Desktop

(Make sure the initial letter of Desktop is capital)

sudo -s

xampp ubuntu

Step2: Installing Xampp in Ubuntu

1. To install xampp in ubuntu run the following command in terminal which will extract the download file into /opt directory. Run the following Command in terminal

tar xvfz xampp-linux-1.7.3a.tar.gz -C /opt

(Note: This version will install xampp 1.7.3 version Place the xampp-linux-1.7.3a with the version if you want to install another version).

This process will install xampp. You will find xampp in /opt/lampp. Directory.

Step 3: Solve htdocs trouble

After install xampp when you try to paste anything to htdocs you will get permission denied error. Therefore to fix this you have to run the following code in terminal after running the code you can simply put files and folder into htdocs

sudo chmod 777 -R /opt/lampp/htdocs/

This changes the ownership of the htdocs folder to your user, the -R option makes the command recursive so all permissions of folders and files inside htdocs are changed aswell.

Step 4: How to operate xampp in ubuntu

In you can excess xampp with simple graphical interface but in linux you have to user terminal to start xamp. Here are the few guide for ubuntu user to operate xampp

To start Xampp

Run the following command in terminal to start lampp

/opt/lampp/lampp start

xampp-ubuntu-start

Stop the Xampp

/opt/lampp/lampp stop

You can see further documentation on xampp page if you need more guide to operate xampp on linux

Also see how to add GUI based xamp control panel in ubuntu

Shell script to install xampp for Linux

0saves
Posted in Linux, Ubuntu | Tagged , , , , , , , | 63 Comments

63 Responses to How to install xampp in ubuntu

  1. abdulRash PHILIPPINES Mozilla Firefox Windows says:

    I followed every step of the way but,
    after the chown command, my browser is stuck at the xampp
    splash.php page. Even if I clicked on English to choose
    the language, the browser won’t leave the splash page.
    I was root when I did the tar extraction and the chown
    commands. I am also using ubuntu linux ver 10.04 LTS.
    My firefox is ver 3.6.10.

  2. saugat NEPAL Mozilla Linux says:

    I think this error because you might have done some mistake in changing ownership (chown command). However Xampp will still operate on the problem if you have created new php file . type the http://localhost/filename.php to browse. All other page like phpmysql can be browse by command line.

  3. amit Mozilla Firefox Linux says:

    yo, thanks man it works very well i done it on mint10.00 julia

    LINUX == RESPECT

  4. vipin INDIA Mozilla Firefox Ubuntu Linux says:

    thank man
    it works..
    now the problem is solved by your help…
    by the way you told the very well steps to follow up .. thanks

  5. Chris AUSTRALIA Mozilla Firefox Ubuntu Linux says:

    Works great! Thanks :)

  6. sahil INDIA Mozilla Firefox Ubuntu Linux says:

    great tutorial!
    but my problem is that, I want to access a locally created website and i dont know how to set it up in xampp for linux (yeah, mine’s already working), like in easyphp for windows there was an option right on the first page to assign aliases to local folders containing the websites.

    • saugat NEPAL Mozilla Firefox Windows says:

      Hello Sahil . Your locally created website will be in htdocs folder. you should put all the file there. To access the file go to localhost/htdocs/filename. Replace file name with file. if you have folder there replace with folder name. Your should give the path in your web browser. All your file should be put in htdocs folder.

  7. jcarlos BRAZIL Google Chrome Ubuntu Linux says:

    I’ve received the message that Desktop directory doesn’n exist. I? using Ubuntu installed on Windows by Wubi.

  8. yeaswaran INDIA Internet Explorer Windows says:

    hai,
    i’m new to linux evnvaroinment. i want to install (sql) in ubuntu 10.10… could u help me pls…

  9. Darren TAIWAN Mozilla Firefox Ubuntu Linux says:

    Just wanted to say a thank you – new to ubuntu (running on vmware)

    I’d previously tried installing lamp with ubuntu via tasksel, but with no joy.

    This worked a treat, thanks.

  10. Rajnish INDIA Mozilla Firefox Linux says:

    Hello friend,
    Just i installed ubuntu 11.04 using wubi inside my windows. When i try to play any video or audio file using banshee player or movie player then ask for codec, when i try ti update codec then it fails. same thing happens when i try to install vlc player using softwre center.
    Please please solve my problem and tell me another way to install softwares except softwre center.

  11. Ron SPAIN Mozilla Firefox Windows says:

    This worked for, when lots of others didn’t. Many thanks.

    (Ubuntu 10.04 on VBox 4.08 as guest on Windows 7)

  12. Chicho INDONESIA Google Chrome Ubuntu Linux says:

    Thank you,…
    just want to add, please also note into tutorial that when copying something new to htdocs don’t forget to re-run the command
    sudo chmod 777 -R /opt/lampp/htdocs/
    otherwise it will be forbidden.
    Thank you…

  13. You are rock. i just started working in Ubuntu and it was great help for me.
    thanks,

    thanks once again.

  14. Tijs NETHERLANDS Google Chrome Linux says:

    Thank you!!

    I forgot everytime the -R in the chmod. :D

  15. Pingback: useful ubuntu resources « Roshan Book UNITED STATES PHP

  16. Finley NETHERLANDS Google Chrome Linux says:

    Okay, i dit evry step but the MYSQL won´t start and he don´t load localhost ore localhost/finley he doesnt load localhost at all

    help please
    grtz Fin

    • saugat NEPAL Google Chrome Windows says:

      Hello grtz Fin
      Try localhost/phpmyadmin. The phpmyadmin should show up. If it doesn’t then tell me the error in the page you are getting. Thanks

      • Sandeep Singh INDIA Google Chrome Linux says:

        Hello Saugat,
        Can u pls help me out from a problem which is coming when i am localhost/phpmyadmin page.. Error i have written below..

        “Access forbidden!

        New XAMPP security concept:

        Access to the requested directory is only available from the local network.

        This setting can be configured in the file “httpd-xampp.conf”.

        If you think this is a server error, please contact the webmaster.

        Error 403

        localhost
        Apache/2.4.2 (Unix) OpenSSL/1.0.1c PHP/5.4.4 ”

        Actually i have tried all the stuffs that is given on “http://www.apachefriends.org/f/viewtopic.php?p=149788″ link , still i am not able to access phpmyadmin part..

        Thanks in advance

        • saugat NEPAL Google Chrome Linux says:

          @Sandeep: You have to edit /opt/lampp/etc/extra/httpd-xampp.conf file. Steps:
          1) sudo gedit /opt/lampp/etc/extra/httpd-xampp.conf
          2) Find
          3) Add line: Require all granted. The code should look like this:

          AllowOverride AuthConfig Limit
          Require all granted
          Order allow,deny
          Allow from all

  17. Isuru SRI LANKA Google Chrome Ubuntu Linux says:

    Thank You!

    Note – “Sudo -s” is not working
    use “sudo -s”

  18. Imraan Mozilla Firefox Linux says:

    very nice tutorial. Installed without any problem in my Ubuntu 11.04 system. Thank you saugat

  19. Nanospeck AUSTRALIA Mozilla Firefox Linux says:

    Thanks a lot… the chmod 777 really was an elixer. I was search hard for those lines for over a month :P

  20. Alphy Google Chrome Ubuntu Linux says:

    I followed the tutorial all the way. But when i start lampp, I get an error message which says…”14: Syntax error: “(” unexpected”; Any help. I am new to linux

  21. MiD-AwE Google Chrome Ubuntu Linux says:

    Thank you for the tutorial. Installed OK, except when I visit http://localhost/xampp/index.php I select my language (English) and it seems fine until I choose ‘phpMyAdmin’ from the Tools section. The problem is that ‘phpMyAdmin’ is displayed in German and even Google translate is not translating the page properly into English. Very strange, since I’ve used Xampp in windows many times and never seen this before. Can you suggest any fix?

    Ubuntu 11.10, Xamp 1.7.7

    Thanks

  22. shweta INDIA Mozilla Firefox Ubuntu Linux says:

    thanks a lot for such a article..

  23. Paul PORTUGAL Mozilla Firefox Ubuntu Linux says:

    Finally I get to install xampp (lampp)… Very simple steps, very clear!
    thank you very much for the help

  24. Pingback: How To: Add GUI xampp control panel on ubuntu « Niroze's Weblog UNITED STATES PHP

  25. Rohit INDIA Mozilla Firefox Linux says:

    Thanks for this clean information. I want to setup XAMP to test my PHP website locally and found its really simple after reading your article.

  26. Hi guys! this tutorial is amazing… ’cause I try to install xampp in Ubuntu following others tutorial but don’t work… Thanks a lot

  27. prabhay INDIA Mozilla Firefox Linux says:

    i amtrying to install xampp on ubuntu 11.
    when i run tarxvfz command it shows error message
    tar(child):xampp-linux-devel-1.7.3.tar.gz:cannot open file:no such file or directory(but my downloaded file is located on desktop)
    tar(child):error is not recoverable:exiting now
    tar:child returned status 2
    tar:eror not recoverable now:exiting now

  28. Dr. Virus Google Chrome Linux says:

    Hi, i get this message when i try to run the command: “tar xvfz xampp-linux-1.7.3a.tar.gz -C /opt”

    tar (child): xampp-linux-1.7.3a.tar.gz: The function open failed. No such file or filecatalog.
    tar (child): Error is not recoverable: exiting now
    tar: Child returned status 2
    tar: Error is not recoverable: exiting now

    What am i doing wrong?

  29. Pingback: Confluence: Ask Knowledge Engineering Tools UNITED STATES

  30. Pingback: Terminal non responsive after installing XAMPP in virtual machine and using sudo | MoVn - Linux Ubuntu Center VIET NAM WordPress

  31. Matt UNITED STATES Mozilla Firefox Ubuntu Linux says:

    Thanks. Great tutorial! Was struggling with getting Xampp to install and run. Works great now, as well as the GUI to stop it! Thanks again.

  32. Pingback: Lubuntu, installing xampp + eclipse « PswApps28's Blog PHP

  33. Ankit Mozilla Firefox Ubuntu Linux says:

    please tell me the default username for phpadmin, mysql, ftp for xampp
    I used the command
    /opt/lampp/lampp security
    and changed the password for making secure login. Now if I want to access my phpadmin page then it prompts for username and password.
    Need help!

  34. Pingback: XAMPP installation UNITED STATES Netscape Navigator

  35. hishamfire Mozilla Firefox Ubuntu Linux says:

    I’m using ubuntu 12.04 and I have installed xampp-linux-1.8.0-beta5.tar.gz and I have all of those steps but with changing chmod to 755 and when I have tasted localhost it said that it works . but my problem is that the page of localhost/xampp does not apear it comes with error . how can I solve this problem?

    • sachit NEPAL Google Chrome Linux says:

      @Hishamfire, After you successfully installed Xampp, you need to start it. Use the following command to start xampp:
      sudo /opt/lampp/lampp start

  36. Pingback: Ubuntu Xampp – GeekLogy WordPress

  37. Thanks..you done it in a very simple & effective WAY.. …This is seriously awesome..tHANKS a TON..:)

  38. Meraz AUSTRALIA Mozilla Firefox Ubuntu Linux says:

    Thnx..excellent post :)

  39. Vigneshwaran AUSTRALIA Mozilla Firefox Ubuntu Linux says:

    I am using linux mint-12(64-bit) as OS which is of debian flavour.I installed Xampp in it , but when i start it i am getting an error “XAMPP is currently only availably as 32 bit application. Please use a 32 bit compatibility library for your system.”….Can you give me any suggestions…….

    • sachit NEPAL Google Chrome Linux says:

      XAMPP is currently only available as 32 bit application. So, you need 32 library system to install Xampp in your 64-bit Linux mint. Add following libraries using the following command:
      sudo apt-get install ia32-libs

  40. I found that you need to replace… xampp-linux-1.7.3a.tar.gz …..
    with … download.php?xampp-linux-1.7.3a.tar.gz..

    and worked great .. thanks for this post….

  41. pavan INDIA Mozilla Firefox Ubuntu Linux says:

    Dear sir
    I installed Lamp server properly but when I run http://localhost/ it not run.
    I followed your all command.

  42. Jamie UNITED STATES Google Chrome Linux says:

    Thank you sooo much! I was ready to pull my hair out and came across your tutorial. Thank you again so much!

  43. Pingback: How To: Add GUI xampp control panel on ubuntu | VICHHAIY… Welcome!!! UNITED STATES PHP

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>