LAMP Or Xampp? I Choose Xampp

by Rob on April 27, 2009

[ad#posts]
xampp web serverI do quite a bit of work designing and customizing blog themes for others (don’t let the design of this site fool you!) and therefore I really need to have a local development server for design and testing purposes.  Linux is well known for it’s powerful and secure LAMP server, but there are other choices a person could make.

I first came across Xampp while I was going through one of my Vista phases.  It is a perfect fit for me, and I think it would work out quite nicely for just about anyone wanting an easy to use, easy to configure development server.

It may not seem like much, but one of the things I like most about Xampp is that it doesn’t start when the computer boots up; the user toggles the server on and off as desired.  That is a bonus for me since I really don’t want my server running all the time.

Setting up my Xampp server was a quick and easy process.  Xampp can be found in the Arch Linux repos, but can also be downloaded from their site if it’s not in your distros repository.  If you’re not using Linux (and that’s OK, nobody’s perfect), versions for Windows or Mac are also available.  Under Arch Linux I installed Xampp by simply entering this command in a terminal:

yaourt -S xampp

In a minute or two the software was downloaded, installed, and I was ready to go.

The standard install, at least in my case, leaves a few security holes to patch such as a “root” user for MySQL with no password.  Maybe I should be concerned about this, but since I only use this locally and do not open it to the public I just left it as is.

The only thing I wanted to change was the location where my web files would be located.  All my web files are served from the /opt/lampp/htdocs folder, and I didn’t want to have to add, modify or delete files as root when doing my work.  So I created a symlink to my home directory and would then be able to work as a normal user.

Creating the symlinked folder was easy as well.  From the terminal I just entered:

ln -s /opt/lampp/htdocs /home/username

Obviously, I didn’t enter “username” in the path directory; I used my home file name which is “robert”.  After doing this, I had a new folder in my home directory called “htdocs”.  The only thing left for me to do was to give ownership of this new file in my home directory to me.

This was done by using the chown command:

sudo chown -hR /home/robert/htdocs

I was under the impression that the “-hR” option would also change the ownership of all the subfiles in this folder to me, but I was mistaken.  The interior folders still had root ownership, so I moved into the htdocs directory and entered the same command for the few folders inside.  As I had no need for the favicon file or the index.php file included in there, I deleted those and copied my Wordpress files in there instead.

Phpmyadmin is also included with the install, so by navigating to http://localhost/phpmyadmin I was able to work with my databases as well.

Xampp is controlled from the command line with the following input:

sudo lampp {start, stop, restart}

Whenever I want to work with my web server I just have to quickly start up Xampp from the terminal and do my thing. When I’m done, it’s just a short command away from being terminated.  It’s simple, easy to install, and does everything I need for what I do.

Click some of these circles and spread the news!

Stumble thisDigg thisBookmark thisTweet thisPost on facebookSubmit to reddit

{ 3 comments… read them below or add one }

1 Jason Rehmus April 27, 2009 at 8:43 pm

Xampp is a great, easy to use, server set up. I’ve used it at home for the same reason. I also used it to FTP files between systems (across platforms) when I was too lazy to set up Samba.

2 admin April 27, 2009 at 10:25 pm

@Jason: I do like Xampp for it’s ease of use. I’m interested in how you used it to FTP files though; something like that could prove to be handy for me in the future. Could you maybe explain that a little in the comments or through the site contact form? Much appreciated, thanks!

One thing I’ve noticed about it though, and this may be just my experience, is that Xampp is just as fast and snappy as if I would have installed all the LAMP parts manually. But Xampp operates much slower on Windows than on Vista, at least it always did for me. Other people may have differing experiences

3 Jason Rehmus April 29, 2009 at 11:12 am

Basically, I set it up to test sites locally, like you, on a Linux machine. We have videos and pictures stored on that machine as well. I wondered about a good way to move those files back and forth w/ other Linux machines and a Windows laptop. I thought, “if this is running web server software, can’t I just use an FTP client to connect?” So, I tried Filezilla with the IP address of the box running the server and it connected just fine. That’s how I’ve been moving stuff up to it that we want to save. The added benefit is that we have easy access to movies that are saved on that server. We just navigate to a web page, copy the link that Apache displays for that directory’s contents, and use VLC to stream the movie off our little server.

Leave a Comment

Powered by WP Hashcash