ComputersSoftware

Install PhpMyAdmin on different operating systems

PhpMyAdmin is a free project for web developers designed to simplify the interaction with MySQL databases. The tool is written in PHP and works through any web browser. For its normal operation it is necessary that the system has a web server, PHP and MySQL installed. In this article we will talk about installing PhpMyAdmin in different operating systems - Ubuntu, Centos and Debian.

Install PhpMyAdmin in Ubuntu

Before you install the program on this system, you need to have a LAMP bundle in it. The first term in the abbreviation means that the Linux family system will be used.

Apache is one of the most popular web servers. MySql is a component for operating with the site or project databases. Well, PHP is the language on which web services are written. In this context, it means that a translator is used, which will convert PHP code into browser-understandable instructions. The following is a brief description of the installation process for this set. Without it, you can not use PhpMyAdmin.

Installing LAMP

All these components can be installed separately, and can be ready-made. To understand the configuration process, it's best to do everything manually. Apache in Ubuntu can be installed in two lines:

  • Sudo apt-get update - this line is needed to update data about existing applications;
  • Sudo apt-get install apache2 - the installation itself.

Since these commands must be executed on behalf of the superuser, sudo is set before them, and the root password is required. The system will scan the available space and report how much new software will take. Then he will offer to agree by pressing the Y key. The successful installation of the server is verified by going to the localhost in the browser. As a result, you should see a page like this, as shown in the figure below.

Next is to install and configure MySQL. As for the server, the terminal is used. It is typed: sudo apt-get install mysql-server. In the process, the system will prompt you for a password for the root account. It should be noted that this is not root Ubuntu, namely MySQL.

The final step is to install in Ubuntu PHP. This module will have to be installed in conjunction with several of its add-ons, so that it can correctly and optimally work with databases and the server. This command is executed, consisting of several names: sudo apt-get install php libapache2-mod-php php-mcrypt php-mysql. After its input, the installation of the LAMP components can be considered complete. It remains to reboot the server using sudo systemctl restart apache2.

To test the functionality of this software package, you need to create a test file in the / var / www / html / directory. In it, you can write a few lines in PHP that will output system information or an error if it fails:

  • Phpinfo ()
  • ?>

Now, at about the address localhost / filename.php, you should see a page like this, as shown in the figure above.

PhpMyAdmin: Workflow

The installation of PhpMyAdmin in Ubuntu is the same as the rest of the applications - through several lines. First, we write this command: sudo apt-get install phpmyadmin. In the process, the user will be asked which server will function. In this case, you need to select Apache. Then the question will follow whether the dbconfig-common configuration tool will be used, which is worthy of answering in the affirmative. And most importantly, you will be prompted for a password for the MySQL database. Then you will need a secret code for PhpMyAdmin. It remains to restart the web server again: sudo systemctl restart apache2. After going to the localhost / phpmyadmin address, the login page and password page should be displayed: After login, you can manually manage the databases using a user-friendly interface.

CentOS and PhpMyAdmin

To install PhpMyAdmin in CentOS, you will also need a LAMP set. The whole procedure is very similar to that described for Ubuntu. The only difference is that it runs through the Yum manager and looks a little differently the name of the server itself: sudo yum install httpd.

Running is as follows:

  • Sudo systemctl start httpd
  • Sudo systemctl enable httpd

If everything is correct, then the test page will be available at localhost in the browser.

Next, you need a MySQL server. Its implementation is slightly different for different Linux distributions, in particular, for CentOS, the interpretation of MariaDB is set: sudo yum install mariadb-server.

The launch is similar to the web server:

  • Sudo systemctl start mariadb
  • Sudo systemctl enable mariadb

But for work it is necessary after all to specify the password for root, therefore the command: sudo mysql_secure_installation is used. Specify a new password.

The installation of PHP also happens with the connection of such a module: sudo yum install php php-pear php-gd php-mysql.

To apply all the changes made to the system, reboot the web server: sudo systemctl restart httpd.

Now it's PhpMyAdmin's turn. For this, there is a command: sudo yum install phpmyadmin

Just like in Ubuntu, after the next restart of the web server, the page with PhpMyAdmin will open with the command typed in the address bar of the browser: localhost / phpmyadmin. From now on, you can consider the installation of PhpMyAdmin in CentOS as complete.

PhpMyAdmin and Debian

The Debian and Ubuntu distributions are very similar. Therefore, it is not surprising that the entire installation instructions for PhpMyAdmin in Debian can be copied from the Ubuntu command to the command. The only difference is that the current user is root, so the sudo command will be superfluous.

Conclusion

In the article, brief instructions for the simple installation of the LAMP and PhpMyAdmin software package were considered. Of course, the process can not always go smoothly, and errors will occur. But almost all of them are accompanied by their own codes, by which you can find an explanation and a solution. But in most cases, the installation of PhpMyAdmin should take place without visible obstacles.

In addition, on the Web for different distributions there is a ready-made set of LAMP, which can be installed in one line. Naturally, its assembly is not carried out by official manufacturers of products, so sometimes their versions may become slightly outdated. Manual installation makes it possible to use the latest versions. And after performing all the procedures, the owner will get a convenient and fast component to manage their databases.

Similar articles

 

 

 

 

Trending Now

 

 

 

 

Newest

Copyright © 2018 en.delachieve.com. Theme powered by WordPress.