【CentOS】make cc Command not found,make: *** [adlist.o] Error 127”
参考:https://blog.csdn.net/wzygis/article/details/51705559
https://blog.csdn.net/cn_wk/article/details/50244673
问题:Hint: It's a good idea to run 'make test' ;)
INSTALL install
INSTALL install
INSTALL install
INSTALL install
INSTALL install
make[1]: Leaving directory `/usr/local/redis/src'
解决
参考:
https://blog.csdn.net/testcs_dn/article/details/39756477
参考:
http://blog.mayongfa.cn/258.html
https://www.cnblogs.com/mafly/p/redis_cluster.html
创建集群
由于 Redis 集群需要使用 ruby 命令,所以我们需要安装 ruby 和相关接口。
yum install ruby
yum install rubygems
gem install redis
redis操作指令
注意事项:
Redis报错:WRONGTYPE Operation against a key holding the wrong kind of value 解决处理
hkeys ifs....
./redis-cli -h 192.25.106.44 -p 7111 -a 'hsstr.COM'
$ redis-cli -h host -p port -a password
redis 集群链接:
redis-cli -c -h host -p port -a password
redis重启
netstat -tnlp|grep 6389
pwdx 29315 查找pid进程所在的程序路径
kill 29315
python 连接异常
redis.exceptions.ResponseError: CLUSTERDOWN The cluster is down
如果是用apt-get
或者yum install
安装的redis,可以直接通过下面的命令停止/启动/重启redis
/etc/init.d/redis-server stop
/etc/init.d/redis-server start
/etc/init.d/redis-server restart
如果是通过源码安装的redis,则可以通过redis的客户端程序redis-cli
的shutdown
命令来重启redis
redis-cli -h 127.0.0.1 -p 6379 shutdown
如果上述方式都没有成功停止redis,则可以使用终极武器 kill -9
/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- redis (LoadError)
from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require'
from ./redis-trib.rb:25:in `<main>'
解答:https://blog.csdn.net/Hello_World_QWP/article/details/78260684
gem install 报错(手动下载,gem install)
解决方法:https://blog.csdn.net/qqxyy99/article/details/78962846
创建集群失败
解答:设置了密码,删除密码即可
创建集群一直处在创建中。。。
Nodes configuration updated
>>> Assign a different config epoch to each node
>>> Sending CLUSTER MEET messages to join the cluster
Waiting for the cluster to join
问题:
参考:https://www.cnblogs.com/huxinga/p/6644226.html
https://www.cnblogs.com/huxinga/p/6644226.html
./redis-trib.rb create --replicas 1 192.168.5.130:7001 192.168.5.130:7002 192.168.5.130:7003 192.168.5.129:7004 192.168.5.129:7005 192.168.5.129:7006 ./redis-server /usr/local/redis-cluster/7001/redis.conf ./redis-server /usr/local/redis-cluster/7002/redis.conf ./redis-server /usr/local/redis-cluster/7003/redis.conf ./redis-server /usr/local/redis-cluster/7004/redis.conf ./redis-server /usr/local/redis-cluster/7005/redis.conf ./redis-server /usr/local/redis-cluster/7006/redis.conf
创建键值的时候报错
解答:全局连接redis
仔细观察能够注意到,redis-cli根据指示,不断在7000和7002结点之前重定向跳转。如果启动时不加-c选项的话,就能看到以错误形式显示出的MOVED重定向消息。 [root@8gVm redis-3.0.4]# src/redis-cli -h 192.168.5.130 -p 7001 192.168.5.130:7001> get foo (error) MOVED 7252 192.168.5.129:7004
参考文章:https://www.cnblogs.com/mafly/p/redis_cluster.html
http://blog.mayongfa.cn/258.html
单机部署redis
https://www.linuxidc.com/Linux/2017-03/141403.htm
https://blog.csdn.net/nxx_168/article/details/7381404
ruby 离线安装详情:http://www.cnblogs.com/xuliangxing/p/7132656.html?utm_source=itdadao&utm_medium=referral
redis集群报错:
### Cause: redis.clients.jedis.exceptions.JedisNoReachableClusterNodeException: No reachable node in cluster
由于磁盘上已经有数据: