Mysql Cluster 8.0.26搭建

Mysql Cluster 8.0.26搭建

一、基础环境部署

1、基本环境(每个节点都需要)
1.1 关闭防火墙
systemctl stop firewalld # 关闭防火墙
systemctl disable firewalld #设置开机不自启
1.2 关闭selinux
setenforce 0
修改/etc/selinux/config
sed -s 's/enforcing/disabled/g' /etc/selinux/config
1.3 修改hosts文件
172.25.16.* mysql01
172.25.16.* mysql02
172.25.16.* mysql03
1.4 设置免密登录
ssh-keygen -t rsa
ssh-copy-id mysql01
ssh-copy-id mysql02
ssh-copy-id mysql03
1.5 sysctl.conf 优化
cat>>/etc/sysctl.conf <<EOF
fs.aio-max-nr = 1048576
fs.file-max = 681574400
kernel.shmmax = 137438953472 
kernel.shmmni = 4096
kernel.sem = 250 32000 100 200
net.ipv4.ip_local_port_range = 9000 65000
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048586
EOF
1.6 limit 优化
cat>>/etc/security/limits.conf <<EOF
mysql soft nproc 65536
mysql hard nproc 65536
mysql soft nofile 65536
mysql hard nofile 65536
EOF
cat>>/etc/pam.d/login <<EOF
session required /lib/security/pam_limits.so
session required pam_limits.so
EOF
cat>>/etc/profile<<EOF

if [ $USER = "mysql" ]; then
ulimit -u 16384 -n 65536
fi
EOF
source /etc/profile
2、mysql安装
2.1 mysql安装包下载
wget https://cdn.mysql.com//Downloads/MySQL-Cluster-8.0/mysql-cluster-community-8.0.26-1.el7.x86_64.rpm-bundle.tar

解压安装

tar -xvf mysql-cluster-community-8.0.26-1.el7.x86_64.rpm-bundle.tar
rpm -ivh mysql-cluster-community-common-8.0.26-1.el7.x86_64.rpm mysql-cluster-community-l
  • 1
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值