首页 > 数据库 > MySQL > 正文

trove 介于 centos7 制作 mysql5.5 镜像

2024-07-24 12:35:57
字体:
来源:转载
供稿:网友
  本文档是手动制作mysql5.5的trove镜像
 
  openstack版本为newton
 
  1、创建基础虚拟机
 
  登录openstack创建一台虚拟机,这台虚拟机用于制作trove镜像,虚拟机的根磁盘最终会上传到glance给trove使用,虚拟机的根磁盘容量根据需要设置,这里略掉这步的详细操作。
 
  以下操作皆登录到这台虚拟机中操作
 
  2、 配置ssh
 
  cat /etc/ssh/sshd_config
  UseDNS no
  3、添加mysql源
 
  yum install http://dev.mysql.com/get/mysql57-community-release-el7-9.noarch.rpm
 
  yum remove mariadb-libs
  4、编辑/etc/yum.repos.d/mysql-community.repo 禁用mysql5.7,启用mysql5.5
 
  # Enable to use MySQL 5.5
  [mysql55-community]
  name=MySQL 5.5 Community Server
  baseurl=http://repo.mysql.com/yum/mysql-5.5-community/el/7/$basearch/
  enabled=1
  gpgcheck=1
  gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
 
  [mysql57-community]
  name=MySQL 5.7 Community Server
  baseurl=http://repo.mysql.com/yum/mysql-5.7-community/el/7/$basearch/
  enabled=0
  gpgcheck=1
  gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
  5、安装mysql5.5
 
  安装完mysql後,不必设置mysqld随机启动
 
  yum install mysql-community-server
  6、配置mysql
  6.1、编辑/etc/my.cnf,在文件末尾添加下面一行,include这行上面有一行空白
 
  ...
 
  !includedir /etc/mysql/conf.d/
  6.2 创建目录
 
  mkdir -p /etc/mysql/conf.d/
  7、安装percona-xtrabackup
 
  innobackupex
  yum install https://www.percona.com/redir/downloads/percona-release/redhat/percona-release-0.1-4.noarch.rpm
  yum install percona-xtrabackup-24
  8、 整合代码
  由于在centos上备份时,有bug:1649592,已经整合到master分支,需要将commit整合进stable/newton分支
 
  commit c1fd3e3a4c643dba524656c8d53d3506233beaf3
  Merge: 880c707 f5d1cae
  Author: Jenkins <jenkins@review.openstack.org>
  Date:   Thu Jan 19 16:07:48 2017 +0000
 
      Merge "Fix backup of mysql variants on Centos"
  ...
  commit f5d1caea889f85196dfc1efe4892560f0b145191
  Author: Doug Shelley <doug@parelastic.com> 2016-01-20 04:22:03
  Committer: Doug Shelley <doug@parelastic.com> 2016-12-14 00:29:41

(编辑:武林网)

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表