Yum Install http://yum.postgresql.org/9.4/redhat/rhel-6-x86_64/pgdg-redhat94-9.4-1.noarch.rpm
Yum Install Postgresql-server
The following problems were found: error:package:postgresql93-contrib-9.3.5-1pgdg.rhel6.i686 (pgdg93) requires:libcrypto.so.10 ( libcrypto.so.10)
Su Postgres
Yum Install http://mirror.centos.org/centos/6/os/x86_64/Packages/openssl-1.0.1e-30.el6.x86_64.rpm
Find/-name ' pg_hba.conf '
Vim/var/lib/pgsql/9.4/data/pg_hba.conf
# "Local" is for Unix domain sockets connections only
Local all All trust
# IPV4 Local connections:
Host All 127.0.0.1/32 MD5
Host All 172.22.8.51/24 MD5
Host All 172.10.23.27/24 MD5
Host All 172.22.14.51/24 MD5
Vim/var/lib/pgsql/9.4/data/postgresql.conf
listen_addresses = ' * '
Su Postgres
Psql
Postgres = #alter user postgres with password ' new password ';
Postgres =#\q
Yum Install Postgresql-odbc
=====================================================================
wget ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-2.3.2.tar.gz
Tar xvf Unixodbc-2.3.2.tar
CD unixODBC-2.3.2
./configure--prefix=/usr/local/unixodbc-2.3. --includedir=/usr/include--libdir=/usr/lib-bindir=/usr/bin--sysconfdir=/etc
Make
Make install
At this point, the UNIXODBC is already installed and can be programmed using the ODBC Common API.
However, if you want to operate a specific database, you also need the appropriate database to provide ODBC driver, such as the operation of MySQL ODBC driver, is: http://dev.mysql.com/downloads/connector/odbc/5.1.html.
Redhat6 Installing PostgreSQL