The database utility, phpMyAdmin, is used for managing MySquốc lộ databases through a graphical web-based interface. It can be configured lớn manage a local database (on the same system), or a remote database (over a network).
Bạn đang xem: How to install phpmyadmin on centos 7
This tutorial will show you how to lớn install phpMyAdmin và configure basic security on CentOS 7.
Step 3: Installing phpMyAdmin on CentOS 7
To install PHPMyAdmin on CentOS, enter the command:
subởi yum -y install phpmyadminOnce the system executes the command, PHPMyAdmin is installed và ready to lớn launch.
Step 4: Configuring & Securing phpMyAdmin
Your new software installation includes a mặc định Apabịt configuration tệp tin.You’ll want to make some changes to lớn that configuration to lớn prsự kiện unauthorized access. Here are two common ways of restricting access lớn unauthorized users.Restrict IP Addresses
This method can be used to lớn grant remote access khổng lồ a single workstation.By default, phpMyAdmin is configured so that the hệ thống it’s installed on has access.This change lets you allow or restrict access to specific IPhường addresses of different or additional computers.
The tệp tin is located at /etc/httpd/conf.d/phpMyAdmin.conf.Type the following at your command prompt:
subởi vyên ổn /etc/phpMyAdmin/config.inc.phpInside the config tệp tin, you should see four (4) lines that refer to “Require IP” or “Allow IP..” By mặc định, they should be mix to 127.0.0.1, which is the IP address referring to lớn the system you are working on.To allow other systems to lớn access this phpMyAdmin application, add (or change) these numbers to lớn the IP address of the computer you want khổng lồ grant access khổng lồ.
Once you’ve sầu made the changes, save the tệp tin.Change Alias
Open phpMyAdmin.conf using a text editor:
sudo vlặng /etc/phpMyAdmin/config.inc.phpNear the top, you should see two lines:
Alias /phpMyAdmin /usr/share/phpMyAdminAlias /phpmyadmin /usr/share/phpMyAdmin“Alias” is how the mạng internet will see your phpMyAdmin configuration. Since the default configuration is an easy target for bots và hackers, consider changing the alias setting.Just put a ‘#’ sign before the existing entries so the program sees them as comments, rather than instructions.Then add your own line:
Alias /MySecretLogin /usr/share/phpMyAdminNow, when you go khổng lồ your login screen, you’ll have sầu lớn type https://IP_OR_DOMAIN/MySecretLogin (or whatever you choose) to lớn gain access.
Once you’re finished making changes, save sầu the file.
Step 5: Restart Apache
Regardless of which configuration you use, you’ll need to restart the Apabịt service khổng lồ see your changes:
subởi systemctl restart httpd.service