FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 12-06-2008, 01:03 AM
"中和刘"
 
Default where are the data and log folders of postgresql 8.3 on debian sid?

I have installed postgresql 8.3 from debian package, and i'm reading
the official document from postgresql, the document says after
installing the database, it needs to create data folder and specify
log file to initiate the database, like this:
---------------
mkdir /usr/local/pgsql/data
chown postgres /usr/local/pgsql/data
su - postgres
/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
/usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data >logfile 2>&1 &
-----------------
but i cannot find the folder in my debian installation, i think they
are at some location else, where is it? thanks


--
I'm a web developer using debian+mono(C#)+postgresql+xhtml+js+xsl+xml+css
homepage http://www.starliu.com


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 12-06-2008, 03:17 AM
"中和刘"
 
Default where are the data and log folders of postgresql 8.3 on debian sid?

On Sat, Dec 6, 2008 at 11:42 AM, Ken Irving <fnkci@uaf.edu> wrote:
> On Fri, Dec 05, 2008 at 06:28:03PM -0900, Ken Irving wrote:
>> On Sat, Dec 06, 2008 at 10:03:04AM +0800, ????????? wrote:
>> > I have installed postgresql 8.3 from debian package, and i'm reading
>> > the official document from postgresql, the document says after
>> > installing the database, it needs to create data folder and specify
>> > log file to initiate the database, like this:
>> > ---------------
>> > mkdir /usr/local/pgsql/data
>> > chown postgres /usr/local/pgsql/data
>> > su - postgres
>> > /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
>> > /usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data >logfile 2>&1 &
>> > -----------------
>> > but i cannot find the folder in my debian installation, i think they
>> > are at some location else, where is it? thanks
>
> Taking another look at this, the instructions show to create a
> directory for your data owned by the postgres user, and then to
> run a couple of commands on it, initdb and postgres. My guess
> would be that those would be found in /usr/bin/ and so in the
> root user's path, but in any case should be in some bin/ directory
> somewhere.
>
> Some things to try...
>
> man initdb
> man postgres
> man -k postgres
> dpgk -L PACKAGE_NAME | grep bin/
>
> Or wait a day and use locate initdb, if for some reason you want to know
> where it is. Maybe there's something under /var/, e.g., if the debian
> package has configured a default location for the database.
>
> In any case, you're not starting from scratch (as the upstream docs
> probably assume), you're using debian!
>
> Ken
>
> --
> Ken Irving
>
>
> --
> To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
>
thank you for your advice, i found in the /etc/postgresql:
---------------
data_directory = '/var/lib/postgresql/8.3/main'
---------------
and i found the /var/log/postgresql
i hope i'm right



--
I'm a web developer using debian+mono(C#)+postgresql+xhtml+js+xsl+xml+css


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 12-06-2008, 04:22 AM
"中和刘"
 
Default where are the data and log folders of postgresql 8.3 on debian sid?

On Sat, Dec 6, 2008 at 12:48 PM, Ken Irving <fnkci@uaf.edu> wrote:
> On Sat, Dec 06, 2008 at 12:17:40PM +0800, ????????? wrote:
>> On Sat, Dec 6, 2008 at 11:42 AM, Ken Irving <fnkci@uaf.edu> wrote:
>> > On Fri, Dec 05, 2008 at 06:28:03PM -0900, Ken Irving wrote:
>> >> On Sat, Dec 06, 2008 at 10:03:04AM +0800, ????????? wrote:
>> >> > I have installed postgresql 8.3 from debian package, and i'm reading
>> >> > the official document from postgresql, the document says after
>> >> > installing the database, it needs to create data folder and specify
>> >> > log file to initiate the database, like this:
>> >> > ---------------
>> >> > mkdir /usr/local/pgsql/data
>> >> > chown postgres /usr/local/pgsql/data
>> >> > su - postgres
>> >> > /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
>> >> > /usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data >logfile 2>&1 &
>> >> > -----------------
>> >> > but i cannot find the folder in my debian installation, i think they
>> >> > are at some location else, where is it? thanks
>> >
>> > Taking another look at this, the instructions show to create a
>> > directory for your data owned by the postgres user, and then to
>> > run a couple of commands on it, initdb and postgres. My guess
>> > would be that those would be found in /usr/bin/ and so in the
>> > root user's path, but in any case should be in some bin/ directory
>> > somewhere.
>> >
>> > Some things to try...
>> >
>> > man initdb
>> > man postgres
>> > man -k postgres
>> > dpgk -L PACKAGE_NAME | grep bin/
>> >
>> > Or wait a day and use locate initdb, if for some reason you want to know
>> > where it is. Maybe there's something under /var/, e.g., if the debian
>> > package has configured a default location for the database.
>> >
>> > In any case, you're not starting from scratch (as the upstream docs
>> > probably assume), you're using debian!
>> >
>> >
>> thank you for your advice, i found in the /etc/postgresql:
>> ---------------
>> data_directory = '/var/lib/postgresql/8.3/main'
>> ---------------
>> and i found the /var/log/postgresql
>> i hope i'm right
>
> It turns out I have postgres installed on one system (not sure why...).
> I did:
>
> $ ls /usr/share/doc/postgresql-common/README.De*
> README.Debian.gz README.Devel
> $ zless /usr/share/doc/postgresql-common/README.Debian.gz
>
> which says in part:
>
> PostgreSQL for Debian
> =====================
> ...
> First steps for the impatient
> -----------------------------
> Eventually you will not get around reading at least some parts of
> the manual, but if you want to get straight into playing SQL, here
> are the steps to create a database user and a database for the Unix
> user 'joe':
>
> 1. ...
>
> Those look to me like some potentially useful instructions if you're
> trying to get started (without reading the fine manual...).
>
> Ken
>
yes, i found the document, it's what i want, thank you

> --
> Ken Irving
>
>
> --
> To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
>
>


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 

Thread Tools




All times are GMT. The time now is 09:21 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org