`
lipsion
  • 浏览: 15266 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
社区版块
存档分类
最新评论

redis安装备忘

阅读更多
wget http://download.redis.io/releases/redis-2.8.1.tar.gz
tar -xvf redis-2.8.1.tar.gz
cd redis-2.8.1
make
mkdir -p /usr/local/redis/var
cd src
cp redis-server redis-sentinel redis-cli redis-check-dump redis-check-aof redis-benchmark /usr/local/redis/

#设置redis进程为后台守护进程:
#sed -i "s/daemonize no/daemonize yes/g" /etc/redis.conf

redis.conf
daemonize yes
pidfile /usr/local/redis/var/redis.pid
port 6379
timeout 300
loglevel debug
logfile /usr/local/redis/var/redis.log
databases 16
save 900 1
save 300 10
save 60 10000
dbfilename dump.rdb
dir /usr/local/redis/var/
appendonly no


start.sh
#!/bin/sh
path=`dirname $0`
$path/redis-server $path/redis.conf


shutdown.sh
#!/bin/sh
path=`dirname $0`
kill -9 `cat $path/var/redis.pid`

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics