Reputation: 7959
I am using Ubuntu to develop my website. Recently, I started to use redis.
When I started my computer, redis-server will start by its own.
What method can I stop my redis-server starting by itself?
Upvotes: 32
Views: 23434
Reputation: 25159
For those looking for a more up-to-date solution. If your system is using systemd (Ubuntu 15.04 and up) the way to not launch it at start-up is:
sudo systemctl disable redis-server
systemctl admits "basically" these actions (check the following links for the complete list)
disable
. Don't launch at boot.enable
. Launch at boot.start
. Launch it now.stop
. Stop it now.status
. To check if is runningAs written in this answer:
For more details, see enabling-and-disabling-services and for the very long answer see this post
For more details, see this post on Digital Ocean and the man page for systemctl.
Upvotes: 36
Reputation: 39223
It seems that the redis-server
package uses rc.d
scripts, and the preferred way to deal with them in Ubuntu is using update-rc.d
:
sudo update-rc.d redis-server disable
Should do the trick. You can also disable it in a certain runlevel only:
sudo update-rc.d redis-server disable 2
Upvotes: 38