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已經(jīng)安裝完畢,這時候可以使用odbc的通用api進行編程了。
但是如果要操作具體的數(shù)據(jù)庫,還需要相應數(shù)據(jù)庫提供的odbc驅動,比如操作mysql的ODBC驅動,下載地址是:http://dev.Mysql.com/downloads/connector/odbc/5.1.html。
更多關于云服務器,域名注冊,虛擬主機的問題,請訪問三五互聯(lián)官網(wǎng):m.shinetop.cn