Hello Linux Geeksters.
In this article I will show you how to install Xampp on Ubuntu 13.04 Raring Ringtail, Ubuntu 12.10 Quantal Quetzal and Ubuntu 12.04 Precise Pangolin.
XAMPP is an easy to install multiplatform Apache distribution, working on Linux, Solaris, Windows and Mac OS X. It includes Apache web, MySQL, PHP, Perl, a FTP server and phpMyAdmin.
New in XAMPP 1.8.1:
- New version of Apache (2.4.3)
- New version of PHP (5.4.7)
- New version of MySQL (5.5.27)
- Nev version of phpMyAdmin (3.5.2.2)
Let’s start the installation guide:
How to install Xampp on Ubuntu 12.10 and Ubuntu 12.04:
Add the ppa:
$ sudo add-apt-repository ppa:upubuntu-com/xampp
Update the repo index:
$ sudo apt-get update
Install XAMPP:
$ sudo apt-get install xampp
How to install Xampp on Ubuntu 13.04:
Because there is no PPA for installing Xampp on Ubuntu 13.04, we have to make an installation from sources:
Download the sources: from sourceforge.
Create the /opt directory (if it does not exist) and extract the archive there:
$ cd ~/Downloads
$ sudo mkdir -p /opt
$ sudo tar xzvf xampp-linux-1.8.1.tar.gz -C /opt
This is it. Start the Lampp server now:
$ sudo /opt/lampp/lampp start
To access the XAMPP web interface, paste this link in your browser: http://localhost/xampp
You may get this error when accessing XAMPP:
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”.
To fix this, open the /opt/lampp/etc/extra/httpd-xampp.conf file with sudo priviledges:
$ gksudo gedit /opt/lampp/etc/extra/httpd-xampp.conf
And replace this code:
<Directory “/opt/lampp/phpmyadmin”>
AllowOverride AuthConfig Limit
Order allow,deny
Allow from all
</Directory>
With this one:
<Directory “/opt/lampp/phpmyadmin”>
AllowOverride AuthConfig Limit
Order allow,deny
Allow from all
Require all granted
</Directory>
Actually, all you have to do is add the Require all granted line, on the second last line of the block code.
For 64 bit systems only, install ia32-libs, to fix the “XAMPP is currently only availably as 32 bit application. Please use a 32 bit compatibility library for your system” error:
$ sudo apt-get install lib32stdc++6
Restart the lampp server and you are done:
$ sudo /opt/lampp/lampp restart
thanks !!
Excuse me, when i put this code:
$ sudo /opt/lampp/lampp start
I get this message:
XAMPP is currently only availably as 32 bit application. Please use a 32 bit compatibility library for your system.
What can i do? i really need Xampp to develop PHP, thanks for your help.
you have to install ia32-libs. thank you for your comment, i will also edit the article.
$ sudo apt-get install ia32-libs
Thank’s dude your so kind..this article so helpfull..
how do i create the /opt
$ sudo mkdir /opt
I’m using Ubuntu 13.04. I downloaded xampp from the link you provided. I follow your instructions exactly the way you say it. When try to extract the downloaded file, it says “tar (child): xampp-linux-1.8.1.tar.gz: Cannot open: No such file or directory”
Am I supposed to move the file somewhere before I try and extract it? I used Firefox to download, and it went to the default download location.
yes, extract the archive from the ~/Downloads directory. i have updated the tutorial!
Worked great. Thanks
Nice One…. It really worked for me without any sort of difficulties….
Thanks
Thanks!!!
Thx mate! This was really helpful 🙂
Cheers
When installed on Ubuntu 13.1 I struggled a little ’cause tar threw me error “tar: z: Cannot open: No such file or directory” until I adjusted tar arguments to “zxvf” instead of “xvfz”
yes, f has to be the last argument, before the archive’s name. thank you for that. i have fixed the issue
Thx this article was so helpfull!
With best regards Max
Thank you so much 🙂
Works like a charm in 13.04.
thank you so much for the thorough guide
but after the step for editing the file with “Require all granted”..its still giving me that error
Many thanks for the article!!!
I had this problem.
I tried to modify the file /opt/lampp/etc/extra/httpd-xampp.conf as mantioned above with no success.
I resolved in “New xampp security concept” paragraph in the same file adding exception of my lan address in the form xx.xx.xx.xx/xx in the line “Allow from” like this:
Allow from ::1 127.0.0.0/8 xx.xx.xx.xx/xx \
Thanks so much for the install instructions. I’m having the same issue as NicolaBi. Can you please explain the instructions to me? I don’t understand the two xx’s after the lan address.
From NicolaBi:Many thanks for the article!!!
I had this problem.
I tried to modify the file /opt/lampp/etc/extra/httpd-xampp.conf as mantioned above with no success.
I resolved in “New xampp security concept” paragraph in the same file adding exception of my lan address in the form xx.xx.xx.xx/xx in the line “Allow from” like this:
Allow from ::1 127.0.0.0/8 xx.xx.xx.xx/xx \
thanks a lot .. worked for me on ubuntu 13!
For Ubuntu amd64/64bit you should update the 64bit compatibility libraries:
sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0
hi
thanks for the tuto!
works fine.
please need help to install moodle for an exposé.
got 64bit backbox distro.
thanks in advance
Yo Mr Geekster, I just wanted to thank you for writing this post without it I would have never gotten Xampp running on Ubuntu. I will definitely need to bookmark this page. Thanks