No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README.md
pgsql-9.4-centos-7x-64.sh

README.md

postgresql 9.4 script for Centos 7x64

For use on a clean CentOS 7.x64 box only.

This script installs:

  • postgresql94

  • postgresql94-devel

  • postgresql94-server

  • postgresql94-libs

  • postgresql94-contrib

  • postgresql94-plperl

  • postgresql94-plpython

  • postgresql94-pltcl

  • postgresql94-python

  • postgresql94-odbc

  • postgresql94-jdbc

  • perl-DBD-Pg

  • pgbouncer

  • Webmin

  • IP tables

The script also creates the following:

  • A minimally privilaged user (pgadmin - change to whatever you like)

  • Disables root log in

  • Resets the root password to a 32 character string

  • Sets IP tables

  • Configures Webmin for managing PostgreSQL

  • Installs a self-signed SSL

  • Updates pga_hba.conf to MD5 and SSL

  • Updates postgresql.conf for SSL.

  • You can change the SSH port as well as the user name to whatever you like. You can also add/remove packages.

  • Once completed, it will display the new passwords for pgadmin, root, postgres, and ssl as well as write them to an auth.txt file. It will also restart SSHD, so be sure to copy new password!

-This script uses IP Tables and not firewalld. If you want to set up firewalld, comment out the iptable lines as noted.

Usage:

  1. Download the script to a clean CentOS 7.x64 box or use wget wget https://github.com/DavidGhedini/postgresql-9.4-script-centos-7x64/blob/master/pgsql-9.4-centos-7x-64.sh
  2. Make it executable chmod 755 pgsql-9.4-centos-7x-64.sh
  3. Execute it ./pgsql-9.4-centos-7x-64.sh

Example Output at end of script:

Passwords saved in /root/auth.txt

pg pass: DqVnavTlCXcSKfgprgUtjF-20rpfsKui

ssl pass: yxaQJCXgueTw19XEOMPdZzNd5n6rwVOG

pgadmin pass: A0RUHtEfSFC82mHeDP_ixrRavk7itgkE

root pass: RvZEHkZv-AeQS-ce0Mcnif7GxmmJ-zxN