linux下redis集群安装

来源:转载


一、编译安装redis

tar -xzvf redis-3.0.4.tar.gzcd redis-3.0.4makemake PREFIX=/usr/local/redis installcp –r src /usr/local/redismkdir /usr/local/redis/data



二、复制配置文件到/usr/local/redis

安装集群依赖

rpm -ivh http://yum.puppetlabs.com/el/5/products/x86_64/puppetlabs-release-5-6.noarch.rpmyum install ruby ruby-devel rubygems rpm-buildgem install redis

三、启动各个节点

/usr/local/redis/bin/redis-server /usr/local/redis/redis.conf > /usr/local/redis/redis-6380.log 2>&1 & 

四、构建节点

redis-trib.rb create --replicas 1 172.16.1.33:6379 172.16.1.35:6379 172.16.1.36:6379 172.16.1.37:6379 172.16.1.38:6379 172.16.1.39:6379




分享给朋友:
您可能感兴趣的文章:
随机阅读: