欧美一级特黄大片做受成人-亚洲成人一区二区电影-激情熟女一区二区三区-日韩专区欧美专区国产专区

etcd集群的部署

node1  192.168.56.173
node2 192.168.56.174
node3 192.168.56.200
node* 為主機(jī)名稱
[root@node1 ~]# cat /etc/redhat-release 
CentOS Linux release 7.2.1511 (Core) 
[root@node1 ~]#

創(chuàng)新互聯(lián)專注于成都網(wǎng)站設(shè)計(jì)、成都網(wǎng)站建設(shè)、網(wǎng)頁(yè)設(shè)計(jì)、網(wǎng)站制作、網(wǎng)站開(kāi)發(fā)。公司秉持“客戶至上,用心服務(wù)”的宗旨,從客戶的利益和觀點(diǎn)出發(fā),讓客戶在網(wǎng)絡(luò)營(yíng)銷(xiāo)中找到自己的駐足之地。尊重和關(guān)懷每一位客戶,用嚴(yán)謹(jǐn)?shù)膽B(tài)度對(duì)待客戶,用專業(yè)的服務(wù)創(chuàng)造價(jià)值,成為客戶值得信賴的朋友,為客戶解除后顧之憂。

https://github.com/coreos/etcd/releases/download/v3.0.15/etcd-v3.0.15-linux-amd64.tar.gz 
tar xf  etcd-v3.0.15-linux-amd64.tar.gz 
cd etcd-v3.0.15-linux-amd64 
cp etcd  /usr/bin/
cp etcdctl /usr/bin/

192.168.56.173(node1)

cat  /etc/systemd/system/etcd2.service

[Unit]
Description=etcd2.service
[Service]
Type=notify
TimeoutStartSec=0
Restart=always
ExecStartPre=-/usr/bin/mkdir -p /data/etcd2
ExecStart=/usr/bin/etcd \
  --data-dir /data/etcd2 \
  --name etcd0 \
  --advertise-client-urls http://192.168.56.173:2379,http://192.168.56.173:4001 \
  --listen-client-urls http://0.0.0.0:2379,http://0.0.0.0:4001 \
  --initial-advertise-peer-urls http://192.168.56.173:2380 \
  --listen-peer-urls http://0.0.0.0:2380 \
  --initial-cluster-token etcd-cluster-1 \
  --initial-cluster etcd0=http://192.168.56.173:2380,etcd1=http://192.168.56.174:2380,etcd2=http://192.168.56.200:2380
[Install]
WantedBy=multi-user.target
# 設(shè)置服務(wù)自啟動(dòng)
systemctl enable /etc/systemd/system/etcd2.service
# 啟動(dòng)etcd1  (先不要做 三個(gè)節(jié)點(diǎn)都部署完畢 在分別啟動(dòng) 否則啟動(dòng)會(huì)hang)
systemctl restart etcd2.service

192.168.56.174(node2)

[root@node2 ~]# cat  /etc/systemd/system/etcd2.service 

[Unit]
Description=etcd2.service
[Service]
Type=notify
TimeoutStartSec=0
Restart=always
ExecStartPre=-/usr/bin/mkdir -p /data/etcd2
ExecStart=/usr/bin/etcd \
  --data-dir /data/etcd2 \
  --name etcd1 \
  --advertise-client-urls http://192.168.56.174:2379,http://192.168.56.174:4001 \
  --listen-client-urls http://0.0.0.0:2379,http://0.0.0.0:4001 \
  --initial-advertise-peer-urls http://192.168.56.174:2380 \
  --listen-peer-urls http://0.0.0.0:2380 \
  --initial-cluster-token etcd-cluster-1 \
  --initial-cluster etcd0=http://192.168.56.173:2380,etcd1=http://192.168.56.174:2380,etcd2=http://192.168.56.200:2380
[Install]
WantedBy=multi-user.target
# 設(shè)置服務(wù)自啟動(dòng)
systemctl enable /etc/systemd/system/etcd2.service
# 啟動(dòng)etcd2  (先不要做 三個(gè)節(jié)點(diǎn)都部署完畢 在分別啟動(dòng) 否則啟動(dòng)會(huì)hang)
systemctl restart etcd2.service

