Setting Up LAMP and PhpMyAdmin on Ubuntu 15.04

Setting Up LAMP and PhpMyAdmin on Ubuntu 15.04
How to install Linux, Apache, MySQL, PHP (LAMP) stack

PhpMyAdmin on Ubuntu ,LAMP stack is a mixture of the maximum regularly used open source software program related to web carrier.

This organization consists of Apache Web Server, MySQL/MariaDB and PHP. Often the MySQL/MariaDB.

Databases are managed via database management tool which includes phpMyAdmin.

This article will manual you through the process of installing LAMP on Ubuntu 15.04 primarily based server.

Requirements:

Before we begin, there are few necessities that must be met:

  • Minimal installation of Ubuntu 15.04.
  • SSH get admission to to the server (in case you do no longer have direct get entry to to the server).
  • If the machine could be used as server you must ensure it has a static IP address configured.

PhpMyAdmin on Ubuntu,Step 1: Set Server Hostname and System Update

  1. As quickly as your Ubuntu 15.04 server is up and going for walks, get entry to it over SSH and setup the hostname.
  2. This may be easily finished by the usage of:
$ sudo hostnamectl set-hostname your-hostname.com
$ hostnamectl
Setting Up LAMP and PhpMyAdmin on Ubuntu

PhpMyAdmin on Ubuntu,Of direction you ought to change “your-hostname.Com” with the real hostname that you will use.

2. To make sure your device is up to date, run the following command:

$ sudo apt-get update && sudo apt-get upgrade
Setting Up LAMP and PhpMyAdmin on Ubuntu


PhpMyAdmin on Ubuntu, Step 2: Install Apache Webserver

3 Apache is the most regularly used webserver and it hosts maximum of the sites to be had online.

To deploy Apache on your server, you could clearly kind the subsequent command:

$ sudo apt-get install apache2
Setting Up LAMP and PhpMyAdmin on Ubuntu

You can now start Apache by running:

$ sudo service apache2 start
Setting Up LAMP and PhpMyAdmin on Ubuntu

4 To verify if the net server is running efficaciously, open http://server-ip-address in your browser.

You can locate your server IP deal with through jogging:

$ ifconfig –a
Setting Up LAMP and PhpMyAdmin on Ubuntu

When you access the IP address in browser, you should see a page similar to this:

Setting Up LAMP and PhpMyAdmin on Ubuntu

PhpMyAdmin on Ubuntu, Step 3: Install PHP with Modules

PHP stands for Hypertext Preprocessor . It is a powerful programing language used in most cases for generating dynamic web pages regularly used with databases.

Notice that PHP code is done with the aid of the net server.

To set up PHP in reality run the subsequent command:

$ sudo apt-get install php5 php5-mysql php5-mcrypt php5-gd libapache2-mod-php5
Setting Up LAMP and PhpMyAdmin on Ubuntu

6 To test your PHP installation, navigate to the web server root listing and create and open a report named php_info.Hypertext Preprocessor:

$ cd /var/www/html/
$ sudo vim php_info.php

Insert the following code:

<?php phpinfo(); ?>

Save the report and load it on your browser by typing http://your-ip-cope with/php_info.Php.

You have to see the output of the phpinfo() function to be able to offer statistics approximately your PHP setup:

You can set up greater PHP modules later. To look for extra modules clearly use:

$ sudo apt search php5

PhpMyAdmin on Ubuntu, Step 4: Install MariaDB Server and Clientv

7 MariaDB is a pretty new database management machine that is community-evolved. It is a fork of MySQL.

Intended to stay free beneath the GNU GPL. The mission is led with the aid of the authentic builders of MySQL because of Oracle gaining manipulate over MySQL distribution.

It essentially gives the same capability as MySQL and there’s not anything to worry here.

To set up MariaDB in Ubuntu 15.04 run the subsequent command:

$ sudo apt-get install mariadb-client mariadb-server

8 During installation, you’ll no longer be requested to setup password for the MariaDB root user.

To do this, you may need to trouble the subsequent set of instructions:

$ sudo mysql –u root
$ use mysql;
$ update user set plugin='' where User='root';
$ flush privileges;
$ quit

Now the basis user can be secured by means of the use of the following command:

$ mysql_secure_installation

Step 5: Install PhpMyAdmin

9 PhpMyAdmin is an internet interface via which you could without problems manipulate/administer your MySQL/MariaDB databases.

The installation is truly easy and may be finished with the subsequent command:

$ sudo apt-get install phpmyadmin

Upon set up you’ll be asked to pick the internet server you’re using. Select “Apache” and keep:

10 Next you’ll be asked if you wish to configure phpMyAdmin with dbconfig-not unusual. Select “No” as proven in the screenshot:

At this point your phpMyAdmin installation is complete. To get right of entry to it you may use

http://your-ip-address/phpmyadmin
:

To authenticate you can use the MySQL root user and the password which you setup in advance for that user.

Step 6: Start LAMP at System Boot

11 Even although the installers must have configured each Apache and MariaDB to start automatically upon gadget boot.

You may simply in case run the subsequent commands to ensure that they may be enabled:

$ sudo systemctl enable apache2
$ sudo systemctl enable mysql

You can perform a machine reboot to make certain that all offerings start typically as anticipated.

That is all. Your Ubuntu 15.04 server is now strolling the LAMP stack and you are geared up to construct or installation your net initiatives on it.