codis3.1 codis-test 安装部署实践之三 codis-test的配置及启动




本系列安装实践文档,参考codis 官方安装说明文档

#关闭防火墙,以免codis受到 各种虚拟机、docker环境的防火墙干扰
     #防火墙状态
     # systemctl status firewalld.service
     #关闭防火墙
     # systemctl stop firewalld.service

#codis-test 的配置
     #由于codis环境复杂,新手搭建容易犯错,因此笔者建议先把 codis-test(/data/go/src/github.com/CodisLabs/codis/scripts/test.sh) 跑起来;
      #熟悉这个 codis-test 之后,再重新搭建自己的 codis环境就比较容易了

     #pwd
     [root@localhost scripts]# pwd
     /data/go/src/github.com/CodisLabs/codis/scripts 
     #修改 etcd 为 zookeeper
     #cat test.sh
          ... ...    
#coordinator_name = "etcd"
coordinator_name = "zookeeper"
#coordinator_addr = "127.0.0.1:2379"
coordinator_addr = "192.168.42.102:2180"

#启动 test.sh  
          [root@localhost scripts]# pwd
          /data/go/src/github.com/CodisLabs/codis/scripts
          [root@localhost scripts]# ./test.sh &          

          #此时 ./tmp目录 会有很多日志,可以观察控制台以及如下  ./tmp 相关日志  是否有报错,报错后就需要根据提示处理相关问题了
          [root@localhost scripts]# ls ./tmp/
          11080.log   11081.log   codis-test.etcd  dashboard.toml  redis-56379.log  redis-56479.log
          11080.toml  11081.toml  dashboard.log    etcd.log        redis-56380.log  redis-56480.log
          
          #常见的碰到创建组错误,          
          codis-admin error: --create-group --gid 1         
          #到 zookeeper 直接删除 /codis3/codis-test 的目录
          [zk: 192.168.42.102:2180(CONNECTED) 1] ls /codis3
          [codis-test, codis-demo130, codis-demo163]
          [zk: 192.168.42.102:2180(CONNECTED) 2] rmr /codis3/codis-test
          [zk: 192.168.42.102:2180(CONNECTED) 3] ls /codis3
          [codis-demo130, codis-demo163]  

          #再重新启动
            [root@localhost scripts]# ./test.sh & 

#codis-fe 的启动
     #在以上 test.sh 没有报错后,可以启动 codis-fe ,以方便从浏览器管理整个 codis-test 集群
     #tmp 目录新增 codis.json 配置文件

     [root@localhost scripts]# pwd
     /home/codis/gopath/src/github.com/CodisLabs/codis/scripts
     [root@localhost scripts]# cat tmp/codis.json
[
    {
        "name": "codis-demo163",
        "dashboard": "192.168.5.163:18080"
    }
]

     #启动 codie-fe
     [root@localhost scripts]# ../bin/codis-fe --ncpu=4 --log=./tmp/fe.log --log-level=DEBUG --assets-dir=../bin/assets --dashboard-list=./tmp/codis.json --listen=192.168.5.163:8080  &
     

     #然后能从浏览器访问到, 说明 codis-test 已经配置、启动完毕;  
     





  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值