# centos 5 32bit
rpm -Uvh http://yum.postgresql.org/9.1/redhat/rhel-5-i386/pgdg-centos91-9.1-4.noarch.rpm
yum install postgresql91-server
/etc/init.d/postgresql-9.1 initdb
service postgresql-9.1 start
chkconfig postgresql-9.1 on
# yum install https://download.postgresql.org/pub/repos/yum/10/redhat/rhel-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm -y
# yum install postgresql10 postgresql10-server postgresql10-contrib postgresql10-libs -y
# /usr/pgsql-10/bin/postgresql-10-setup initdb
Initializing database ... OK
# systemctl enable postgresql-10.service
# systemctl start postgresql-10.service