Since, Linux based machines contribute 96% of the total public internet, it is no doubt that Linux is the most successful kernel ever build for web related tasks. As most of you know that
Around 50% of whole internet is running with Apache web services. So the combination of “Linux + Apache” is inevitable in internet. In this post, we will see the installation of
Linux + Apache + Mysql + PHP (commonly called as LAMP).
Linux based operating systems comes under a variety of flavors/distributions. Since it is open source, any programmer can customize it as per their requirements. There are 2 very popular and commonly used distributions which we are going to see here.
I will share you the step by step instruction to install Apache + Mysql + PHP in these distributions in detail below.
Single Command Installation:
============================
Let me consider you have a freshly installed Ubuntu machine with root access with you and if you want a trouble free and one step installation for LAMP. You can follow the below step.
This will install Apache, Mysql and PHP in a single command.
Just ssh the server and type the following command. Make sure you are using ^ symbol at the end of lamp-server.
You can refer the below screen capture for details.
In case, if your server were unable to pull up the repository for lamp server, you can try updating your repository and try the above command again.
Just type the following command in the terminal to update.
You can refer the below screen capture for details.
######################################
If you want to install custom versions of LAMP or prefer to go to step by step process, you can follow the below steps.
To get a successful LAMP, you have to install the services in the following order,
As like the name states, Linux, Apache, MySQL and PHP give LAMP.
APACHE:
To install Apache, type the following command in your server terminal.
You can refer the below screen capture for details.
MYSQL:
To install MySQL type the following command in your server terminal.
You can refer the below screen capture for details.
PHP:
You can install PHP along with all necessary modules in a single command. In this case, we are installing PHP 5.5 version along with all necessary modules for a web server.
Type the following command in your terminal
You can refer the below screen capture for details.
Once the installation gets over, you can verify the list of PHP modules installed in your server by executing the following command.
This is the step by step method of installing LAMP in your debian based servers. We will see the installation of LAMP on CENTOS/Redhat based machines in our upcoming posts.
0 comments