https://blog.csdn.net/zt_96123/article/details/88798375
关闭防火墙、关闭SElinux。
配置yum源https://mirrors.aliyun.com/epel/7Server/x86_64/
vim /etc/yum.repos.d/epel.repo
[epel]
name=epel
baseurl=https://mirrors.aliyun.com/epel/7Server/x86_64/
gpgcheck=0
~
1、安装MariaDB
安装命令
yum -y install mariadb mariadb-server
安装完成MariaDB,首先启动MariaDB
systemctl start mariadb
设置开机启动
systemctl enable mariadb
接下来进行MariaDB的相关简单配置
mysql_secure_installation
首先是设置密码,会提示先输入密码
Enter current password for root (enter for none):<–初次运行直接回车
设置密码
Set root password? [Y/n] <– 是否设置root用户密码,输入y并回车或直接回车
New password: <– 设置root用户的密码
Re-enter new password: <– 再输入一次你设置的密码
其他配置
Remove anonymous users? [Y/n] <– 是否删除匿名用户,回车
Disallow root login remotely? [Y/n] <–是否禁止root远程登录,回车,
Remove test database and access to it? [Y/n] <– 是否删除test数据库,回车
Reload privilege tables now? [Y/n] <– 是否重新加载权限表,回车
完成。
测试登陆
2、安装phpMyAdmin以及依赖包
yum install php php-mcrypt httpd mod_ssl phpmyadmin -y
修改配置文件
vim /etc/httpd/conf.d/phpMyAdmin.conf
修改17和35行,或者如图所示。
重启httpd服务
[root@localhost conf.d]# systemctl retsart httpd
打开浏览器输入:
http://ip/phpMyAdmin