contrib/postgresql/README

51 lines
1.3 KiB
Plaintext
Raw Normal View History

2009-01-12 23:53:18 +01:00
README POSTGRESQL
=================
UPGRADING FROM A PREVIOUS VERSION
---------------------------------
2010-09-20 19:53:25 +02:00
If upgrading from a non-compatible version (ie 8.0.x >> 8.1.x or
8.x.y >> 9.a.b) be sure to dump the databases before upgrading and
restore them later.
2009-01-12 23:53:18 +01:00
Example: (for your convenience, there could be better ways to
achieve this)
# pg_dumpall -U postgres > pg.dump
# /etc/rc.d/postgresql stop
# mv /var/pgsql/data /var/pgsql/data-backup
# mkdir /var/pgsql/data
# chown postgres /var/pgsql/data
# sudo -u postgres initdb -D /var/pgsql/data
2009-01-12 23:53:18 +01:00
# /etc/rc.d/postgresql start
# psql -U postgres -f pg.dump postgres
Do not forget to update / copy old config files to /var/pgsql/data
NEW INSTALL
-----------
To complete the installation and create a test database you need to do
2015-12-19 15:27:55 +01:00
some additional steps or use the included post-install script.
2009-01-12 23:53:18 +01:00
# useradd -m -d /home/postgres -s /bin/false postgres
2009-01-12 23:53:18 +01:00
# passwd -l postgres
# mkdir -p /var/pgsql/data
# sudo -u postgres initdb -D /var/pgsql/data
2009-01-12 23:53:18 +01:00
# /etc/rc.d/postgresql start
# sudo -u postgres createdb test
# psql -U postgres test
2009-01-12 23:53:18 +01:00
Edit /etc/cron/weekly/syslog as root and add
a line "/usr/sbin/rotatelog postgresql"
The complete installation instructions are located here:
2021-08-13 01:58:15 +02:00
https://www.postgresql.org/docs/current/interactive/installation.html