验证etcd
- 启动etcd。
- 前台运行:
1 2
cd /usr/local/etcd/bin ./etcd
- 后台运行:
1 2
cd /usr/local/etcd/bin nohup ./etcd >./nohup.out 2>&1 &
- 前台运行:
- 验证插入数据。
1
./etcdctl put key "etcd"
- 查找数据。
1
./etcdctl get key
- 更改数据,更改命令用put即可。
1 2
./etcdctl put key "world" ./etcdctl get key
- 删除数据。
1 2
./etcdctl del key ./etcdctl get key
- 关闭etcd。
- 前台运行退出:
Ctrl+c
- 后台运行退出:查找etcd进程号结束进程,或者直接结束etcd进程。
1 2
ps -ef | grep etcd kill -9 56556
或者:
1
pkill -9 etcd
- 前台运行退出:
父主题: 源码编译安装和卸载