Linux – Install PostgreSQL on Ubuntu without starting it

debiandpkglinuxpostgresqlUbuntu

I want to install PostgreSQL 8.4 (or any service) on Ubuntu 10.4 (or any Linux distro) without it starting up as part of the installation. Right now when I do a

sudo apt-get install postgresql-8.4

part of the installation process is

Starting PostgreSQL 8.4 database server                   [ OK ] 

I really don't want PostgreSQL to start just because I'm installing it because I want a chance to change some config files before starting it for the first time.

Any thoughts on how to do this or if it's possible at all?

Thanks,
Everett

Best Answer

See this blog post which details how to prevent it from being started in the postinstall scripts.

But in most cases this doesn't add any additional steps to your setup. You can change the configuration files while the service is running and you have to restart or issue a SIGHUP signal to the daemon to have these changes take affect. So you can just proceed to edit the configuration then run sudo /etc/init.d/postgresql restart when you're done.