redisのソースコードコンパイルインストール
tar -zxvf redis-2.8.19.tar.gz
cd redis-2.8.19
make
make PREFIX=/usr/local/redis install
mkdir /usr/local/redis/etc/
cp redis.conf /usr/local/redis/etc/
cd /usr/local/redis/bin/
cp redis-benchmark redis-cli redis-server /usr/bin/
vim /usr/local/redis/etc/redis.conf
#
# redis
# no ( )
daemonize yes
# , 0
timeout 300
# redis , :notice
loglevel verbose
# , redis :""
# stdout, /dev/null
logfile stdout
我们现在来看一下配置文件
6379.conf
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
|
6380.conf
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
daemonize
yes
pidfile
/var/run/redis_6380
.pid
port 6380
tcp-backlog 511
timeout 0
tcp-keepalive 0
loglevel notice
logfile
/usr/local/redis/logs/redis_6380
.log
databases 16
save 900 1
save 300 10
save 60 10000
stop-writes-on-bgsave-error
yes
rdbcompression
yes
rdbchecksum
yes
dbfilename dump.rdb
dir
/usr/local/redis/6380
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
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 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
:
https://www.cnblogs.com/smail-bao/p/6164132.html
:https://segmentfault.com/a/1190000003084917