Modify Colors

Default Reverse Brown Dark Blue

Archive

Advertisement

LAMP stands for Linux, Apache, MySQL, and PHP, which represents a very common configuration for Linux-based web servers. If you’re interested in testing websites, particularly those that involve a server-side scripting language like PHP, you can install a local LAMP server on your own computer. This tutorial will show you some tricks for setting up a local LAMP server.

Most of this tutorial will apply to any Linux distribution, however the first trick only applies to Debian-based distributions using Synaptic (including Ubuntu).

Trick 1: Installing LAMP with one click

Open Synaptic and choose Edit > Mark packages by task… Then check the box next to LAMP Server, click OK, and click Apply. That’s it!

Sets of packages can be marked together

Sets of packages can be marked together

Trick 2: Easy access to /var/www/

By defualt, the directory that stores all the files for your new server (/var/www/) can only be written to by root. This gets to be a real pain, since you have to use sudo any time you want to put something in /var/www/. You can fix this using the following command:

sudo chmod o+w /var/www/

This allows anyone to write to /var/www/. I am sure many people will argue that this is a bad policy; however,  I generally feel that there is minimal risk in opening up one non-essential directory to write access by anyone on a personal computer.

Trick 3: Testing on a different computer

What if your new website involves interactions between different users or you need to see how it looks on a different operating system? You don’t need to buy hosting space just to do these tests. If you have another computer on the same network, you can actually access the website from that computer.

On your server computer, type this command:

ifconfig

Find the IP address after inet addr and enter this in the address bar on a different computer that is on the same network. You should see the Apache “It works!” page or whatever else you have in the root of your /var/ww/ directory.

I hope this helps you create some cool websites without paying for hosting until you really need it.

Related posts:

  1. Remotely Accessing Your Linux Computer: Part 1 This is the first part in a four part series...
  2. Remotely Accessing Your Linux Computer: Part 4 This is the fourth part in a four part series...
  3. Remotely Accessing Your Linux Computer: Part 2 This is the second part in a four part series...
  4. Installing Flash Player 10 Prerelease on Linux Are you sick of drop down menus being hidden by...
  5. GMail, Evolution, And IMAP Google’s GMail service has become very popular, but many people...

1 comment on this post.

  1. Aakash says:

    LAMP is a great choice on Linux based systems..I have tried it on Xubuntu….on my Windows based systems I prefer Xamp…which is also a breeze to install and setup and comes with a GUI.

Leave a Comment