无法启动Redis内存中数据存储

时间:2019-06-12 12:48:25

标签: ubuntu amazon-ec2 redis

在ubuntu 16.04上安装Redis后,我无法激活该服务。当我用sudo systemctl status redis检查它时,它显示了以下错误:

● redis.service - Redis In-Memory Data Store
   Loaded: loaded (/etc/systemd/system/redis.service; disabled; vendor preset: enabled)
   Active: failed (Result: start-limit-hit) since Wed 2019-06-12 12:34:59 UTC; 6s ago
  Process: 16672 ExecStop=/usr/local/bin/redis-cli shutdown (code=exited, status=203/EXEC)
  Process: 16670 ExecStart=/usr/local/bin/redis-server /etc/redis/redis.conf (code=exited, status=203/EXEC)
 Main PID: 16670 (code=exited, status=203/EXEC)

Jun 12 12:34:59 ip- systemd[1]: redis.service: Service hold-off time over, scheduling restart.
Jun 12 12:34:59 ip- systemd[1]: Stopped Redis In-Memory Data Store.
Jun 12 12:34:59 ip- systemd[1]: redis.service: Start request repeated too quickly.
Jun 12 12:34:59 ip- systemd[1]: Failed to start Redis In-Memory Data Store.
Jun 12 12:34:59 ip- systemd[1]: redis.service: Unit entered failed state.
Jun 12 12:34:59 ip- systemd[1]: redis.service: Failed with result 'start-limit-hit'.

我尝试重新启动Redis服务器sudo systemctl restart redis,但没有成功。

还尝试使用以下代码更改redis目录的所有者:

sudo chown redis:redis /var/lib/redis

sudo systemctl restart redis

但它也不起作用。

请帮助我解决此问题。

1 个答案:

答案 0 :(得分:0)

在这里,我们将为Redis安装所有必需的依赖项,以摆脱上述错误。

cd插入 deps cd /redis-stable/deps

然后,安装所需的软件包: make hiredis lua jemalloc linenoise

现在,倒退到文件夹 cd / redis-stable cd ..

现在执行,make命令运行,然后安装sudo make install

最后,您可以运行Redis。 sudo apt install redis-server