Install Phpmyadmin Nginx Ubuntu 16.04 Php 7
Introduction to PhpMyAdmin
PhpMyAdmin is a web-based tool that enables the users to manage their MySQL databases. It also provides a graphical interface allowing users to manage databases, create/modify tables, manage user accounts as well as execute SQL statements. It is written in PHP and may be used on Apache or IIS web servers.
It is a software package that is installed on web servers and enables users to manage databases, create/modify tables, manage user accounts, execute SQL statements, and more. It is used by many webmasters and developers to manage their websites and databases.
In this article, we will explain you how to install phpMyAdmin on Ubuntu 16.04 server with Nginx and PHP 7.0 support.
Prerequisites for Installing phpMyAdmin
Before starting with the installation process, you need to have the following packages installed on your Ubuntu 16.04 server:
- Nginx web server
- MySQL or MariaDB database server
- PHP 7.0 processor
Downloading and Installing phpMyAdmin
The first step is to download the phpMyAdmin package. You can download the latest version of phpMyAdmin from its official website. You can use the following command to download the file:
wget https://files.phpmyadmin.net/phpMyAdmin/4.6.2/phpMyAdmin-4.6.2-all-languages.tar.gz
Once the download is complete, extract the tar archive by running the following command:
tar xzf phpMyAdmin-4.6.2-all-languages.tar.gz
This will extract the files and create a phpMyAdmin folder containing the phpMyAdmin files.
Now, you need to configure Nginx so that it can serve phpMyAdmin files. You can do this by creating a new server block configuration file for phpMyAdmin in the ‘/etc/nginx/sites-available/’ directory.
sudo nano /etc/nginx/sites-available/phpmyadmin
Now add the following lines in the file:
server {
listen 80;
server_name example.com;
root /usr/share/phpMyAdmin;
index index.php;
location / {
try_files $uri $uri/ =404;
}
location ~ .php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
}
}
Save and close the file, then enable the configuration by creating a symbolic link.
sudo ln -s /etc/nginx/sites-available/phpmyadmin /etc/nginx/sites-enabled/
Now, check the Nginx configuration for any syntax errors:
sudo nginx -t
If the syntax is correct, you should see the following output:
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
If the configuration syntax is correct, restart the Nginx service to apply the changes:
sudo systemctl restart nginx
Configuring phpMyAdmin
Once Nginx is configured, you need to configure phpMyAdmin. To do this, you need to edit the phpMyAdmin configuration file ‘config.inc.php’. If the file does not exist, you can create it using the following command:
sudo nano /usr/share/phpMyAdmin/config.inc.php
Now add the following lines to the file:
// Servers configuration
$i = 0;
// First server
$i++;
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['extension'] = 'mysql';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'password';
Save and close the file. The configuration file allows for two different authentication types. The ‘config’ type is used for access control via a username and password in the ‘config.inc.php’ file.
Now, you need to create a MySQL user which will be used to access the phpMyAdmin Panel. You can do this by logging into the MySQL server as the root user and running the following command:
CREATE USER 'phpmyadminuser'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON *.* TO 'phpmyadminuser'@'localhost' WITH GRANT OPTION;
FLUSH PRIVILEGES;
Replace ‘password’ with the desired password for the user.
Now, you are ready to access the phpMyAdmin web interface. Open your web browser and type the URL ‘http://example.com/phpmyadmin/’ to access the phpMyAdmin login page. Enter the username and password of the user you created earlier to log in.
Conclusion
In this tutorial we have explained how to install phpMyAdmin on an Ubuntu 16.04 server with Nginx and PHP 7.0. We have also explained how to configure Nginx and phpMyAdmin. We hope it has been helpful for you.
FAQs
- Q. What does phpMyAdmin do?
A. PhpMyAdmin is a web-based tool that enables the users to manage their MySQL databases. It also provides a graphical interface allowing users to manage databases, create/modify tables, manage user accounts as well as execute SQL statements.
- Q. How do I access phpMyAdmin?
A. You can access the phpMyAdmin login page by entering the URL ‘http://example.com/phpmyadmin/’ in your web browser. You will need to enter the username and password of the user created earlier to log in.
- Q. How do I configure Nginx for phpMyAdmin?
A. You can configure Nginx for phpMyAdmin by creating a new server block configuration file for phpMyAdmin in the ‘/etc/nginx/sites-available/’ directory. You can then enable the configuration by creating a symbolic link.
Thank you for reading this article. For more information about how to configure and use phpMyAdmin, please refer to the official documentation or read other articles.
Related Posts:
- Nginx Config Server Proxy_Pass Nginx Config Server Proxy_Pass What is Nginx and How Does it Work? Nginx is an open source web server and reverse proxy used to host websites and distribute traffic across…
- Webuzo Run Nginx As User Webuzo Run Nginx As User What is Nginx? Nginx (pronounced "engine x") is a highly-configurable web server that is often used as a reverse proxy and load balancer. Nginx is…
- Nginx Dev Mapper Centos-Root Is 100 Full Nginx Dev Mapper CentOs-Root Is 100 Full What Is Nginx Dev Mapper? Nginx Dev Mapper is a file system space mapping tool for the Linux operating system and is shipped…
- Step By Step Install Nginx And Phpmyadmin On Ubuntu Step By Step Install Nginx And Phpmyadmin On Ubuntu Introduction Setting up a web server on Ubuntu is easy and straightforward. Nginx is a popular web server for Ubuntu, and…
- Install Wordpress On Ubuntu 18.04 Nginx Install WordPress On Ubuntu 18.04 Nginx Introduction To Ubuntu And Nginx Ubuntu is a popular open-source operating system which has gained immense popularity over the years. It is easy to…
- Php-Fpm Cache Nginx Centos Php-Fpm Cache Nginx Centos Introduction to Nginx, Php-Fpm, and Centos Nginx, PHP-FPM, and Centos are three powerful, open-source technologies that are used to create powerful applications, websites, and services. Nginx…
- Install Phpvirtualbox On Ubuntu 12.04 Nginx Install PHPVirtualbox on Ubuntu 12.04 Nginx What is PHPVirtualbox? PHPVirtualbox is a web-based management tool designed to assist the user in creating and managing virtualized environments. It is developed, maintained…
- Install Laravel Nginx Ubuntu 18.04 Install Laravel Nginx on Ubuntu 18.04 Introduction In this tutorial, we will look at how to install Laravel with Nginx on an Ubuntu 18.04 server. Laravel is a powerful PHP…
- Nginx Windows Create Virtual Host Nginx Windows Create Virtual Host What Is Nginx? Nginx is an open source web server software. First released in 2004, it has steadily become the preferred choice of web administrators…
- 403 Forbidden Nginx 1.7 3 403 Forbidden Nginx 1.7 3 What is 403 Forbidden Nginx 1.7 3? 403 Forbidden Nginx 1.7 3 is a status code sent from a server when it receives a request…
- How To Set Up Nginx Loadbalancer Ubuntu How To Set Up Nginx Loadbalancer Ubuntu Introduction to Nginx Loadbalancer Nginx Loadbalancer is a web application that lets you easily set up load balancing for your website. It is…
- Install Nginx Phpmyadmin Centos 7 Install Nginx Phpmyadmin Centos 7 What is Nginx? Nginx is a web server that is used in Linux-based operating systems such as Centos 7. It is designed to handle high-traffic…
- How To Install Nginx On Centos 7.5 How To Install Nginx On Centos 7.5 What is Nginx - An Overview Nginx is a web server and reverse proxy application used for serving both static and dynamic web…
- Deploy Laravel In Local Nginx Windows Deploy Laravel In Local Nginx Windows 1. Introduction To Nginx Nginx is a web server that is primarily used to handle web traffic. It is open source, meaning it is…
- Webmin Change Apaceh With Nginx Webmin Change Apache With Nginx Understanding Apache and Nginx Apache and Nginx are two of the most popular web servers on the market. Both are open source, highly configurable and…
- Nginx For Routing Kubernetes Cluster Nginx For Routing Kubernetes Cluster Introduction to Kubernetes and Nginx Kubernetes is an open-source platform that provides components and tools to manage containers within a cluster. It enables an administrator…
- Configure Nginx Add Module Mac Configure Nginx Add Module Mac What is Nginx? Nginx is an open source web server software that helps websites become more efficient. In particular, it helps websites by providing a…
- Vps Webserver Nginx Php7 Mysql Vps Webserver Nginx Php7 Mysql What Is VPS Webserver? A VPS webserver is a Virtual Private Server (VPS) that has been configured to act as a web server. A VPS…
- Install Mariadb Nginx Debian 9.7 Install Mariadb and Nginx on Debian 9.7 Overview of Installing MariaDB and Nginx on Debian 9.7 Installing MariaDB and Nginx on Debian 9.7 can be an essential step when setting…
- Nginx Windows Execute Command Conf Nginx Windows Execute Command Conf What is Nginx for Windows? Nginx for Windows is an open-source web server used to run websites and web applications on Windows operating systems. It…
- Install Phpmyadmin On Nginx Ubuntu 18.04 Install Phpmyadmin On Nginx Ubuntu 18.04 Introduction PhpMyAdmin is one of the most popular and widely used web-based database management tools available. It is used for administering, managing and maintaining…
- How To Install Nginx Maridb 10 On Ubuntu 16.04 Lts How To Install Nginx Maridb 10 On Ubuntu 16.04 Lts Step 1 — Installing Nginx The first step in installing Nginx and MariaDB 10 on Ubuntu 16.04 is installing Nginx.…
- Vestacp Nginx And Apache Inactive After Migrate Ip Vestacp Nginx and Apache Inactive After Migrate IP What is Vestacp? Vesta Control Panel or VestaCP is an open-source hosting control panel. It can be freely used to manage websites,…
- Nginx Vs Apache Wordpress Benchmark Nginx Vs Apache Wordpress Benchmark What Are Nginx and Apache? Nginx and Apache are two of the most popular web server software applications on the market today. Nginx is a…
- Centos7 Nginx Php-Fpm Sock CentOS7 Nginx Php-Fpm Sock What is CentOS? CentOS (Community ENTerprise Operating System) is a Linux distribution that provides a free, enterprise-class, community-supported computing platform functionally compatible with its upstream source,…
- Can I Install Phpmyadmin In Nginx Can I Install Phpmyadmin In Nginx? PHPmyadmin is a web-based management tool for databases such as MySQL and MariaDB. It is a popular tool for web developers and database administrators…
- Server Admin Panel For Nginx Server Admin Panel For Nginx What is Nginx? Nginx is an open source web server and content management system developed by Igor Sysoev in 2004. It is known for its…
- Ubuntu Install Web Server Nginx Ubuntu Install Web Server Nginx Step 1: Install the Nginx Package The first step when installing Nginx on Ubuntu is to install the Nginx package from the Ubuntu repository. This…
- Nginx Config Multiple Proxy_Pass Nginx Config Multiple Proxy_Pass What is Nginx? Nginx is a high-performance web server that is widely used for deploying web applications and handling static content. It is also capable of…
- 1.14.1 Nginx Bug 1.14.1 Nginx Bug What is Nginx? Nginx (pronounced "engine-x"), is a lightweight web server system developed by the Russian software company Nginx Inc. It is the most widely used web…