今天看啥
    热点:

      天发国际娱乐官网:这一年,许镜清经别人提醒,在微博上发起了众筹。

      cenots7 部署etcd集群


      ip角色192.168.1.101master192.168.1.102node1192.168.1.103node2

      1. 安装etcd

      yuminstall-yetcd

      2. 配置文件

      #master配置ETCD_NAME=etcdmasterETCD_DATA_DIR="/var/lib/etcd/etcd-master.etcd"ETCD_LISTEN_PEER_URLS="http://www.1click-soft.com/tfgjylgw:2380"ETCD_LISTEN_CLIENT_URLS="http://www.1click-soft.com/tfgjylgw:2379,http://www.1click-soft.com/tfgjylgw:2379"ETCD_INITIAL_ADVERTISE_PEER_URLS="http://www.1click-soft.com/tfgjylgw:2380"ETCD_INITIAL_CLUSTER="etcdmaster=http://www.1click-soft.com/tfgjylgw:2380,etcdnode1=http://www.1click-soft.com/tfgjylgw:2380,etcdnode2=http://www.1click-soft.com/tfgjylgw:2380"ETCD_INITIAL_CLUSTER_STATE="new"ETCD_INITIAL_CLUSTER_TOKEN="etcd-cluster-00"ETCD_ADVERTISE_CLIENT_URLS="http://www.1click-soft.com/tfgjylgw:2379"#etcdnode01ETCD_NAME=etcdnode01ETCD_DATA_DIR="/var/lib/etcd/etcd-master.etcd"ETCD_LISTEN_PEER_URLS="http://www.1click-soft.com/tfgjylgw:2380"ETCD_LISTEN_CLIENT_URLS="http://www.1click-soft.com/tfgjylgw:2379,http://www.1click-soft.com/tfgjylgw:2379"ETCD_INITIAL_ADVERTISE_PEER_URLS="http://www.1click-soft.com/tfgjylgw:2380"ETCD_INITIAL_CLUSTER="etcdmaster=http://www.1click-soft.com/tfgjylgw:2380,etcdnode1=http://www.1click-soft.com/tfgjylgw:2380,etcdnode2=http://www.1click-soft.com/tfgjylgw:2380"ETCD_INITIAL_CLUSTER_STATE="new"ETCD_INITIAL_CLUSTER_TOKEN="etcd-cluster-00"ETCD_ADVERTISE_CLIENT_URLS="http://www.1click-soft.com/tfgjylgw:2379"#etcdnode02ETCD_NAME=etcdnode02ETCD_DATA_DIR="/var/lib/etcd/etcd-master.etcd"ETCD_LISTEN_PEER_URLS="http://www.1click-soft.com/tfgjylgw:2380"ETCD_LISTEN_CLIENT_URLS="http://www.1click-soft.com/tfgjylgw:2379,http://www.1click-soft.com/tfgjylgw:2379"ETCD_INITIAL_ADVERTISE_PEER_URLS="http://www.1click-soft.com/tfgjylgw:2380"ETCD_INITIAL_CLUSTER="etcdmaster=http://www.1click-soft.com/tfgjylgw:2380,etcdnode1=http://www.1click-soft.com/tfgjylgw:2380,etcdnode2=http://www.1click-soft.com/tfgjylgw:2380"ETCD_INITIAL_CLUSTER_STATE="new"ETCD_INITIAL_CLUSTER_TOKEN="etcd-cluster-00"ETCD_ADVERTISE_CLIENT_URLS="http://www.1click-soft.com/tfgjylgw:2379"

      3. 配置启动命令

      cat /usr/lib/systemd/system/etcd.service

      [Unit]Description=EtcdServerAfter=network.targetAfter=network-online.targetWants=network-online.target[Service]Type=notifyWorkingDirectory=/var/lib/etcd/EnvironmentFile=-/etc/etcd/etcd.confUser=etcdExecStart=/bin/bash-c"GOMAXPROCS=$(nproc)/usr/bin/etcd--name=\"${ETCD_NAME}\"\--data-dir=\"${ETCD_DATA_DIR}\"\--listen-peer-urls=\"${ETCD_LISTEN_PEER_URLS}\"\--listen-client-urls=\"${ETCD_LISTEN_CLIENT_URLS}\"\--advertise-client-urls=\"${ETCD_ADVERTISE_CLIENT_URLS}\"\--initial-cluster-token=\"${ETCD_INITIAL_CLUSTER_TOKEN}\"\--initial-cluster=\"${ETCD_INITIAL_CLUSTER}\"\--initial-cluster-state=\"${ETCD_INITIAL_CLUSTER_STATE}\""Restart=on-failureLimitNOFILE=65536[Install]WantedBy=multi-user.target

      4. 管理

      分别启动各种节点systemctl start etcd

      #查看群集状态命令etcdctlmemberlist

      www.1click-soft.comtruehttp://www.1click-soft.com/Linux/1228652.htmlTechArticlecenots7 部署etcd集群 ip角色192.168.1.101master192.168.1.102node1192.168.1.103node2 1. 安装etcd yum install -yetcd 2. 配置文件 #master配置 ETCD_NAME=etcdmaster ETCD_DA...

      相关文章

      帮客评论

      视觉看点
      百度 360 搜狗