Postgres/Upgrading 9.5 to 9.7 CENTOS/

From Observer GigaFlow Support | VIAVI Solutions Inc.
Jump to: navigation, search
vi /etc/yum.repos.d/CentOS-Base.repo
#To the sections ([base] and [updates] ) i, you need to append a line (otherwise dependencies might resolve to the postgresql supplied by the base repository):
yum install
yum install postgresql96-server
yum install postgresql96-contrib
/etc/init.d/rosd stop&&/etc/init.d/postgresql-95 stop
/usr/pgsql-9.6/bin/postgresql96-setup initdb
systemctl enable postgresql-9.6.service
chkconfig --del postgresql-95
mkdir /db/pgsql/data96/
chown postgres:postrges /db/pgsql/data96/
chmod 700 /db/pgsql/data96/
rsync -av /var/lib/pgsql/9.6/data/* /db/pgsql/data96/
/usr/pgsql-9.6/bin/pg_upgrade -b /opt/postgresql/pg95/bin/ -B /usr/pgsql-9.6/bin/ -d /db/pgsql/data/ -D /db/pgsql/data96/ -k
#edit /db/pgsql/data96/pg_hba.conf and /db/pgsql/data96/postgresql.conf files to enable myipfix user and other settings. (/opt/ros/resources/docs/sql/
service postgresql-9.6 restart