CentOs 7 安装mysql-server 和libmysqlclient-dev

安装从网上下载文件的wget命令

yum -y install wget 

下载mysql的repo源

wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm  

安装mysql-community-release-el7-5.noarch.rpm包

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

[root@centos7 seven]# cd /etc/yum.repos.d/ [root@centos7 yum.repos.d]# ls CentOS-Base.repo       CentOS-Media.repo          mysql-community.repo CentOS-CR.repo         CentOS-Sources.repo        mysql-community-source.repo CentOS-Debuginfo.repo  CentOS-Vault.repo          nginx.repo CentOS-fasttrack.repo  CentOS-x86_64-kernel.repo  

安装mysql

yum install mysql-server  

安装mysql开发包(ubuntu的libmysqlclient-dev)

yum install mysql-devel