Redhat6 install postgresql
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 are 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
Yum install postgresql-server
Service postgresql-9.4 initdb
Chkconfig postgresql-9.4 on
Find /-name 'pg_hba.conf'
Vim / var/lib/pgsql/9.4/data/pg_hba.conf
# "local" is for Unix domain socket connections only
Local all all trust
# IPv4 local connections:
Host all all 127.0.0.1/32 md5
Host all all 172.22.8.51/24 md5
Host all all 172.10.23.27/24 md5
Host all 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, unixodbc has been installed, and you can use odbc's generic api for programming.
However, if you want to operate a specific database, you also need the odbc driver provided by the corresponding database, such as the ODBC driver that operates mysql. The download address is: http://dev.mysql.com/downloads/connector/odbc/5.1.html.