• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
Source Digit

Source Digit

Linux, Ubuntu Tutorials & News, Technology, Gadgets & Gizmos

  • Home
  • How To
  • Ubuntu
  • Instagram
  • Blogging
  • Android
  • WordPress
  • +More
    • Cloud Computing
    • Gadgets
    • Social Media
    • Technology
  • Write for Us
Home / How To / How To Install LAMP Stack on Ubuntu 16.04 – Linux, Apache, MySQL & PHP

How To Install LAMP Stack on Ubuntu 16.04 – Linux, Apache, MySQL & PHP

By Sourabh / April 29, 2016 Category: How To, Ubuntu

Install Lamp On Ubuntu 16.04 Desktop, using Terminal. Install Apache on Ubuntu 16.04, install MySQL on Ubuntu 16.04, install PHP MyAdmin on Ubuntu 16.04. Install Lamp on Ubuntu Server.

LAMP – Linux, Apache, MySQL & PHP

LAMP is a web service solution stacks, named as an acronym of four components: the Linux operating system, the Apache HTTP Server, the MySQL relational database management system (RDBMS), and the PHP programming language.

Apache

Apache is an open-source multi-platform web server. It provides a full range of web server features including CGI, SSL and virtual domains. To install Apache, run the following commands:

sudo apt-get update
sudo apt-get install apache2

apache2

The above commands will install Apache with web root folder under /var/www on your system. To test Apache, open your web browser and type http://localhost/ or http://server-ip-address/ in the URL box and it will test for it. If Apache works, you will see a page that says “It Works!”.

apcahe-window

MySQL

The next step is to install MySQL. MySQL is very popular, widely used open source relation database management system. To install MySQL, we execute the following command:

sudo apt-get install mysql-server

Or

sudo apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql

mysql-ubuntu

It will install the MySQL server along-with the required libraries. During the installation, enter MySQL root password. Once the installation is complete, run the following command to install MySQL system tables:

sudo mysql_install_db

Once MySQL is installed, you can verify the MySQL status using command:

On Ubuntu 16.04, Ubuntu 15.10, Ubuntu 15.04:

sudo systemctl status mysql

On Ubuntu 14.10 and previous versions of Ubuntu:

sudo service mysql status

PHP MyAdmin

PHP is an open source general-purpose scripting language for web development which can be embedded into HTML. To install PHP run the following command:

sudo apt-get install php libapache2-mod-php php-mcrypt php-mysql

php-5

Run the following commands to install PHP MyAdmin on Linux Ubuntu Systems:

sudo apt-get install phpmyadmin

php-myadmin

Follow the on screen instructions and confirm prompts and PHP will be installed automatically. During the installation, you will be asked for root and confirmations (web server).

php-myadmin-configure php-myadmin-root-password

Once installed, add phpmyadmin to the apache configuration.

sudo nano /etc/apache2/apache2.conf

Add the phpmyadmin config to the file.

Include /etc/phpmyadmin/apache.conf

Restart Apache by running the following command:

sudo service apache2 restart

You can then access phpmyadmin by going to youripaddress/phpmyadmin or localhost.phpmyadmin/. The screen should look like this. Enter the credentials to access the PHP MyAdmin page.

php-myadmin-screen php-myadmin-window

Tags: How To Install Apache on Ubuntu 16.04, How To Install LAMP On Ubuntu 16.04, How To Install LAMP Stack On Ubuntu 16.04, How To Install Linux on Ubuntu 16.04, How To Install MySQL on Ubuntu 16.04, How To Install PHP MyAdmin On Ubuntu 16.04, How To Install PHP On Ubuntu 16.04, How To Install PHP stack on Ubuntu 16.04, Install Apache on Ubuntu, Install Apache on Ubuntu 16.04, Install Apache On Ubuntu 16.10, Install Lamp On Ubuntu, Install LAMP on Ubuntu 16.04, Install Lamp On Ubuntu 16.04 Desktop, Install Lamp On Ubuntu 16.04 Digitalocean, Install Lamp On Ubuntu 16.04 Lts, Install Lamp On Ubuntu 16.04 Using Terminal, Install Lamp On Ubuntu 16.10, Install Lamp On Ubuntu 16.10 Desktop, Install Lamp On Ubuntu 16.10 Digitalocean, Install Lamp On Ubuntu 16.10 Lts, Install Lamp On Ubuntu 16.10 Using Terminal, Install Lamp On Ubuntu Desktop, Install Lamp On Ubuntu Server, Install MySQL on Ubuntu, Install MySQL on Ubuntu 16.04, Install MySQL On Ubuntu 16.10, Install PHP MyAdmin On Ubuntu 16.04, Install PHP MyAdmin On Ubuntu 16.10, install PHP MyAdmin on Ubuntu., Install Phpmyadmin Ubuntu, using Terminal. Install Apache on Ubuntu

Primary Sidebar

Latest Posts

Ubuntu 25.04 ‘Plucky Puffin’ Is Available To Download

How to Login as Root User in Linux Terminal

Install Firefox In Ubuntu Terminal Command Line

How To Check Kernel Installed Date In Linux Ubuntu

How To List All Kernel Modules That Are Loaded In Ubuntu

Enable Ubuntu Auto Login Without Password

Download Ubuntu 25.04 Official Default Wallpapers

How To Fix Initramfs Error In Ubuntu Command Line

How To Check All Available Kernel Version In Linux Ubuntu

3 Best Artificial Intelligence Domain Name Generators

© 2025 Source Digit • Linux, Ubuntu Tutorials & News, Technology, Gadgets & Gizmos

  • Home
  • About
  • Privacy Policy
  • Terms & Conditions
  • Contact Us
  • Sitemap