[Ubunto 10.04+ Guide] Insanely Easy LAMP Setup

  • Thread starter steelmanronald06
  • Start date
S

steelmanronald06

Guest
From past experience it seems that the question of setting up a LAMP server always arises, and it always seems to be on Ubuntu. I believe this is because Ubuntu markets out to the non-Linux user, therefore it is viewed as very easy to use and thus the first turn-to choice for beginners who want to set up their own LAMP Server. Let me re-enforce that this is for those absolute beginners who need to quickly know how to set up the initial LAMP Environment and are having a difficult time finding the answer via Google or the Ubuntu doc.

First step:

Code:
apt-get update

I know this seems very basic, but I can't tell you how many times people start at Step two, it doesn't work, and the problem is because it is a fresh clean install of Ubuntu with un-updated repos.

Second step:

Code:
apt-get install tasksel

Some Ubuntu installs may already have tasksel, in which case you'll see a message saying that 0 installed and 0 needs updated. I must also stop here a second to let everyone know that if you are not running as root, which seems to be very common since Ubuntu is all about keeping the root user private, you should prepend 'sudo' to each of these commands

Third step:

Code:
tasksel

This step will launch a GUI like screen with a list of "packages" that can be set up in your environment. Use your arrow keys to go down to LAMP Server and hit the space bar. A small * will appear next to the "package". Now hit tab, which highlights the okay button, and hit Enter/Return. Ubuntu will take care of the rest.

You will now have a full LAMP Environment running. Additional PHP libraries, Virtual Hosts, etc. are all beyond the scope of this post.

Things to know:

Restart apache: service apache2 restart [OR] /etc/init.d/apache2 restart
Apache Config: /etc/apache2/apache2.conf (httpd.conf exists, but the primary config file is apache2.conf)
Virtual Hosts: Place them in /etc/apache2/sites-enabled/
Web Root: /var/www/
 


It's very helpful, though CentOs but UBUNTU is the right choice for a production webserver.
 


Top