将动态网络配置为静态网络此网站详细的配置:静态IP设置(超详细)
systemctl restart network (重启 network)
systemctl status network (查看 network 状态)
systemctl stop NetworkManager (停止NetworkManager )
systemctl disable NetworkManager (设置为开机不启动)
systemctl restart network (重新启动network)
systemctl enable network (设置为开机自动启动)
vi /etc/hosts
关闭防火墙并设置为开机不启动:
systemctl stop firewalld
systemctl disable firewalld查看防火墙是否关闭:
systemctl status firewalld
安装mariadb数据库
先查看RDO中MariaDB的版本及配置/etc/my.cnf.d/server.cnf
yum install -y mariadb mariadb-server python2-
PyMySQL
出现complete则成功:
开机自动启动MariaDB
systemctl enable mariadb重启数据库
systemctl restart mariadb
设置MariaDB服务安全 root密码
mysql_secure_installation
先按回车,然后按Y,设置mysql密码,然后一直按n结束
设置并修改密码:
退出后看能不能进去,能进去则说明成功。