LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-22-2012, 12:40 PM   #1
raindog308
Member
 
Registered: Dec 2010
Posts: 34

Rep: Reputation: 1
How to install package without starting service in Debian?


One of my Debian gripes is that if you do an apt-get that pulls in samba or bind or something as a dependency, it starts samba or bind, which often is not what I want.

I can't seem to find an apt-get flag that says "install samba, but don't start it". Is there such an option?

As an example, I did an "apt-get update && apt-get upgrade" on a minimal Debian 6 install and afterwards, bind and samba were both running...grrr...
 
Old 06-22-2012, 02:54 PM   #2
Kustom42
Senior Member
 
Registered: Mar 2012
Distribution: Red Hat
Posts: 1,604

Rep: Reputation: 415Reputation: 415Reputation: 415Reputation: 415Reputation: 415
Besides doing the old school manual install I don't know of an option for the package managers that will prevent it from starting.
 
Old 06-22-2012, 10:40 PM   #3
i_joh
Member
 
Registered: Apr 2005
Distribution: Debian
Posts: 82

Rep: Reputation: 5
You can rename links in /etc/rc0.d/ rc1.d/ rc2.d/ rc3.d/ rc4.d/ rc5.d/ rc6.d/ rcS.d/ to prevent services from starting. For example, I don't want NFS starting. So I renamed my nfs-common links to look like this:

rc0.d/K05nfs-common
rc1.d/K05nfs-common
rc2.d/K05nfs-common
rc3.d/K05nfs-common
rc4.d/K05nfs-common
rc5.d/K05nfs-common
rc6.d/K05nfs-common
rcS.d/K17nfs-common

Notice all the link names start with K instead of S. Just beware the following from the manual of update-rc.d:

Quote:
A common system administration error is to delete the links with the thought that this will "disable" the
service, i.e., that this will prevent the service from being started. However, if all links have been
deleted then the next time the package is upgraded, the package's postinst script will run update-rc.d
again and this will reinstall links at their factory default locations. The correct way to disable ser‐
vices is to configure the service as stopped in all runlevels in which it is started by default. In the
System V init system this means renaming the service's symbolic links from S to K.
Also know that stopping services will disable functionality, which may cause problems. Only disable them if you're absolutely sure you don't want their functionality.

Edited once more: rc0.d, rc1.d, rc6.d and rcS.d are special runlevels in which you shouldn't need to modify anything. Just search the webs for 'debian runlevel' to get a hint on what the different runlevels are for.

Last edited by i_joh; 06-22-2012 at 10:49 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Installing services using apt-get install *service name* Unable to locate package. bwilky11 Debian 2 05-07-2012 04:22 PM
[SOLVED] Pound load balancer service not starting on Debian 6 Sector_Banana Linux - Newbie 3 09-25-2011 05:52 AM
install package on Debian ust Linux - Newbie 6 04-15-2011 11:37 AM
Won't Boot - Starting Printer Service - Starting CUPS jeansond Linux - Newbie 0 10-11-2004 06:39 PM
Fresh Debian install locks while starting up Imek Debian 1 10-02-2004 07:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:00 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration