Before we had installed the LNMP environment, let's now install the phpMyAdmin.
As before, the Yum Default library is not phpMyAdmin, we need to install from the Epel Library, and previously installed Epel friends can download the rpm package directly.
Yum install epel--IVH http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
Install phpMyAdmin after download is complete
Yum Install--enablerepo=remi--enablerepo=remi-php56 phpmyadmin
Then, we change the Nginx configuration file and add the path of the phpMyAdmin.
vi/etc/nginx/conf.d/default. conf
Add the following code to the Nginx configuration file. As shown in the following.
Location/phpMyAdmin { /usr/share/phpmyadmin; Index index.php; } ~/phpmyadmin/.+\.php$ { if ($fastcgi _script_name ~/phpmyadmin/(. +\.php.*) $) { Set $valid _fastcgi_script_name $1; } Include Fastcgi_params; 127.0. 0.1:9000; Fastcgi_index index.php; /usr/share/phpmyadmin/$valid _fastcgi_script_name; }
After the modification is completed, still: Wq exit, then nginx-t detection syntax, nginx-s reload restart Nginx
Finally, when we open our browser and visit http://localhost/phpmyadmin/, we will see the following interface.
At this point, the phpMyAdmin configuration is complete. Finally, the access address of the database is not safe to expose, it is best to configure a complex irregular address.
CENTOS7 lnmp+phpmyadmin Environment Construction (third, installation phpmyadmin)