linux安装redis

cd /usr/local
yum install gcc
wget http://download.redis.io/releases/redis-5.0.4.tar.gz
tar xzf redis-5.0.4.tar.gz
cd redis-5.0.4
make

vim  redis.custom.conf 

daemonize yes
port 
requirepass 
databases 256
logfile ./redislog.log
dir ./
bind 0.0.0.0
save 60 1
save 3600 100
dbfilename dbdump-6666.rdb
dir ./
stop-writes-on-bgsave-error yes
rdbcompression yes
rdbchecksum yes

appendonly yes
appendfilename aof-6666.aof
appendfsync everysec
no-appendfsync-on-rewrite yes
auto-aof-rewrite-percentage 100
auto-aof-rewrite-min-size 64mb

masterauth password
slaveof ip port
slave-read-only yes

./src/redis-server  redis.custom.conf 
    原文作者:likeghee
    原文地址: https://segmentfault.com/a/1190000020536003
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