zoukankan      html  css  js  c++  java
  • consul命令记录

    服务端启动脚本

    #/bin/bash!
    echo "******************************************************************************************"
    echo "* 注意:                                                                                  *"              
    echo "* consul  已经使用supervisor服务进行管理                                                 *"    
    echo "* 如要启动请执行  supervisorctl update                                                   *"
    echo "* 启动/重启服务:  supervisorctl start/restart consul                                     *"
    echo "* 查看运行状态:   supervisorctl status                                                   *"
    echo "******************************************************************************************"
    #consul agent -server -ui -bootstrap-expect 1 -client=10.100.5.29 -data-dir /home/changcheng/app/tools/monitor/consul/data -log-file /home/changcheng/app/tools/monitor/consul/log/consul_log-$(date +%Y-%m-%d--%H-%M)
    

    客户端

    get_ip=`ip a show dev eth0|grep -w inet|awk '{print $2}'|awk -F '/' '{print $1}'|head -n 1`
    cat > $app_path/join.sh  << _FEOF
    #!/bin/bash
    cd /home/changcheng/app/consul && ./consul join $consul_server
    _FEOF
    cat > $app_path/start.sh  << _BEOF
    #!/bin/bash
    nohup /home/changcheng/app/consul/consul agent -data-dir /home/changcheng/data/consul  -node=${get_ip} -bind=  -client=0.0.0.0 -retry-join  ${consul_server}  >> /home/changcheng/app/consul/consul.log &
    _BEOF
    
  • 相关阅读:
    DHCP服务器搭建
    linux文件通配符
    NTP服务器搭建
    .Net下MoongoDB的简单调用
    Mac 下安装配置MongoDB讲解
    Redis 介绍学习
    PostgreSQL学习之路一 安装
    CentOS安装PostgreSQL
    离线安装PostgreSQL11.6
    PostgreSQL 安装扩展插件plpython3u执行python,访问页面或者第三方程序
  • 原文地址:https://www.cnblogs.com/lizhaojun-ops/p/10676534.html
Copyright © 2011-2022 走看看