CentOS 7中如何安装mysql server
2016-05-19 15:56
387 查看
以前一直用RHEL 6.3和6.4,系统盘里自带了mysql server,配置好yum源后,直接yum install mysql-server就可安装mysql服务器端了,最近用CentOS 7.1,发现系统盘没有提供mysql-server的RPM包,在网上搜罗了半天,最后在mysql的官方网站找到答案。
只需在/etc/yum.repos.d/目录下添加以下文件mysql-community.repo文件,内容如下:
以上对应的是5.6版本。
5.7版本的内容如下:
最后执行yum install mysql-community-server即可。
我用的是5.6版本的内容,在安装的过程中,报以下错误:
很显然,本地没有RPM-GPG-KEY-mysql文件,于是对上文的mysql-community.repo做了一下修改,修改后的内容如下:
重新执行yum install mysql-community-server命令,安装OK~
只需在/etc/yum.repos.d/目录下添加以下文件mysql-community.repo文件,内容如下:
# Enable to use MySQL 5.6 [mysql56-community] name=MySQL 5.6 Community Server baseurl=http://repo.mysql.com/yum/mysql-5.6-community/el/5/$basearch/ enabled=1 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
以上对应的是5.6版本。
5.7版本的内容如下:
# Note: MySQL 5.7 is currently in development. For use at your own risk. # Please read with sub pages: https://dev.mysql.com/doc/relnotes/mysql/5.7/en/ [mysql57-community-dmr] name=MySQL 5.7 Community Server Development Milestone Release baseurl=http://repo.mysql.com/yum/mysql-5.7-community/el/6/$basearch/ enabled=1 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
最后执行yum install mysql-community-server即可。
我用的是5.6版本的内容,在安装的过程中,报以下错误:
GPG key retrieval failed: [Errno 14] curl#37 - "Couldn't open file /etc/pki/rpm-gpg/RPM-GPG-KEY-mysql"
很显然,本地没有RPM-GPG-KEY-mysql文件,于是对上文的mysql-community.repo做了一下修改,修改后的内容如下:
[mysql56-community] name=MySQL 5.6 Community Server baseurl=http://repo.mysql.com/yum/mysql-5.6-community/el/5/$basearch/ enabled=1 gpgcheck=0
重新执行yum install mysql-community-server命令,安装OK~
相关文章推荐
- ls
- linux下面/usr/local和opt目录有何区别
- ls
- linux格式化磁盘命令
- centos下二进制免编译安装mysql
- centos python tab 补全
- linux(ubuntu)之android开发日记
- linux rsync安装配置
- Linux下安装PCRE
- linux各种解压命令
- 如何在Ubuntu / CentOS 6.x上安装Bugzilla
- 怎么防止服务器的任务因断网中断(linux screen 命令详解)
- 我常用的linux命令
- 认证授权和审计
- Linux-13个LS命令使用例子
- centos 源码安装python3.5.1
- Linux DM9000网卡驱动程序完全分析
- 【Linux】深入理解Linux修改hostname
- Linux中如何查看修改系统的时间和时区
- linux运维常用命令