Updating CentOS 9.5 to CentOS 9.6

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):
#exclude=postgresql*
yum install https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-x86_64/pgdg-redhat96-9.6-3.noarch.rpm
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/createmyipfixdb.sh)
service postgresql-9.6 restart