如何从我的ubuntu-16.04服务器中删除redis

时间:2017-05-11 03:30:33

标签: ubuntu redis ubuntu-16.04 ubuntu-server

当我运行sudo systemctl status redis时,我得到了这个

● redis.service - Redis In-Memory Data Store
Loaded: loaded (/etc/systemd/system/redis.service; enabled; vendor preset: 
enabled)
Active: inactive (dead) (Result: exit-code) since Thu 2017-05-11 03:43:43 
WEST; 
31min ago
Main PID: 1553 (code=exited, status=203/EXEC)

May 11 03:43:42 fevrok systemd[1]: redis.service: Control process exited, 
code=exited status=203
May 11 03:43:42 fevrok systemd[1]: redis.service: Unit entered failed state.
May 11 03:43:42 fevrok systemd[1]: redis.service: Failed with result 'exit-code'.
May 11 03:43:43 fevrok systemd[1]: redis.service: Service hold-off time over, scheduling restart.
May 11 03:43:43 fevrok systemd[1]: Stopped Redis In-Memory Data Store.
May 11 03:43:43 fevrok systemd[1]: redis.service: Start request repeated too quickly.
May 11 03:43:43 fevrok systemd[1]: Failed to start Redis In-Memory Data Store.

当我运行sudo systemctl status redis-server时,我得到了这个

● redis-server.service - Advanced key-value store
Loaded: loaded (/lib/systemd/system/redis-server.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2017-05-11 03:25:48 WEST; 49min ago
 Docs: http://redis.io/documentation,
       man:redis-server(1)
Main PID: 1121 (redis-server)
CGroup: /system.slice/redis-server.service
       └─1121 /usr/bin/redis-server 127.0.0.1:6379

May 11 03:25:48 fevrok systemd[1]: Starting Advanced key-value store...
May 11 03:25:48 fevrok run-parts[1116]: run-parts: executing /etc/redis/redis-server.pre-up.d/00_example
May 11 03:25:48 fevrok run-parts[1122]: run-parts: executing /etc/redis/redis-server.post-up.d/00_example
May 11 03:25:48 fevrok systemd[1]: Started Advanced key-value store.

看起来我在我的机器上有2个redis服务,所以如何删除第一个,因为它已经老了,当我尝试启动它时不工作,可能是因为我试图删除它很久以前所以我认为我做到了这一点,所以问题是:我如何删除这项服务:/etc/systemd/system/redis.service

1 个答案:

答案 0 :(得分:0)

sudo apt-get purge redis

如果它不起作用,您可以尝试查找redis文件并将其删除,主要是redis位于/ usr / bin / redis