目标(本文达成的结果,配对关系可能会变):

先在131上进行操作

1.下载redis

http://download.redis.io/releases/redis-5.0.2.tar.gz

2.解压

[testapp@k8s-node2 ~]$ mkdir redis

[testapp@k8s-node2 ~]$ cd redis

上传文件

[testapp@k8s-node2 ~/redis]$ tar -zxvf redis-5.0.2.tar.gz

3.修改/usr/local/bin/权限

su - root

chmod 777 /usr/local/bin/

su - testapap

建立文件夹

[testapp@k8s-node2 ~/redis]$ mkdir redis_cluster

[testapp@k8s-node2 ~/redis]$ mkdir logs

[testapp@k8s-node2 ~/redis]$ touch logs/redis_run.logs

[testapp@k8s-node2 ~/redis]$ cp /redis-5.0./redis.conf .
[testapp@k8s-node1 ~/redis]$ ll
总用量
drwxrwxr-x testapp testapp 8月 : logs
drwxrwxr-x testapp testapp 11月 redis-5.0.
-rw-rw-r-- testapp testapp 8月 : redis-5.0..tar.gz
drwxrwxr-x testapp testapp 8月 : redis_cluster

[testapp@k8s-node1 ~/redis]$ pwd
/home/ap/testapp/redis

 

4.修改配置文件

port 6380 //端口(从节点使用6381端口)

#bind 127.0.0.1 //需要注释掉该配置

daemonize yes //redis后台运行

logfile “/home/ap/testapp/redis/logs/redis_run.log”//配置redis日志路径

pidfile /home/ap/testapp/redis/redis_cluster/redis_6380.pid //redis的进程文件

appendonly yes //aof日志开启 有需要就开启,它会每次写操作都记录一条日志 

dir /home/ap/testapp/redis/redis_cluster/ //数据库备份的文件放置的路径

Protected-mode no //是否开启保护模式

cluster-enabled yes //开启集群 把注释#去掉

cluster-config-file /home/ap/testappl/redis/redis_cluster/nodes_6380.conf //集群的配置

cluster-node-timeout 15000 //请求超时 默认15秒,可自行设置

5.安装

cd redis-5.0.2

make && make install

6.启动

/home/ap/testapp/redis/redis-5.0.2/src/redis-server /home/ap/testapp/redis/redis_cluster/redis.conf

ps -ef | grep redis

7.关闭防墙

systemctl status firewalld //查看防火墙状态
systemctl is-enabled firewalld //查看开机是否启动防火墙服务
systemctl stop firewalld //关闭防火墙
systemctl disable firewalld //禁用防火墙(系统启动时不启动防火墙服务)

8.组成集群

关闭6380

/home/ap/testapp/software/redis/redis-5.0.2/src/redis-cli -c -p 6380 shutdown

配置集群conf

cp redis.conf redis6380.conf

cp redis.conf redis6381.conf ##并更改内容中6380 为6381

cp redis.conf redis6382.conf ##并更改内容中6380 为6382

rm redis.conf

依次启动6380 6381 6382

/home/ap/testapp/redis/redis-5.0.2/src/redis-server /home/ap/testapp/redis/redis_cluster/redis6380.conf

/home/ap/testapp/redis/redis-5.0.2/src/redis-server /home/ap/testapp/redis/redis_cluster/redis6381.conf

/home/ap/testapp/redis/redis-5.0.2/src/redis-server /home/ap/testapp/redis/redis_cluster/redis6382.conf

再在192.168.111.132重复1--8

组成集群

/home/ap/testapp/software/redis/redis-5.0.2/src/redis-cli --cluster create 192.168.111.131:6380 192.168.111.131:6381 192.168.111.131:6382 192.168.111.132:6380 192.168.111.132:6381 192.168.111.132:6382 --cluster-replicas 1

