In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
This document is a manual trove image of mysql5.6
Openstack version is newton
1. Create a basic virtual machine
Log in to openstack to create a virtual machine, which is used to create trove images. The root disk of the virtual machine will eventually be uploaded to glance for trove to use. The root disk capacity of the virtual machine will be set as needed. Omit the details of this step.
The following operations are logged in to this virtual machine.
2. Configure ssh
Cat / etc/ssh/sshd_configUseDNS no
3. Add mysql source
Yum install http://dev.mysql.com/get/mysql57-community-release-el7-9.noarch.rpmyum remove mariadb-libs
4. Edit / etc/yum.repos.d/mysql-community.repo disable mysql5.7 and enable mysql5.6
# Enable to use MySQL 5.6 [mysql56-community] name=MySQL 5.6 Community Serverbaseurl= http://repo.mysql.com/yum/mysql-5.6-community/el/7/$basearch/enabled=1gpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql[mysql57-community]name=MySQL 5.7 Community Serverbaseurl= http://repo.mysql.com/yum/mysql-5.7-community/el/7/$basearch/enabled=0gpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
5. Install mysql5.6
After installing mysql, it is not necessary to set up mysqld to start randomly
Yum install mysql-community-server
6. Configure mysql
Edit / etc/my.cnf, add the following line at the end of the file, with a blank above the include line
...! includedir / etc/mysql/conf.d/
6.2. Create a directory
Mkdir-p / etc/mysql/conf.d/
7. Install percona-xtrabackup
Innobackupexyum install https://www.percona.com/redir/downloads/percona-release/redhat/percona-release-0.1-4.noarch.rpmyum install percona-xtrabackup-24
8. Install trove-agent with source code
8.1. Install related software packages
Yum install git python-virtualenv
8.2. Create a user
Useradd-m trove# sets trove sudocat / etc/sudoers.d/trove Defaults:trove! requirettytrove ALL= (ALL) NOPASSWD:ALL
Download the trove source code
Mkdir / opt/trovechown trove:trove / opt/trovesu-trovecd / opt/trovegit clone https://github.com/openstack/trove.git
8.4. Integration code
Since there is bug:1649592 when backing up on centos, when the master branch has been integrated, commit needs to be integrated into the stable/newton branch
Commit c1fd3e3a4c643dba524656c8d53d3506233beaf3Merge: 880c707 f5d1caeAuthor: Jenkins Date: Thu Jan 19 16:07:48 2017 + 0000 Merge "Fix backup of mysql variants on Centos"... commit f5d1caea889f85196dfc1efe4892560f0b145191Author: Doug Shelley January-20 04:22:03Committer: Doug Shelley 16:07:48-12-14 00:29:41
8.5. Integrated submission
Git config-global user.email "youre mail" git config-global user.name "yuoure name" git checkout stable/newtongit cherry-pick f5d1cae
8.6. Install trove
8.6.1. Install trove
Yum install gccsu-trovecd / opt/trovevirtualenv vensource ven/bin/activatepip install pip-- upgradecd trovepip install-r requirements.txt\-- index-url http://mirrors.aliyun.com/pypi/simple/\-trusted-host mirrors.aliyun.compython setup.py install
8.6.2. Create a startup file
Mkdir-p / etc/trove/conf.dchown-R trove:trove / etc/trovemkdir-p / var/lib/trovechown-R trove:trove / var/lib/trovemkdir-p / var/log/trovechown-R trove:trove / var/log/trove# if trove-guestagent.conf,guest_info.conf is not created in advance, # and set the owner of / etc/trove to trove, after creating instance, # these two files injected by nova will have root permissions # files pre-exist Nova injection file does not change the user and group of the file Will change the read and write permissions of the file touch / etc/trove/conf.d/trove-guestagent.conftouch / etc/trove/conf.d/guest_info.confchown-R trove:trove / etc/trovecat / usr/lib/systemd/system/trove- guestagent.service[ Unit] Description=OpenStack Trove guestagent ServiceAfter=syslog.target network.target [service] Type=simpleUser=troveExecStart=/opt/trove/ven/bin/trove-guestagent-- config-file / etc/trove/conf.d/trove-guestagent.conf-- config-file / etc/trove/conf .d / guest_info.confRestart=on-failure [Install] WantedBy=multi-user.targetsystemctl daemon-reloadsystemctl enable trove-guestagent
9. Upload image
9.1. Clean up the system
Rm-rf .sshrm-rf / home/trove/.cache/rm-rf / var/lib/mysql/auto.cnf poweroff
9.2. Make the mirror into a snapshot
10. Configure trove to use the created image
Trove-manage-- config-file / etc/trove/trove.conf\ datastore_version_update mysql mysql-5.6 mysql\ 0eb99bad-ad41-420c-bab5-844d84421c23''1
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.