==官网==
www.mysql.com
www.oracle.com
==准备工作==
环境:# cat /etc/redhat-release
CentOS Linux release 7.4.1708 (Core)
适当调整内存
关闭selinux
# sed -ri '/^SELINUX=/c\SELINUX=disabled' /etc/selinux/config(vim /etc/selinux/config更改也可)
# setenforce 0
关闭防火墙
# systemctl stop firewalld && systemctl disable firewalld
1. 添加yum仓库
# cd /etc//yum.repos.d/
# vim mysql.repo
# Enable to use MySQL 5.7
[mysql57-community]
name=MySQL 5.7 Community Server
baseurl=http://repo.mysql.com/yum/mysql-5.7-community/el/7/$basearch/ #官方源地址
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
此处需要有校验文件,否则安装会报如下错误:
Downloading packages:
警告:/var/cache/yum/x86_64/7/mysql57-community/packages/mysql-community-server-5.7.23-1.el7.x86_64.rpm: 头V3 DSA/SHA1 Signature, 密钥 ID 5072e1f5: NOKEY
从 file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql 检索密钥
获取 GPG 密钥失败:[Errno 14] curl#37 - "Couldn't open file /etc/p