Redhat6 安装postgresql

发布时间:2020-08-07 05:10:25 作者:CdTech
来源:网络 阅读:347



yum install http://yum.postgresql.org/9.4/redhat/rhel-6-x86_64/pgdg-redhat94-9.4-1.noarch.rpm



yum 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 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


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

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






推荐阅读:
  1. Redhat 6配置RHCS实现双机HA群集
  2. redhat6 + 11G RAC 双节点部署

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

安装 postgresql redhat6

上一篇:Javascript Game (转)

下一篇:mysql 中获取字段中特定位置的值

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》