Centos7.2之phpadmin安装配置

centos7.2
lamp之phpadmin
PhpMyAdmin是一个以PHP为基础,以Web-Base方式架构在网站主机上的MySQL的数据库管理工具,让管理者可用Web接口管理MySQL数据库php

下载地址:https://files.phpmyadmin.net/phpMyAdmin/4.0.10.20/phpMyAdmin-4.0.10.20-all-languages.zip
注意:下载的版本要和当前的php版本和mysql版本相适应,否则不能成功。html

~]# yum install httpd php php-mysql mariadb-server 安装须要的服务
~]#systemctl start httpd 启动httpd服务
~]#systemctl start mariadb 启动mysql服务
~]# ss -tnl 查看监听的端口
State Recv-Q Send-Q Local Address:Port Peer Address:Port
LISTEN 0 50 :3306 :
LISTEN 0 128 :::80 :::
:* mysql

~]# systemctl stop firewalld 关闭防火墙
~]# systemctl disable firewalld永久关闭防火墙
~]# setenforce 0 暂时关闭selinux
~]# sed -i "s/^SELINUX\=enforcing/SELINUX\=disabled/g" /etc/selinux/config 永久关闭selinux
~]# unzip phpMyAdmin-4.7.9-all-languages.zip 解压phpmyadminlinux

~]# cp -a phpMyAdmin-4.7.9-all-languages /var/www/html/ 复制到指定目录
html]# ln -s phpMyAdmin-4.7.9-all-languages pma 建立软链接,方便之后升级
html]# cd pma/
pma]# cp config.sample.inc.php config.inc.php 复制配置文件sql

~]# tr -d 'a-z0-9A-Z'</dev/urandom |head -30 |md5sum
7a1e4b41291c0c74e82ef5a5f528dc82 - 生成随机字符串
pma]#vim config.inc.php 编辑配置文件
$cfg['blowfish_secret'] = '7a1e4b41291c0c74e82ef5a5f528dc82';添加随机字符串数据库

浏览器登录:192.168.1.102/pma
提示:The mbstring extension is missing。
pma]# yum install php-mbstring -y 安装扩展模块vim

pma]# systemctl reload httpd 从新加载,从新登陆centos

登陆界面
Centos7.2之phpadmin安装配置
MariaDB [(none)]> set password for 'root'@'localhost'=password('magedu');
MariaDB [(none)]> set password for 'root'@'127.0.0.1'=password('magedu');
MariaDB [(none)]> flush privileges; 重读受权表生效
在登陆界面输入上面的用户名和密码便可浏览器

相关文章
相关标签/搜索