about summary refs log tree commit diff stats
path: root/tools/scripts/install-postgres.sh
diff options
context:
space:
mode:
authorSilvino Silva <silvino@bk.ru>2016-09-29 05:21:34 +0100
committerSilvino Silva <silvino@bk.ru>2016-09-29 05:21:34 +0100
commit81d7c7820c25cdca723bbe7c13a3657174904b70 (patch)
tree984cd63c11d252b82a55901be38cb66a53cfc4f7 /tools/scripts/install-postgres.sh
parent17bc450495c9ab6933590fb825dbd80b0af64a66 (diff)
downloaddoc-81d7c7820c25cdca723bbe7c13a3657174904b70.tar.gz
postgresql revision
Diffstat (limited to 'tools/scripts/install-postgres.sh')
-rw-r--r--tools/scripts/install-postgres.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/tools/scripts/install-postgres.sh b/tools/scripts/install-postgres.sh
new file mode 100644
index 0000000..06666e0
--- /dev/null
+++ b/tools/scripts/install-postgres.sh
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+. `dirname $0`/config-install.sh
+
+prt-get depinst postgresql
+
+cp -R $CONF_DIR/etc/rc.d/postgresql /etc/rc.d/
+
+mkdir /srv/pgsql/
+touch /var/log/postgresql
+chown postgres:postgres /srv/pgsql /var/log/postgresql
+
+sudo -u postgres initdb -D /srv/pgsql/data
+
+cp $CONF_DIR/srv/pgsql/data/pg_hba.conf /srv/pgsql/data/
+chown postgres:postgres /srv/pgsql/data/pg_hba.conf