PDA

View Full Version : [ubuntu] need to install lamp stack



jimeast
January 19th, 2013, 10:42 PM
on the ubuntu site I followed the following instructions:
To install the default LAMP stack in Ubuntu 10.04 and above
First install tasksel...

$ sudo apt-get install tasksel
... and then the LAMP stack:

$ sudo tasksel install lamp-server

It looked like it installed. I don't know what to do now. On Windows you just find the xampp folder and put stuff you want to test in htdocs folder and there's a control panel for starting and stopping services. Maybe I'm looking in the wrong places but I don't see a xampp folder let alond a htdocs folder and I have no idea how to start and stop Apachee, PHP or MySQL. Hopefully someone here has been through this and knows what I need to do next.

mörgæs
January 20th, 2013, 12:25 PM
Localhost points to /var/www .

You might need to open file and directory permissions.

Lars Noodén
January 20th, 2013, 12:41 PM
To add to what mörgæs wrote, if you are the only user of your machine then it is enough to change ownership of /var/www. That is of course only the default and if you would like to move it or add additional virtual hosts, then you can have other directories.

Apache and MySQL get started automatically when your machine starts. You can look in /etc/init/ if you are curious about the Upstart script that runs them. You can start or stop them the same way you would start any other services on your machine.

matt_symes
January 20th, 2013, 12:43 PM
Hi

As mörgæs (http://ubuntuforums.org/member.php?u=939075) stated, the default folder is /var/www but this can be changed by editing the file...


/etc/apache2/sites-available/default

This is the default virtual host for apache. You can add other virtual hosts easily enough.

The apache service can be started, stopped and restarted with..


sudo service apache2 stop
sudo service apache2 start
sudo service apache2 restartYou also have


sudo service apache2 reloadHere is some information to get you started.

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

Kind regards