codis linux 部署

1.zookeeper 采用 jstorm中已使用的集群

2.GO语言安装

下载安装包:go1.4.1.linux-amd64.tar

tar -xvf go1.4.1.linux-amd64.tar


/etc/profile

export GOROOT=/usr/local/go

export PATH=$GOROOT/bin:$PATH

export GOPATH=/home/xxxx/tools/go


go -version


go get -u -d github.com/wandoulabs/codis


$GOPATH/src/github.com/wandoulabs/codis make时间比较长。耐心等待


安装完成


启动步骤


1.启动 dashboard

执行 bin/codis-config dashboard, 该命令会启动 dashboard

2.初始化 slots

执行 bin/codis-config slot init,该命令会在zookeeper上创建slot相关信息

3.启动 Codis Redis

和官方的Redis Server参数一样

4.添加 Redis Server Group

bin/codis-config server add 1 localhost:6379 master

bin/codis-config server add 1 localhost:6380 slave

bin/codis-config server add 2 localhost:6479 master

bin/codis-config server add 2 localhost:6480 slave

5.设置 server group 服务的 slot 范围

bin/codis-config slot range-set 0 511 1 online

bin/codis-config slot range-set 512 1023 2 online

6.启动 codis-proxy

bin/codis-proxy -c config.ini -L ./log/proxy.log --cpu=8 --addr=0.0.0.0:19000 --http-addr=0.0.0.0:11000

bin/codis-config -c config.ini proxy online <proxy_name> <---- proxy的id, 如 proxy_1

7.访问http://localhost:18087/admin


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值