Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Although I have an overview of running commands like apt-get install apache2 what I don't know is what order I should run them in to get a LAMP server running.

Also, I assume I should create a /var/www to put my sites in there (want about 4 domains pointing to this server.

As I have a clean slate, would be great to get advice on the correct way to get set up.

(as a side note, I want to replicate these settings in vagrant/puppet)

share|improve this question
add comment

2 Answers 2

up vote 2 down vote accepted

There is a very easy way to do this in Ubuntu, run the command

sudo tasksel

It will provide you a list of items to install, scroll down to LAMP and press the space bar to select it, then press enter, it will install all the pre-requisites required and it will all be preconfigured.

share|improve this answer
    
tasksel: aptitude failed (100)? :-( –  John Mee Dec 14 '12 at 6:46
add comment
  1. Install apache ( sudo apt-get install apache2 ) and test the results http://website.name
  2. Install PHP5 ( sudo apt-get install php5 libapache2-mod-php5 ) - restart apache2 ( /etc/init.d/apache2 restart ) - create under /var/www/website.name a file named test.php with the following code in it "" ; test with http://website.name/test.php
  3. Install mysql ( sudo apt-get install mysql-server); dont forget to set a root password ( mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('YourPasswordHere'); )
share|improve this answer
    
thanks - sounds simple enough! But what about things like mysql-client ? –  ed209 Aug 2 '12 at 9:02
    
You can install mysql-client along with mysql-server. –  Ionut Aug 2 '12 at 9:13
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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