tumblr visit counter
New in Ubuntu 12.10 Quantal Quetzal Beta 1 full details here

Easily Install & Configure XAMPP/LAMPP with GUI in Ubuntu

If you are web developer you would definitely know XAMPP, it allows you to easily install Apache web server with MySQL, PHP and Perl on your local machine. In windows XAMPP installation is fairly simple but in Ubuntu it gets tricky for new previously windows users.

Download and Installation

XAMPP for Linux was previously called LAMPP. You can download XAMPP for Linux/Ubuntu from following link:

Download XAMPP for Linux

Or alternatively you can download through wget command in terminal

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

After download do not open downloaded file just copy downloaded file to desktop.

Now via command line navigate to desktop

cd Desktop

After executing above command you need to get root access with following command

sudo -s

To install XAMPP you need to extract packages to /opt directory. /opt directory can be edited via root permissions that’s why we got root access via above commands. Now run following command in terminal to extract XAMPP packages in /opt directory.

tar xvfz xampp-linux-1.7.7.tar.gz -C /opt

Configuration and GUI Control Panel

Now XAMPP is successfully installed but you will need root access to put files in /opt/lampp/htdocs folder. You can fix permissions of htdocs folder with the help of following command

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

this will give you all permissions over /opt/lampp/htdocs folder so you can easily put files in that folder.

To Start XAMPP server you have to run following command

/opt/lampp/lampp start

To Stop XAMPP server you have to run following command

/opt/lampp/lampp stop

For XAMPP GUI control panel just like you find in windows version just follow these commands.

Add XAMPP Control Panel shortcut in applications

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

After running above command gkeditor will open, in editor paste following text and hit save.

[Desktop Entry]
Comment=Start and 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/Humanity/devices/24/network-wired.svg
Encoding=UTF-8
Terminal=false
Name[en_CA]=XAMPP Control Panel
Comment[en_CA]=Start and Stop XAMPP
Type=Application
Icon=/usr/share/icons/Humanity/devices/24/network-wired.svg

Now XAMPP server is fully configured, you can find XAMPP Control Panel GUI in Applications>Other.

  • Chris

    Simple and important tutorial!! Thank you!

    Everything went well, but I don’t see XAMPP Control Panel GUI app in Applications>Other, however I find XAMPP Control Panel in Applications directly, clicking that is asking for password. But nothing comes up upon giving the password.

    Also need help on accessing “htdocs” folder to place files like we do on Windows, is that possible on Ubuntu?

    Please assist with these!