LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Danbooru,postgresql,Code. Cant understand this code (https://www.linuxquestions.org/questions/linux-newbie-8/danbooru-postgresql-code-cant-understand-this-code-817740/)

Vodkaholic1983 07-02-2010 08:55 PM

Danbooru,postgresql,Code. Cant understand this code
 
Hey all
am defo a linux starter am trying to get Danbooru installed and working on my server am not doing to bad
Also this helped me
But here is where i am
it says

export PATH=$PATH:/usr/lib/postgresql/8.1/bin
export LOCAL_DB=$PWD/var-db
export PGDATA=$LOCAL_DB/data
initdb
export PGHOST=$LOCAL_DB
pg_ctl -w -l $LOCAL_DB/server.log start -o "-c listen_addresses= -c unix_socket_directory=$LOCAL_DB"
for i in dev test prod; do createdb danbooru-$i; done
createuser -sDR danbooru-dbuser

I realy dont understand any of that part at all :x
so my question is could someone who does understand it explain what i need to do and help me understand it

Sorry i dont know what else to write am totaly lost on this now
Thanks

edit = opps am running Debian (lenny 64bit)

AlucardZero 07-02-2010 10:35 PM

Have you tried running the commands? What don't you get?

Vodkaholic1983 07-03-2010 05:38 AM

Quote:

Originally Posted by AlucardZero (Post 4022342)
Have you tried running the commands? What don't you get?

Hey yes ive tryed running the commands and it errors cant be used in root or something like that

i dont get all of it :/

Wim Sturkenboom 07-03-2010 06:25 AM

Quote:

Originally Posted by Vodkaholic1983 (Post 4022599)
Hey yes ive tryed running the commands and it errors cant be used in root or something like that

i dont get all of it :/

Please, exact errors are important :(

Vodkaholic1983 07-03-2010 12:50 PM

Quote:

Originally Posted by Wim Sturkenboom (Post 4022632)
Please, exact errors are important :(

Sorry


# export PATH=$PATH:/usr/lib/postgresql/8.3/bin
# export LOCAL_DB=$PWD/var-db
# export PGDATA=$LOCAL_DB/data
# initdb
initdb: cannot be run as root
Please log in (using, e.g., "su") as the (unprivileged) user that will
own the server process.
#

AlucardZero 07-03-2010 01:25 PM

You can't run initdb as root. Log in as the (unprivileged) user that will own the server process.

This is a Postgres error. More information from Google: http://www.postgresql.org/docs/8.1/s...pp-initdb.html

Vodkaholic1983 07-03-2010 01:36 PM

Thanks for the help
i give up this is way to hard for me to do all this
every step of this has been painful

Thanks anyway
Mike

Tinkster 07-03-2010 03:47 PM

All you need to do is to become the user postgres (assuming that
is still his name in Debian) before running those commands.

Code:

su - postgres
Not that hard, really.

That said: the document you followed is not very
detailed, really; it fails to mention which user you're
supposed to be running all this as, and where to
create the directory structure.

On a second note: the document uses an ancient version
of postgres. If danbooro hasn't changed since then I'd
recommend not using the product at all - the current
branch is 8.4.4 (8.1 is still maintained, but the changes
in performance at quite substantial).





Cheers,
Tink


All times are GMT -5. The time now is 07:26 PM.