1-本人安装的系统版本信息(Esxi虚拟机) [lsug@172-16-1-105 ~]$ uname -a Linux 172-16-1-105 2.6.32-573.el6.x86_64 #1 S
1-本人安装的系统版本信息(Esxi虚拟机)
[lsug@172-16-1-105 ~]$ uname -a
Linux 172-16-1-105 2.6.32-573.el6.x86_64 #1 SMP Thu Jul 23 15:44:03 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
[lsug@172-16-1-105 ~]$ cat /etc/redhat-release
CentOS release 6.7 (Final)
2-下载安装包
redis-3.0.5.tar.gz
3-解压并安装
tar -zxf redis-3.0.5.tar.gz
mv redis-3.0.5 redis
cd redis
make
sudo make install prefix=/data/redis
mkdir conf data bin
mv redis.conf conf/
sudo cp /usr/local/bin/redis-* bin/
4-编辑配置文件
[lsug@localhost ~]$ cat /data/redis/conf/redis.conf
daemonize yes
pidfile /data/redis/data/redis.pid
port 6379
tcp-backlog 65536
bind 0.0.0.0
timeout 0
tcp-keepalive 300
loglevel notice
logfile /data/redis/data/redis.log
databases 16
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 yes
repl-diskless-sync-delay 5
repl-ping-slave-period 5
repl-disable-tcp-nodelay no
repl-backlog-size 64mb
repl-backlog-ttl 1800
slave-priority 100
maxmemory 1gb
appendonly yes
appendfilename "appendonly.aof"
appendfsync everysec
no-appendfsync-on-rewrite yes
auto-aof-rewrite-percentage 100
auto-aof-rewrite-min-size 64mb
aof-load-truncated 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-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 12
aof-rewrite-incremental-fsync yes
5-启动
cd /data/redis/
./bin/redis-server conf/redis.conf
6-检查是否启动成功
[lsug@localhost ~]$ ps -ef | grep redis
lsug 8987 1 0 10:21 ? 00:00:00 ./bin/redis-server 0.0.0.0:6379