Install XAMPP in ubuntu


Install XAMPP:

Step:1

Download the most recent version of XAMPP: (at time of writing 1.5.3a)
http://prdownloads.sourceforge.net/x…ar.gz?download

(Source URL: http://www.apachefriends.org/en/xampp-linux.html#374)

Step:2

Extract the archive to /opt using sudo: (make sure you are in the directory that you downloaded the archive to)

Terminal Code:

Xampp install

Start XAMPP

To start it up, open a terminal and type this:

start xampp

Stop XAMPP:

To stop it, open a terminal and type this:

stop xampp

Sweet XAMPP Control Panel:

Run in a terminal:

gedit ~/.local/share/applications/xampp-control-panel.desktop

[Desktop Entry]
Comment=Start/Stop XAMPP
Name=XAMPP Control Panel
Exec=gksudo "python /opt/lampp/share/xampp-control-panel/xampp-control-panel.py"
Icon[en_CA]=/usr/share/icons/Tango/scalable/devices/network-wired.svg
Encoding=UTF-8
Terminal=false
Name[en_CA]=XAMPP Control Panel
Comment[en_CA]=Start/Stop XAMPP
Type=Application
Icon=/usr/share/icons/Tango/scalable/devices/network-wired.svg

Enter this above code in gedit window

gedit

Click -> Application -> others -> xampp Control Panel

XAMPP Control Panel

Test to see if XAMPP is running:

Once XAMPP is up and running open firefox and go to: http://localhost/

Location of files and uploading

XAMPP by default uses /opt/lampp/htdocs as the root web directory. The easiest way to start working on files is to link a folder in your home directory into this directory.
My user name is netaji so I have /home/netaji/public_html linked to /opt/lampp/htdocs/netaji. So if I navigate to http://localhost/netaji/ I get a listing of all the files/folders in that directory. (As long is there isn’t a index.php/html/etc file)
To set this up, run in a terminal:

  1. Make public_html directory in home directory:
    Code:
    mkdir ~/netaji
  2. Link to /opt/lampp/htdocs
    Code:
    sudo ln -s ~/netaji /opt/lampp/htdocs/$USER

Now any files and folders you place in ~/public_html will be published to your personal webserver.

Bookmark http://localhost/username to make this easy to access.

    • mihai k
    • November 30th, 2009

    Great. But i have a question? How to edit httpd.conf and php.ini; on WAMP it was easy to configure apache and php? I’m new to ubuntu (just migrated from windows).

    • Hi, Mihai K.

      WAMP only for Windows, WAMP stands for Windows Apache MySql PHP.

      Linux used LAMP or XAMPP.

      Mihai, it very easy to edit httpd.conf and php.ini,

      see your opt/lamp/etc root path and select your target file open with text editor.

        • mihai k
        • December 3rd, 2009

        Thanks for reply. The problem was about to change settings to edit and save the files (php.ini & httpd.conf) and after some googleing it was pretty easy:
        chmod 777 /opt/lampp/etc/php.ini.

    • solai
    • June 11th, 2010

    How to remove xampp if it is already installed? wat commands we should use.plz reply me

    • siva
    • October 30th, 2010

    Thankz ji, now its is esay for me to do it.

  1. No trackbacks yet.

Leave a reply to eropherce Cancel reply