postgresql on slackware 10
im running slackware 10 and installed the tgz package of postgresql that i got from linux packages.net
installed it using installpkg postgres* when i try to create a database with the command "createdb mydatabase" i get: createdb: could not connect to database template1: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432"? how do i start up the database at boot time? or even without having to reboot? |
You will probably need to make some adjustments but this is my postgre start script. Make a fie called rc.postgre in /etc/rc.d and add a call to "rc.postgre start" in your rc.local and "rc.postgre stop" in rc.K
One thing that will almost definitely be wrong for you is the log location. I made my own package but I am pretty sure I left everything else at the default locations. Code:
#!/bin/sh |
Note though that you do need to set up postgre before the script will work. Try reading the postgre manual for install instructions: It is possible the package from linuxpackages.net automated it but I doubt it. I would offer more precise advice but I don't know what you have done beyond installing the package.
Taken from the said manual at http://www.postgresql.org/docs/7.4/s...tallation.html Quote:
|
well i coulnt get it working with the slackware tgz file so i went to the source:p
got the latest postgresql.tar.gz unpackaged it. then as a non root user cd into the directory, did a ./configure then a make. didnt take long about 3 mins. then su and then make install. everything seemed to go smooth. then still as root user. mkdir /usr/local/pgsql/data chown postgres /usr/local/pgsql/data su - postgres /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data then this command which seemed to start the database. /usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data now to create databases i had to su postgres again from root, this is i suppose where you would add users and everything. |
If I am following your statements correctly then yes. If you can open up a SQL command line for the server then you are good to go for the instllation and you can add users/dbs/tables.
|
thanks for the help.
just one more thing how do i go about doing this? " add /usr/local/pgsql/bin to your PATH environment variable and /usr/local/pgsql/lib to your LD_LIBRARY_PATH environment variable." |
add that to /etc/profile if you want it system wide or just in the ~/.bashrc of an user :
PATH="$PATH:/usr/local/pgsql/bin" export PATH and in /etc/ld.so.conf add : /usr/local/pgsql/lib and run ldconfig |
All times are GMT -5. The time now is 02:41 AM. |