环境:CentOS7.9
工具:Xshell 7
wget \
https://cdn.mysql.com/archives/mysql-5.7/mysql-community-client-5.7.32-1.el7.x86_64.rpm
https://cdn.mysql.com/archives/mysql-5.7/mysql-community-common-5.7.32-1.el7.x86_64.rpm
https://cdn.mysql.com/archives/mysql-5.7/mysql-community-libs-5.7.32-1.el7.x86_64.rpm
https://cdn.mysql.com/archives/mysql-5.7/mysql-community-libs-compat-5.7.32-1.el7.x86_64.rpm
https://cdn.mysql.com/archives/mysql-5.7/mysql-community-server-5.7.32-1.el7.x86_64.rpm
yum install -y mysql-community-*-5.7.32-1.el7.x86_64.rpm
cat /var/log/mysqld.log | grep password
mysql -u root -p
关闭每台服务器的防火墙和selinux
systemctl disable --now firewalld
setenforce 0
主服务器使用本地时钟源
yum -y install ntp
vi /etc/ntp.conf
server 127.127.136.0
fudge 127.127.136.0 stratum 8
systemctl start ntpd
修改配置文件
vi /etc/my.conf
server_id = 11
log_bin=master_bin
log_slave_updates=true
grant replication slave on *.* to 'myslave'@'43.248.136.%' identified by '1234';
set global validate_password_length=4;
set global validate_password_policy=0;
alter user root@localhost identified by '1234';
Vi /etc/my.conf
server-id = 2
relay-log=relay-log-bin
relay-log-index=slave-relay-bin.index
change master to master_host='43.248.136.97',master_user='myslave',master_password='1234',master_log_file='master-bin.000001',master_log_pos=154;
start slave;
show slave status\G;
systemctl stop firewalld
setenforce 0
1、查看yum库中有哪些版本
yum search java|grep jdk
2、选择指定版本安装,yum源安装的是OpenJDK
yum install java-1.8.0-openjdk*
3、安装完成后查看版本
Java -version
4、修改配置文件
cd /usr/lib/jvm
ls
vi /etc/profile
创建amoeba文件夹,使用rz命令从本地放入系统,解压文件
tar -zxf amoeba-mysql-binary-2.2.0.tar.gz
设置文件夹权限
查看是否安装完成
如果这种报错
修改 vi /usr/local/amoeba/bin/amoeba
Mysql服务器添加权限和用户开放给amoeba
grant all on *.* to ‘anyu’@'43.248.136.%' identified by '123.com';
配置amoeba服务器文件
vi conf/amoeba.xml
vi conf/dbServers.xml
启动
查看服务是否成功,监听端口为8066为成功启动