Redhat6 安装postgresql

网友投稿 464 2022-09-22

Redhat6 安装postgresql

Redhat6 安装postgresql

yum install install postgresql-server

发现如下问题:Error: Package: postgresql93-contrib-9.3.5-1PGDG.rhel6.i686 (pgdg93) Requires: libcrypto.so.10(libcrypto.so.10)

su postgres

yum install install postgresql-serverservice postgresql-9.4 initdbchkconfig 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=/etcmakemake install

这时,unixodbc已经安装完毕,这时候可以使用odbc的通用api进行编程了。

但是如果要操作具体的数据库,还需要相应数据库提供的odbc驱动,比如操作mysql的ODBC驱动,-是:http://dev.mysql.com/downloads/connector/odbc/5.1.html。

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:tomcat运行控制脚本catalina.sh分析
下一篇:C# WebClient download image within url and display the downloaded picture automatically in windows o(曹海涛)
相关文章

 发表评论

暂时没有评论,来抢沙发吧~