From owner-freebsd-questions@FreeBSD.ORG Wed Dec 31 15:17:01 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 89F781065720 for ; Wed, 31 Dec 2008 15:17:01 +0000 (UTC) (envelope-from bsam@ipt.ru) Received: from services.ipt.ru (services.ipt.ru [194.62.233.110]) by mx1.freebsd.org (Postfix) with ESMTP id 4150A8FC2E for ; Wed, 31 Dec 2008 15:17:01 +0000 (UTC) (envelope-from bsam@ipt.ru) Received: from bb.ipt.ru ([194.62.233.89]) by services.ipt.ru with esmtp (Exim 4.54 (FreeBSD)) id 1LI2oe-000H8l-8F for freebsd-questions@freebsd.org; Wed, 31 Dec 2008 18:17:00 +0300 To: Free BSD Questions list References: <20081231150648.GA18063@teddy.fas.com> From: Boris Samorodov Date: Wed, 31 Dec 2008 18:17:06 +0300 In-Reply-To: <20081231150648.GA18063@teddy.fas.com> (stan's message of "Wed\, 31 Dec 2008 10\:06\:48 -0500") Message-ID: <13963197@bb.ipt.ru> User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: PostgreSQL setup X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Dec 2008 15:17:02 -0000 stan writes: > I have installed PostgreSQL via the ports on a new 7.1 machine. I am trying > to set it up. > > I found: > > http://www.freebsddiary.org/postgresql.php > > Whic says to run: > > su -l pgsql -c initdb > > But that gives me the following error message: > > initdb: no data directory specified > You must identify the directory where the data for this database system > will reside. Do this with either the invocation option -D or the > environment variable PGDATA. > > But when I try: > > # su -l pgsql -c initdb -D /usr/local/postgres > > I get: > > Illegal option -D > > What am I doing wrong? You haven't read a post-install message. ;-) You may read it now: ----- $ less /usr/ports/databases/postgresql83-server/files/pkg-message-server.in ----- WBR -- Boris Samorodov (bsam) Research Engineer, http://www.ipt.ru Telephone & Internet SP FreeBSD committer, http://www.FreeBSD.org The Power To Serve