192.168.56.200(node2)

[root@node3~]# cat  /etc/systemd/system/etcd2.service 

[root@node3 ~]# cat  /etc/systemd/system/etcd2.service 
[Unit]
Description=etcd2.service
[Service]
Type=notify
TimeoutStartSec=0
Restart=always
ExecStartPre=-/usr/bin/mkdir -p /data/etcd2
ExecStart=/usr/bin/etcd \
  --data-dir /data/etcd2 \
  --name etcd2 \
  --advertise-client-urls http://192.168.56.200:2379,http://192.168.56.200:4001 \
  --listen-client-urls http://0.0.0.0:2379,http://0.0.0.0:4001 \
  --initial-advertise-peer-urls http://192.168.56.200:2380 \
  --listen-peer-urls http://0.0.0.0:2380 \
  --initial-cluster-token etcd-cluster-1 \
  --initial-cluster etcd0=http://192.168.56.173:2380,etcd1=http://192.168.56.174:2380,etcd2=http://192.168.56.200:2380
[Install]
WantedBy=multi-user.target
# 設(shè)置服務(wù)自啟動(dòng)
systemctl enable /etc/systemd/system/etcd2.service
# 啟動(dòng)etcd3  (先不要做 三個(gè)節(jié)點(diǎn)都部署完畢 在分別啟動(dòng) 否則啟動(dòng)會(huì)hang)
systemctl restart etcd2.service

備注:?jiǎn)?dòng)的方式一個(gè)一個(gè)啟動(dòng) 否則systemctl  restart   etcd2.service 會(huì)hang住

查看狀態(tài) 

[root@node3 ~]# systemctl  status etcd2.service 
● etcd2.service
   Loaded: loaded (/etc/systemd/system/etcd2.service; enabled; vendor preset: disabled)
   Active: active (running) since Sat 2017-09-02 23:43:59 CST; 10min ago
  Process: 2673 ExecStartPre=/usr/bin/mkdir -p /data/etcd2 (code=exited, status=0/SUCCESS)
 Main PID: 2675 (etcd)
   CGroup: /system.slice/etcd2.service
           └─2675 /usr/bin/etcd --data-dir /data/etcd2 --name etcd2 --advertise-client-urls http://192.168.56.200:2379,http://192.168.56.200:4001 --listen-client-urls http://0.0.0.0:2379,http://0.0.0.0:4001...

Sep 02 23:44:45 node3 etcd[2675]: established a TCP streaming connection with peer e37f661be0f0e44a (stream Message reader)
Sep 02 23:44:45 node3 etcd[2675]: established a TCP streaming connection with peer 161efc88633d5fd4 (stream MsgApp v2 reader)
Sep 02 23:44:45 node3 etcd[2675]: established a TCP streaming connection with peer 161efc88633d5fd4 (stream Message reader)
Sep 02 23:44:45 node3 etcd[2675]: closed an existing TCP streaming connection with peer 161efc88633d5fd4 (stream Message writer)
Sep 02 23:44:45 node3 etcd[2675]: established a TCP streaming connection with peer 161efc88633d5fd4 (stream Message writer)
Sep 02 23:44:46 node3 etcd[2675]: 52aafe548d51c9ea [term: 25] received a MsgVote message with higher term from e37f661be0f0e44a [term: 26]
Sep 02 23:44:46 node3 etcd[2675]: 52aafe548d51c9ea became follower at term 26
Sep 02 23:44:46 node3 etcd[2675]: 52aafe548d51c9ea [logterm: 20, index: 623, vote: 0] voted for e37f661be0f0e44a [logterm: 20, index: 623] at term 26
Sep 02 23:44:46 node3 etcd[2675]: 52aafe548d51c9ea [term: 26] ignored a MsgVote message with lower term from 161efc88633d5fd4 [term: 24]
Sep 02 23:44:46 node3 etcd[2675]: raft.node: 52aafe548d51c9ea elected leader e37f661be0f0e44a at term 26
[root@node3 ~]#
[root@node3 ~]# netstat  -lntup 
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      869/sshd            
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      1132/master         
tcp6       0      0 :::2379                 :::*                    LISTEN      2675/etcd           
tcp6       0      0 :::2380                 :::*                    LISTEN      2675/etcd           
tcp6       0      0 :::22                   :::*                    LISTEN      869/sshd            
tcp6       0      0 ::1:25                  :::*                    LISTEN      1132/master         
tcp6       0      0 :::4001                 :::*                    LISTEN      2675/etcd           
[root@node3 ~]#