[testapp@k8s-node1 ~/redis/redis_cluster]$ /home/ap/testapp/redis/redis-5.0./src/redis-cli --cluster create  192.168.111.131: 192.168.111.131: 192.168.111.131: 192.168.111.132: 192.168.111.132: 192.168.111.132: --cluster-replicas
>>> Performing hash slots allocation on nodes...
Master[] -> Slots -
Master[] -> Slots -
Master[] -> Slots -
Adding replica 192.168.111.132: to 192.168.111.131:
Adding replica 192.168.111.131: to 192.168.111.132:
Adding replica 192.168.111.132: to 192.168.111.131:
M: 078d0050ee8502ac2e21fd26b63924d5fca1c384 192.168.111.131:6380
slots:[0-5460] (5461 slots) master
M: f1b97d85a94a309b9c67e6b50104cc2e6c2be6b3 192.168.111.131:6381
slots:[10923-16383] (5461 slots) master
S: c8952a45cf7019bb1dfd8f8e029dc3415d65b214 192.168.111.131:
replicates a799a7cf8c7a14bbc72f7411322895e0ff3d4952
M: a799a7cf8c7a14bbc72f7411322895e0ff3d4952 192.168.111.132:6380
slots:[5461-10922] (5462 slots) master
S: 301acfbb7929a0416911f892efadfad8a5bf38f9 192.168.111.132:
replicates 078d0050ee8502ac2e21fd26b63924d5fca1c384
S: b56997d7fbbe5df8257733c3ad017edbeb4bdaff 192.168.111.132:
replicates f1b97d85a94a309b9c67e6b50104cc2e6c2be6b3
Can I set the above configuration? (type 'yes' to accept): yes ##输入yes
>>> 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
......
>>> Performing Cluster Check (using node 192.168.111.131:)
M: 078d0050ee8502ac2e21fd26b63924d5fca1c384 192.168.111.131:
slots:[-] ( slots) master
additional replica(s)
S: b56997d7fbbe5df8257733c3ad017edbeb4bdaff 192.168.111.132:
slots: ( slots) slave
replicates f1b97d85a94a309b9c67e6b50104cc2e6c2be6b3
S: c8952a45cf7019bb1dfd8f8e029dc3415d65b214 192.168.111.131:
slots: ( slots) slave
replicates a799a7cf8c7a14bbc72f7411322895e0ff3d4952
M: a799a7cf8c7a14bbc72f7411322895e0ff3d4952 192.168.111.132:
slots:[-] ( slots) master
additional replica(s)
M: f1b97d85a94a309b9c67e6b50104cc2e6c2be6b3 192.168.111.131:
slots:[-] ( slots) master
additional replica(s)
S: 301acfbb7929a0416911f892efadfad8a5bf38f9 192.168.111.132:
slots: ( slots) slave
replicates 078d0050ee8502ac2e21fd26b63924d5fca1c384
[OK] All nodes agree about slots configuration.
>>> Check for open slots...
>>> Check slots coverage...
[OK] All slots covered.
[testapp@k8s-node1 ~/software/redis/redis_cluster]$

成功搞定

[testapp@k8s-node1 ~/software/redis/redis_cluster]$ ll
总用量
-rw-rw-r-- testapp testapp 8月 : appendonly.aof
-rw-r--r-- testapp testapp 8月 : dump.rdb
-rw-rw-r-- testapp testapp 8月 : flushCluster.sh
-rw-r--r-- testapp testapp 8月 : nodes-.conf
-rw-r--r-- testapp testapp 8月 : nodes-.conf
-rw-r--r-- testapp testapp 8月 : nodes-.conf
-rw-rw-r-- testapp testapp 8月 : redis6380.conf
-rw-rw-r-- testapp testapp 8月 : redis_6380.pid
-rw-rw-r-- testapp testapp 8月 : redis6381.conf
-rw-rw-r-- testapp testapp 8月 : redis_6381.pid
-rw-rw-r-- testapp testapp 8月 : redis6382.conf
-rw-rw-r-- testapp testapp 8月 : redis_6382.pid
[testapp@k8s-node1 ~/software/redis/redis_cluster]$ pwd
/home/ap/testapp/software/redis/redis_cluster
[testapp@k8s-node1 ~/software/redis/redis_cluster]$

