标签:
下载好Redis....
make
make install
mkdir /etc/redis/
cp redis.conf /etc/redis/redis_6379.conf
redis_6379.conf内容(update):
#注意创建的目录,还有权限
daemonize yes
logfile "/data/redis/logs/redis.log"
dir /data/redis
requirepass wojiushimima
自启动脚本(注意路径):
cp utils/redis_init_script /etc/init.d/redisd
修改内容(注意路径):
#!/bin/sh
# chkconfig: 2345 90 10
# description: Redis is a persistent key-value database
EXEC=/usr/local/bin/redis-server
CLIEXEC=/usr/local/bin/redis-cli
#密码是增加的行
REDIS_PASS="wojiushimima"
echo "Stopping ..."
$CLIEXEC -p $REDISPORT -a $REDIS_PASS shutdown
chkconfig redisd on
service redisd start
service redisd stop
标签:
原文地址:http://www.cnblogs.com/TeaIng-Index/p/5670585.html