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

這時(shí),unixodbc已經(jīng)安裝完畢,這時(shí)候可以使用odbc的通用api進(jìn)行編程了。

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

更多關(guān)于云服務(wù)器域名注冊(cè),虛擬主機(jī)的問題,請(qǐng)?jiān)L問三五互聯(lián)官網(wǎng):m.shinetop.cn

贊(0)
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享網(wǎng)絡(luò)內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請(qǐng)聯(lián)系客服。郵箱:3140448839@qq.com。本站原創(chuàng)內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明出處:三五互聯(lián)知識(shí)庫 » Redhat6 安裝postgresql

登錄

找回密碼

注冊(cè)