The database utility, phpMyAdmin, is used for managing MySQL databases through a graphical web-based interface. It can be configured to manage a local database (on the same system), or a remote database (over a network).

Bạn đang xem: Install phpmyadmin on centos 7 for php 7

This tutorial will show you how to install phpMyAdmin và configure basic security on CentOS 7.


Step 3: Installing phpMyAdmin on CentOS 7

To install PHPMyAdmin on CentOS, enter the command:

sudo yum -y install phpmyadminOnce the system executes the command, PHPMyAdmin is installed and ready lớn launch.

Step 4: Configuring and Securing phpMyAdmin

Your new software installation includes a mặc định Apache configuration file.You’ll want to lớn make some changes to that configuration lớn prevent unauthorized access. Here are two common ways of restricting access to 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 khổng lồ specific IP addresses of different or additional computers.

Xem thêm: 12 Bước Thực Hiện Cách Cho Con Bú Nằm Hay Không? Cách Cho Con Bú Nằm An Toàn, Mẹ Đã Biết

The tệp tin is located at /etc/httpd/conf.d/phpMyAdmin.conf.Type the following at your command prompt:

sudo vim /etc/phpMyAdmin/ the config file, you should see four (4) lines that refer to “Require IP” or “Allow IP.” By default, they should be set lớn, which is the IP address referring khổng lồ the system you are working on.To allow other systems to lớn access this phpMyAdmin application, địa chỉ cửa hàng (or change) these numbers khổng lồ the IP address of the computer you want khổng lồ grant access to.

Once you’ve made the changes, save the file.

Change Alias

Open phpMyAdmin.conf using a text editor:

sudo vim /etc/phpMyAdmin/ the top, you should see two lines:

Alias /phpMyAdmin /usr/share/phpMyAdminAlias /phpmyadmin /usr/share/phpMyAdmin“Alias” is how the internet will see your phpMyAdmin configuration. Since the mặc định 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 địa chỉ cửa hàng your own line:

Alias /MySecretLogin /usr/share/phpMyAdminNow, when you go khổng lồ your login screen, you’ll have khổng lồ type https://IP_OR_DOMAIN/MySecretLogin (or whatever you choose) to gain access.

Once you’re finished making changes, save the file.

Step 5: Restart Apache

Regardless of which configuration you use, you’ll need to restart the Apache service to lớn see your changes:

sudo systemctl restart httpd.service

Step 6: Verify phpMyAdmin is Working

To check if phpMyAdmin is working correctly, enter your servers IP and /phpmyadmin in a web browser. For example: