1. #安装依赖
2. yum install -y wget gcc*
3. #创建目录
4. mkdir /htdocs/redis -p
5. #下载软件包
6. cd /tmp
7. wget -c http://test.e-bidding.org/gxdownload/redis-2.8.24.tar.gz
#解压
tar xf redis-2.8.24.tar.gz
#将解压目录的内容移动到/htdocs/redis
mv redis-2.8.24/* /htdocs/redis/&&cd /htdocs/redis
#编译安装
make && make install
make src/
#创建对应目录及日志文件
mkdir {data,log,bin,conf} -p && touch ./log/redis.log
#提取对应命令
cd /htdocs/redis/src/ && cp -r redis-server redis-cli ../bin/
#创建配置文件
cat > /htdocs/redis/conf/redis.conf <<EOF
daemonize yes
pidfile /var/run/redis.pid
port 16379
tcp-backlog 511
bind 172.17.189.17
timeout 0
tcp-keepalive 0
loglevel notice
logfile "/htdocs/redis/log/redis.log"
databases 16
save 900 1
save 300 10
save 60 10000
stop-writes-on-bgsave-error no
rdbcompression yes
rdbchecksum yes
dbfilename dump.rdb
dir "/htdocs/redis/data/"
requirepass wwww88354986
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
EOF
#启动redis
/htdocs/redis/bin/redis-server /htdocs/redis/conf/redis.conf
标签:log,单击,max,ziplist,redis,conf,安装,htdocs From: https://blog.51cto.com/u_13811034/8173679