[Ubunto 10.04+ Guide] Insanely Easy LAMP Setup

  • Thread starter steelmanronald06
  • Start date


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:

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:

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:


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.
MALIBAL Linux Laptops

Linux Laptops Custom Built for You
MALIBAL is an innovative computer manufacturer that produces high-performance, custom laptops for Linux.

For more info, visit: https://www.malibal.com

Members online

No members online now.