LAMP (Linux, Apache, MariaDB/MySQL and PHP) with phpMyAdmin on Ubuntu 18.04 LTS Server.

LAMP Stack (Linux, Apache, MariaDB/MySQL and PHP) with phpMyAdmin on Ubuntu 18.04 LTS Server. These open source applications are used by most of the hosting companies, developers, bloggers etc. A LAMP is used for hosting dynamic websites and popular application like WordPress and MediaWiki and more.

Prerequisites:
  1. Ubuntu 18.04 LTS Server running Instance.
  2. root or sudo access.
  3. Internet to download applications.

Read Also: Installation of Ubuntu 18.04 LTS Server.
Our IP Address of Ubuntu 18.04 LTS Server is:
192.168.56.110
Update your Ubuntu 18.04 LTS Server.
$ sudo apt update && sudo apt upgrade
1. Apache Web Server Installation
Once your system is updated, execute below command to install Apache Web Server (Click on picture to enlarge it). 
$ sudo apt install -y apache2 apache2-utils

Once Installation is done, apache2 service will start automatically. If apache2 service doesn’t start, use below command to check status|start|enable the service (Click on picture to enlarge it)
$ systemctl status apache2
$ sudo systemctl start apache2
$ sudo systemctl enable apache2
Check Apache Web Server version:
$ sudo apache2 -v

Now, open web browser of Ubuntu 18.04 LTS Server and type IP address of your Ubuntu 18.04 LTS Server in address bar. It should show you the Apache2 Ubuntu default page as show below screenshot (Click on picture to enlarge it).

If you are unable to see the above page, check or allow system Firewall access of apache2 service on default port 80 (Click on picture to enlarge it).
$ sudo ufw allow 80/tcp
$ sudo ufw status


2. MySQL installation
Read also: Installation of MySQL on Ubuntu 18.04 LTS Server. 
3. PHP Installation
PHP is widely used server side scripting language to generated dynamic websites. Use below command to install PHP (Click on picture to enlarge it).
$ sudo apt install php php-common php-mysql php-gd php-cli 

Once PHP is installed, create a sample info.php page in your document root directory (/var/www/html(Click on picture to enlarge it).

Test working of PHP.
Open Web Browser and enter IP Address with info.php (192.168.56.110/info.php) in browser address bar as shown below. 
Note: This may be vary on your setup (Click on picture to enlarge it).

5. Installation of phpMyAdmin on Ubuntu 18.04 LTS Server.

phpMyAdmin is a free and open source MySQL and MariaDB administration Graphical User Interface (GUI) tool, especially used for web hosting services. phpMyAdmin is  written in PHP and one of the most popular web-based MySQL & MariaDB management tools and commonly used operations like browsing, dropping, creating, altering databases, tables, fields and indexes.This post will describe step-by-step instructions to install and configure phpMyAdmin on Linux Ubuntu 18.04 LTS Server distributions. Before installing phpMyAdmin make sure that you have install Apache, PHP and MySQL is installed on server.

Features:
1. GUI or Web Interface
2. Support MySQL Features like create databases, tables, views, fields and indexes & create and alter databases, tables, fields and indexes etc.
3. Import  data CSV and SQL format
4. Administration of multiple servers
5. Export data in various format like CSV, SQL, XML etc.
Install phpMyAdmin (Click on picture to enlarge it)
$ sudo  apt install phpmyadmin
During installation & packages configuration process, it will prompt to choose Web Server, we have selected Apache Web Server and click on OK to proceed.
Configuring database for phpMyAdmin
Set password for phpMyAdmin
Confirm password
Need to provide root or administrative user password for MySQL.
 

Once installation is done, restart apache2 service to take changes effect.
$ sudo systemctl restart apache2

Lastly, open Web Browser and type below URL and type root credentials as shown below screenshot (Click on picture to enlarge it).
  
phpMyAdmin admin screen.

That’s it! In this article, we have seen LAMP Installation on Ubuntu 18.04 LTS Server with phpMyAdmin. Please share it with others and use comment box below to raise query if any. Also follow us on tecluesdotcom Facebook Official Page.

Leave a Comment