博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
离线安装redis-cluster
阅读量:5371 次
发布时间:2019-06-15

本文共 2809 字,大约阅读时间需要 9 分钟。

#离线安装redis-clusterhttps://cache.ruby-lang.org/pub/ruby/2.4/ruby-2.4.5.tar.gz#安装rubytar xf ruby-2.4.5.tar.gzcd ruby-2.4.5/./configure  --prefix=/usr/local/rubymake && make instaecho "PATH=$PATH:/usr/local/ruby/bin/" >>/etc/profilesource /etc/profileruby -vhttps://rubygems.org/downloads/redis-4.0.3.gem#安装配置rubygems的redisapicd /usr/local/src/gem install -l  redis-4.0.3.gem gem list redishttps://sourceforge.net/projects/tcl/files/Tcl/8.6.0/#安装tclunzip tcl868-src.zipcd tcl8.6.8/unix/./configure --prefix=/usr/local/tclmake && make installmake install-private-headersecho "PATH=$PATH/usr/local/tcl/bin/" >>/etc/profile. /etc/profilehttp://download.redis.io/releases/redis-4.0.11.tar.gz#安装redistar xf redis-4.0.11.tar.gz cd redis-4.0.11/make PREFIX=/usr/local/redis installcp   /usr/local/src/redis-4.0.11/src/redis-trib.rb   /usr/local/redis/bin/

 

#redis配置

bind 0.0.0.0port 7000tcp-backlog 511timeout 300tcp-keepalive 300daemonize yessupervised nopidfile "/var/run/redis_7000.pid"loglevel noticelogfile "/var/log/redis_7000.log"databases 16stop-writes-on-bgsave-error yesrdbcompression yesrdbchecksum yesdbfilename dump.rdbdir /tmp/slave-serve-stale-data yesslave-read-only yesrepl-diskless-sync norepl-diskless-sync-delay 5repl-disable-tcp-nodelay noslave-priority 100appendonly noappendfilename "appendonly.aof"appendfsync everysecno-appendfsync-on-rewrite noauto-aof-rewrite-percentage 100auto-aof-rewrite-min-size 64mbaof-load-truncated yeslua-time-limit 5000cluster-enabled yescluster-config-file nodes-7000.confcluster-node-timeout 15000slowlog-log-slower-than 10000slowlog-max-len 512latency-monitor-threshold 0notify-keyspace-events ""hash-max-ziplist-entries 512hash-max-ziplist-value 64list-max-ziplist-size -2list-compress-depth 0set-max-intset-entries 512zset-max-ziplist-entries 128zset-max-ziplist-value 64hll-sparse-max-bytes 3000activerehashing yesclient-output-buffer-limit normal 0 0 0client-output-buffer-limit slave 256mb 64mb 60client-output-buffer-limit pubsub 32mb 8mb 60hz 10aof-rewrite-incremental-fsync yes

 

for i in 700{
1..5};do cp redis_7000.conf redis_${i}.conf;sed -i "s#7000#${i}#g" redis_${i}.conf;done[root@serverscripts]#ll /usr/local/redis/conf/total 24-rw-r--r-- 1 root root 1271 Nov 6 13:34 redis_7000.conf-rw-r--r-- 1 root root 1271 Nov 6 13:35 redis_7001.conf-rw-r--r-- 1 root root 1271 Nov 6 13:35 redis_7002.conf-rw-r--r-- 1 root root 1271 Nov 6 13:35 redis_7003.conf-rw-r--r-- 1 root root 1271 Nov 6 13:35 redis_7004.conf-rw-r--r-- 1 root root 1271 Nov 6 13:35 redis_7005.conf#启动for i in `ls ./`;do /usr/local/redis/bin/redis-server ./$i;done#创建集群/usr/local/redis/bin/redis-trib.rb create --replicas 1 10.0.0.100:7000 10.0.0.100:7001 10.0.0.100:7002 c 10.0.0.100:7003 10.0.0.100:7004 10.0.0.100:7005

 

转载于:https://www.cnblogs.com/zhangb8042/p/9914843.html

你可能感兴趣的文章
c# 对SOAP返回XML字符串的解析方法
查看>>
线程Thread
查看>>
最长公共子串_暴力解法(不会正解)36行
查看>>
摆棋子
查看>>
冲刺二------个人任务
查看>>
[HIve - LanguageManual] Joins
查看>>
unity里的c#
查看>>
UMLl类图实例
查看>>
java随机汉字生成
查看>>
Win7 “Bluetooth设置”对话框无法打开,及无法查找到设备
查看>>
"Coding Interview Guide" -- 在行列都排好序的矩阵中找数
查看>>
Maven与Antx(整理)
查看>>
洛谷P1082同余方程
查看>>
CSS中怎么让DIV居中
查看>>
windows配置jenkins编码
查看>>
关于服务器程序运行中收到SIGPIPE(转)
查看>>
npm 安装Vue环境时报错
查看>>
[jQuery插件]Pause 暂停
查看>>
CegoAdm 1.4.0 发布,Cego 管理工具
查看>>
LeetCode 327.Count of Range Sum
查看>>