Redis4.0.9 installation
Ip
Port
Password
192.168.10.17
6379
123456
Install the compilation environment
Shell > yum install make gcc
Install redis
Tar zxvf redis-4.0.9.tar.gz compilation and installation
Cd redis-4.0.9
Make PREFIX=/data/redis install
Mkdir / data/redis/ {etc,data,logs}
Configure redis:
Shell > sed'/ ^ # / dbot / ^ $/ d' redis.conf
Protected-mode yes
Port 6379
Tcp-backlog 511
Timeout 0
Tcp-keepalive 300
Daemonize yes
Supervised no
Pidfile / var/run/redis_6379.pid
Loglevel notice
Logfile "/ data/redis/logs/redis.log"
Databases 16
Always-show-logo yes
Save 900 1
Save 300 10
Save 60 10000
Stop-writes-on-bgsave-error yes
Rdbcompression yes
Rdbchecksum yes
Dbfilename dump.rdb
Dir / data/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
Requirepass 123456
Lazyfree-lazy-eviction no
Lazyfree-lazy-expire no
Lazyfree-lazy-server-del no
Slave-lazy-flush no
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
Aof-use-rdb-preamble no
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-size-2
List-compress-depth 0
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 0 0 0
Client-output-buffer-limit slave 256mb 64mb 60
Client-output-buffer-limit pubsub 32mb 8mb 60
Hz 10
Aof-rewrite-incremental-fsync yes
Start the service
/ data/redis/bin/redis-server / data/redis/etc/redis.conf
Out of Service
/ data/redis/bin/redis-cli-a 123456 shutdown