Tag Archives: lamp

How to quickly install the LAMP Stack on an Ubuntu Server Tips, Tricks and Tutorials 24 AUG 2013

ubuntu-10-logoIf you are running an Ubuntu server then chances are pretty good that you are using it as a web server. That in turn means you probably want to run it as a LAMP stack, i.e. Linux, Apache, MySQL, and PHP, or at least that’s what I need 90% of the time.

Of course the fact that you are running Ubuntu means that the Linux part of the stack is already taken care of meaning that the next thing to sort out is the installation of the Apache webserver, MySQL database server, and of course the web scripting workhorse that is PHP.

Now while you can install these things one by one, but if defaults are fine for you and time is of the essence, then thanks to the nifty tasksel Ubuntu command installing all three at once is a snap.

Basically tasksel groups software packages by tasks and offers an easy way to install all packages needed for that particular task. In other words, basically it does the same as a conventional meta-package.

If it isn’t installed by default, run:

sudo apt-get install tasksel

Once installed, you can run the application like so:

sudo tasksel

From there it is a matter of scrolling through the menu to locate the LAMP server option, press space to select it (an asterisk will appear next to the menu option) and then a final click on OK to begin the installation process (you can tab to the OK button if you don’t have a mouse available). Answer the MySQL root password prompt accordingly and once done, you should have a nice and shiny new installation of Apache, MySQL and PHP at your fingertips, verified by the standard “It Works!” message returned when hitting http://localhost

Note: I’m quite fond of following this up by installing the web-based database management tool PHPMyAdmin, which can be done via a call to:

sudo apt-get install phpmyadmin

Again, you’ll be asked for the root MySQL password to complete this installation, so it is probably worth having jotted this down somewhere! :)

Ubuntu Maverick Meerkat: How to Quickly Install Apache, MySQL and PHP CodeUnit 29 OCT 2010

If you are a web developer, then installing the Apache, MySQL and PHP stack is of paramount importance, something that becomes apparent when you look around and see how many customised LAMP and WAMP installers there are out and about at the moment.

Ubuntu comes with its own tool to make installing these three as simple as a snap of the fingers, this time in the form of its uber useful Tasksel tool, which itself is actually in integral part of the Debian installer. Basically Tasksel groups software packages by tasks and offers an easy way to install all packages needed for that particular task. In other words, basically it does the same as a conventional meta-package.

Unfortunately, since 10.04 Tasksel has been dropped from the default Ubuntu install, meaning that if you want to make use of it, you’ll first need to install it with the following command:

sudo apt-get install tasksel

Once installed, you can run the application like so:

sudo tasksel

From there it is a matter of scrolling through the menu to locate the LAMP server option, press space to select it (an asterisk will appear next to the menu option) and then a final click on OK to begin the installation process. Answer the prompts accordingly and once done, you should have a nice and shiny new installation of Apache, MySQL and PHP at your fingertips, verified by the standard “It Works!” message returned when hitting http://localhost

Nifty.