Thread: Configuration on CentOS 4.6
I installed CentOS 4 which included Postgresql 7.something, updated to final, but it seems that the configuration was not done during install. On top of that, the file structure doesn't match what's in the Postgres documentation so I can't figure out how to get it configured. For example, there's no pg_hba.config and there's no directory /pgsql/data anywhere to put one in. ANyone familiar with this situation? Thanks, Bruce ____________________________________________________________________________________ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
> For example, there's no pg_hba.config and there's no directory /pgsql/data anywhere to put one in. You need to run initdb which will generate those files with default content. I'm not sure where CentOS / RedHat puts them by default (I compile from source) but at a guess: /usr/local/postgres/bin/initdb -D /path/to/database/files/ databasename Run that as the postgres user. /path/to/database/files/ is where you want to put the files. It does not need to exist already as initdb will create it. Depends how CentOS / RedHat have setup the package, but it would possible default to /usr/local/postgres/data/ I think. THINK BEFORE YOU PRINT - Save paper if you don't really need to print this *******************Confidentiality and Privilege Notice******************* The material contained in this message is privileged and confidential to the addressee. If you are not the addressee indicated in this message or responsible for delivery of the message to such person, you may not copy or deliver this message to anyone, and you should destroy it and kindly notify the sender by reply email. Information in this message that does not relate to the official business of Weatherbeeta must be treated as neither given nor endorsed by Weatherbeeta. Weatherbeeta, its employees, contractors or associates shall not be liable for direct, indirect or consequential loss arising from transmission of this message or any attachments e-mail.
--- Phillip Smith <phillip.smith@weatherbeeta.com.au> wrote: > > For example, there's no pg_hba.config and there's no > directory /pgsql/data > anywhere to put one in. > > You need to run initdb which will generate those files with > default content. > > I'm not sure where CentOS / RedHat puts them by default (I > compile from > source) but at a guess: > /usr/local/postgres/bin/initdb -D /path/to/database/files/ > databasename > > Run that as the postgres user. > /path/to/database/files/ is where you want to put the files. > It does not > need to exist already as initdb will create it. Depends how > CentOS / RedHat > have setup the package, but it would possible default to > /usr/local/postgres/data/ I think. Thanks very much. That worked. I was trying to use createdb and getting the message "user doesn't exist." Previously when I installed postgresql, I also compiled it from source and had no problem creating a db and getting it running. For some reason, trying to step in in the middle of the process got me hung up Sincerely, Bruce ____________________________________________________________________________________ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
> Thanks very much. That worked. > > I was trying to use createdb and getting the message "user doesn't > exist." Previously when I installed postgresql, I also compiled it > from source and had no problem creating a db and getting it running. > For some reason, trying to step in in the middle of the process > got me hung up Understandable :) I get the same problem, so I just compile from source to avoid the issue :P THINK BEFORE YOU PRINT - Save paper if you don't really need to print this *******************Confidentiality and Privilege Notice******************* The material contained in this message is privileged and confidential to the addressee. If you are not the addressee indicated in this message or responsible for delivery of the message to such person, you may not copy or deliver this message to anyone, and you should destroy it and kindly notify the sender by reply email. Information in this message that does not relate to the official business of Weatherbeeta must be treated as neither given nor endorsed by Weatherbeeta. Weatherbeeta, its employees, contractors or associates shall not be liable for direct, indirect or consequential loss arising from transmission of this message or any attachments e-mail.
On Monday 28 April 2008, Bruce Hyatt <brucejhyatt@yahoo.com> wrote: > I installed CentOS 4 which included Postgresql 7.something, > updated to final, but it seems that the configuration was not > done during install. > > On top of that, the file structure doesn't match what's in the > Postgres documentation so I can't figure out how to get it > configured. > > For example, there's no pg_hba.config and there's no directory > /pgsql/data anywhere to put one in. > > ANyone familiar with this situation? The first time you start the service the Red Hat init script will run initdb for you. -- Alan
--- Alan Hodgson <ahodgson@simkin.ca> wrote: > On Monday 28 April 2008, Bruce Hyatt <brucejhyatt@yahoo.com> > wrote: > > I installed CentOS 4 which included Postgresql 7.something, > > updated to final, but it seems that the configuration was > not > > done during install. > > > > On top of that, the file structure doesn't match what's in > the > > Postgres documentation so I can't figure out how to get it > > configured. > > > > For example, there's no pg_hba.config and there's no > directory > > /pgsql/data anywhere to put one in. > > > > ANyone familiar with this situation? > > The first time you start the service the Red Hat init script > will run initdb > for you. That didn't seem to have happened. It wasn't until I ran it myself from the command line that I could create a database. Bruce ____________________________________________________________________________________ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
Hi, On Mon, 2008-04-28 at 16:56 -0700, Bruce Hyatt wrote: > For example, there's no pg_hba.config and there's no directory > /pgsql/data anywhere to put one in. run service postgresql start It will run initdb for you, and start database. Also the directory structure is actually /var/lib/pgsql/data . Regards, -- Devrim GÜNDÜZ , RHCE PostgreSQL Replication, Consulting, Custom Development, 24x7 support Managed Services, Shared and Dedicated Hosting Co-Authors: plPHP, ODBCng - http://www.commandprompt.com/
Attachment
Hi, On Tue, 2008-04-29 at 11:32 +1000, Phillip Smith wrote: > I get the same problem, so I just compile from source to avoid the > issue :P So you say precompiled binaries are different that what you compile on your server, in terms of functionality? :) -- Devrim GÜNDÜZ , RHCE PostgreSQL Replication, Consulting, Custom Development, 24x7 support Managed Services, Shared and Dedicated Hosting Co-Authors: plPHP, ODBCng - http://www.commandprompt.com/
Attachment
>> On Tue, 2008-04-29 at 11:32 +1000, Phillip Smith wrote: >> I get the same problem, so I just compile from source to avoid the >> issue :P > > So you say precompiled binaries are different that what you compile on your server, in terms of functionality? Not at all (unless I'm compiling a different version than what my distro repos have. For example, Ubuntu 6.06LTS repos only go to PG-8.1 at the moment, but I've compiled 8.2 on a box running 6.06LTS :) THINK BEFORE YOU PRINT - Save paper if you don't really need to print this *******************Confidentiality and Privilege Notice******************* The material contained in this message is privileged and confidential to the addressee. If you are not the addressee indicated in this message or responsible for delivery of the message to such person, you may not copy or deliver this message to anyone, and you should destroy it and kindly notify the sender by reply email. Information in this message that does not relate to the official business of Weatherbeeta must be treated as neither given nor endorsed by Weatherbeeta. Weatherbeeta, its employees, contractors or associates shall not be liable for direct, indirect or consequential loss arising from transmission of this message or any attachments e-mail.