No More XAMPP For Me! A Better Alternative Exists On Xubuntu

If you’re on a Ubuntu-based distro, you’re in luck: you don’t have to install XAMPP to get a web server started! Just install the following packages, including all dependencies, in order:

  1. mysql-server
  2. apache2
  3. php5

Restart Apache with sudo /etc/init.d/apache2 restart. (Apache should complain like this: “Could not determine the server’s fully qualified domain name, using for ServerName” — to resolve this, open up /etc/apache2/httpd.conf and add a line like ServerName localhost. See this page for more info.)

Optionally, install phpmyadmin.

For phpmyadmin, the administrative user is “root”, as usual.

Your web pages are now stored in the /var/www/ directory. From here, symlink to any other directory in your hard drive to include that directory into your web server! The beauty of this method, instead of going with XAMPP, is that your system will automatically update all web-server related components whenever you update your system with apt-get or Synaptic Package Manager or whatever. Also, Apache will start automatically whenever you reboot. No more downloading XAMPP and extracting as superuser, and repeating it all over again every time XAMPP updates to a newer version. No more firing up a terminal and telling XAMPP to start with that horrendously long command sudo /opt/lampp/lampp start. Hooray Ubuntu!

The above steps worked fine for me on Xubuntu 8.04.1.

UPDATE March 23, 2009: I’m on Arch Linux now, and I simply followed the Arch wiki on Apache et al to get things rolling without XAMPP. And it works just fine. Use Arch!


6 thoughts on “No More XAMPP For Me! A Better Alternative Exists On Xubuntu

  1. Like I mentioned in my post, I use Arch Linux now, and have not used Xubuntu for several months. But from what I can remember, the packages should be no different than the other ones in Synaptic — so if you’re good at using Synaptic then there should be no problem.

  2. Thanks for this, it worked brilliantly! I’ve always had to use XAMPP for local web development so as you said in your post, it was very annoying re-doing it all after each new release. This way is so much easier! 🙂

  3. Thank you so much! I use gentoo with a non multilib profile. So in other words I can only run native 64 bit code. So this is my only option. Thanks again!

Comments are closed.