日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程资源 > 综合教程 >内容正文

综合教程

Redhat6 安装postgresql

發(fā)布時間:2023/12/31 综合教程 25 生活家
生活随笔 收集整理的這篇文章主要介紹了 Redhat6 安装postgresql 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

系統(tǒng)運(yùn)維

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

yum install postgresql-server

發(fā)現(xiàn)如下問題: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=#alteruserpostgreswithpassword\'newpassword\';

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已經(jīng)安裝完畢,這時候可以使用odbc的通用api進(jìn)行編程了。

但是如果要操作具體的數(shù)據(jù)庫,還需要相應(yīng)數(shù)據(jù)庫提供的odbc驅(qū)動,比如操作mysql的ODBC驅(qū)動,下載地址是:http://dev.Mysql.com/downloads/connector/odbc/5.1.html。

總結(jié)

以上是生活随笔為你收集整理的Redhat6 安装postgresql的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。