相思资源网 Design By www.200059.com

yum or rpm?

yum安装方式很方便,但是下载mysql的时候从官网下载,速度较慢。

rpm安装方式可以从国内镜像下载mysql的rpm包,比较快。rpm也适合离线安装。

环境说明

"htmlcode">

rpm -qa|grep mariadb
 mariadb-libs-5.5.56-2.el7.x86_64

"htmlcode">

rpm -e mariadb-libs-5.5.56-2.el7.x86_64 --nodeps

安装依赖环境

yum install -y openssl-devel.x86_64 openssl.x86_64 
yum install -y libaio.x86_64 libaio-devel.x86_64 
yum install -y perl.x86_64 perl-devel.x86_64 
yum install -y perl-JSON.noarch 
yum install -y autoconf 
yum install -y wget
yum install -y net-tools

关闭防火墙

systemctl stop firewalld.service
systemctl disable firewalld.service

禁用selinux

vi /etc/selinux/config

将SELINUX=enforcing改为SELINUX=disabled

reboot 重启机器

从网易镜像下载mysql安装包集合

"htmlcode">

wget https://mirrors.163.com/mysql/Downloads/MySQL-8.0/mysql-8.0.13-1.el7.x86_64.rpm-bundle.tar
tar -xvf mysql-8.0.13-1.el7.x86_64.rpm-bundle.tar

"htmlcode">

wget https://mirrors.163.com/mysql/Downloads/MySQL-8.0/mysql-community-common-8.0.13-1.el7.x86_64.rpm
wget https://mirrors.163.com/mysql/Downloads/MySQL-8.0/mysql-community-libs-8.0.13-1.el7.x86_64.rpm
wget https://mirrors.163.com/mysql/Downloads/MySQL-8.0/mysql-community-client-8.0.13-1.el7.x86_64.rpm
wget https://mirrors.163.com/mysql/Downloads/MySQL-8.0/mysql-community-server-8.0.13-1.el7.x86_64.rpm

按顺序安装

"htmlcode">

rpm -ivh mysql-community-common-8.0.13-1.el7.x86_64.rpm
rpm -ivh mysql-community-libs-8.0.13-1.el7.x86_64.rpm
rpm -ivh mysql-community-client-8.0.13-1.el7.x86_64.rpm
rpm -ivh mysql-community-server-8.0.13-1.el7.x86_64.rpm

"htmlcode">

rpm -ivh mysql-community-libs-compat-8.0.13-1.el7.x86_64.rpm
rpm -ivh mysql-community-embedded-compat-8.0.13-1.el7.x86_64.rpm
rpm -ivh mysql-community-devel-8.0.13-1.el7.x86_64.rpm
rpm -ivh mysql-community-test-8.0.13-1.el7.x86_64.rpm

初始化数据库

mysqld --initialize --console

目录授权,否则启动失败

chown -R mysql:mysql /var/lib/mysql/

启动服务

systemctl start mysqld

加密

mysql_secure_installation

其他

其他操作和yum安装方式一样,不再重复。

安装perl所有模块

yum install -y perl-Module-Install.noarch

总结

以上所述是小编给大家介绍的Centos7 安装mysql 8.0.13(rpm)的教程详解,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对网站的支持!

标签:
centos7,安装mysql,rpm安装mysql, mysql,rpm

相思资源网 Design By www.200059.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
相思资源网 Design By www.200059.com

评论“Centos7 安装mysql 8.0.13(rpm)的教程详解”

暂无Centos7 安装mysql 8.0.13(rpm)的教程详解的评论...