etcd3集群部署
来源:互联网 发布:故宫淘宝有没有app 编辑:程序博客网 时间:2024/05/20 20:56
部署环境
主机名IP操作系统node201 10.0.0.201 centos 7.3 64位 node20210.0.0.202centos 7.3 64位node20310.0.0.203centos 7.3 64位停掉防火墙
systemctl stop firewalld
systemctl disable firewalld
关闭SELinux
编辑/etc/selinux/config
下载etcd
https://github.com/coreos/etcd/releases
cd /usr/local/src
wget https://github.com/coreos/etcd/releases/download/v3.1.7/etcd-v3.1.7-linux-amd64.tar.gz,也可以使用curl或aria2下载
tar zxvf etcd-v3.1.7-linux-amd64.tar.gz
cd etcd-v3.1.7-linux-amd64
添加环境变量export ETCDCTL_API=3,指定客户端工具etcdctl使用api v3和服务器程序etcd进行通信。
使用静态方式创建集群
在node201节点创建etcd.service
[Unit]Description=Etcd ServerAfter=network.targetAfter=network-online.targetWants=network-online.target[Service]Type=notifyWorkingDirectory=/usr/local/src/etcd-v3.1.7-linux-amd64EnvironmentFile=-/usr/local/src/etcd-v3.1.7-linux-amd64/etcd.conf# set GOMAXPROCS to number of processorsExecStart=/usr/local/src/etcd-v3.1.7-linux-amd64/etcd \ --name infra0 \ --initial-advertise-peer-urls http://10.0.0.201:2380 \ --listen-client-urls http://10.0.0.201:2379,http://127.0.0.1:2379 \ --listen-peer-urls http://10.0.0.201:2380 \ --advertise-client-urls http://10.0.0.201:2379 \ --initial-cluster-token etcd-cluster1 \ --initial-cluster infra0=http://10.0.0.201:2380,infra1=http://10.0.0.202:2380,infra2=http://10.0.0.203:2380 \ --initial-cluster-state newRestart=on-failureLimitNOFILE=65536[Install]WantedBy=multi-user.target
[Unit]Description=Etcd ServerAfter=network.targetAfter=network-online.targetWants=network-online.target[Service]Type=notifyWorkingDirectory=/usr/local/src/etcd-v3.1.7-linux-amd64EnvironmentFile=-/usr/local/src/etcd-v3.1.7-linux-amd64/etcd.conf# set GOMAXPROCS to number of processorsExecStart=/usr/local/src/etcd-v3.1.7-linux-amd64/etcd \ --name infra1 \ --initial-advertise-peer-urls http://10.0.0.202:2380 \ --listen-client-urls http://10.0.0.202:2379,http://127.0.0.1:2379 \ --listen-peer-urls http://10.0.0.202:2380 \ --advertise-client-urls http://10.0.0.202:2379 \ --initial-cluster-token etcd-cluster1 \ --initial-cluster infra0=http://10.0.0.201:2380,infra1=http://10.0.0.202:2380,infra2=http://10.0.0.203:2380 \ --initial-cluster-state newRestart=on-failureLimitNOFILE=65536[Install]WantedBy=multi-user.target
在节点node203创建文件etcd.service
[Unit]Description=Etcd ServerAfter=network.targetAfter=network-online.targetWants=network-online.target[Service]Type=notifyWorkingDirectory=/usr/local/src/etcd-v3.1.7-linux-amd64EnvironmentFile=-/usr/local/src/etcd-v3.1.7-linux-amd64/etcd.conf# set GOMAXPROCS to number of processorsExecStart=/usr/local/src/etcd-v3.1.7-linux-amd64/etcd \ --name infra2 \ --initial-advertise-peer-urls http://10.0.0.203:2380 \ --listen-client-urls http://10.0.0.203:2379,http://127.0.0.1:2379 \ --listen-peer-urls http://10.0.0.203:2380 \ --advertise-client-urls http://10.0.0.203:2379 \ --initial-cluster-token etcd-cluster1 \ --initial-cluster infra0=http://10.0.0.201:2380,infra1=http://10.0.0.202:2380,infra2=http://10.0.0.203:2380 \ --initial-cluster-state newRestart=on-failureLimitNOFILE=65536[Install]WantedBy=multi-user.target
cp etcd.service /usr/lib/systemd/system/
systemctl daemon-reload
systemctl enable etcd
sytemctl start etcd
使用etcdctl版本2查看信息
0 0
- etcd3集群部署
- etcd3.7.2集群搭建(静态配置)
- 集群部署
- etcd3安装和配置
- etcd3进行配置管理
- MYSQL集群部署(三)--集群部署
- ETCD3 和 ETCD2 性能比较
- 集群部署方案
- Tomcat集群技术部署
- websphere 集群部署
- [转]部署Cassandra集群
- 集群上部署hadoop
- 集群部署Cassandra
- mysql 集群以及部署
- Cassandra集群部署规划
- cas 集群部署配置
- hadoop集群部署lzo
- hadoop集群部署
- Hive上计算两时点相差分钟数的方法
- 华为交换机配置基本命令——视图切换
- linux管道的那点事
- ssm+redis 如何更简洁的利用自定义注解+AOP实现redis缓存
- canvas鼠标移动动态星空背景特效
- etcd3集群部署
- 文章标题
- java script第5章
- 常用数据类型转换(JAVA)
- 视图坐标系和绝对坐标系偏移量来实现滑动
- 剑指offer第3题——>有序二维数组的查找
- yii框架中的andFilterWhere 和 andWhere的区别
- Thrift 入门教程
- centos配置ftp