Whi*_*ger 2 redis ubuntu-15.04
我根据本教程安装了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)
Run Code Online (Sandbox Code Playgroud)
我不确定这个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)
Run Code Online (Sandbox Code Playgroud)
我创建了回忆创建脚本shlonsky并unicorn_my_app启动nginx和独角兽,但我认为它们不会影响进一步的.service灌注.任何想法我需要做什么来允许.service文件安装?
尝试简单地通过apt-get:安装redis-server
sudo apt-get install redis-server,之后简单地start/ stop/ restart服务器使用sudo service redis-server startOR你也应该能够在后台手动启动redis-server redis-server &.