LAMP STANDS FOR:
- L:Linux
- A:Apache
- M:MySQL
- P:PHP
What is LAMP?
- LAMP is a shorthand term for a web application platform consisting of Linux, Apache, MySQL and one of Perl or PHP.
- Lamp is an OPENSOURCE
- Together, these open source tools provide a world-class platform for deploying web applications
TECHNOLOGIES USED IN LAMP:
For more information please visit this article.
For Now, Let’s Get On With Our Installation.
You can either follow the video below or go along with the written steps right below it.
PREREQUISITES
- Update your Debian : sudo apt-get update.
- Upgrade your Debian : sudo apt-get upgrade.
- Install aptitude package : sudo apt-get install aptitude.
INSTALLING APACHE
APACHE
- Apache is the most popular web server on the Internet. Apache like LINUX, MySQL and PHP is an open source project
- Apache 2.0 apache has become a robust well documented multi-threaded web server. Support for non-UNIX systems.
- Apache can run on a large number of hardware and software platforms. Since 1996 Apache has been the most popular web server on the Internet. Presently apache holds 67% of the market.
First, we will need to upgrade our Debian installation. We can do this by running the below command:
sudo aptitude safe-upgrade
A safe upgrade is done to update the currently installed software on your Debian 8 installation.
After the upgrade we need to install our apache server.
sudo aptitude install apache2 apache2-doc
The command above will install the basic configuration for our Apache webserver as well as installing the latest documentation for Apache.
You can verify if Apache is installed properly by going to your web browser and entering the ip address of your server. You should see the below webpage:
INSTALLING MYSQL
After verifying that Apache is up and running we can now start the installation of our Mysql server.
MySQL :
- MySQL is a fast flexible Relational Database. MySQL is the most widely used Relational Database Management System in the world with over 4 million instances in use.
- MySQL is high-performance, robust, multi-threaded and multi user. MySQL utilizes a client server architecture.
- MySQL’ focus is on stability and speed. Support for all aspects of the SQL standard that do not conflict with the performance goals are supported.
To install Mysql server we will need to run the following commands:
sudo aptitude install mysql-server php5-mysql
During the installation, the server will ask you to select and confirm your administrator or root password, This root password will be used when you would like to add or make changes to the database and Mysql server configuration. Make sure to set a good password with uppercase, lowercase and alphanumeric characters.
Afterwards, run the following script to secure your mysql server installation. This will lock down access to the server and avoid security and performance issues.
sudo mysql_secure_installation
During the configuration you will be asked for the root password that you entered earlier. It will also ask you if you want to change this password or not. If you can happy with your password you can skip this step. You can just simply hit ENTER for the rest of the questions.
To check if the mysql server is running login to mysql server using:
mysql -u root -p
And enter your root password then run the following command:
mysql> status
Now that your database and Apache server is already up and running we can now move on to installing PHP.
___
INSTALLING PHP
PHP:
- PHP is the most popular scripting language for developing dynamic web based applications.
- Originally developed by Rasmus Lerdorf
- The beauty of PHP is that it is easy to get started with yet it is capable of extremely robust and complicated
- In LAMP PHP is the glue that takes the input from the browser and adds the data to the MySQL database.
Some use of PHP is to provide information on user accounts, traffic updates, location information and many more. To install PHP we will execute the following commands.
sudo aptitude install php5-common libapache2-mod-php5 php5-cli
The command above will install php and we will test it later on to check if our configuration and installation is fine.
INSTALLING OTHER PHP MODULES
To install multiple modules just add it into the existing command:
sudo aptitude install php5-gd php5-common
TESTING PHP
In order to check if our PHP installation is working and that all installed modules are properly configured we will have to create a php file containing our php information.
To do this we will creat a file in our /var/www/html directory called info.php.
sudo nano /var/www/html/info.php
Open the file and paste the following php script inside the file:
<?php
phpinfo();
?>
Save and close the file. Afterwards, open your web browser and enter your server ip address followed by the filename we just created.
http://your_server_IP/info.php
You should see the same page as below. The data in your info page may be different from mine since some of the modules I have may not be installed on your server. What is important at this time is that your page is properly processing php information.
___
LAMP is now installed on your Debian 7 server.
Congratulations.
0 Comments