LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Postgres installation initdb problem (https://www.linuxquestions.org/questions/linux-software-2/postgres-installation-initdb-problem-104290/)

bruce64 10-15-2003 01:43 PM

Postgres installation initdb problem
 
Good afternoon everyone,
I am setting up Postgresql on my redhat 8 system. I have installed the files and have set up the proper directories, however I have run into a problem. I am trying to initialize the database with initdb. The command is

pg$ /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data

I did not have a bin in that first half of the statement so in locating initdb, I found it in the dire /usr/bin. I then used the following line:

pg$ /usr/bin/initdb -D /usr/local/pgsql/data

After running the line above, I got a message saying success! I then started the postmaster and again everything went fine. However I need to create users for this database so I use the following command:

pg$ /usr/local/pgsql/bin/createuser bruce

I get an error stating there is no such directory. The question is, how do I get the postgres bin created? Also I am guessing that the bin should have commands that are specific to postgresql. Is there a way for me to import this bin from /usr/bin ? Any help is greatly appreciated. Thanks!

Bruce

jpbarto 10-15-2003 02:04 PM

I'm not sure exactly what the problem may be... however the createuser is just a shell script. You could take a look at its internals to find out what it may be doing that would cause a 'no such directory' error.

If you can provide more information, particularly *exactly* what the returned error is I may be able to help a bit more. Also do you get this error before or after answering the two permission questions of whether the user can add / del tables and add / del users?

jpbarto

bruce64 10-16-2003 02:52 PM

Answering my own question
 
Thanks for the reply jb! I was fooling around with the createuser script. Bottom line, there is supposed to be a bin in the following path /usr/local/pgsql/bin In this bin is where are the postgres scripts should be. However during my installation I did not end up with a "bin" in the pgsql directory. Knowing where the postgres scripts reside (/usr/bin/) I can execute everything I need. The trick of course will be to set up the postmaster to start up on log in. That maybe my next post to the group. If anyone is curious as to this problem in detail, I would be happy to explain it in full. Take care!

Bruce

jpbarto 10-16-2003 02:55 PM

Good, glad you got it going.


All times are GMT -5. The time now is 01:03 PM.