如果失败(重试时报Node xxx is not empty)可以用下面脚本来清除后再试

[testapp@k8s-node1 ~/redis/redis_cluster]$ cat flushCluster.sh
##判断参数
if [ $# -eq ]
then
echo -e "usage: sh $0 ip \nexit!!"
exit
fi ##删除文件
rm /home/ap/testapp/redis/redis_cluster/appendonly.aof /home/ap/testapp/redis/redis_cluster/dump.rdb /home/ap/testapp/redis/redis_cluster/nodes-*.conf
echo "remove appendonly.aof dump.rdb nodes-*.conf,but will be re-created once restart done" ##清除redsi库 for port in
do ##清除redsi库
/home/ap/testapp/redis/redis-5.0./src/redis-cli -c -h $ -p ${port} <<EOF >/dev/null
flushdb
cluster reset
exit
/
EOF echo "reflushdb redis $1:$port finished"
##关闭服务
/home/ap/testapp/redis/redis-5.0./src/redis-cli -c -p ${port} shutdown
echo "shut down redis service on $1:$port finished" ##启动服务
/home/ap/testapp/redis/redis-5.0./src/redis-server /home/ap/testapp/redis/redis_cluster/redis${port}.conf
echo "start redis service on $1:$port finished"
done echo "all port restart finished"

9.为集群中的每一个节点设置密码

编写批量启动脚本

[testapp@k8s-node1 ~/redis/redis_cluster]$ pwd
/home/ap/testapp/redis/redis_cluster
[testapp@k8s-node1 ~/redis/redis_cluster]$ ll
总用量
-rw-rw-r-- testapp testapp 8月 : appendonly.aof
-rw-r--r-- testapp testapp 8月 : dump.rdb
-rw-rw-r-- testapp testapp 8月 : flushCluster.sh
-rw-r--r-- testapp testapp 8月 : nodes-.conf
-rw-r--r-- testapp testapp 8月 : nodes-.conf
-rw-r--r-- testapp testapp 8月 : nodes-.conf
-rw-rw-r-- testapp testapp 8月 : redis6380.conf
-rw-rw-r-- testapp testapp 8月 : redis_6380.pid
-rw-rw-r-- testapp testapp 8月 : redis6381.conf
-rw-rw-r-- testapp testapp 8月 : redis_6381.pid
-rw-rw-r-- testapp testapp 8月 : redis6382.conf
-rw-rw-r-- testapp testapp 8月 : redis_6382.pid
-rw-rw-r-- testapp testapp 8月 : startAll.sh
-rw-rw-r-- testapp testapp 8月 : stopAll.sh
[testapp@k8s-node1 ~/software/redis/redis_cluster]$ cat startAll.sh
/home/ap/testapp/software/redis/redis-5.0./src/redis-server /home/ap/testapp/redis/redis_cluster/redis6380.conf
/home/ap/testapp/software/redis/redis-5.0./src/redis-server /home/ap/testapp/redis/redis_cluster/redis6381.conf
/home/ap/testapp/software/redis/redis-5.0./src/redis-server /home/ap/testapp/redis/redis_cluster/redis6382.conf [testapp@k8s-node1 ~/software/redis/redis_cluster]$ cat stopAll.sh
/home/ap/testapp/redis/redis-5.0./src/redis-cli -c -p shutdown
/home/ap/testapp/redis/redis-5.0./src/redis-cli -c -p shutdown
/home/ap/testapp/redis/redis-5.0./src/redis-cli -c -p shutdown [testapp@k8s-node1 ~/redis/redis_cluster]$

修改每个redis638*.conf

masterauth <master-password>  改为  masterauth test@123

requirepass foobared   改为 requirepass test@123

一向比较懒的我

[testapp@k8s-node2 ~/redis/redis_cluster]$  sed 's/# masterauth <master-password>/masterauth test@123/g' redis638*.conf|grep test@123 ##尝试修改,并显示结果
masterauth test@
masterauth test@
masterauth test@
[testapp@k8s-node2 ~/software/redis/redis_cluster]$ sed -i 's/# masterauth <master-password>/masterauth test@123/g' redis638*.conf ##加-i表示真正修改源文件

同理

[testapp@k8s-node2 ~/redis/redis_cluster]$  sed  's/# requirepass foobared/requirepass test@123/g' redis638*.conf|grep test@
masterauth test@
requirepass test@
masterauth test@
requirepass test@
masterauth test@
requirepass test@
[testapp@k8s-node2 ~/redis/redis_cluster]$ sed -i 's/# requirepass foobared/requirepass test@123/g' redis638*.conf

验证

[testapp@k8s-node2 ~/software/redis/redis_cluster]$ grep test@ redis638*.conf
redis6380.conf:masterauth test@
redis6380.conf:requirepass test@
redis6381.conf:masterauth test@
redis6381.conf:requirepass test@
redis6382.conf:masterauth test@
redis6382.conf:requirepass test@

然后重启

sh stopAll.sh

sh startAll.sh

[testapp@k8s-node2 ~/redis/redis_cluster]$ sh stopAll.sh
[testapp@k8s-node2 ~/redis/redis_cluster]$ sh startAll.sh
[testapp@k8s-node2 ~/redis/redis_cluster]$ ps -ef|grep redis
testapp : ? :: /home/ap/testapp/redis/redis-5.0./src/redis-server *: [cluster]
testapp : ? :: /home/ap/testapp/redis/redis-5.0./src/redis-server *: [cluster]
testapp : ? :: /home/ap/testapp/redis/redis-5.0./src/redis-server *: [cluster]
testapp : pts/ :: grep --color=auto redis
[testapp@k8s-node2 ~/software/redis/redis_cluster]$ pwd
/home/ap/testapp/software/redis/redis_cluster
[testapp@k8s-node2 ~/software/redis/redis_cluster]$

验证,不输入密码,报NOAUTH Authentication required

9.1集群相关信息查看

9.1.1集群状态

redis-cli -h ip -p 9379 -a password cluster info
9.1.2.集群节点信息
redis-cli -h ip -p 9379 -a password cluster nodes
9.1.3.节点内存、cpu、key数量等信息(每个节点都需查看)
redis-cli -h ip -p 9379 -a password info
9.1.4.从redis集群中查看key(只需要连接master节点查看)
a.查看该节点的所有key
redis-cli -h ip -p 9379 -a password keys *
b.查看key的value值
redis-cli -h ip -p 9379 -a password -c get key
c.查看key值得有效期
redis-cli -h ip -p 9379 -a password -c ttl key

[testapp@k8s-node1 ~/software/redis/redis_cluster]$ /home/ap/testapp/software/redis/redis-5.0./src/redis-cli -c -h 192.168.111.131 -p   cluster info ##查看集群信息
NOAUTH Authentication required.
[testapp@k8s-node1 ~/software/redis/redis_cluster]$ /home/ap/testapp/software/redis/redis-5.0./src/redis-cli -c -h 192.168.111.131 -p -a test@ cluster info
Warning: Using a password with '-a' or '-u' option on the command line interface may not be safe.
cluster_state:ok
cluster_slots_assigned:
cluster_slots_ok:
cluster_slots_pfail:
cluster_slots_fail:
cluster_known_nodes:
cluster_size:
cluster_current_epoch:
cluster_my_epoch:
cluster_stats_messages_ping_sent:
cluster_stats_messages_pong_sent:
cluster_stats_messages_sent:
cluster_stats_messages_ping_received:
cluster_stats_messages_pong_received:
cluster_stats_messages_received:
[testapp@k8s-node1 ~/software/redis/redis_cluster]$ /home/ap/testapp/software/redis/redis-5.0./src/redis-cli -c -h 192.168.111.131 -p -a test@ cluster nodes ##查看集群结点信息
Warning: Using a password with '-a' or '-u' option on the command line interface may not be safe.
301acfbb7929a0416911f892efadfad8a5bf38f9 192.168.111.132:@ slave 078d0050ee8502ac2e21fd26b63924d5fca1c384 connected
b56997d7fbbe5df8257733c3ad017edbeb4bdaff 192.168.111.132:@ slave f1b97d85a94a309b9c67e6b50104cc2e6c2be6b3 connected
f1b97d85a94a309b9c67e6b50104cc2e6c2be6b3 192.168.111.131:@ master - connected -
078d0050ee8502ac2e21fd26b63924d5fca1c384 192.168.111.131:@ myself,master - connected -
c8952a45cf7019bb1dfd8f8e029dc3415d65b214 192.168.111.131:@ slave a799a7cf8c7a14bbc72f7411322895e0ff3d4952 connected
a799a7cf8c7a14bbc72f7411322895e0ff3d4952 192.168.111.132:@ master - connected -
[testapp@k8s-node1 ~/software/redis/redis_cluster]$
[testapp@k8s-node1 ~/software/redis/redis_cluster]$ /home/ap/testapp/software/redis/redis-5.0./src/redis-cli -c -h 192.168.111.131 -p -a test@ info ##查看节点节点内存、cpu、key数量等信息
Warning: Using a password with '-a' or '-u' option on the command line interface may not be safe.
# Server
redis_version:5.0.
redis_git_sha1:
redis_git_dirty:
redis_build_id:c55a3c91ae2e868
redis_mode:cluster
os:Linux 3.10.-.el7.x86_64 x86_64
arch_bits:
multiplexing_api:epoll
atomicvar_api:atomic-builtin
gcc_version:4.8.
process_id:
run_id:bde9ca1163e34126efb47de9ee76c589dd979b89
tcp_port:
uptime_in_seconds:
uptime_in_days:
hz:
configured_hz:
lru_clock:
executable:/home/ap/testapp/software/redis/redis-5.0./src/redis-server
config_file:/home/ap/testapp/software/redis/redis_cluster/redis6380.conf # Clients
connected_clients:
client_recent_max_input_buffer:
client_recent_max_output_buffer:
blocked_clients: # Memory
used_memory:
used_memory_human:2.28M
used_memory_rss:
used_memory_rss_human:7.67M
used_memory_peak:
used_memory_peak_human:2.28M
used_memory_peak_perc:100.05%
used_memory_overhead:
used_memory_startup:
used_memory_dataset:
used_memory_dataset_perc:6.49%
allocator_allocated:
allocator_active:
allocator_resident:
total_system_memory:
total_system_memory_human:972.55M
used_memory_lua:
used_memory_lua_human:.00K
used_memory_scripts:
used_memory_scripts_human:0B
number_of_cached_scripts:
maxmemory:
maxmemory_human:0B
maxmemory_policy:noeviction
allocator_frag_ratio:1.09
allocator_frag_bytes:
allocator_rss_ratio:2.47
allocator_rss_bytes:
rss_overhead_ratio:1.20
rss_overhead_bytes:
mem_fragmentation_ratio:3.45
mem_fragmentation_bytes:
mem_not_counted_for_evict:
mem_replication_backlog:
mem_clients_slaves:
mem_clients_normal:
mem_aof_buffer:
mem_allocator:jemalloc-5.1.
active_defrag_running:
lazyfree_pending_objects: # Persistence
loading:
rdb_changes_since_last_save:
rdb_bgsave_in_progress:
rdb_last_save_time:
rdb_last_bgsave_status:ok
rdb_last_bgsave_time_sec:
rdb_current_bgsave_time_sec:-
rdb_last_cow_size:
aof_enabled:
aof_rewrite_in_progress:
aof_rewrite_scheduled:
aof_last_rewrite_time_sec:-
aof_current_rewrite_time_sec:-
aof_last_bgrewrite_status:ok
aof_last_write_status:ok
aof_last_cow_size:
aof_current_size:
aof_base_size:
aof_pending_rewrite:
aof_buffer_length:
aof_rewrite_buffer_length:
aof_pending_bio_fsync:
aof_delayed_fsync: # Stats
total_connections_received:
total_commands_processed:
instantaneous_ops_per_sec:
total_net_input_bytes:
total_net_output_bytes:
instantaneous_input_kbps:0.02
instantaneous_output_kbps:0.00
rejected_connections:
sync_full:
sync_partial_ok:
sync_partial_err:
expired_keys:
expired_stale_perc:0.00
expired_time_cap_reached_count:
evicted_keys:
keyspace_hits:
keyspace_misses:
pubsub_channels:
pubsub_patterns:
latest_fork_usec:
migrate_cached_sockets:
slave_expires_tracked_keys:
active_defrag_hits:
active_defrag_misses:
active_defrag_key_hits:
active_defrag_key_misses: # Replication
role:master
connected_slaves:
slave0:ip=192.168.111.132,port=,state=online,offset=,lag=
master_replid:bb5feffa6c709a7daac8fe92e722e85f067da375
master_replid2:
master_repl_offset:
second_repl_offset:-
repl_backlog_active:
repl_backlog_size:
repl_backlog_first_byte_offset:
repl_backlog_histlen: # CPU
used_cpu_sys:1.147768
used_cpu_user:0.126526
used_cpu_sys_children:0.085297
used_cpu_user_children:0.000000 # Cluster
cluster_enabled: # Keyspace

9.2 redis.config配置

查看文件中生效配置,即非空非注释行

[testapp@k8s-node2 ~/redis/redis_cluster]$ grep -v "^#" redis6380.conf|grep -v "^$"
protected-mode no
port
tcp-backlog
timeout
tcp-keepalive
daemonize yes
supervised no
pidfile /home/ap/testapp/redis/redis_cluster/redis_6380.pid
loglevel notice
logfile "/home/ap/testapp/redis/logs/redis_run.log"
databases
always-show-logo yes
save
save
save
stop-writes-on-bgsave-error yes
rdbcompression yes
rdbchecksum yes
dbfilename dump.rdb
dir /home/ap/testapp/redis/redis_cluster
masterauth test@
replica-serve-stale-data yes
replica-read-only yes
repl-diskless-sync no
repl-diskless-sync-delay
repl-disable-tcp-nodelay no
replica-priority
requirepass test@
lazyfree-lazy-eviction no
lazyfree-lazy-expire no
lazyfree-lazy-server-del no
replica-lazy-flush no
appendonly yes
appendfilename "appendonly.aof"
appendfsync everysec
no-appendfsync-on-rewrite no
auto-aof-rewrite-percentage
auto-aof-rewrite-min-size 64mb
aof-load-truncated yes
aof-use-rdb-preamble yes
lua-time-limit
cluster-enabled yes
cluster-config-file /home/ap/testapp/redis/redis_cluster/nodes-.conf
cluster-node-timeout
slowlog-log-slower-than
slowlog-max-len
latency-monitor-threshold
notify-keyspace-events ""
hash-max-ziplist-entries
hash-max-ziplist-value
list-max-ziplist-size -
list-compress-depth
set-max-intset-entries
zset-max-ziplist-entries
zset-max-ziplist-value
hll-sparse-max-bytes
stream-node-max-bytes
stream-node-max-entries
activerehashing yes
client-output-buffer-limit normal
client-output-buffer-limit replica 256mb 64mb
client-output-buffer-limit pubsub 32mb 8mb
hz
dynamic-hz yes
aof-rewrite-incremental-fsync yes
rdb-save-incremental-fsync yes
[testapp@k8s-node2 ~/redis/redis_cluster]$

9.3持久化相关的配置

rdb快照模式

save 900 1
save 300 10
save 60 10000
stop-writes-on-bgsave-error yes
rdbcompression yes
rdbchecksum yes
dbfilename dump.rdb
rdb-save-incremental-fsync yes

AOF增量日志模式
appendonly yes
appendfilename "appendonly.aof"
appendfsync everysec
no-appendfsync-on-rewrite no
auto-aof-rewrite-percentage 100
auto-aof-rewrite-min-size 64mb
aof-load-truncated yes
aof-use-rdb-preamble yes
aof-rewrite-incremental-fsync yes
 

10 集群使用

192.168.111.132:6380中加入keyhello值
[testapp@k8s-node1 ~/redis/redis_cluster]$ /home/ap/testapp/redis/redis-5.0./src/redis-cli -c -h 192.168.111.131 -p  -a test@
Warning: Using a password with '-a' or '-u' option on the command line interface may not be safe.
192.168.111.131:> set keyhello valueworld
-> Redirected to slot [] located at 192.168.111.132:
OK
192.168.111.132:> keys *
) "keyhello"
192.168.111.132:> exit
192.168.111.131:6381加入keyhello131-6381
[testapp@k8s-node2 ~/redis/redis_cluster]$ /home/ap/testapp/redis/redis-5.0./src/redis-cli -c -h 192.168.111.131 -p  -a test@
Warning: Using a password with '-a' or '-u' option on the command line interface may not be safe.
192.168.111.131:> keys *
(empty list or set)
192.168.111.131:> set keyhello1316381 worldhaha
-> Redirected to slot [] located at 192.168.111.131:
OK
192.168.111.131:> keys
(error) ERR wrong number of arguments for 'keys' command
192.168.111.131:> keys *
) "keyhello1316381"
192.168.111.131:> exit
[testapp@k8s-node2 ~/software/redis/redis_cluster]$

客户端查看

11 问题及解决

https://blog.csdn.net/wenwen360360/article/details/70162169

Linux安装redis时报gcc:未找到命令错误

https://blog.csdn.net/weixin_38109191/article/details/81531086

tar解压出错:gzip: stdin: unexpected end of file的解决

Hint: It's a good idea to run 'make test' ;)

INSTALL install
install: 无法创建普通文件"/usr/local/bin/redis-server": 权限不够
make[1]: *** [install] 错误 1
make[1]: 离开目录“/home/ap/testapp/software/redis/redis-5.0.2/src”
make: *** [install] 错误 2
[testapp@k8s-node1 ~/software/redis/redis-5.0.2]$ ll

[testapp@k8s-node1 /usr/local]$ su - root
密码:
上一次登录:三 8月 :: CST 2019pts/ 上
[root@k8s-node1 ~]# chmod -R /usr/local/bin/
[root@k8s-node1 ~]#

[ERR] Node xxx is not empty. Either the node already knows other no...

https://blog.csdn.net/xianzhixianzhixian/article/details/82777767

redis集群安装多端口多实例部署的更多相关文章

  1. redis 集群安装

    redis集群安装 1.下载redis源码 2.解压并进入解压后的文件夹redis内 3.make,生成一系列的文件(mkreleasehdr.sh, redis-benchmark, redis-c ...

  2. CentOS下redis集群安装

    环境: 一台CentOS虚拟机上部署六个节点,创建3个master,3个slave节点 1.下载并解压 cd /root wget http://download.redis.io/releases/ ...

  3. Springboot 2.0.x 集成基于Centos7的Redis集群安装及配置

    Redis简介 Redis是一个基于C语言开发的开源(BSD许可),开源高性能的高级内存数据结构存储,用作数据库.缓存和消息代理.它支持数据结构,如 字符串.散列.列表.集合,带有范围查询的排序集,位 ...

  4. redis集群安装部署

    (要让集群正常工作至少需要3个主节点,在这里我们要创建6个redis节点,其中三个为主节点,三个为从节点,对应的redis节点的ip和端口对应关系如下) 192.168.1.160:7000 192. ...

  5. Linux 下Redis集群安装部署及使用详解(在线和离线两种安装+相关错误解决方案)

    一.应用场景介绍 本文主要是介绍Redis集群在Linux环境下的安装讲解,其中主要包括在联网的Linux环境和脱机的Linux环境下是如何安装的.因为大多数时候,公司的生产环境是在内网环境下,无外网 ...

  6. redis集群安装2

      概要:本文主要介绍如何在Centos7中单机搭建redis集群三主三从,按照本文绝对可以实现该需求,至于先搭建单机版主要为了方便理解redis集群,为下一步开发或生产上redis集群做铺垫.同时本 ...

  7. 【Redis篇】Redis集群安装与初始

    一.前述   本文将单台节点不同端口模拟集群方式. 二.具体搭建 前提是安装好redis具体可参考http://www.cnblogs.com/LHWorldBlog/p/8463269.html 1 ...

  8. windows下redis集群安装和部署

    1.下载windows版本的Redis 官网只提供linux版本的下载 官网下载地址:http://redis.io/download github下载地址:https://github.com/MS ...

  9. Windows下Redis集群安装与部署

    1.下载 Redis-x64-3.2.100.zip 安装程序 官网下载地址:http://redis.io/download GitHub下载地址:https://github.com/micros ...

随机推荐

  1. javascript百度地图使用(根据地名定位、根据经纬度定位)

    需要购买阿里云产品和服务的,点击此链接领取优惠券红包,优惠购买哦,领取后一个月内有效: https://promotion.aliyun.com/ntms/yunparter/invite.html? ...

  2. 在.NET使用Newtonsoft.Json转换,读取,写入json

    首先,大家要明白什么是json,了解更多关于json方面资料大家可以点击https://www.ibm.com/developerworks/cn/web/wa-lo-json/ ,我在这里简单介绍下 ...

  3. k3 cloud在站点中新增用户

    1.进去金蝶云企业平台: 网址:https://cloud.kingdee.com/pt/ 2.进入控制台页面,我的产品下面选择添加用户 去cloud平台新增并同步用户注册信息 3.去管理中心更新用户 ...

  4. js防抖和节流优化浏览器滚动条滚动到最下面时加载更多数据

    防抖和节流,主要是用来防止过于平凡的执行某个操作,如浏览器窗口变化执行某个操作,监听某个input输入框keyup变化,瀑布流布局时Y轴滚动,图片加载. js函数的防抖 经过一段事件才执行某个操作,如 ...

  5. 学习MyBatis时报的错

    初学MyBatis第一天跟着敲代码,一直报错,报错到崩溃,错误如下 org.apache.ibatis.exceptions.PersistenceException: ### Error query ...

  6. django基础篇06-ModelForm操作及验证

    本文内容主要来自银角大王的博客 学习大纲: 一.ModelForm 二.Ajax - 原生(jQuery) - 伪Ajax操作 三.文件上传(预览) - Form提交 - Ajax文件上传 四. 图片 ...

  7. MFC学习笔记2---简单计算器

    前言 学习了鸡啄米网页的前三部分后,我们就可以做一个小软件出来了,我选择先做一个计算器. 这是Win7系统自带的计算器: 为了提升成就感,我将计算器的大部分内容去除,于是就变成这样: 这样就只剩下了1 ...

  8. Windows 开启 winrm

    # Windows 开启 winrm   ``` Enable-PSRemoting   winrm enumerate winrm/config/listener   winrm quickconf ...

  9. 牛客假日团队赛2 C 修围栏 ( 哈夫曼树,贪心)

    链接:https://ac.nowcoder.com/acm/contest/924/C 来源:牛客网 修围栏 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 32768K,其他语言6 ...

  10. L3-015. 球队“食物链”

    某国的足球联赛中有N支参赛球队,编号从1至N.联赛采用主客场双循环赛制,参赛球队两两之间在双方主场各赛一场. 联赛战罢,结果已经尘埃落定.此时,联赛主席突发奇想,希望从中找出一条包含所有球队的“食物链 ...