LAMP Server and phpmyadmin installation

Hello,
In this post, I will show you how you can install LAMP server and phpmyadmin on Ubuntu system.


Installing LAMP Server

LAMP is the acronym of Linux, Apache, MySQL and PHP. It represents the packages to be installed on Linux operating system, along with Apache web server. The data of websites can be stored using MySQL and dynamic contents of the pages is managed by PHP.

First of all open terminal and run the following command:

sudo apt-get update






You will be prompted to enter the sudo password to allow root permission. This command will get all the latest updates of the software you have installed on your system as well as provide the latest updates of packages to be installed on.




Now, type the following command onto the terminal to install “tasksel” :

sudo apt-get install tasksel




You will be asked for confirmation: Click ‘Y’ or ‘y’ and hit ‘enter’ to continue:





Now sit back and relax as this will take a few minutes to install tasksel on your Ubuntu system.

Once tasksel is installed , type the following command to open tasksel:

sudo tasksel




When tasksel is opened scroll down to ‘LAMP server’ using arrow key. Hit ‘spacebar’ to select ‘LAMP server’ and click on tab to highlight on Ok button and click Enter.




During installation, you will be asked to enter MySQL password, enter your password and click OK to continue installation.



Type the password again to confirm.



To check if apache is installed in your system, go to the terminal and type the following command:

sudo service apache2 start




Now, go to your browser (Chrome or Firefox) and type the following in the url bar:

http://localhost/

A webpage will be opened saying “it works” which means apache is successfully installed on your system.






After the installation, we can check if php is working properly or not by placing a file inside web server root directory.

Type the following command onto the terminal:

sudo gedit /var/www/html/testphp.php

and into that file type the following, after entering save and close the file:

<?php phpinfo(); ?>

Now, open you web browser and navigate to:

http://localhost/testphp.php

You will be able to see php information page which means PHP is installed and working properly.



Now, the LAMP package is successfully installed on your system.




Installing phpmyadmin

To install phpmyadmin, go to the terminal and type the following command and click enter:

sudo apt-get install phpmyadmin




You will be asked for confirmation, type ‘y’ and click enter.
Now, during installation you will be asked to select web server to run phpmyadmin.

Click spacebar to select ‘apache2’ and click enter




Now, you will be asked to enter mysql application password to configure phpmyadmin. Enter your mysql password and click enter.






You will be asked to enter the password again, re-enter the password and click enter to continue.

Now that phpmyadmin is installed, go to your browser and navigate to:

http://localhost/phpmyadmin/





Enter the username as ‘root’ and the password that you’ve entered during installation of phpmyadmin.








LAMP Server and phpmyadmin is now successfully installed.

Comments

Popular Posts