下載好Redis....redis
make ui
make installserver
mkdir /etc/redis/ip
cp redis.conf /etc/redis/redis_6379.confit
redis_6379.conf內容(update):io
#注意建立的目錄,還有權限require
daemonize yescli
logfile "/data/redis/logs/redis.log"date
dir /data/redisfile
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
REDISPORT=6379
EXEC=/usr/local/bin/redis-server
CLIEXEC=/usr/local/bin/redis-cli
CONF="/etc/redis/redis_${REDISPORT}.conf"
#密碼是增長的行
REDIS_PASS="wojiushimima"
echo "Stopping ..."
$CLIEXEC -p $REDISPORT -a $REDIS_PASS shutdown
chkconfig redisd on
service redisd start
service redisd stop