centos7.0 的yum源中没有 mysql的包 ,所以我们自已从网上下载一个mysql的源安装包
1. 下载mysql的repo源(centos 7.0 也没有wget命令,所以先来一个 yum -y install wget)
1 | $ wget http: //repo .mysql.com /mysql-community-release-el7-5 .noarch.rpm |
2. 安装mysql-community-release-el7-5.noarch.rpm包
1 | $ sudo rpm -ivh mysql-community-release-el7-5.noarch.rpm |
安装这个包后,会获得两个mysql的yum repo源:/etc/yum.repos.d/mysql-community.repo,/etc/yum.repos.d/mysql-community-source.repo。
3. 安装mysql
1 | $ sudo yum install mysql-server |