尝试按照http://redis.io/topics/quickstart
中的说明在redian 7 wheezy(redis版本7)中安装redis作为服务但是在运行sudo update-rc.d redis_6379默认
之后我收到这些错误
update-rc.d: using dependency based boot sequencing
insserv: warning: script 'redis_6379' missing LSB tags and overrides
insserv: There is a loop between service nginx and redis_6379 if stopped
insserv: loop involving service redis_6379 at depth 2
insserv: loop involving service nginx at depth 1
insserv: Stopping redis_6379 depends on nginx and therefore on system facility `$all' which can not be true!
insserv: exiting now without changing boot order!
update-rc.d: error: insserv rejected the script header
Nginx init.d是
#! /bin/sh
### BEGIN INIT INFO
# Provides: nginx
# Required-Start: $all
# Required-Stop: $all
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts the nginx web server
# Description: starts nginx using start-stop-daemon
### END INIT INFO
PATH=/opt/nginx/sbin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/opt/nginx/sbin/nginx
NAME=nginx
DESC=nginx
test -x $DAEMON || exit 0
# Include nginx defaults if available
if [ -f /etc/default/nginx ] ; then
. /etc/default/nginx
fi
set -e
Redis init.d
#!/bin/sh
#
# Simple Redis init.d script conceived to work on Linux systems
# as it does use of the /proc filesystem.
REDISPORT=6379
EXEC=/usr/local/bin/redis-server
CLIEXEC=/usr/local/bin/redis-cli
PIDFILE=/var/run/redis_${REDISPORT}.pid
CONF="/etc/redis/${REDISPORT}.conf"
答案 0 :(得分:1)
尝试将标题添加到 /etc/init.d/redis_6379
### BEGIN INIT INFO
# Provides: redis_6379
# Required-Start: $network $remote_fs $local_fs
# Required-Stop: $network $remote_fs $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: start and stop redis_6379
# Description: Redis daemon
### END INIT INFO
并运行
sudo update-rc.d redis_6379 defaults