top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How to disable openssh-server & my sql server from startup services?

+2 votes
810 views

I recently installed Opennssh-server & mysql-server on my computer for development, but I require these services few time, I know I can start these service by using

sudo service start/stop/restart.

But how to disable them from starting on startup, becoz these tools made my computer bootup very slow.

posted Mar 9, 2014 by Garima Jain

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

Locate the upstart configuration files for the programs; they should be in /etc/init

add the single word "manual" after anything else in the "start on" section for the programs' config files.

After you save your changes, you will find that the programs will only start when you ask them to - not on startup. However, they will still STOP under the same conditions as before. If you want to prevent that too, change the "stop on" stanza as well. Not recommended for MySQL, which definitely should be shut down in an orderly fashion.

For full details on these config files, see "man 5 init". From that man page:

"*manual This stanza will disregard any previously seen start on definition. By adding this stanza on any line below the start on definition, it provides the ability to stop a job from being automatically started. When specified, the only way to start such a job is via start (8).*"

answer Mar 9, 2014 by Mandeep Sehgal
locate the scripts in /etc/init.d and then do a chmod -x
Dont  do that.

a) using chmod in /etc/init.d will have no effect on most upstart-controlled programs

b) for programs not controlled by upstart, you will then also be unable to start the scripts manually (at least not without doing something like "sudo sh /etc/init.d/progname")

c) it's ugly. Read "man update-rc.d" instead
Similar Questions
+2 votes

I am used to traditional update-rc.d et all.

Now I wonder how to add a a script that used to called by init.d (with start/sop ..) to the new "service start xx" regime.

All the tutorials I found talk about how to use update-rc.d..

+2 votes

Can someone share the command if its there?

0 votes

building bootloader or configuring bootloader or building rootfs from scratch

...