centos 7 teaches you how to quickly install and configure phpmyadmin

phpmyadmin is a graphical database, which is very convenient to manage. Compared with the command line interface, it is more conducive to beginners. Let me lead you to build the following environment.
The first step is to mount your own image, turn off the firewall and selinux. I have already discussed it in previous chapters, so I will ignore it here. First, install the httpd service of apache. Of course, mine is You can also send me a private message asking for the remote connection tool xshell.

 yum -y install httpd

Used to provide web services and then enable this service.

systemctl restart httpd

Insert image description here
There is no problem accessing the site (the picture is a site I created myself).
Insert image description here

The second step is to install mariadb, which is mysql database, using the following command.

yum -y install mariadb-server mariadb

One is the client and the other is the server. After the installation is complete, restart the service and then set the password.

systemctl restart mariadb
[root@king-Blog html]# mysqladmin -u root password
New password: 
Confirm new password: 

Just enter the password. Be sure to remember it and use it later.
Then enter the database to test.

Insert image description hereJust exit.

The third step is to configure the epel warehouse. This is because the yum source does not have the phpmyadmin package.

vim /etc/yum.repos.d/epel.repo

Enter the warehouse directly, then click i to insert and enter the following command

Insert image description here
[epel]
name=epel
baseurl=https://mirrors.aliyun.com/epel/7Server/x86_64/
gpgcheck=0

wq Save and exit.
The fourth step is to install phpmyadmin. It is recommended to use the following command

yum install php php-mcrypt httpd mod_ssl phpmyadmin -y

Just wait patiently for a while. . . . . .

The fifth step is to modify the configuration file to allow access by your own IP address.

vim /etc/httpd/conf.d/phpMyAdmin.conf

Trivia: Set the line number

: set nu

Locate rows 18 and 35 and modify your own network segment (note that you modify it twice).

Require ip 192.168.80.0/24

192.168.80.0/24 is my network segment. Of course, you can also use ip add to query your own IP address.

The sixth step is to restart the httpd service, and then open the browser to access it.
http://192.168.80.150/phpmyadmin/

Insert image description here

Then log in with the root and password you just set. It will come in handy now.

Insert image description here

Insert image description here
If you think King Blog is good, please give it a follow and support, thank you.

Guess you like

Origin blog.csdn.net/qq_51235445/article/details/124941227