我要评分
获取效率
正确性
完整性
易理解

Verifying etcd

  1. Start etcd.
    • Foreground running:
      1
      2
      cd /usr/local/etcd/bin
      ./etcd
      

    • Background running:
      1
      2
      cd /usr/local/etcd/bin
      nohup ./etcd >./nohup.out 2>&1 & 
      

  2. Verify the inserted data.
    1
    ./etcdctl put key "etcd"
    

  3. Check for data.
    1
    ./etcdctl get key
    

  4. Run the put command to modify the data.
    1
    2
    ./etcdctl put key "world"
    ./etcdctl get key
    

  5. Delete the data.
    1
    2
    ./etcdctl del key
    ./etcdctl get key
    

  6. Stop etcd.
    • Exit from the foreground.
      Ctrl+c
    • Exit from the background: Search for the etcd process ID and stop the process, or directly stop the etcd process.
      1
      2
      ps -ef | grep etcd
      kill -9 56556
      

      Or:

      1
      pkill -9 etcd