The LAMP server is the commonly abbreated for Linux Apache MySql PHP server. This is a platform where web pages can be build/test/run using linux.
So setting up your LAMP server includes installing all those above said packages and configuring them to work together.
You can use either terminal or synaptic package manager to install these packages [and should have a working internet connection]. Anyway we may have to use the terminal for configuring them. So better move with the Terminal [Applications > Accessories > Terminal] itself.
1. Install Apache server
Below command will install apache server in your system
when the installation finishes, test weather it's working by pointing your web browser[firefox / chrome . . . ] to the following web address.
You should see a folder entitled apache2-default/. Open it and you will see a message saying something like > "It works!"
2. Install PHP
- - - - - - - - - - - - -
copy-paste the command given below onto a terminal and hit the enter key.
While PHP installation finishes, restart the apache web server to make it compatible with apache using the following command.
To ensure there are no issues with PHP let's give it a quick test run.
Step 1. In the terminal copy/paste the following line:
This will open up a file called test.php.
Add the following line into the test.php, save and close the file.
Now open you're web browser and type the following into the web address:
Note : You can change the location of the Document root [by default it is /var/www/] by reading this article.
- - - - - - - - - - - - - -
open up the Terminal and then copy/paste this line:
Now just restart Apache and you are all set!
That's enough! your LAMP server is ready, and now you can can move up with your pretty codes >>