Today we will find out about setting up LAMP.
What is LAMP?
LAMP is a gathering of open source programming used to get web servers up and running. The acronym remains for Linux, Apache, MySQL, and PHP. Since the virtual private server is as of now running Ubuntu, the linux part is dealt with. Here is the means by which to introduce the rest.
These instructions require that you have root permissions on your Linux server or VPS. Let's get started.
1. Install Apache
To setup Apache you should install the Metapackage apache2. This should be possible via looking for and installing in the Software Center, or by running the command as follow.
sudo apt-get install apache2
2. Install MySQL
To install MySQL you should install the Metapackage mysql-server. This should be possible via looking for and installing in the Software Center, or by running the following command.
sudo apt-get install mysql-server
####3. Install PHP
To install PHP you should install the Metapackages php5 and libapache2-mod-php5. This should be possible via looking for and introducing in the Software Center, or by running following command.
sudo apt-get install php5 libapache2-mod-php5
4. Restart Server
Your server needs to restart Apache naturally after the establishment of both MySQL and PHP. If it doesn't, run this command.
sudo /etc/init.d/apache2 restart
5. Check Apache
Open a web program and explore to http://localhost/. You should see a message saying It works!
6. Check PHP
You can check your PHP by executing any PHP document from inside/var/www/. Then again you can execute the accompanying order, which will influence PHP to run the code without the requirement for making a document .
php -r 'echo "\n\nYour PHP installation is working fine.\n\n\n";'
These are the key steps for installation and setup of LAMP.
Do let me know in comments if you have any question.