Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
gmake[2]: Leaving directory `/usr/local/src/postgresql-7.4.2/src/pl'
gmake[1]: Leaving directory `/usr/local/src/postgresql-7.4.2/src'
postgreSQL installation complete.
GMAKE INSTALL FINISHES SUCCESSFULLY
[root@localhost postgresql-7.4.2]# LD_LIBRARY_PATH=/usr/local/pgsql/lib
[root@localhost postgresql-7.4.2]# export LD_LIBRARY_PATH
[root@localhost postgresql-7.4.2]# su postgres
bash-2.05b$ /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.
The database cluster will be initialized with locale en_NZ.UTF-8.
creating directory /usr/local/pgsql/data... ok
creating directory /usr/local/pgsql/data/base... ok
creating directory /usr/local/pgsql/data/global... ok
creating directory /usr/local/pgsql/data/pg_xlog... ok
creating directory /usr/local/pgsql/data/pg_clog... ok
selecting default max_connections... 100
selecting default shared_buffers... 1000
creating configuration files... ok
creating template1 database in /usr/local/pgsql/data/base/1... ok
initializing pg_shadow... ok
enabling unlimited row size for system tables... ok
initializing pg_depend... ok
creating system views... ok
loading pg_description... ok
creating conversions... ok
setting privileges on built-in objects... ok
creating information schema... ok
vacuuming database template1... ok
copying template1 to template0... ok
Success. You can now start the database server using:
/usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data
or
/usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data -l logfile start
INITIALISATION IS SUCCESSFUL
bash-2.05b$ /usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data
LOG: could not create IPv6 socket: Address family not supported by protocol
LOG: database system was shut down at 2004-04-29 10:51:19 NZST
LOG: checkpoint record is at 0/9B1058
LOG: redo record is at 0/9B1058; undo record is at 0/0; shutdown TRUE
LOG: next transaction ID: 536; next OID: 17142
LOG: database system is ready
AT THIS POINT I DID CTRL+Z AS NOTHING ELSE HAPPENED
[1]+ Stopped /usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data
POSMASTER HAS STOPPED
bash-2.05b$ /usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data
FATAL: lock file "/usr/local/pgsql/data/postmaster.pid" already exists
HINT: Is another postmaster (PID 19495) running in data directory "/usr/local/pgsql/data"?
bash-2.05b$
UNABLE TO RESTART? ANOTHER INSTANCE OF POSTMASTER RUNNING? NO!!
If someone could explain to me what is going on I would appreciate it.
Of course it is running, you've just backgrounded and
stopped it, not terminated... append an ampersand to
your command-line and redirect the output to a) a
log or b) /dev/null ...
I have had to reinstall rh9 and have just installed postgres again from source, evrything has gone smoothly up to the point where I want to create a database.
Code:
[postgres@localhost postgres]$ creatdb testdb
-bash: creatdb: command not found
[postgres@localhost postgres]$
I'm using "O'reillys practical postgresql" as a guide and have followed the steps
so I'm not really sure why I get the "command not found"
I have installed from postgresql-7.4.2.tar.gz untarring and unzipping then using
default ."/configure" then "make" then "make install" postgres user has been created and postgres.postgres owns /usr/local/pgsql
/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
initiated db created cluster evrything fine
then
/usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data -l logfile start
postmaster successfully started
Thanks for the reply,
I'm really new to linux/opensource and figured the only way to learn was to just jump in and try stuff. Will spend more time trying to digest the man pages though. I'm updating packages so will try the script then.
I tried the script and then looked at the postgresql manual for version 7.4.2 and they have changed the syntax for setting the path to...
That is quite clear, and the only difference is that
in my statement the path to psql is appended, in
yours it's prepended. And that only makes a difference
if somewhere in your path there's a second executable
py the same name.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.