MySQL第一次作业

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
.
.
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值