htsql / cogs.local / data / vm /


# Post-installation script for the pgsql91 VM.
set -ex

# Update the hostname.
echo pgsql91-vm >/etc/hostname

# Install the PostgreSQL 9.1 server from backports.
apt-get -qy -t squeeze-backports install postgresql-9.1

# Clean APT cache.
apt-get clean

# Set the password of the user postgres to 'admin'.
su -c "psql -c \"ALTER ROLE postgres WITH PASSWORD 'admin'\"" postgres

# Configure PostgreSQL to listen on all interfaces.
cat <<END >>/etc/postgresql/9.1/main/postgresql.conf

# Listen on all available interfaces:
listen_addresses = '*'

# Configure PostgreSQL to allow login from the external interface.
cat <<END >>/etc/postgresql/9.1/main/pg_hba.conf

# Allow external network connections:
host all all md5
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.