Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Redhat6 install postgresql

2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

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.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report