LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-02-2010, 08:55 PM   #1
Vodkaholic1983
Member
 
Registered: May 2010
Distribution: Windows / Debian
Posts: 163

Rep: Reputation: 0
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)

Last edited by Vodkaholic1983; 07-02-2010 at 08:57 PM. Reason: missing my OS
 
Old 07-02-2010, 10:35 PM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,822

Rep: Reputation: 610Reputation: 610Reputation: 610Reputation: 610Reputation: 610Reputation: 610
Have you tried running the commands? What don't you get?
 
Old 07-03-2010, 05:38 AM   #3
Vodkaholic1983
Member
 
Registered: May 2010
Distribution: Windows / Debian
Posts: 163

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by AlucardZero View Post
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 :/
 
Old 07-03-2010, 06:25 AM   #4
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

Rep: Reputation: 282Reputation: 282Reputation: 282
Quote:
Originally Posted by Vodkaholic1983 View Post
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
 
Old 07-03-2010, 12:50 PM   #5
Vodkaholic1983
Member
 
Registered: May 2010
Distribution: Windows / Debian
Posts: 163

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Wim Sturkenboom View Post
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.
#
 
Old 07-03-2010, 01:25 PM   #6
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,822

Rep: Reputation: 610Reputation: 610Reputation: 610Reputation: 610Reputation: 610Reputation: 610
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
 
Old 07-03-2010, 01:36 PM   #7
Vodkaholic1983
Member
 
Registered: May 2010
Distribution: Windows / Debian
Posts: 163

Original Poster
Rep: Reputation: 0
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
 
Old 07-03-2010, 03:47 PM   #8
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
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

Last edited by Tinkster; 07-03-2010 at 03:52 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to understand this shell code? nillgump Linux From Scratch 1 10-10-2008 04:19 AM
User Preferences: Use HTML code instead of vB code? (vB code is overrated) stefanlasiewski LQ Suggestions & Feedback 5 07-26-2005 01:37 AM
help to understand this code cranium2004 Programming 1 03-21-2005 11:35 AM
Help me understand this Driver code! fbarre Linux - Newbie 2 09-24-2003 05:10 PM
Help me understand this Driver code! fbarre Linux - General 2 09-24-2003 12:51 PM


All times are GMT -5. The time now is 08:58 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration