http://www.oschina.net/p/codis
豆瓣Redis解決方案Codis安裝使用
http://blog.csdn.net/dc_726/article/details/47052607
Redis集群方案,Codis安裝測(cè)試
http://blog.csdn.net/freewebsys/article/details/44100919
Codis 使用文檔
https://github.com/wandoulabs/codis/blob/master/doc/tutorial_zh.md
http://blog.csdn.net/yanggd1987/article/details/46825895
Codis作者黃東旭細(xì)說(shuō)分布式Redis架構(gòu)設(shè)計(jì)和踩過(guò)的那些坑們
http://www.open-open.com/lib/view/open1436360508098.html
------- 安裝配置 ---------------
1.安裝golang
cd /usr/local/
wget https://storage.googleapis.com/golang/go1.4.2.linux-amd64.tar.gz
tar -zxvf go1.4.2.linux-amd64.tar.gz
2.下載codis
方法1:
cd /usr/local
git clone https://github.com/wandoulabs/codis.git
方法2:
直接到github下載穩(wěn)定版
地址:https://github.com/wandoulabs/codis/releases
解壓:tar -zxvf codis-2.0.7.tar.gz
/usr/localcodis-2.0.7更改目錄名為/usr/local/codis
3.將codis的pkg包拷貝到$GOPATH目錄。
mkdir -p /usr/local/codis/src/github.com/wandoulabs/codis
cp /usr/local/codis/pkg/ /usr/local/codis/cmd/ /usr/local/codis/src/github.com/wandoulabs/codis -R
4. 安裝編譯工具
yum groupinstall "Development Tools"
5. 執(zhí)行編譯測(cè)試腳本
cd /usr/local/codis
./bootstrap.sh
6. 設(shè)置配置文件
vi /usr/local/codis/config.ini
zk=zk1:2181,zk2:2181,zk3:2181
dashboard_addr=zk1:18087
7.啟動(dòng)dashboard
bin/codis-config dashboard
8.初始化 slots
bin/codis-config slot init
9. 添加 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