Codis:redis Cluster Solution
The Codis consists of four parts:
Codis Proxy (Codis-proxy)
Codis Manager (Codis-config)
Codis Redis (Codis-server)
ZooKeeper
1. First install the Go language to install 1.0 and previous versions
https://code.google.com/p/go/
wget https://storage.googleapis.com/golang/go1.4.2.linux-amd64.tar.gz
Tar zxvf go1.4.2.linux-amd64.tar.gz
MV go/usr/local/
Configuring Environment variables
Vi/etc/profile
Export Goroot=/usr/local/go
Export path= $PATH: $GOROOT/bin
Export Gopath=/usr/local/codis
Source/etc/profile
Perform
Go version
View version
2. Go get Codis Code
Yum-y Install git
cd/usr/local/
git clone https://github.com/wandoulabs/codis.git
#将codis的pkg包拷贝到 $GOPATH directory.
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
Perform
Cd/usr/local/codis
./bootstrap.sh installation Program
The installation test is successful and can be configured.
The compiled binaries are under the/usr/local/codis/bin directory.
You need to install zookeeper before starting Codis.
: Http://zookeeper.apache.org/releases.html#download
wget http://mirrors.cnnic.cn/apache/zookeeper/zookeeper-3.4.6/zookeeper-3.4.6.tar.gz
Tar zxvf zookeeper-3.4.6.tar.gz
MV Zookeeper-3.4.6/opt/local/zookeeper
Mkdir/opt/local/zookeeper/logs
cd/opt/local/zookeeper/conf/
CP Zoo_sample.cfg Zoo.cfg
VI zoo.cfg Modifying configuration files
Modify DataDir
Datadir=/opt/local/zookeeper/data
and increase the log
Datalogdir=/opt/local/zookeeper/logs
Start Zookeeper
/opt/local/zookeeper/bin/zkserver.sh start
# Start the Codis service before you have to start the Zookeeper,sample directory with a simple cluster configuration.
Cd/usr/local/codis/sample
VI config.ini Modify the background access port by default to localhost:18087
The startall.sh script will boot Redis at the same time.
/usr/local/codis/sample/startall.sh
http://localhost:18087/admin/Access Management page
Codis replacing a Redis cluster solution