This tutorial includes detailed steps on how to upgrade from old 9.2 postgresql server to new 9.6 postgresql server, with data migration. But you can also use this article if you want to install fresh 9.6 version - you just need to skip migration steps. You can also check this link for more information.
1. install PGDG RPM file for new postgresql server
sudo yum install https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-x86_64/pgdg-centos96-9.6-3.noarch.rpm(for the list of all options, check this link: https://yum.postgresql.org/repopackages.php)