Installing and Configuring Lampp (the simple guide)
It may not surprise you if you read the posts around here, but I am a very lazy person when it comes to configuring and installing stuff on anything other than Windows OS. I will avoid anything that involves popping open terminal and putting commands in myself, unless I’ve found them on a forum somewhere.
So, when I was searching the Ubuntu forums for how to make lampp start with Linux, I just wished that someone would post with a clear step by step guide about how to do basic stuff with lampp.

I’ve decided to create this post in the hope that anyone else trying to configure lampp on Ubuntu Linux doesn’t have to look in completely different places to find the answers they are looking for. Note: I’m installing on a clean copy of Ubuntu Linux release 7.10 “Gutsy Gibbon”, with lampp version 1.6.4.
(By the way - non Ubuntu users: you should really give Gutsy Gibbon a spin, even if you are a Windows person like me.)
Step One - Get Lampp
Get lampp. So, you’ll need a direct link to the Sourceforge.net lampp download page.
Make sure that file is downloaded to your Ubuntu desktop, or at least move it there when it’s done, or the commands I’m telling you to paste into terminal won’t find the file.
Step Two - Install It
Yes, I know there’s a perfectly good guide on the lampp site, but it isn’t exactly the same for installing it on Ubuntu. So, I’ll include the (very slightly) modified version for you to paste into terminal below.
sudo tar xvfz Desktop/xampp-linux-1.6.4.tar.gz -C /opt
That’s it. Lampp installed. (Might take a minute or two to extract it all, but it will get there)
Step Three - Starting and Testing
Still in terminal, paste:
sudo /opt/lampp/lampp start
Now you can pop open firefox, and type “localhost” into the address bar.
Note: It should most definately work, but in some cases it doesn’t. I’m afraid this article just assumes that the install went fine, you’ll have to scour the Apache Friends Network Lampp Documentation for help. Sorry :-(
Step Four - Running Lampp At Boot
Sure, if you don’t want to make it run at start-up skip to step five by all means.
So, to make lampp auto run when you boot up your computer, firstly paste the below into terminal:
sudo gedit /etc/init.d/rc.local
When the text editor opens, paste the following just below the “#! /bin/sh” line:
/opt/lampp/lampp start
After you have inserted this line, hit the “Save” button, and close the text editor.
So, now lampp will start when you boot your linux box up. At this point I would recommend trying it out, by restarting your computer.
Step Five - Security
For one thing, it is outlined in the Lamp install instructions that your installation should be secure. So, either follow the instructions on the page above, or just paste the following into terminal:
sudo /opt/lampp/lampp security
The steps are pretty straightforward, and mostly all you have to do is enter a password and hit enter.
Step Six - Fixing Stuff
I did find some problems with the normal use of lampp, mainly with the configuration of ProFTPD. For one thing connecting via FTP over my LAN took absolutely ages to connect, hanging before it had even processed my credentials. So, after looking on numerous forums, I found that it was trying to do a reverse lookup on the client’s IP address (or something like that). The way to disable it is to get on gedit and change the proftpd.conf file. So, get on terminal and paste:
sudo gedit /opt/lampp/etc/proftpd.conf
Now, paste these two lines anywhere in the document, and click save:
IdentLookups off
UseReverseDNS off
I messed about with the settings to let me have read access to the whole server, which is obviously not advised. I also changed the ftp username from “nobody” to “alan”.
Well, that’s basically it. The lampp server is now ready to be used, so have a play around with it.
Below are the screenshots that I was going to use for this post, then decided against them. (They’re showing stuff like running terminal etc)
Oh, and if you’re wondering why all of the screenshots are in 1024×768, I took them all over the VNC server (post), and I have it at that resolution so I can see both my Windows and Ubuntu desktop at the same time, so VNC doesn’t fill the whole screen.




Reader Comments
30 responses so far
1tambi December 11th, 2007 at 9:14 am
2Alan 
December 13th, 2007 at 2:07 am
3Peter January 17th, 2008 at 8:40 pm
4Robert Karran January 18th, 2008 at 11:32 am
5Cees-Willem January 26th, 2008 at 3:32 pm
6Alan January 27th, 2008 at 12:12 am
7rakesh patel March 9th, 2008 at 2:18 pm
8HAIKAL March 11th, 2008 at 9:29 am
9Alan March 11th, 2008 at 4:52 pm
10donex March 30th, 2008 at 2:58 pm
11Alan March 30th, 2008 at 4:31 pm
12Oliver April 22nd, 2008 at 10:53 pm
13Max August 24th, 2008 at 5:39 pm
14Alan August 24th, 2008 at 6:46 pm
15reddy September 2nd, 2008 at 5:05 am
16Alan September 2nd, 2008 at 11:03 am
17Immanuel September 18th, 2008 at 12:34 am
18Alan September 18th, 2008 at 1:45 pm
19Max September 19th, 2008 at 1:42 pm
20Hitesh Ubharani September 30th, 2008 at 12:39 am
21Art October 16th, 2008 at 11:17 am
22Siva shankari October 18th, 2008 at 6:42 pm
23Siva shankari October 18th, 2008 at 7:21 pm
24Siva shankari October 18th, 2008 at 7:24 pm
25Alan October 19th, 2008 at 11:53 am
26Art October 31st, 2008 at 12:53 pm
27Gobind November 26th, 2008 at 11:39 am
28Said S. Juma December 4th, 2008 at 11:41 am
29Said S. Juma December 4th, 2008 at 1:40 pm30Como hacer un servidor web en GNU/Linux December 15th, 2008 at 3:47 pm
Leave a commentcan you teach me how do u change the nobody username to something else? in your case - alan? tq
Hi,
While you have the “proftpd.conf” file open, search for the “Users” line (about line 29), and replace “nobody” with a user that is able to access files on your computer. (As far as I can remember, you can then login to the ftp server with the same credentials that you use to login to Ubuntu with.)
I think that should work, as long as the user account already exists on your Ubuntu installation.
Thanks, and sorry for the delayed response, Alan.
It would be pretty useful to explain how to set alias directories.
cheers
Peter
Clear, concise with necessary links supplied. easy to follow and it works! you should get a job teaching teachers how to teach,
Very clear and easy tutorial. Yet I keep having some problems using my lampp installation. I work as a webdevelloper, and at the office we use xampp on windows-boxes. I prefer ubuntu myself so I tried lampp. But when running the cms I build at work I keep getting permission errors (like when calling php functions mkdir() or f_open()). I’ve put all the files in the /opt/lampp/htdocs folder at first. Then I tried putting the files in /home//www and created a symbolic link but still no go. Do you have any idea what can be going wrong?
I’m really not sure - for the record I hate permissions on Linux. Could it be something like PHP runs under a different user - so it requires permissions to read and write stuff? That’s just a wild guess, but I’m sure I had an issue once where PHP just didn’t have the right permissions to access files and folders.
If you can’t get lampp working there’s a really clear guide on the Ubuntu wiki about installing Apache, PHP and MYSQL if you’re prepared to go that far.
https://help.ubuntu.com/community/ApacheMySQLPHP
thanks!. was getting extremely frustrated trying to get this done. your steps worked perfectly
Hello
The tutorial is very helpfull, but I’m searching a guide to setup lampp under ubuntu server with webmin.
Can I get some help for?
Best Regards
Hi,
I’ve tried that with just the server version - the steps are just the same (except where i’ve put “gedit” replace that with “nano”) and you’ll have to download lampp with “wget”, instead of using firefox.
Webmin should pick apache up I think, i’m not sure about anything else though. I’m sure someone’s managed to do it - have a Google if you’re stumped.
dude how can I change the permission to install lampp in the /opt directory in linux because i can extract the file in the /opt. thnx
If you’re using the “sudo” command before each command like i’ve shown above, you should be able to write to it.
What?!? Unix permissions are a thing of beauty!
Anyway yes, you’ll likely need to
chown -Rthe appropriate files to the correct user (I don’t know what this is though, trydaemon:daemon). If that doesn’t work you can always try the (horrendously insecure)chmod -R 777to see if it is a permissions problem. Remember to put them back when you’ve determined whether it is though!Hi ,this is a great posing. But need some help on how to change the user name and password used for the authentication the moment I type localhost in the browser.
Regards,
Max
I’m not sure what your problem is… why not trying to run
/opt/lampp/lampp securityto change the default passwords. Other than that I’m not really qualified to comment, as the last time I used lampp was when I wrote this post originally.unable to call /opt/lampp/lampp security, while calling it is saying no directory found. can anybody help. otherwise all working fine
Sounds like you didn’t install lampp there - or it installed itself somewhere else. I’m not sure how any new versions handle the security thing. Try looking at the FAQ on the site.
Nice guide. However, i’m having the same problem as Max above. After setting passwords for everything, when I type in localhost into the browser, it prompts me for a user/password… I try the password that i set for my XAMPP pages but it doesn’t work…
That sounds very odd. It’s been AGES since I used lampp, let alone any new releases of it. I can’t help you - all I can suggest is to check the .htaccess file and delete the username/password auth that’s being sent to the browser.
Hi,I managed to run everything smoothly, there was mysql-server which had some other authentications which were preventing the running of the mysql that comes with lampp, so after stopping, everything works fine. For the usernames and passwords I just following the instructions above keenly and was successful.
Some tell me, which is the best linux server between centos,debian and redhat
Regards,
Max
Thanks Alan!
It saved a lot of time and frustration.
Thanks for this Alan. I had already got it working with no issues and also got the control panel to function without any problems. I was just looking for tweaks when I came across your article. Very easy to follow, good work…
Thanks
Art
Hi,
Really a wonderful work. But, while trying to launch, im gettin the follg. errors: plz do tel me, hw to rectify it.. the older version only working..
XAMPP: Another web server daemon is already running.
XAMPP: Another MySQL daemon is already running.
XAMPP: XAMPP-ProFTPD is already running.
XAMPP for Linux started.
Luks lyk, already Apache, and MySQL are running. bt hw to stop them, so tat XAMPP cud run properly. I want to use XAMPP only..
Plz do reply soooooooooon
Thanks alot…
Hi, i solved my previous prob. by modifying in Services option. But i want to know how to launch that Graphical XAMPP Control panel in Desktop. I found a coding in a site, to be saved, but that was not working for me. Plz do help me. Thanks alot in advance.
When i tried to launch thru Terminal, using
/opt/lampp/lampp panel,
i got the following error msg:
Traceback (most recent call last):
File “xampp-control-panel.py”, line 21, in
import gtk
File “/var/lib/python-support/python2.5/gtk-2.0/gtk/__init__.py”, line 48, in
from gtk import _gtk
ImportError: /usr/lib/libcairo.so.2: undefined symbol: FT_GlyphSlot_Embolden
Sorry, I can’t help you out there as I’ve not used Ubuntu and Lampp since I wrote this post. All I can suggest is trying to Google the error message.
To Siva:
have you tried this thread?
http://ubuntuforums.org/showthread.php?t=223410&highlight=xampp+control+panel
I suggest you uninstall first before going through the setup.
my lampp starts with login and i still have the desktop icon for the panel
code in the launcher:
gksudo “python /opt/lampp/share/xampp-control-panel/xampp-control-panel.py”
Hope this is what your looking for.
hi guyes,
i am getting problem in proftpd in xampp.
i want to know the home directory or document root directory path used by proftp for a user.
i tried the path used by vsftpd which is:
/home/guest
but when ever i am browsing my ftp account usingg an extrnal ipaddress it show an empty directory. i want to know the path of that directory.
Hello Alan!
My name is said suleiman juma I’m from Zanzibar, Tanzania.
I’m a students of Web developing at Zanzibits (www.zanzibits.com).
I’m new in ubuntu but I works with xampp on windows for my self to test my PHP codes. Your tutorials helps me and I’m now atleast able to work with terminal!
Thanks! I’ll tell you if something wrong happen to my linux(ubuntu). Big up Alan!!
Hello Guys!
I want to change the directory for and document root for my lampp server and I’m running Ubuntu(linux) in my system what should I do?
[...] aqui una guia para hacer algunos ajustes manuales al [...]