Codis replacing a Redis cluster solution

Source: Internet
Author: User
Tags redis cluster

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.