How To Install Linux, Apache, MariaDB, PHP (LAMP Stack) on Linux Mint 19 / Linux Mint 18

0

LAMP Stands for Linux, Apache, MariaDB, and PHP. Most of the websites work with the above combination. If you think the above combination will be only on servers where the hosting is made, that is wrong you can make on your PC which has Linux.

The installation of the LAMP on Linux Mint is simple quite when compared to other Linux environment.

In other Linux environment, we need to install all the above separately by separate commands. But in Linux Mint you can install the LAMP in a single command.

Install AMP(Apache, MySQL & PHP)

Open a terminal and run the following command.

sudo apt-get install lamp-server^

Once you run the command, it will ask you to enter the password for the user.

Install LAMP Stack on Linux Mint 19 - All in One Command for LAMP Stack
Install LAMP Stack on Linux Mint 19 – All in One Command for LAMP Stack

Then it will search the required package for LAMP server. In the end, it will prompt you to confirm the downloading and installation of packages.

Type Y and then press enter.

Install LAMP Stack on Linux Mint 19 - Confirm the installation
Install LAMP Stack on Linux Mint 19 – Confirm the installation

Wait for the installation to complete.

Test Apache

Before testing Apache, restart the Apache server.

sudo systemctl restart apache2

Open up any web browser and then enter the following into the web address:

http://localhost/

OR

http://your.ip.add.ress

You will get the Apache2 Ubuntu Default Page. This page confirms that the Apache is working fine.

Install LAMP Stack on Linux Mint 19 - Apache Default Web Page
Install LAMP Stack on Linux Mint 19 – Apache Default Web Page
Apache’s default document root is /var/www/html on Linux Mint, and the configuration file is /etc/apache2/httpd.conf. Additional configurations are stored in the /etc/apache2/*-enabled directories.

Test PHP

For testing the PHP, place a .php file on to the default document root of the Apache web server.

sudo nano /var/www/html/phpinfo.php

Copy/Paste this line into the phpinfo file:

<?php phpinfo(); ?>

Now open your web browser and type the following into the web address:

http://localhost/phpinfo.php

OR

http://your.ip.add.ress/phpinfo.php

The page will look like below:

Install LAMP Stack on Linux Mint 19 - PHP Information
Install LAMP Stack on Linux Mint 19 – PHP Information

MySQL Support Information:

Install LAMP Stack on Linux Mint 19 - MySQL Support
Install LAMP Stack on Linux Mint 19 – MySQL Support

Install phpMyAdmin on Linux Mint 19

Next is to install phpMyAdmin, a graphical web interface to manage databases very easily.

sudo apt-get install phpmyadmin

The installation will prompt you to select the web server for automatic configuration. Use space to select the web server type and then press Enter.

Install phpMyAdmin on Linux Mint 19 - Choose Web ServerNext screen will prompt you for configuring database called db-common for phpMyAdmin.

Use the tab key to select yes and Press Enter.

Install phpMyAdmin on Linux Mint 19 - Configure DB for phpMyAdmin
Install phpMyAdmin on Linux Mint 19 – Configure DB for phpMyAdmin

It will prompt you to type the password for MySQL application password for phpMyAdmin.

Install phpMyAdmin on Linux Mint 19 - Enter Password for MySQL
Install phpMyAdmin on Linux Mint 19 – Enter Password for MySQL

if you left it blank, a random password will be generated. Type the password of your wish and press Enter.

Confirm your password in the next screen.

Install phpMyAdmin on Linux Mint 19 - ReEnter Password for MySQL
Install phpMyAdmin on Linux Mint 19 – ReEnter Password for MySQL

Test phpMyAdmin

If would like to manage the MySQL through phpMyAdmin, then open the Mozilla Firefox and type the following web address.

http://localhost/phpmyadmin

OR

http://your.ip.add.ress/phpmyadmin

You will get a MySQL login page. Type the username and password.

Install phpMyAdmin on Linux Mint 19 - phpMyAdmin Login Screen
Install phpMyAdmin on Linux Mint 19 – phpMyAdmin Login Screen

After the Login, you will get the Main Page of the phpMyAdmin. Here you can manage your databases very easily.

Install phpMyAdmin on Linux Mint 19 - phpMyAdmin DashboardThat’s All.

You might also like