简体   繁体   English

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

[英]how to delete redis from my ubuntu-16.04 server

When I run sudo systemctl status redis i get this 当我运行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.

and when I run sudo systemctl status redis-server i get this 当我运行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.

it looks like I'm having 2 redis services in my machine so how can i remove the first one because it's old and not working when I try to start it, maybe because i tried to delete it long time ago so i think i did it worng so the question is: how i can delete this service : /etc/systemd/system/redis.service 看来我的机器上有2个Redis服务,所以如何删除第一个服务,因为它很旧并且在尝试启动它时无法正常工作,也许是因为我很久以前就试图删除它,所以我认为我做到了所以,问题是:我如何删除此服务: /etc/systemd/system/redis.service

If you used apt-get when installing 如果在安装时使用apt-get

sudo apt-get purge --auto-remove redis-server

If you used makefile when installing 如果在安装时使用了makefile

How to uninstall Redis server from Ubuntu 如何从Ubuntu卸载Redis服务器

sudo apt-get purge redis

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM