What are the differences between the two following ways or starting something, first being:
/etc/init.d/redis-server start
And second:
/usr/bin/redis-server
I've never really fully understood why which is preferred over the other.
What are the differences between the two following ways or starting something, first being:
/etc/init.d/redis-server start
And second:
/usr/bin/redis-server
I've never really fully understood why which is preferred over the other.
Whatever goes into /etc/init.d
is a script that starts a service and may define appropriate level where the script runs - single user mod, multiuser, shutdown; it's not the service itself.
Whatever goes into /usr/bin
is the actual server, it is the executable file.
The analogy from windows world would be .exe
files vs scheduled services that call those .exe
files
ps aux | grep redis-server
and the do a killkill -9 <PID>
. Which is annoying. – Karl Morrison Nov 24 '15 at 16:56stop
command, and other related commands likestatus
,restart
, etc., a standardised set so that you don't have to figure out how to do those things. – muru Nov 24 '15 at 17:18service redis-server start/stop
? Those I do know that I need to get the pid and kill. – Karl Morrison Nov 24 '15 at 17:22service
command is a wrapper script which calls the correct set of commands depending on the system. In this case, the sameinit.d
script you mentioned - you shouldn't have to kill manually. If you do, it's a bug and should be reported. – muru Nov 24 '15 at 17:24pkill
command. – muru Nov 24 '15 at 17:28