1、CentOS7 RPM方式安装MySQL5.7
环境准备:
1、安装CentOS7.x
2、配置IP(可以上网)
3、关闭防火墙和SELinux
[root@node ~]# systemctl stop firewalld
[root@node ~]# systemctl disable firewalld
Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
[root@node ~]# vi /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of three values:
# targeted - Targeted processes are protected,
# minimum - Modification of targeted policy. Only selected processes are protected.
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
[root@node ~]# setenforce 0 临时关闭SELINUX
[root@node ~]# getenforce
Permissive
4、安装常用软件(vim bash-completion lrzsz wget net-tools psmisc tree dos2unix)
yum install vim bash-completion lrzsz wget net-tools psmisc tree dos2unix -y
.
.
.
Complete!
5、创建快照
查看系统版本:
[root@node1 ~]# cat /etc/redhat-release
CentOS Linux release 7.9.2009 (Core)
RPM方式安装MySQL5.7:
SELinux禁用状态
[root@node1 ~]# getenforce
Disabled
防火墙关闭
[root@node1 ~]# systemctl is-active firewalld.service
unknown
1、yum在线安装:
1、下载 MySQL Yum Repository
wget -c https://repo.mysql.com//mysql80-community-release-el7-5.noarch.rpm
2、添加 MySQL Yum Repository
yum localinstall mysql80-community-release-el7-5.noarch.rpm
.
.
.
Installed:
mysql80-community-release.noarch 0:el7-5
Complete!
3、选择安装发行版
禁用8.0:yum-config-manager --disable mysql80-community
-bash: yum-config-manager: command not found
yum -y install yum-utils
.
.