美文网首页Zookeeper
Zookeeper 开机启动配置

Zookeeper 开机启动配置

作者: 泡水鱼干 | 来源:发表于2021-05-22 10:29 被阅读0次

    系统centos7

    [root@localhost system]# cd /etc/systemd/system
    [root@localhost system]# vim zkServer.service
    [Unit]
    Description=zookeeper service
    Requires=network.target
    After=network.target remote-fs.target nss-lookup.target
    
    [Service]
    Type=forking
    WorkingDirectory=/usr/local/zookeeper-3.6.2
    Environment="JAVA_HOME=/usr/local/jdk1.8.0_271"
    ExecStart=/usr/local/zookeeper-3.6.2/bin/zkServer.sh start
    ExecStop=/usr/local/zookeeper-3.6.2/bin/zkServer.sh stop
    Restart=on-abort
    TimeoutSec=600
    
    [Install]
    WantedBy=multi-user.target
    [root@localhost system]# systemctl daemon-reload
    [root@localhost system]# systemctl enable zkServer.service 
    [root@localhost system]# systemctl start zkServer.service 
    [root@localhost system]# systemctl status zkServer.service 
    

    相关文章

      网友评论

        本文标题:Zookeeper 开机启动配置

        本文链接:https://www.haomeiwen.com/subject/ffynjltx.html