0
点赞
收藏
分享

微信扫一扫

通过systemed运行etcd实例

seuleyang 2022-01-07 阅读 38

前提

已经在/opt/etcd存在可执行的etcd程序

操作步骤

  1. 新建配置文件
    vim /usr/lib/systemd/system/etcd.service
  2. 添加内容
    [Unit]
    Description=Etcd Server
    After=network.target
    After=network-online.target
    Wants=network-online.targe
    
    [Service]
    Type=notify
    WorkingDirectory=/opt/etcd
    ExecStart=/bin/bash -c "./etcd --listen-client-urls http://0.0.0.0:2379 --advertise-client-urls http://0.0.0.0:2371 --listen-peer-urls http://0.0.0.0:2380"
    Restart=on-failure
    LimitNOFILE=65536
    
    [Install]
    WantedBy=multi-user.target
    
  3. 启动服务
    systemctl start etcd
    systemctl status etcd
    
举报

相关推荐

0 条评论