diff --git a/debian/resources/postgres.sh b/debian/resources/postgres.sh index 73d4362..9fcd21c 100755 --- a/debian/resources/postgres.sh +++ b/debian/resources/postgres.sh @@ -6,8 +6,16 @@ echo "Install PostgreSQL" #generate a random password password=$(dd if=/dev/urandom bs=1 count=20 2>/dev/null | base64) -#Postgres +#install message echo "Install PostgreSQL and create the database and users\n" + +#included in the distribution +#apt-get install -y --force-yes sudo postgresql + +#postgres official repository +echo 'deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main' >> /etc/apt/sources.list.d/pgdg.list +wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - +apt-get update && apt-get upgrade -y apt-get install -y --force-yes sudo postgresql #Add PostgreSQL and BDR REPO