我按照本教程安装了Redis
服务器
https://www.digitalocean.com/community/tutorials/how-to-install-and-use-redis
安装正确我的安装设置如下
Selected config:
Port : 6379
Config file : redis
Log file : /var/log/redis_6379.log
Data dir : /var/lib/redis/6379
Executable : /usr/local/bin/redis-server
Cli Executable : /usr/local/bin/redis-cli
在此之后我被问到这样一个问题
Is this ok? Then press ENTER to go on or Ctrl-C to abort.
Copied /tmp/6379.conf => /etc/init.d/redis_6379
Installing service...
Adding system startup for /etc/init.d/redis_6379 ...
/etc/rc0.d/K20redis_6379 -> ../init.d/redis_6379
/etc/rc1.d/K20redis_6379 -> ../init.d/redis_6379
/etc/rc6.d/K20redis_6379 -> ../init.d/redis_6379
/etc/rc2.d/S20redis_6379 -> ../init.d/redis_6379
/etc/rc3.d/S20redis_6379 -> ../init.d/redis_6379
/etc/rc4.d/S20redis_6379 -> ../init.d/redis_6379
/etc/rc5.d/S20redis_6379 -> ../init.d/redis_6379
Success!
Starting Redis server...
Installation successful!
在此之后,我通过运行以下命令将其关闭
sudo service redis_6379 stop
之后我现在尝试启动Redis-Server
sudo service redis_6379 start
抛出错误
Starting Redis server...
15465:C 15 Mar 03:03:00.315 # Fatal error, can't open config file 'redis'
答案 0 :(得分:0)
使用locate redis.conf查找redis.conf文件。 我在/etc/redis/redis.conf中有我的
它应该是这样的: