vim /etc/init.d/redisd
REDISPORT=6379
EXEC=/usr/local/bin/redis-server
CLIEXEC=/usr/local/bin/redis-cli
#PIDFILE=/var/run/redis_${REDISPORT}.pid
PIDFILE=/var/run/redis.pid
CONF="/etc/redis/${REDISPORT}.conf"
配置pid文件不一致所导致
vim /etc/redis/6379.conf
这两处的pid文件名要一致,不然启动脚本无法生效。
redis的配置方法可参考:http://www.tuicool.com/articles/aQbQ3u