标签:aof size inux 进入 运行 rem bin usr 配置文件
yum -y install gcc gcc-c++ libstdc++-devel tcl -y
wget http://219.238.7.71/files/403400000ABE0C0C/download.redis.io/releases/redis-4.0.2.tar.gz
tar -zxvf redis-4.0.2.tar.gz -C /usr/local/src/
cd /usr/local/src/ ll mv redis-4.0.2/ redis
cd /usr/local/src/redis make MALLOC=libc #添加内存回收机制 否则可能会安装报错 error: jemalloc/jemalloc.h: No such file or directory make PREFIX=/usr/local/src/redis/ install
cd /usr/local/src/redis mkdir conf #存放配置文件的目录 mkdir -p data/6379 #存放redis数据的目录,日志等 cd conf vi redis_6379.conf
bind 192.168.161.150 protected-mode yes port 6379 tcp-backlog 511 timeout 0 tcp-keepalive 300 daemonize yes supervised no pidfile /usr/local/src/redis/data/6379/redis_6379.pid loglevel notice logfile "/usr/local/src/redis/data/6379/log.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 /usr/local/src/redis/data/6379/ 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 lazyfree-lazy-eviction no lazyfree-lazy-expire no lazyfree-lazy-server-del no slave-lazy-flush no appendonly yes 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
cd /usr/local/src/redis/bin ./redis-server ../conf/redis_6379.conf
ps -ef|grep redis
./redis-cli -h 192.168.161.150 -p 6379
到此,Redis4.0.2的安装部署就结束了!!!
标签:aof size inux 进入 运行 rem bin usr 配置文件
原文地址:http://www.cnblogs.com/gouyadong/p/7860118.html