查看相關(guān)主體的狀態(tài)

[root@node1 etcd-v3.0.15-linux-amd64]# etcdctl member list
161efc88633d5fd4: name=etcd0 peerURLs=http://192.168.56.173:2380 clientURLs=http://192.168.56.173:2379,http://192.168.56.173:4001 isLeader=false
52aafe548d51c9ea: name=etcd2 peerURLs=http://192.168.56.200:2380 clientURLs=http://192.168.56.200:2379,http://192.168.56.200:4001 isLeader=false
e37f661be0f0e44a: name=etcd1 peerURLs=http://192.168.56.174:2380 clientURLs=http://192.168.56.174:2379,http://192.168.56.174:4001 isLeader=true
[root@node1 etcd-v3.0.15-linux-amd64]#

集群的狀態(tài)監(jiān)控(可以結(jié)合zabbix做監(jiān)控)

[root@node1 etcd-v3.0.15-linux-amd64]# etcdctl cluster-health
member 161efc88633d5fd4 is healthy: got healthy result from http://192.168.56.173:2379
member 52aafe548d51c9ea is healthy: got healthy result from http://192.168.56.200:2379
member e37f661be0f0e44a is healthy: got healthy result from http://192.168.56.174:2379
cluster is healthy
[root@node1 etcd-v3.0.15-linux-amd64]#

etcd基本操作

[root@node1 ~]# etcdctl set testkey "hello world"
hello world
[root@node1 ~]# etcdctl   get  testkey 
hello world
[root@node1 ~]# curl -L http://localhost:2379/v2/keys/testkey
{"action":"get","node":{"key":"/testkey","value":"hello world","modifiedIndex":11,"createdIndex":11}}
[root@node1 ~]# curl -L http://192.168.56.173:2379/v2/keys/testkey
{"action":"get","node":{"key":"/testkey","value":"hello world","modifiedIndex":11,"createdIndex":11}}
[root@node1 ~]#

文章標(biāo)題:etcd集群的部署
網(wǎng)站URL:http://www.aaarwkj.com/article32/ipdipc.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供建站公司、虛擬主機(jī)靜態(tài)網(wǎng)站、App開(kāi)發(fā)網(wǎng)站制作、網(wǎng)站策劃

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)

網(wǎng)站優(yōu)化排名
日本高清免费播放一区二区| 国产中文字幕乱码中文| 国产自拍成人精品视频| 亚洲一区二区三区熟女av| 中国毛片一区二区三区 | 亚洲免费一级黄色录像片| 日本不卡免费一区二区视频| 国产精品国产三级国产专用| 丰满少妇一区二区三区在线观看 | 97国产精品视频在线观看| 国内一级黄色片免费观看| 国产有码视频一区二区三区| 不用播放器的av蜜臀| 这里只有精品国产999| 日本黄色录像黄色录像| 黄色免费大片在线播放| 亚洲日本乱码一区二区三| 国产精品自在线拍亚洲另类| 91出品国产福利在线| 欧美日韩亚洲中文综合网 | 九九久久亚洲av成人乱片| 欧美中文日韩国产字幕| 欧美精品高清在线视频| 久久精品久久久精品| 亚洲国产成人午夜精品| 久久亚洲一区二区麻豆偷| 精品国产av一区二区麻豆| 国产成人+亚洲欧洲综合| 国产av无毛一区二区三区| 免费人成在线观看网站免费观看| 亚洲天堂av福利在线观看| 欧美日韩视频一区二区| 传媒视频在线观看网站| 亚洲一区日本一区二区| 免费人成网站在线观看| 久久精品国产亚洲av麻| 日本韩国视频一区二区| 国产一区二区三区不卡视频| 国产一级二级三级久久| 国产一区二区在线乱码| 亚洲激情自拍偷拍视频|