一.yum 安装时错误 Errno 14 Couldn't resolve host 解决办法
修改一下 /etc/resolv.conf添加一个nameserver 8.8.8.8完成
二.gem install redis时报错
- yum install curl
- curl -L get.rvm.io | bash -s stable
三.安装RVM失败: public key not found
$ curl -L get.rvm.io | bash -s stable --ruby
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 184 100 184 0 0 30 0 0:00:06 0:00:06 --:--:-- 40
100 22721 100 22721 0 0 1845 0 0:00:12 0:00:12 --:--:-- 6170
Downloading https://github.com/rvm/rvm/archive/1.26.11.tar.gz
Downloading https://github.com/rvm/rvm/releases/download/1.26.11/1.26.11.tar.gz.asc
gpg: Signature made Tue 31 Mar 2015 05:52:13 CST using RSA key ID BF04FF17
gpg: Can't check signature: public key not found
Warning, RVM 1.26.0 introduces signed releases and automated check of signatures when GPG software
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
解决方法是:
1.$ gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
2.gpg: requesting key D39DC0E3 from hkp server keys.gnupg.net
3.gpg: /home/charles/.gnupg/trustdb.gpg: trustdb created
4.gpg: key D39DC0E3: public key "Michal Papis (RVM signing) <mpapis@gmail.com>" imported
5.gpg: no ultimately trusted keys found
6.gpg: Total number processed: 1
7.gpg: imported: 1 (RSA: 1)
然后重新执行: curl -L get.rvm.io | bash -s stable --ruby
四.继续第二步骤的后续操作:
3. source /usr/local/rvm/scripts/rvm
4.查看rvm库中已知的ruby版本
rvm list known
5.安装一个ruby版本
rvm install 2.3.3
6.使用一个ruby版本
rvm use 2.3.3
7.卸载一个已知版本
rvm remove 2.0.0
8.查看版本
ruby --version
9.再安装redis
gem install redis
五.配置文件中修改的几个地方:
port 7000
cluster-enabled yes
cluster-config-file nodes.conf
cluster-node-timeout 5000
appendonly yes
daemonize yes
databases 1
protected-mode no
Sorry, can't connect to node 192.168.8.136:7001
配置文件里面设置bind为当前的ip地址, 将bind 127.0.0.1这行注释掉
redis01/redis-cli -p 7002 -c
Could not connect to Redis at 127.0.0.1:7002: Connection refused
配置为bind 127.0.0.1 192.168.8.136这样配置后远程可以连接redis01/redis-cli 192.168.8.136 -p 7002 但是-c参数无效,报(error) ERR unknown command '-c'
配置错误的话jedis连接报错:JedisClusterMaxRedirectionsException: Too many Cluster redirections?
配置#bind 127.0.0.1
#bind 192.168.8.136