I set up a new VPS instance of Ubuntu and am wondering what the easiest way is to get up and running with a basic LAMP stack (i.e. which packages are required, which configuration options need to be tweaked, if any, etc.).

link|improve this question
feedback

7 Answers

up vote 54 down vote accepted
sudo apt-get install tasksel
sudo tasksel install lamp-server

It will install all the basic LAMP stack for you, prompt for MySQL root password, etc.

More specifically it will install the following packages, and their dependencies.

mysql-client-core-5.1 libwrap0 apache2 libaprutil1-dbd-sqlite3 tcpd libapache2-mod-php5 apache2.2-common apache2-utils php5-common libaprutil1-ldap libaprutil1 php5-mysql mysql-server-core-5.1 libdbi-perl libplrpc-perl mysql-server apache2.2-bin libdbd-mysql-perl libhtml-template-perl libnet-daemon-perl libapr1 mysql-server-5.1 libmysqlclient16 ssl-cert apache2-mpm-prefork mysql-common mysql-client-5.1

You might also want to take a peek at the Ubuntu Server Guide.

(Assuming Ubuntu 10.04)

link|improve this answer
1  
excellent answer. Thanks. – Jay Jan 2 '11 at 19:06
feedback

In Synaptic, click edit and mark by task. Then select LAMP Server and hit apply. Done.

link|improve this answer
+1 for providing a slightly more GUI:ish solution, even if it's not necessarily available on a VPS. – andol Jul 31 '10 at 6:25
feedback

I personally always find that installing the MySQL server and then PHPMyAdmin will install all the parts I need

sudo apt-get install mysql-server

(doing this first means it asks for the root account password to be set in advance)

then

sudo apt-get install phpmyadmin

It also gives you all the tools you'll need to administrate your MySQL server once it's installed :)

link|improve this answer
feedback

On commandline the simplest way is probably to use tasksel.

link|improve this answer
feedback

The packages are apache2 and libapache2-mod-php5. php5 has a number of additional modules, you may need some. List them with apt-cache search php5

Try revising your search or

sudo apt-get install apache2 libapache2-mod-php5

Enable php5 with

sudo a2enmod php5

Restart apache

sudo service apache2 restart

The following wiki pages can be very helpful if you are starting with apache.

https://help.ubuntu.com/community/ApacheMySQLPHP

https://help.ubuntu.com/11.10/serverguide/C/httpd.html

Note- This answer was migrated from elsewhere. To add mysql install

sudo apt-get install mysql-server php5-mysql
link|improve this answer
feedback

http://www.apachefriends.org/en/xampp-linux.html

It has LAMP as well as phpmyadmin integrated along with perl modules. Installs in /opt/lampp so can be installed/removed easily...

link|improve this answer
feedback

Try EHCP (easy hosting control panel) ...

ehcp installation on a clean server will do the dirty job for you ...

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.