Redis复制和哨兵部署
环境准备
主机名 | sht-sgmhadoopdn-01 | sht-sgmhadoopdn-02 | sht-sgmhadoopdn-03 |
OS | CentOS Linux release 7.6.1810 (Core) | ||
IP地址 | 172.16.101.58 | 172.16.101.58 | 172.16.101.58 |
redis安装路径 | /usr/local/redis | ||
角色 | master | slave | slave |
redis各版本下载地址
http://download.redis.io/releases/
此处我们选择3.2.12版本
http://download.redis.io/releases/redis-3.2.12.tar.gz
系统环境配置
新建系统用户redis
# groupadd -r dba # useradd -r -g dba -G root redis
内核参数优化
# cat /etc/sysctl.conf ....................... vm.overcommit_memory=1 vm.swappiness=1 fs.aio-max-nr=1048576 fs.file-max= 7672460 net.ipv4.ip_local_port_range=9000 65500 net.core.rmem_default=262144 net.core.rmem_max=4194304 net.core.wmem_default=262144 net.core.wmem_max=1048586 net.core.somaxconn = 2048 kernel.sem= 50100 64128000 50100 1280 kernel.shmall=5242880 kernel.shmmax=12884901888 .......................
系统资源使用优化
# echo "redis soft nproc 65536" >> /etc/security/limits.conf # echo "redis hard nproc 65536" >> /etc/security/limits.conf # echo "redis soft nofile 65536" >> /etc/security/limits.conf # echo "redis hard nofile 65536" >> /etc/security/limits.conf
大内存页优化
# echo "echo never > /sys/kernel/mm/transparent_hugepage/enabled" >> /etc/rc.local
相关推荐
王道革 2020-11-25
wangdonghello 2020-11-03
Langeldep 2020-11-16
chenhualong0 2020-11-16
聚合室 2020-11-16
koushr 2020-11-12
MRFENGG 2020-11-11
guoyanga 2020-11-10
fackyou00 2020-11-10
Orangesss 2020-11-03
dongCSDN 2020-10-31
rainandtear 2020-10-30
Quietboy 2020-10-30
liuyulong 2020-10-29
fansili 2020-10-29
温攀峰 2020-10-23
jackbon 2020-10-19
kaixinfelix 2020-10-04