You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# forked from https://gist.github.com/jpetazzo/5494158
3
3
4
-
echo'host all all 0.0.0.0/0 md5'>> /etc/postgresql/9.1/main/pg_hba.conf
4
+
mkdir -p /opt/postgresql
5
+
cp -a /var/lib/postgresql/* /opt/postgresql/
6
+
chown -R postgres:postgres /opt/postgresql
5
7
su postgres sh -c "/usr/lib/postgresql/9.1/bin/postgres --single -D /var/lib/postgresql/9.1/main -c config_file=/etc/postgresql/9.1/main/postgresql.conf"<<<"CREATE USER root WITH SUPERUSER PASSWORD '$1';"
6
8
su postgres sh -c "/usr/lib/postgresql/9.1/bin/postgres --single -D /var/lib/postgresql/9.1/main -c config_file=/etc/postgresql/9.1/main/postgresql.conf"<<<"CREATE DATABASE db;"
7
9
su postgres sh -c "/usr/lib/postgresql/9.1/bin/postgres -D /var/lib/postgresql/9.1/main -c config_file=/etc/postgresql/9.1/main/postgresql.conf -c listen_addresses=*"
0 commit comments