1# centos 5 32bit
2rpm -Uvh http://yum.postgresql.org/9.1/redhat/rhel-5-i386/pgdg-centos91-9.1-4.noarch.rpm
3yum install postgresql91-server
4/etc/init.d/postgresql-9.1 initdb
5service postgresql-9.1 start
6chkconfig postgresql-9.1 on
1sudo yum install https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
2
1...
2[base]
3name=CentOS-$releasever - Base
4mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
5#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
6gpgcheck=1
7gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
8
9exclude=postgresql*
10
11#released updates
12[updates]
13name=CentOS-$releasever - Updates
14mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&infra=$infra
15#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
16gpgcheck=1
17gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
18exclude=postgresql*
19...
20
1# /usr/pgsql-10/bin/postgresql-10-setup initdb
2Initializing database ... OK
3