How To Install Linux, Apache, MySQL, PHP (LAMP) stack on Ubuntu

How To Install Linux, Apache, MySQL, PHP (LAMP) stack on Ubuntu

The following instructional exercise presumes you comprehend what a LAMP(Linux, Apache, MySQL, PHP) Server is, the means by which to work a site from the back end and how to introduce programming utilizing either the Software Center or the Terminal.

It additionally expect encounter running other Basic Terminal Commands.

There is additionally a phenomenal article on Digital Ocean that might be of more pertinence on the off chance that you are taking a shot at a remote or open confronting server.

1. Introduce Apache

To install Apache you should install the Metapackage apache2. This should be possible via hunting down and introducing in the Software Center, or by running the following order.

sudo apt-get install apache2

2. Install MySQL

To Install MySQL you should Install the Metapackage mysql-server. This should be possible via hunting down and introducing in the Software Center, or by running the following command.

sudo apt-get install mysql-server

3. Introduce PHP

To introduce PHP you should introduce the Metapackages php5 and libapache2-mod-php5. This should be possible via hunting down and introducing in the Software Center, or by running the following command.

sudo apt-get install php5 libapache2-mod-php5

4. Restart Server

Your server ought to restart Apache consequently after the establishment of both MySQL and PHP. In the event that it doesn’t, execute this command.

sudo /etc/init.d/apache2 restart

5. Check Apache

Open a web program and explore to http://localhost/. You ought to see a message saying It works!

6. Check PHP

You can check your PHP by executing any PHP record from inside /var/www/. On the other hand you can execute the following command, which will make PHP run the code without the requirement for making a record.

php - r 'echo "sucess :: Your PHP installation is working fine. thanks to onlinecode";'

Leave a Comment

Your email address will not be published. Required fields are marked *

  +  4  =  12

We accept paid advance and paid guest Posting on our Site : Contact US