Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to stop automatically running services?

 
Hussein Baghdadi
clojure forum advocate
Bartender
Posts: 3479
Clojure Mac Objective C
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi.
I have some services running automatically on Ubuntu 7.10 and in my case it is PostgreSQL database.
In general, how to forbid services from running automatically in Ubuntu?
Thanks.
 
Anand Hariharan
Rancher
Posts: 272
C++ Debian VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tweak scripts located at /etc/rcn.d

For a service such as postgresql, n = 3.
 
Stefan Wagner
Ranch Hand
Posts: 1923
Linux Postgres Database Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For Ubuntu, it is most probably Runlevel 2, and /etc/rc2.d/S??postgresql-* .
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18214
53
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The entries in the rc.n directories are aliases (softlinks) to the master scripts. You want to remove both the SnnServicename and the KnnServicename from all the numbered runlevel directories.

In Red Hat/Feodora, there's a magic comment in the initscript that specifies run level information (it's also done in SuSe, but slightly differently). You can turn services on and off via a gui command or via the chkconfig utility, like so:

chkconfig --level 345 postgresql off

Occasionally, Ubuntu adopts Red Hat stuff, so you might want to see if that works.
 
Stefan Wagner
Ranch Hand
Posts: 1923
Linux Postgres Database Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ah yes - there is a helper-tool

with a different version number probably in your case.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic