本文章基于Redis 6.0.9版本,对Redis配置进行说明

目录

序:

1.准备阶段

2.安装阶段

3.配置

4.创建集群

5.测试

6.防火墙开放端口(选)

7.关闭redis

附录

T.术语

T.1.TLS

Q.问题

Q.1.致命错误:openssl/ssl.h:没有那个文件或目录

Q.2.致命错误:jemalloc/jemalloc.h:没有那个文件或目录

Q.3.You need tcl 8.5 or newer in order to run the Redis test

S.解决

S.1.Increased maximum number of open files to 10032 (it was originally set to 1024).

S.2.WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.

S.3. WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.

S.4.WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo madvise > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled (set to 'madvise' or 'never').


序:

  • AC:Actual Combat  实战
  • 系统版本:CentOS 8.3
  • Redis版本:Redis 6.0.9

1.准备阶段

从Redis官网上下载最新的安装包(.tar.gz),目前是6.0.9,得到的压缩文件为 redis-6.0.9.tar.gz

2.安装阶段

cd /opt
# 将压缩文件放到目录/opt下
# 解压
tar -zxvf redis-6.0.9.tar.gz# 重命名文件
mv redis-6.0.9 redis
# 删除redis压缩文件
# rm -f redis-6.0.9.tar.gzcd /opt/redis
# Redis编译, 基础编译
# make
# Redis编译(TLS)
make BUILD_TLS=yes
# Redis测试(TLS)
make test

可能遇到的问题参考《附录 Q.问题》

注意:安装完成后,将编译后的文件打包备份

tar -zcvf redis-make-6.0.9.tar.gz redis

3.配置

请注意,正常工作的最小集群要求至少包含三个主节点。我们准备三个主节点和三个复制节点构成六个节点的集群。

首先,找到配置文件redis.conf,修改对应的属性,端口分别是 7000,7001,7002,7003,7004,7005

port 7000
cluster-enabled yes
cluster-config-file nodes-7000.conf
cluster-node-timeout 5000
appendonly yesbind 0.0.0.0
protected-mode no

注意: 重启集群的时候可能会遇到连接拒绝的情况,此时应该将各个Redis的配置文件(redis.conf) dind 127.0.0.1 修改为 bind 0.0.0.0,重启各个Redis。

protected-mode no

创建测试目录,并将编译和修改好配置的redis文件分别复制进去

mkdir cluster-test
cd cluster-test
mkdir 7000 7001 7002 7003 7004 7005

然后分别修改对应的端口号 7000 7001 7002 7003 7004 7005

分别修改cluster-config-file nodes-7000.conf  nodes-7001.conf  nodes-7002.conf  nodes-7003.conf  nodes-7004.conf  nodes-7005.conf

权限修改

chmod -R 700 ./7000/redis/src
chmod -R 700 ./7001/redis/src
chmod -R 700 ./7002/redis/src
chmod -R 700 ./7003/redis/src
chmod -R 700 ./7004/redis/src
chmod -R 700 ./7005/redis/src

分别启动

/opt/cluster-test/7000/redis/src/redis-server /opt/cluster-test/7000/redis/redis.conf2012:C 18 Dec 2020 09:51:29.967 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
2012:C 18 Dec 2020 09:51:29.967 # Redis version=6.0.9, bits=64, commit=00000000, modified=0, pid=2012, just started
2012:C 18 Dec 2020 09:51:29.967 # Configuration loaded
2012:M 18 Dec 2020 09:51:29.967 * Increased maximum number of open files to 10032 (it was originally set to 1024).
2012:M 18 Dec 2020 09:51:29.968 * Node configuration loaded, I'm f472108629e9436b7a08864da7ac376c652337df_._                                                  _.-``__ ''-._                                             _.-``    `.  `_.  ''-._           Redis 6.0.9 (00000000/0) 64 bit.-`` .-```.  ```\/    _.,_ ''-._                                   (    '      ,       .-`  | `,    )     Running in cluster mode|`-._`-...-` __...-.``-._|'` _.-'|     Port: 7000|    `-._   `._    /     _.-'    |     PID: 2012`-._    `-._  `-./  _.-'    _.-'                                   |`-._`-._    `-.__.-'    _.-'_.-'|                                  |    `-._`-._        _.-'_.-'    |           http://redis.io        `-._    `-._`-.__.-'_.-'    _.-'                                   |`-._`-._    `-.__.-'    _.-'_.-'|                                  |    `-._`-._        _.-'_.-'    |                                  `-._    `-._`-.__.-'_.-'    _.-'                                   `-._    `-.__.-'    _.-'                                       `-._        _.-'                                           `-.__.-'                                               2012:M 18 Dec 2020 09:51:29.968 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
2012:M 18 Dec 2020 09:51:29.968 # Server initialized
2012:M 18 Dec 2020 09:51:29.968 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
2012:M 18 Dec 2020 09:51:29.968 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo madvise > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled (set to 'madvise' or 'never').
2012:M 18 Dec 2020 09:51:29.969 * Ready to accept connections

>>>> ** 此处查看附录S.解决 ** >>>>

解决警告后运行(以下输出为创建集群后的输出,实际初始启动时 输出到 Ready to accept connections 这行)

[root@localhost cluster-test]# /opt/cluster-test/7000/redis/src/redis-server /opt/cluster-test/7000/redis/redis.conf
1781:C 19 Dec 2020 15:54:25.848 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
1781:C 19 Dec 2020 15:54:25.848 # Redis version=6.0.9, bits=64, commit=00000000, modified=0, pid=1781, just started
1781:C 19 Dec 2020 15:54:25.848 # Configuration loaded
1781:M 19 Dec 2020 15:54:25.860 * No cluster configuration found, I'm dc12e9cb09006634b7bdbf769564b2cc080fce29_._                                                  _.-``__ ''-._                                             _.-``    `.  `_.  ''-._           Redis 6.0.9 (00000000/0) 64 bit.-`` .-```.  ```\/    _.,_ ''-._                                   (    '      ,       .-`  | `,    )     Running in cluster mode|`-._`-...-` __...-.``-._|'` _.-'|     Port: 7000|    `-._   `._    /     _.-'    |     PID: 1781`-._    `-._  `-./  _.-'    _.-'                                   |`-._`-._    `-.__.-'    _.-'_.-'|                                  |    `-._`-._        _.-'_.-'    |           http://redis.io        `-._    `-._`-.__.-'_.-'    _.-'                                   |`-._`-._    `-.__.-'    _.-'_.-'|                                  |    `-._`-._        _.-'_.-'    |                                  `-._    `-._`-.__.-'_.-'    _.-'                                   `-._    `-.__.-'    _.-'                                       `-._        _.-'                                           `-.__.-'                                               1781:M 19 Dec 2020 15:54:25.863 # Server initialized
1781:M 19 Dec 2020 15:54:25.866 * Ready to accept connections
1781:M 19 Dec 2020 15:57:09.668 # configEpoch set to 1 via CLUSTER SET-CONFIG-EPOCH
1781:M 19 Dec 2020 15:57:09.695 # IP address for this node updated to 192.168.35.129
1781:M 19 Dec 2020 15:57:12.238 * Replica 192.168.35.129:7003 asks for synchronization
1781:M 19 Dec 2020 15:57:12.238 * Partial resynchronization not accepted: Replication ID mismatch (Replica asked for '3984934fcf1dc1a029ca0d5f7affe30d36d585ca', my replication IDs are 'c3cce9ead0551edc0e199a5c6d185089d9bb3c4c' and '0000000000000000000000000000000000000000')
1781:M 19 Dec 2020 15:57:12.238 * Replication backlog created, my new replication IDs are '77d2b01ce8f3ebfd0f6ba85a56d944dbf69a1d43' and '0000000000000000000000000000000000000000'
1781:M 19 Dec 2020 15:57:12.238 * Starting BGSAVE for SYNC with target: disk
1781:M 19 Dec 2020 15:57:12.239 * Background saving started by pid 1959
1959:C 19 Dec 2020 15:57:12.241 * DB saved on disk
1959:C 19 Dec 2020 15:57:12.242 * RDB: 0 MB of memory used by copy-on-write
1781:M 19 Dec 2020 15:57:12.244 * Background saving terminated with success
1781:M 19 Dec 2020 15:57:12.245 * Synchronization with replica 192.168.35.129:7003 succeeded
1781:M 19 Dec 2020 15:57:14.664 # Cluster state changed: ok
[root@localhost ~]# /opt/cluster-test/7001/redis/src/redis-server /opt/cluster-test/7001/redis/redis.conf
1812:C 19 Dec 2020 15:54:55.851 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
1812:C 19 Dec 2020 15:54:55.851 # Redis version=6.0.9, bits=64, commit=00000000, modified=0, pid=1812, just started
1812:C 19 Dec 2020 15:54:55.851 # Configuration loaded
1812:M 19 Dec 2020 15:54:55.852 * No cluster configuration found, I'm 3816f806bc8489eee344c09735ec0b8c15ff7060_._                                                  _.-``__ ''-._                                             _.-``    `.  `_.  ''-._           Redis 6.0.9 (00000000/0) 64 bit.-`` .-```.  ```\/    _.,_ ''-._                                   (    '      ,       .-`  | `,    )     Running in cluster mode|`-._`-...-` __...-.``-._|'` _.-'|     Port: 7001|    `-._   `._    /     _.-'    |     PID: 1812`-._    `-._  `-./  _.-'    _.-'                                   |`-._`-._    `-.__.-'    _.-'_.-'|                                  |    `-._`-._        _.-'_.-'    |           http://redis.io        `-._    `-._`-.__.-'_.-'    _.-'                                   |`-._`-._    `-.__.-'    _.-'_.-'|                                  |    `-._`-._        _.-'_.-'    |                                  `-._    `-._`-.__.-'_.-'    _.-'                                   `-._    `-.__.-'    _.-'                                       `-._        _.-'                                           `-.__.-'                                               1812:M 19 Dec 2020 15:54:55.854 # Server initialized
1812:M 19 Dec 2020 15:54:55.855 * Ready to accept connections
1812:M 19 Dec 2020 15:57:09.668 # configEpoch set to 2 via CLUSTER SET-CONFIG-EPOCH
1812:M 19 Dec 2020 15:57:09.724 # IP address for this node updated to 192.168.35.129
1812:M 19 Dec 2020 15:57:11.934 * Replica 192.168.35.129:7004 asks for synchronization
1812:M 19 Dec 2020 15:57:11.934 * Partial resynchronization not accepted: Replication ID mismatch (Replica asked for '1154de46950d0b4012569d03bc399b54f0db85b4', my replication IDs are '36022a5afd006e41e02cc8b291a1944ef045b044' and '0000000000000000000000000000000000000000')
1812:M 19 Dec 2020 15:57:11.934 * Replication backlog created, my new replication IDs are '41f930018c8f9e56f3c1563da1a4ed27f0573384' and '0000000000000000000000000000000000000000'
1812:M 19 Dec 2020 15:57:11.934 * Starting BGSAVE for SYNC with target: disk
1812:M 19 Dec 2020 15:57:11.935 * Background saving started by pid 1954
1954:C 19 Dec 2020 15:57:11.940 * DB saved on disk
1954:C 19 Dec 2020 15:57:11.941 * RDB: 0 MB of memory used by copy-on-write
1812:M 19 Dec 2020 15:57:12.021 * Background saving terminated with success
1812:M 19 Dec 2020 15:57:12.022 * Synchronization with replica 192.168.35.129:7004 succeeded
1812:M 19 Dec 2020 15:57:14.643 # Cluster state changed: ok
[root@localhost ~]# /opt/cluster-test/7002/redis/src/redis-server /opt/cluster-test/7002/redis/redis.conf
1838:C 19 Dec 2020 15:55:10.357 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
1838:C 19 Dec 2020 15:55:10.357 # Redis version=6.0.9, bits=64, commit=00000000, modified=0, pid=1838, just started
1838:C 19 Dec 2020 15:55:10.357 # Configuration loaded
1838:M 19 Dec 2020 15:55:10.359 * No cluster configuration found, I'm 206cb126adc60e57a15222f09005308fc7af9428_._                                                  _.-``__ ''-._                                             _.-``    `.  `_.  ''-._           Redis 6.0.9 (00000000/0) 64 bit.-`` .-```.  ```\/    _.,_ ''-._                                   (    '      ,       .-`  | `,    )     Running in cluster mode|`-._`-...-` __...-.``-._|'` _.-'|     Port: 7002|    `-._   `._    /     _.-'    |     PID: 1838`-._    `-._  `-./  _.-'    _.-'                                   |`-._`-._    `-.__.-'    _.-'_.-'|                                  |    `-._`-._        _.-'_.-'    |           http://redis.io        `-._    `-._`-.__.-'_.-'    _.-'                                   |`-._`-._    `-.__.-'    _.-'_.-'|                                  |    `-._`-._        _.-'_.-'    |                                  `-._    `-._`-.__.-'_.-'    _.-'                                   `-._    `-.__.-'    _.-'                                       `-._        _.-'                                           `-.__.-'                                               1838:M 19 Dec 2020 15:55:10.360 # Server initialized
1838:M 19 Dec 2020 15:55:10.360 * Ready to accept connections
1838:M 19 Dec 2020 15:57:09.669 # configEpoch set to 3 via CLUSTER SET-CONFIG-EPOCH
1838:M 19 Dec 2020 15:57:09.724 # IP address for this node updated to 192.168.35.129
1838:M 19 Dec 2020 15:57:11.733 * Replica 192.168.35.129:7005 asks for synchronization
1838:M 19 Dec 2020 15:57:11.733 * Partial resynchronization not accepted: Replication ID mismatch (Replica asked for '5df0c0ac0d0eda05e019ccfd1b2ee9fd47ad652f', my replication IDs are '286fe6195c9aedb7d38996957a793858f6a3b528' and '0000000000000000000000000000000000000000')
1838:M 19 Dec 2020 15:57:11.733 * Replication backlog created, my new replication IDs are '79564542f1ac25dddea7059f6068a90ed7cff623' and '0000000000000000000000000000000000000000'
1838:M 19 Dec 2020 15:57:11.733 * Starting BGSAVE for SYNC with target: disk
1838:M 19 Dec 2020 15:57:11.734 * Background saving started by pid 1951
1951:C 19 Dec 2020 15:57:11.735 * DB saved on disk
1951:C 19 Dec 2020 15:57:11.736 * RDB: 0 MB of memory used by copy-on-write
1838:M 19 Dec 2020 15:57:11.827 * Background saving terminated with success
1838:M 19 Dec 2020 15:57:11.827 * Synchronization with replica 192.168.35.129:7005 succeeded
1838:M 19 Dec 2020 15:57:14.650 # Cluster state changed: ok
[root@localhost ~]# /opt/cluster-test/7003/redis/src/redis-server /opt/cluster-test/7003/redis/redis.conf
1864:C 19 Dec 2020 15:55:23.348 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
1864:C 19 Dec 2020 15:55:23.348 # Redis version=6.0.9, bits=64, commit=00000000, modified=0, pid=1864, just started
1864:C 19 Dec 2020 15:55:23.348 # Configuration loaded
1864:M 19 Dec 2020 15:55:23.349 * No cluster configuration found, I'm 5b5cc86495b4135743de050f0282da1aca00f779_._                                                  _.-``__ ''-._                                             _.-``    `.  `_.  ''-._           Redis 6.0.9 (00000000/0) 64 bit.-`` .-```.  ```\/    _.,_ ''-._                                   (    '      ,       .-`  | `,    )     Running in cluster mode|`-._`-...-` __...-.``-._|'` _.-'|     Port: 7003|    `-._   `._    /     _.-'    |     PID: 1864`-._    `-._  `-./  _.-'    _.-'                                   |`-._`-._    `-.__.-'    _.-'_.-'|                                  |    `-._`-._        _.-'_.-'    |           http://redis.io        `-._    `-._`-.__.-'_.-'    _.-'                                   |`-._`-._    `-.__.-'    _.-'_.-'|                                  |    `-._`-._        _.-'_.-'    |                                  `-._    `-._`-.__.-'_.-'    _.-'                                   `-._    `-.__.-'    _.-'                                       `-._        _.-'                                           `-.__.-'                                               1864:M 19 Dec 2020 15:55:23.350 # Server initialized
1864:M 19 Dec 2020 15:55:23.351 * Ready to accept connections
1864:M 19 Dec 2020 15:57:09.669 # configEpoch set to 4 via CLUSTER SET-CONFIG-EPOCH
1864:M 19 Dec 2020 15:57:09.724 # IP address for this node updated to 192.168.35.129
1864:S 19 Dec 2020 15:57:11.676 * Before turning into a replica, using my own master parameters to synthesize a cached master: I may be able to synchronize with the new master with just a partial transfer.
1864:S 19 Dec 2020 15:57:11.676 # Cluster state changed: ok
1864:S 19 Dec 2020 15:57:12.235 * Connecting to MASTER 192.168.35.129:7000
1864:S 19 Dec 2020 15:57:12.235 * MASTER <-> REPLICA sync started
1864:S 19 Dec 2020 15:57:12.235 * Non blocking connect for SYNC fired the event.
1864:S 19 Dec 2020 15:57:12.236 * Master replied to PING, replication can continue...
1864:S 19 Dec 2020 15:57:12.237 * Trying a partial resynchronization (request 3984934fcf1dc1a029ca0d5f7affe30d36d585ca:1).
1864:S 19 Dec 2020 15:57:12.239 * Full resync from master: 77d2b01ce8f3ebfd0f6ba85a56d944dbf69a1d43:0
1864:S 19 Dec 2020 15:57:12.239 * Discarding previously cached master state.
1864:S 19 Dec 2020 15:57:12.245 * MASTER <-> REPLICA sync: receiving 175 bytes from master to disk
1864:S 19 Dec 2020 15:57:12.245 * MASTER <-> REPLICA sync: Flushing old data
1864:S 19 Dec 2020 15:57:12.245 * MASTER <-> REPLICA sync: Loading DB in memory
1864:S 19 Dec 2020 15:57:12.246 * Loading RDB produced by version 6.0.9
1864:S 19 Dec 2020 15:57:12.246 * RDB age 0 seconds
1864:S 19 Dec 2020 15:57:12.246 * RDB memory usage when created 2.52 Mb
1864:S 19 Dec 2020 15:57:12.246 * MASTER <-> REPLICA sync: Finished with success
1864:S 19 Dec 2020 15:57:12.246 * Background append only file rewriting started by pid 1960
1864:S 19 Dec 2020 15:57:12.287 * AOF rewrite child asks to stop sending diffs.
1960:C 19 Dec 2020 15:57:12.287 * Parent agreed to stop sending diffs. Finalizing AOF...
1960:C 19 Dec 2020 15:57:12.287 * Concatenating 0.00 MB of AOF diff received from parent.
1960:C 19 Dec 2020 15:57:12.287 * SYNC append only file rewrite performed
1960:C 19 Dec 2020 15:57:12.287 * AOF rewrite: 0 MB of memory used by copy-on-write
1864:S 19 Dec 2020 15:57:12.335 * Background AOF rewrite terminated with success
1864:S 19 Dec 2020 15:57:12.335 * Residual parent diff successfully flushed to the rewritten AOF (0.00 MB)
1864:S 19 Dec 2020 15:57:12.335 * Background AOF rewrite finished successfully
[root@localhost ~]# /opt/cluster-test/7004/redis/src/redis-server /opt/cluster-test/7004/redis/redis.conf
1890:C 19 Dec 2020 15:55:41.194 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
1890:C 19 Dec 2020 15:55:41.194 # Redis version=6.0.9, bits=64, commit=00000000, modified=0, pid=1890, just started
1890:C 19 Dec 2020 15:55:41.194 # Configuration loaded
1890:M 19 Dec 2020 15:55:41.195 * No cluster configuration found, I'm 06c3f60002e907640841914d0e392a93409939b0_._                                                  _.-``__ ''-._                                             _.-``    `.  `_.  ''-._           Redis 6.0.9 (00000000/0) 64 bit.-`` .-```.  ```\/    _.,_ ''-._                                   (    '      ,       .-`  | `,    )     Running in cluster mode|`-._`-...-` __...-.``-._|'` _.-'|     Port: 7004|    `-._   `._    /     _.-'    |     PID: 1890`-._    `-._  `-./  _.-'    _.-'                                   |`-._`-._    `-.__.-'    _.-'_.-'|                                  |    `-._`-._        _.-'_.-'    |           http://redis.io        `-._    `-._`-.__.-'_.-'    _.-'                                   |`-._`-._    `-.__.-'    _.-'_.-'|                                  |    `-._`-._        _.-'_.-'    |                                  `-._    `-._`-.__.-'_.-'    _.-'                                   `-._    `-.__.-'    _.-'                                       `-._        _.-'                                           `-.__.-'                                               1890:M 19 Dec 2020 15:55:41.197 # Server initialized
1890:M 19 Dec 2020 15:55:41.197 * Ready to accept connections
1890:M 19 Dec 2020 15:57:09.669 # configEpoch set to 5 via CLUSTER SET-CONFIG-EPOCH
1890:M 19 Dec 2020 15:57:09.724 # IP address for this node updated to 192.168.35.129
1890:S 19 Dec 2020 15:57:11.677 * Before turning into a replica, using my own master parameters to synthesize a cached master: I may be able to synchronize with the new master with just a partial transfer.
1890:S 19 Dec 2020 15:57:11.677 # Cluster state changed: ok
1890:S 19 Dec 2020 15:57:11.931 * Connecting to MASTER 192.168.35.129:7001
1890:S 19 Dec 2020 15:57:11.932 * MASTER <-> REPLICA sync started
1890:S 19 Dec 2020 15:57:11.932 * Non blocking connect for SYNC fired the event.
1890:S 19 Dec 2020 15:57:11.932 * Master replied to PING, replication can continue...
1890:S 19 Dec 2020 15:57:11.934 * Trying a partial resynchronization (request 1154de46950d0b4012569d03bc399b54f0db85b4:1).
1890:S 19 Dec 2020 15:57:11.936 * Full resync from master: 41f930018c8f9e56f3c1563da1a4ed27f0573384:0
1890:S 19 Dec 2020 15:57:11.936 * Discarding previously cached master state.
1890:S 19 Dec 2020 15:57:12.022 * MASTER <-> REPLICA sync: receiving 175 bytes from master to disk
1890:S 19 Dec 2020 15:57:12.022 * MASTER <-> REPLICA sync: Flushing old data
1890:S 19 Dec 2020 15:57:12.022 * MASTER <-> REPLICA sync: Loading DB in memory
1890:S 19 Dec 2020 15:57:12.023 * Loading RDB produced by version 6.0.9
1890:S 19 Dec 2020 15:57:12.023 * RDB age 1 seconds
1890:S 19 Dec 2020 15:57:12.023 * RDB memory usage when created 2.52 Mb
1890:S 19 Dec 2020 15:57:12.023 * MASTER <-> REPLICA sync: Finished with success
1890:S 19 Dec 2020 15:57:12.023 * Background append only file rewriting started by pid 1956
1890:S 19 Dec 2020 15:57:12.063 * AOF rewrite child asks to stop sending diffs.
1956:C 19 Dec 2020 15:57:12.063 * Parent agreed to stop sending diffs. Finalizing AOF...
1956:C 19 Dec 2020 15:57:12.064 * Concatenating 0.00 MB of AOF diff received from parent.
1956:C 19 Dec 2020 15:57:12.064 * SYNC append only file rewrite performed
1956:C 19 Dec 2020 15:57:12.064 * AOF rewrite: 0 MB of memory used by copy-on-write
1890:S 19 Dec 2020 15:57:12.137 * Background AOF rewrite terminated with success
1890:S 19 Dec 2020 15:57:12.137 * Residual parent diff successfully flushed to the rewritten AOF (0.00 MB)
1890:S 19 Dec 2020 15:57:12.137 * Background AOF rewrite finished successfully
[root@localhost ~]# /opt/cluster-test/7005/redis/src/redis-server /opt/cluster-test/7005/redis/redis.conf
1916:C 19 Dec 2020 15:55:54.080 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
1916:C 19 Dec 2020 15:55:54.080 # Redis version=6.0.9, bits=64, commit=00000000, modified=0, pid=1916, just started
1916:C 19 Dec 2020 15:55:54.080 # Configuration loaded
1916:M 19 Dec 2020 15:55:54.089 * No cluster configuration found, I'm 28988eb046a57a6a8d45b99fa21adc8e8c474492_._                                                  _.-``__ ''-._                                             _.-``    `.  `_.  ''-._           Redis 6.0.9 (00000000/0) 64 bit.-`` .-```.  ```\/    _.,_ ''-._                                   (    '      ,       .-`  | `,    )     Running in cluster mode|`-._`-...-` __...-.``-._|'` _.-'|     Port: 7005|    `-._   `._    /     _.-'    |     PID: 1916`-._    `-._  `-./  _.-'    _.-'                                   |`-._`-._    `-.__.-'    _.-'_.-'|                                  |    `-._`-._        _.-'_.-'    |           http://redis.io        `-._    `-._`-.__.-'_.-'    _.-'                                   |`-._`-._    `-.__.-'    _.-'_.-'|                                  |    `-._`-._        _.-'_.-'    |                                  `-._    `-._`-.__.-'_.-'    _.-'                                   `-._    `-.__.-'    _.-'                                       `-._        _.-'                                           `-.__.-'                                               1916:M 19 Dec 2020 15:55:54.092 # Server initialized
1916:M 19 Dec 2020 15:55:54.094 * Ready to accept connections
1916:M 19 Dec 2020 15:57:09.670 # configEpoch set to 6 via CLUSTER SET-CONFIG-EPOCH
1916:M 19 Dec 2020 15:57:09.724 # IP address for this node updated to 192.168.35.129
1916:S 19 Dec 2020 15:57:11.677 * Before turning into a replica, using my own master parameters to synthesize a cached master: I may be able to synchronize with the new master with just a partial transfer.
1916:S 19 Dec 2020 15:57:11.677 # Cluster state changed: ok
1916:S 19 Dec 2020 15:57:11.732 * Connecting to MASTER 192.168.35.129:7002
1916:S 19 Dec 2020 15:57:11.732 * MASTER <-> REPLICA sync started
1916:S 19 Dec 2020 15:57:11.732 * Non blocking connect for SYNC fired the event.
1916:S 19 Dec 2020 15:57:11.732 * Master replied to PING, replication can continue...
1916:S 19 Dec 2020 15:57:11.733 * Trying a partial resynchronization (request 5df0c0ac0d0eda05e019ccfd1b2ee9fd47ad652f:1).
1916:S 19 Dec 2020 15:57:11.734 * Full resync from master: 79564542f1ac25dddea7059f6068a90ed7cff623:0
1916:S 19 Dec 2020 15:57:11.734 * Discarding previously cached master state.
1916:S 19 Dec 2020 15:57:11.827 * MASTER <-> REPLICA sync: receiving 175 bytes from master to disk
1916:S 19 Dec 2020 15:57:11.827 * MASTER <-> REPLICA sync: Flushing old data
1916:S 19 Dec 2020 15:57:11.827 * MASTER <-> REPLICA sync: Loading DB in memory
1916:S 19 Dec 2020 15:57:11.831 * Loading RDB produced by version 6.0.9
1916:S 19 Dec 2020 15:57:11.832 * RDB age 0 seconds
1916:S 19 Dec 2020 15:57:11.832 * RDB memory usage when created 2.52 Mb
1916:S 19 Dec 2020 15:57:11.832 * MASTER <-> REPLICA sync: Finished with success
1916:S 19 Dec 2020 15:57:11.832 * Background append only file rewriting started by pid 1952
1916:S 19 Dec 2020 15:57:11.869 * AOF rewrite child asks to stop sending diffs.
1952:C 19 Dec 2020 15:57:11.869 * Parent agreed to stop sending diffs. Finalizing AOF...
1952:C 19 Dec 2020 15:57:11.870 * Concatenating 0.00 MB of AOF diff received from parent.
1952:C 19 Dec 2020 15:57:11.870 * SYNC append only file rewrite performed
1952:C 19 Dec 2020 15:57:11.871 * AOF rewrite: 0 MB of memory used by copy-on-write
1916:S 19 Dec 2020 15:57:11.936 * Background AOF rewrite terminated with success
1916:S 19 Dec 2020 15:57:11.936 * Residual parent diff successfully flushed to the rewritten AOF (0.00 MB)
1916:S 19 Dec 2020 15:57:11.937 * Background AOF rewrite finished successfully

4.创建集群

创建一个新的集群。选项 --cluster-replicas 1 意味着我们需要为每个主节点创建一个复制节点。其他参数是我要用来创建新集群的实例的地址列表。

注意:一定要使用公网ip,不能使用127.0.0.1,否则会导致使用非本地程序访问集群报“No more cluster attempts left”错误

不要用此命令创建集群:./redis-cli --cluster create 127.0.0.1:7000 127.0.0.1:7001 127.0.0.1:7002 127.0.0.1:7003 127.0.0.1:7004 127.0.0.1:7005 --cluster-replicas 1

要用这个创建集群:./redis-cli --cluster create 192.168.35.129:7000 192.168.35.129:7001 192.168.35.129:7002 192.168.35.129:7003 192.168.35.129:7004 192.168.35.129:7005 --cluster-replicas 1

[root@localhost src]# ./redis-cli --cluster create 192.168.35.129:7000 192.168.35.129:7001 192.168.35.129:7002 192.168.35.129:7003 192.168.35.129:7004 192.168.35.129:7005 --cluster-replicas 1
>>> Performing hash slots allocation on 6 nodes...
Master[0] -> Slots 0 - 5460
Master[1] -> Slots 5461 - 10922
Master[2] -> Slots 10923 - 16383
Adding replica 192.168.35.129:7004 to 192.168.35.129:7000
Adding replica 192.168.35.129:7005 to 192.168.35.129:7001
Adding replica 192.168.35.129:7003 to 192.168.35.129:7002
>>> Trying to optimize slaves allocation for anti-affinity
[WARNING] Some slaves are in the same host as their master
M: dc12e9cb09006634b7bdbf769564b2cc080fce29 192.168.35.129:7000slots:[0-5460] (5461 slots) master
M: 3816f806bc8489eee344c09735ec0b8c15ff7060 192.168.35.129:7001slots:[5461-10922] (5462 slots) master
M: 206cb126adc60e57a15222f09005308fc7af9428 192.168.35.129:7002slots:[10923-16383] (5461 slots) master
S: 5b5cc86495b4135743de050f0282da1aca00f779 192.168.35.129:7003replicates dc12e9cb09006634b7bdbf769564b2cc080fce29
S: 06c3f60002e907640841914d0e392a93409939b0 192.168.35.129:7004replicates 3816f806bc8489eee344c09735ec0b8c15ff7060
S: 28988eb046a57a6a8d45b99fa21adc8e8c474492 192.168.35.129:7005replicates 206cb126adc60e57a15222f09005308fc7af9428
Can I set the above configuration? (type 'yes' to accept): 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.35.129:7000)
M: dc12e9cb09006634b7bdbf769564b2cc080fce29 192.168.35.129:7000slots:[0-5460] (5461 slots) master1 additional replica(s)
M: 3816f806bc8489eee344c09735ec0b8c15ff7060 192.168.35.129:7001slots:[5461-10922] (5462 slots) master1 additional replica(s)
S: 06c3f60002e907640841914d0e392a93409939b0 192.168.35.129:7004slots: (0 slots) slavereplicates 3816f806bc8489eee344c09735ec0b8c15ff7060
S: 28988eb046a57a6a8d45b99fa21adc8e8c474492 192.168.35.129:7005slots: (0 slots) slavereplicates 206cb126adc60e57a15222f09005308fc7af9428
S: 5b5cc86495b4135743de050f0282da1aca00f779 192.168.35.129:7003slots: (0 slots) slavereplicates dc12e9cb09006634b7bdbf769564b2cc080fce29
M: 206cb126adc60e57a15222f09005308fc7af9428 192.168.35.129:7002slots:[10923-16383] (5461 slots) master1 additional replica(s)
[OK] All nodes agree about slots configuration.
>>> Check for open slots...
>>> Check slots coverage...
[OK] All 16384 slots covered.
[root@localhost src]# pwd
/opt/cluster-test/7000/redis/src
[root@localhost src]#

Redis-cli 将建议您进行配置。通过输入 yes 接受建议的配置。集群将被配置和联接,这意味着,个实例将被引导进行相互通信。最后,如果一切顺利,你会看到这样的信息:

[OK] All 16384 slots covered

这意味着至少有一个主节点实例为16384个可用插槽中的每一个提供服务。

5.测试

[root@localhost src]# ./redis-cli -c -p 7000
127.0.0.1:7000> set foo bar
-> Redirected to slot [12182] located at 127.0.0.1:7002
OK
127.0.0.1:7002> set hello world
-> Redirected to slot [866] located at 127.0.0.1:7000
OK
127.0.0.1:7000> get foo
-> Redirected to slot [12182] located at 127.0.0.1:7002
"bar"
127.0.0.1:7002> get hello
-> Redirected to slot [866] located at 127.0.0.1:7000
"world"
127.0.0.1:7000> exit
[root@localhost src]#
// Jedis Redis Client Test
public class ConnectionTest {private static final String IP = "192.168.35.129";private static final List<Integer> PORT1S = Arrays.asList(7000, 7001, 7002, 7003, 7004, 7005);@Testpublic void cluster() {Set<HostAndPort> jedisClusterNodes = new HashSet<>();//Jedis Cluster will attempt to discover cluster nodes automaticallyPORT1S.forEach(item -> jedisClusterNodes.add(new HostAndPort(IP, item)));JedisCluster jc = new JedisCluster(jedisClusterNodes);jc.set("foo", "bar");String value = jc.get("foo");System.out.println(value);}
}

输出如下

// lettuce client
public class ConnectionTest {private static final String IP = "192.168.35.129";private static final List<Integer> PORT1S = Arrays.asList(7000, 7001, 7002, 7003, 7004, 7005);@Testpublic void generateCode() {List<RedisURI> RedisURIList = new ArrayList<>();PORT1S.forEach(item -> {RedisURIList.add(RedisURI.create(IP, item));});RedisClusterClient clusterClient = RedisClusterClient.create(RedisURIList);StatefulRedisClusterConnection<String, String> connection = clusterClient.connect();RedisAdvancedClusterCommands<String, String> syncCommands = connection.sync();String value = syncCommands.get("foo");System.out.println(value);connection.close();clusterClient.shutdown();}
}

输出如下

6.防火墙开放端口(选)

# firewall-cmd --zone=public --add-port=7000/tcp --permanent
# firewall-cmd --zone=public --add-port=7001/tcp --permanent
# firewall-cmd --zone=public --add-port=7002/tcp --permanent
# firewall-cmd --zone=public --add-port=7003/tcp --permanent
# firewall-cmd --zone=public --add-port=7004/tcp --permanent
# firewall-cmd --zone=public --add-port=7005/tcp --permanent
# firewall-cmd --reloadfirewall-cmd --zone=public --add-port=17000/tcp --permanent
firewall-cmd --zone=public --add-port=17001/tcp --permanent
firewall-cmd --zone=public --add-port=17002/tcp --permanent
firewall-cmd --zone=public --add-port=17003/tcp --permanent
firewall-cmd --zone=public --add-port=17004/tcp --permanent
firewall-cmd --zone=public --add-port=17005/tcp --permanent
firewall-cmd --reload

7.关闭redis

[root@localhost ~]# ps -ef | grep redis
root        1781    1714  0 16:02 pts/0    00:00:18 /opt/cluster-test/7000/redi/src/redis-server 0.0.0.0:7000 [cluster]
root        1812    1791  0 16:03 pts/1    00:00:18 /opt/cluster-test/7001/redi/src/redis-server 0.0.0.0:7001 [cluster]
root        1838    1817  0 16:03 pts/2    00:00:19 /opt/cluster-test/7002/redi/src/redis-server 0.0.0.0:7002 [cluster]
root        1864    1843  0 16:03 pts/3    00:00:17 /opt/cluster-test/7003/redi/src/redis-server 0.0.0.0:7003 [cluster]
root        1890    1869  0 16:04 pts/4    00:00:16 /opt/cluster-test/7004/redi/src/redis-server 0.0.0.0:7004 [cluster]
root        1916    1895  0 16:04 pts/5    00:00:16 /opt/cluster-test/7005/redi/src/redis-server 0.0.0.0:7005 [cluster]
root        2356    2203  0 18:50 pts/7    00:00:00 grep --color=auto redis
[root@localhost cluster-test]# /opt/cluster-test/7000/redis/src/redis-cli -p 7005 shutdown
[root@localhost cluster-test]# /opt/cluster-test/7000/redis/src/redis-cli -p 7004 shutdown
[root@localhost cluster-test]# /opt/cluster-test/7000/redis/src/redis-cli -p 7003 shutdown
[root@localhost cluster-test]# /opt/cluster-test/7000/redis/src/redis-cli -p 7002 shutdown
[root@localhost cluster-test]# /opt/cluster-test/7000/redis/src/redis-cli -p 7001 shutdown
[root@localhost cluster-test]# /opt/cluster-test/7000/redis/src/redis-cli -p 7000 shutdown

附录

T.术语

T.1.TLS

  • 安全传输层协议(TLS)用于在两个通信应用程序之间提供保密性和数据完整性。
  • 该协议由两层组成: TLS 记录协议(TLS Record)和 TLS 握手协议(TLS Handshake)。

简介

传输层安全性协议(英语:Transport Layer Security,缩写作TLS),及其前身安全套接层(Secure Sockets Layer,缩写作SSL)是一种安全协议,目的是为互联网通信提供安全及数据完整性保障。网景公司(Netscape)在1994年推出首版网页浏览器,网景导航者时,推出HTTPS协议,以SSL进行加密,这是SSL的起源。IETF将SSL进行标准化,1999年公布第一版TLS标准文件。随后又公布RFC 5246 (2008年8月)与RFC 6176(2011年3月)。在浏览器、邮箱、即时通信、VoIP、网络传真等应用程序中,广泛支持这个协议。主要的网站,如Google、Facebook等也以这个协议来创建安全连线,发送数据。目前已成为互联网上保密通信的工业标准。

SSL包含记录层(Record Layer)和传输层,记录层协议确定传输层数据的封装格式。传输层安全协议使用X.509认证,之后利用非对称加密演算来对通信方做身份认证,之后交换对称密钥作为会谈密钥(Session key)。这个会谈密钥是用来将通信两方交换的数据做加密,保证两个应用间通信的保密性和可靠性,使客户与服务器应用之间的通信不被攻击者窃听。

概论

TLS协议采用主从式架构模型,用于在两个应用程序间透过网络创建起安全的连线,防止在交换数据时受到窃听及篡改。

TLS协议的优势是与高层的应用层协议(如HTTP、FTP、Telnet等)无耦合。应用层协议能透明地运行在TLS协议之上,由TLS协议进行创建加密通道需要的协商和认证。应用层协议传送的数据在通过TLS协议时都会被加密,从而保证通信的私密性。

TLS协议是可选的,必须配置客户端和服务器才能使用。主要有两种方式实现这一目标:一个是使用统一的TLS协议通信端口(例如:用于HTTPS的端口443);另一个是客户端请求服务器连接到TLS时使用特定的协议机制(例如:邮件、新闻协议和STARTTLS)。一旦客户端和服务器都同意使用TLS协议,他们通过使用一个握手过程协商出一个有状态的连接以传输数据。通过握手,客户端和服务器协商各种参数用于创建安全连接:

  • 当客户端连接到支持TLS协议的服务器要求创建安全连接并列出了受支持的密码组合(加密密码算法和加密哈希函数),握手开始。

  • 服务器从该列表中决定加密和散列函数,并通知客户端。

  • 服务器发回其数字证书,此证书通常包含服务器的名称、受信任的证书颁发机构(CA)和服务器的公钥。

  • 客户端确认其颁发的证书的有效性。

  • 为了生成会话密钥用于安全连接,客户端使用服务器的公钥加密随机生成的密钥,并将其发送到服务器,只有服务器才能使用自己的私钥解密。

  • 利用随机数,双方生成用于加密和解密的对称密钥。这就是TLS协议的握手,握手完毕后的连接是安全的,直到连接(被)关闭。如果上述任何一个步骤失败,TLS握手过程就会失败,并且断开所有的连接。

—— 来源百度百科

Q.问题

Q.1.致命错误:openssl/ssl.h:没有那个文件或目录

yum install openssl

Q.2.致命错误:jemalloc/jemalloc.h:没有那个文件或目录

  1. 先下载文件,此处下载的为   jemalloc-5.2.1.tar.bz2
  2. 将下载的文件放到系统目录/opt
  3. 解压编译安装
    # 解压
    tar jxvf jemalloc-5.2.1.tar.bz2
    # 文件夹重命名
    mv jemalloc-5.2.1 jemalloc
    # rm -f jemalloc-5.2.1.tar.bz2
    cd jemalloc/
    # 生成Makefile:
    ./configure
    # 编译:
    make
    # 编译安装:
    make install
    # 编译后的测试:
    make test

Q.3.You need tcl 8.5 or newer in order to run the Redis test

1.到Linx rpm网站查询tcl,选择对应的系统版本,我选择的是CentOS 8.3.2011对应的tcl-8.6.8-2.el8.x86_64.rpm

2.将下载的文件放到目录/opt下

3.安装

rpm -ivh tcl-8.5.13-8.el7.x86_64.rpm

S.解决

S.1.Increased maximum number of open files to 10032 (it was originally set to 1024).

# 永久修改
vim /etc/security/limits.conf* soft nofile 10032
* hard nofile 10032# 此处不用添加 10032就够用了
# soft nofile 65535
# hard nofile 65535# 保存文件后,重启即可生效
# 临时修改
# 查看系统限制
[root@localhost cluster-test]# ulimit -a
core file size          (blocks, -c) unlimited
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 7025
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024                  #《此处》
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) 7025
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited# 设置"open files"数量
[root@localhost cluster-test]# ulimit -n 10032

S.2.WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.

# 1.编辑
vim /etc/sysctl.conf# 2. 将 net.core.somaxconn = 1024 添加进去,然后:wq保存# 3.配置生效
sysctl -p

S.3. WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.

# 1.编辑
vim /etc/sysctl.conf# 2. 将 vm.overcommit_memory = 1 添加进去,然后:wq保存# 3.配置生效
sysctl -p

S.4.WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo madvise > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled (set to 'madvise' or 'never').

不推荐:临时配置

# 临时的
# 1.编辑文件
vim /etc/rc.local# 2.将echo never > /sys/kernel/mm/transparent_hugepage/enabled添加到/etc/rc.local中
echo never > /sys/kernel/mm/transparent_hugepage/enabled# 3.配置生效
source /etc/rc.local

推荐:永久禁用rhel7.2 禁用透明的大页内存--transparent_hugepage(THP)

# 查看
grub2-editenv - list | grep kernelopts
kernelopts=root=/dev/mapper/cl-root ro crashkernel=auto resume=/dev/mapper/cl-swap rd.lvm.lv=cl/root rd.lvm.lv=cl/swap rhgb quiet# 设置
grub2-editenv - set "kernelopts=root=/dev/mapper/cl-root ro crashkernel=auto resume=/dev/mapper/cl-swap rd.lvm.lv=cl/root rd.lvm.lv=cl/swap rhgb quiet transparent_hugepage=never"# 重启
reboot# 验证
[root@localhost ~]# cat /sys/kernel/mm/transparent_hugepage/enabled
always madvise [never]
[root@localhost ~]# grep AnonHugePages: /proc/meminfo
AnonHugePages:         0 kB
[root@localhost ~]# grep nr_anon_transparent_hugepages /proc/vmstat
nr_anon_transparent_hugepages 0
[root@localhost ~]# cat /boot/grub2/grubenv
# GRUB Environment Block
saved_entry=57d21de523544e52844736aaff65c34c-4.18.0-240.1.1.el8_3.x86_64
kernelopts=root=/dev/mapper/cl-root ro crashkernel=auto resume=/dev/mapper/cl-swap rd.lvm.lv=cl/root rd.lvm.lv=cl/swap rhgb quiet transparent_hugepage=never
boot_success=0# 成功

Redis【有与无】【AC2】Redis 安装、配置、集群搭建相关推荐

  1. Redis6安装配置集群cluster以及集群宕机注意事项

    Redis6的cluster模型推荐3主3从 先准备3台服务器,每个上面部署2个redis,服务器配置2核2G: 下面在每台服务器安装redis6,每台机器只要安装一次即可,然后分别配置2个端口的co ...

  2. ActiveMQ此例简单介绍基于docker的activemq安装与集群搭建

    ActiveMQ拓展连接 此例简单介绍基于Docker的activemq安装与集群搭建 一 :安装 1.获取activemq镜像 docker pull webcenter/activemq 2.启动 ...

  3. Redis基于Linux系统的安装与集群搭建

    最近项目里需要引入Redis,这里记录下Redis的安装.这里以centos7为例,首先我们需要确保防火墙关闭 systemctl status firewalld.service //查看防火墙状态 ...

  4. redis安装、集群搭建等

    1 Redis介绍 1.1 什么是NoSql 为了解决高并发.高可扩展.高可用.大数据存储问题而产生的数据库解决方案,就是NoSql数据库. NoSQL,泛指非关系型的数据库,NoSQL即Not-On ...

  5. twemproxy的安装及集群搭建

    linux环境-redis代理twemproxy的安装 安装twemproxy 1.下载redis代理源码到本地 2.安装 3.集群搭建 twemproxy(nutcracker)是一个快且轻量级的缓 ...

  6. RabbitMQ的安装及集群搭建方法

    转自:http://blog.csdn.net/u013256816/article/details/53524766 RabbitMQ安装 1 安装erlang 下载地址:http://www.er ...

  7. redis经典三节点高可用哨兵模式集群搭建

    生产环境下,为保证redis的高可用性,通常会搭建集群,redis集群的好处无需多说,提升单节点的读写性能从而整体提升并发效率,达到整体QPS的提升,同时,多个节点可以实现数据共享,在集群模式下,从节 ...

  8. 基于CentOS的分布式文件系统GlusterFS安装、集群搭建和运维

    一.准备工作 1.1 glusterfs的发展史 2011年10月04日,红帽收购Gluster. 2014年4月30日,红帽公司以1.75亿美元的价格将Ceph的企业级产品提供商Inktank收入囊 ...

  9. 【菜鸟教程】Kafka消息队列入门上(安装、集群搭建、基本命令行操作)

    概述 定义 Kafka 是一个分布式的基于发布/订阅模式的消息队列(Message Queue),主要应用于大数据实时处理领域. 消息队列 什么是消息队列呢? 例如在网站注册时,一般是同步的,当接收到 ...

  10. 用户同步管理及集群初始配置-集群搭建步骤7

    前面的几个步骤执行完之后,集群就已经创建好了初步的分区,如下所示: STATE为idle证明所有节点上的slurmd服务状态是正常,但此时用户还无法利用slurm提交作业,还需要对集群进行初始化配置以 ...

最新文章

  1. 软体定义网路(SDN)的多重意义
  2. hive数据仓库建设
  3. java鼠标进入高亮效果_鼠标选中文本划词高亮、再次选中划词取消高亮效果
  4. Android中View绘制流程
  5. 学徒学计算机,那个有能力的高人愿意收我做学徒啊,我是学计算机的
  6. 读jQuery源码 jQuery.data
  7. Emacs Lisp程序单步调试
  8. Mysql 常用函数集
  9. python图片分析中央气象台降水_python 画降水量色斑图问题
  10. 免费10分钟邮箱上线啦~~
  11. 往事如烟 - 辉哥的财务自由
  12. Win10 文件管理器右侧pdf 无法预览
  13. 电脑游戏业编年史之一游戏的诞生
  14. 面向可解释AI的黑盒和白盒模型
  15. 'OracleInternal.MTS.DTCPSPEManager' 类型初始值设定项引发异常
  16. 【解决】百度云盘怎么免费提高下载速度?
  17. JavaEddy的难题
  18. 6. 手写数字图片数据集MNIST
  19. parallels恢复linux密码,重置Parallels虚拟机windows密码
  20. Appium中使用swipe方法时候出现的问题建议使用flick方法

热门文章

  1. 能量时域空间物理_随手记(19)NR搜索空间及PDCCH盲检
  2. Time Wait的作用、原因、影响和如何避免
  3. 从【连接受限】看Android网络
  4. Layui实现二级联动及多级联动
  5. 重装华为服务器系统教程,服务器系统重装教程
  6. mysql求女生人数_Mysql版sql语句练习50题(小结)
  7. 浏览器常用的尺寸,ui看过来
  8. 快嘴淘宝论坛群发王 2007 bt
  9. 某社区在线人数爬虫,以及群发的源码分享
  10. QT二维图形的绘制(类的介绍与绘图实例)