2

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)

2 Answers 2

2

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.

1
  • tasksel: aptitude failed (100)? :-(
    – John Mee
    Dec 14, 2012 at 6:46
1
  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'); )
2
  • thanks - sounds simple enough! But what about things like mysql-client ?
    – ed209
    Aug 2, 2012 at 9:02
  • You can install mysql-client along with mysql-server.
    – Ionut
    Aug 2, 2012 at 9:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .