redis 部署

目的

搭建 redis server
提供 falcon-alarm 使用

软件安装

yum install -y epel-release
yum install -y redis
mkdir /apps/dat/redis_data

配置

/etc/redis.conf

daemonize yes
pidfile "/var/run/redis/redis.pid"
port 6379
tcp-backlog 511
timeout 0
tcp-keepalive 60
loglevel notice
logfile "/var/log/redis/redis.log"
databases 16
unixsocket /var/run/redis/redis.sock
unixsocketperm 766
stop-writes-on-bgsave-error no
rdbcompression yes
rdbchecksum no
dbfilename "dump.rdb"
dir "/apps/dat/redis_data"
slave-serve-stale-data yes
slave-read-only yes
repl-diskless-sync no
repl-diskless-sync-delay 5
repl-disable-tcp-nodelay no
slave-priority 100
maxmemory 2gb
appendonly no
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
lua-time-limit 5000
slowlog-log-slower-than 10000
slowlog-max-len 128
latency-monitor-threshold 0
notify-keyspace-events ""
hash-max-ziplist-entries 512
hash-max-ziplist-value 64
list-max-ziplist-entries 512
list-max-ziplist-value 64
set-max-intset-entries 512
zset-max-ziplist-entries 128
zset-max-ziplist-value 64
hll-sparse-max-bytes 3000
activerehashing yes
client-output-buffer-limit normal 512mb 512mb 60
client-output-buffer-limit slave 512mb 256mb 120
client-output-buffer-limit pubsub 32mb 8mb 60
repl-backlog-size 64mb
hz 10
aof-rewrite-incremental-fsync yes

启动

[root@ns-yun-020021 falcon-plus]# systemctl  start redis
[root@ns-yun-020021 falcon-plus]# systemctl  status redis -l
● redis.service - Redis persistent key-value database
   Loaded: loaded (/usr/lib/systemd/system/redis.service; disabled; vendor preset: disabled)
  Drop-In: /etc/systemd/system/redis.service.d
           └─limit.conf
   Active: active (running) since Tue 2020-08-18 17:56:33 CST; 1s ago
  Process: 3437 ExecStop=/usr/bin/redis-shutdown (code=exited, status=0/SUCCESS)
 Main PID: 3445 (redis-server)
   Memory: 4.3M
   CGroup: /system.slice/redis.service
           └─3445 /usr/bin/redis-server *:6379
Aug 18 17:56:33 ns-yun-020021.vclound.com systemd[1]: Started Redis persistent key-value database.
Aug 18 17:56:33 ns-yun-020021.vclound.com systemd[1]: Starting Redis persistent key-value database...
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Terry_Tsang

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值