简体   繁体   中英

how to delete redis from my ubuntu-16.04 server

When I run sudo systemctl status redis i get this

● 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

● 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

If you used apt-get when installing

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

If you used makefile when installing

How to uninstall Redis server from Ubuntu

sudo apt-get purge redis

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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