X-Original-To: pgsql-php-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id E7646D1C9EA for ; Thu, 18 Mar 2004 17:52:25 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 44901-10 for ; Thu, 18 Mar 2004 13:52:19 -0400 (AST) Received: from toast.zoidtechnologies.com (unknown [216.144.212.170]) by svr1.postgresql.org (Postfix) with ESMTP id B0D65D1C4EB for ; Thu, 18 Mar 2004 13:52:13 -0400 (AST) Received: from eros.zoidtechnologies.com (unknown [192.168.2.7]) by toast.zoidtechnologies.com (Postfix) with ESMTP id 8227B20107; Thu, 18 Mar 2004 12:52:18 -0500 (EST) Received: by eros.zoidtechnologies.com (Postfix, from userid 500) id 66F272659BF; Thu, 18 Mar 2004 12:52:18 -0500 (EST) Date: Thu, 18 Mar 2004 12:52:18 -0500 From: Jeff MacDonald To: Raul Secan Cc: pgsql-php@postgresql.org Subject: Re: running postgresql as a linux service Message-ID: <20040318175218.GQ9163@zoidtechnologies.com> References: <001b01c40cfc$c6af5dd0$0a10a8c0@zerosoft.ro> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="TSQPSNmi3T91JED+" Content-Disposition: inline In-Reply-To: <001b01c40cfc$c6af5dd0$0a10a8c0@zerosoft.ro> User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200403/47 X-Sequence-Number: 2646 --TSQPSNmi3T91JED+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Mar 18, 2004 at 05:22:07PM +0200, Raul Secan wrote: > Hello, I have succesfuly installed PostgreSQL 7.4.1, on my OS which is Re= d Hat Linux 9.0. >=20 > I start the server with: > $ pg_ctl -D /usr/local/pgsql/data -l logfile start=20 >=20 > And stop it with: > $ pg_ctl -D /usr/local/pgsql/data stop -m fast >=20 > There are two questions here, which I want to put to you guys: > 1. How can make PostgreSQL run as a Linux service so database server > starts at each reboot run 'ntsysv' as root, and make sure the checkbox next to "postgresql" is turned on. > 2. How can I register the PGDATA environment variable, so I don't have to > use -D /usr/local/pgsql/data parameter (and don't use -l logfile if it is > posible) when run the start command >=20 I generally use something like: # /usr/sbin/service postgresql start to start the service, and "stop" to stop it. this *should* take care of dealing with the -D option. > Thanks, Raul Secan. hope that helps. regards, J --TSQPSNmi3T91JED+ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) iD8DBQFAWeHRJr1gbjUXKkIRAiDCAKCMLytcg+fIxwyMJlJaeiNSWPpD3gCfQZMK 3ODD0E7EZgKQ54EXWwbzqvE= =l88s -----END PGP SIGNATURE----- --TSQPSNmi3T91JED+--