博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
centos/7下安装mysql5.7
阅读量:5265 次
发布时间:2019-06-14

本文共 3612 字,大约阅读时间需要 12 分钟。

 本文参考自:https://blog.csdn.net/fanshujuntuan/article/details/78077433

背景:在ubuntu下用vagrant搭建了一个集群环境, 每个虚拟机的box是cenos/7, 每次在启动的时候, 需要在VagrantFile文件中配置,使得master虚拟机预装好mysql

无奈视频中给的脚本在我的机器上老是出错,于是有了下文自己的安装过程.

1.yum install wget

2. wget http://mirror.bit.edu.cn/mysql/Downloads/MySQL-5.7/mysql-5.7.16-1.el6.x86_64.rpm-bundle.tar(这个链接是北理工的开源镜像, 无奈官网太慢,还老是中断)

然后解压.....

[vagrant@10 ~]$ tar -xvf mysql-5.7.16-1.el6.x86_64.rpm-bundle.tar mysql-community-client-5.7.16-1.el6.x86_64.rpmmysql-community-embedded-5.7.16-1.el6.x86_64.rpmmysql-community-embedded-devel-5.7.16-1.el6.x86_64.rpmmysql-community-server-5.7.16-1.el6.x86_64.rpmmysql-community-test-5.7.16-1.el6.x86_64.rpmmysql-community-common-5.7.16-1.el6.x86_64.rpmmysql-community-libs-5.7.16-1.el6.x86_64.rpmmysql-community-devel-5.7.16-1.el6.x86_64.rpmmysql-community-libs-compat-5.7.16-1.el6.x86_64.rpm

别看解压之后这么多文件,有用的就四个文件,并且这四个文件必须按一定顺序安装,因为彼此依赖,顺序是:

mysql-community-common-5.7.16-1.el6.x86_64.rpm  mysql-community-libs-5.7.16-1.el6.x86_64.rpm  mysql-community-client-5.7.16-1.el6.x86_64.rpm  mysql-community-server-5.7.16-1.el6.x86_64.rpm 但是在安装这四个文件之前, 还要装一些别的依赖 3.去除别的冲突的依赖
[vagrant@10 ~]$ rpm -qa | grep postfixpostfix-2.10.1-6.el7.x86_64[vagrant@10 ~]$ rpm -qa | grep mariadbmariadb-libs-5.5.56-2.el7.x86_64[vagrant@10 ~]$ sudo rpm -ev postfix-2.10.1-6.el7.x86_64Preparing packages...postfix-2:2.10.1-6.el7.x86_64[vagrant@10 ~]$ sudo rpm -ev mariadb-libs-5.5.56-2.el7.x86_64Preparing packages...mariadb-libs-1:5.5.56-2.el7.x86_64
4.安装别的依赖 sudo yum -y install libaio sudo yum -y install net-tools sudo yum -y install perl 5.下面正式安装那四个文件
[vagrant@10 ~]$ lsmysql-5.7.16-1.el6.x86_64.rpm-bundle.tarmysql-community-client-5.7.16-1.el6.x86_64.rpmmysql-community-common-5.7.16-1.el6.x86_64.rpmmysql-community-devel-5.7.16-1.el6.x86_64.rpmmysql-community-embedded-5.7.16-1.el6.x86_64.rpmmysql-community-embedded-devel-5.7.16-1.el6.x86_64.rpmmysql-community-libs-5.7.16-1.el6.x86_64.rpmmysql-community-libs-compat-5.7.16-1.el6.x86_64.rpmmysql-community-server-5.7.16-1.el6.x86_64.rpmmysql-community-test-5.7.16-1.el6.x86_64.rpm[vagrant@10 ~]$ sudo rpm -ivh mysql-community-common-5.7.16-1.el6.x86_64.rpm warning: mysql-community-common-5.7.16-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEYPreparing...                          ################################# [100%]Updating / installing...   1:mysql-community-common-5.7.16-1.e################################# [100%][vagrant@10 ~]$ sudo rpm -ivh mysql-community-libs-5.7.16-1.el6.x86_64.rpm   warning: mysql-community-libs-5.7.16-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEYPreparing...                          ################################# [100%]Updating / installing...   1:mysql-community-libs-5.7.16-1.el6################################# [100%][vagrant@10 ~]$ sudo rpm -ivh mysql-community-client-5.7.16-1.el6.x86_64.rpm warning: mysql-community-client-5.7.16-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEYPreparing...                          ################################# [100%]Updating / installing...   1:mysql-community-client-5.7.16-1.e################################# [100%][vagrant@10 ~]$ sudo rpm -ivh mysql-community-server-5.7.16-1.el6.x86_64.rpm warning: mysql-community-server-5.7.16-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEYPreparing...                          ################################# [100%]Updating / installing...   1:mysql-community-server-5.7.16-1.e################################# [100%]

 

 

 ........................完结

 

转载于:https://www.cnblogs.com/tsdblogs/p/9396771.html

你可能感兴趣的文章
优雅地书写回调——Promise
查看>>
android主流开源库
查看>>
AX 2009 Grid控件下多选行
查看>>
PHP的配置
查看>>
Struts框架----进度1
查看>>
Round B APAC Test 2017
查看>>
MySQL 字符编码问题详细解释
查看>>
Ubuntu下面安装eclipse for c++
查看>>
让IE浏览器支持CSS3圆角属性的方法
查看>>
巡风源码阅读与分析---nascan.py
查看>>
LiveBinding应用 dataBind 数据绑定
查看>>
Linux重定向: > 和 &> 区别
查看>>
nginx修改内核参数
查看>>
C 筛选法找素数
查看>>
TCP为什么需要3次握手与4次挥手(转载)
查看>>
IOC容器
查看>>
Windows 2003全面优化
查看>>
URAL 1002 Phone Numbers(KMP+最短路orDP)
查看>>
web_day4_css_宽度
查看>>
electron入门心得
查看>>