雷迪斯拒绝开始

时间:2015-10-03 19:57:28

标签: redis ubuntu-15.04

我根据this tutorial安装了redis。一切正常,直到我运行sudo service redis_6379 start,此时我收到错误 Failed to start redis_6379.service: Unit redis_6379.service failed to load: No such file or directory. 当我检查时,我发现redis没有运行:

> sudo service redis_6379 status
● redis_6379.service
Loaded: not-found (Reason: No such file or directory)
Active: inactive (dead)

我不确定这个redis_6379.service文件是什么,或者我如何创建它?有什么帮助吗?

编辑:尝试使用sudo apt-get install redis-server进行安装并遇到以下错误:

adduser: Warning: The home directory `/var/lib/redis' does not belong to the user that you are currently creating.
insserv: script shlonsky: service nginx already provided!
insserv: script unicorn_my_app: service unicorn already provided!
insserv: warning: script 'vncserver' missing LSB tags and overrides
insserv: There is a loop between service unicorn and vncserver if stopped
insserv:  loop involving service vncserver at depth 2
insserv:  loop involving service unicorn at depth 1
insserv: Stopping vncserver depends on unicorn_faisal_lab 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
dpkg: error processing package redis-server (--configure):
subprocess installed post-installation script returned error exit status 1
Processing triggers for libc-bin (2.21-0ubuntu4) ...
Processing triggers for systemd (219-7ubuntu6) ...
Processing triggers for ureadahead (0.100.0-19) ...
Errors were encountered while processing:
 redis-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

我创建了回忆创建脚本shlonskyunicorn_my_app来启动nginx和unicorn,但我认为它们不会影响进一步的.service灌注。任何想法,我需要做什么来允许.service文件安装?

1 个答案:

答案 0 :(得分:8)

尝试通过apt-get安装redis-server: sudo apt-get install redis-server,之后只需start / stop / restart服务器使用sudo service redis-server start或者您也应该能够在后台手动启动redis-server使用redis-server &