安裝編譯postgresql與pgagent的相關(guān)操作
作者:u9999
本文我們主要介紹了編譯編譯postgresql與pgagent的過程的一系列操作,希望能夠?qū)δ兴鶐椭?/div>
編譯postgresql與pgagent的相關(guān)操作是本文我們主要要介紹的內(nèi)容,接下來就讓我們一起來了解一下這部分內(nèi)容吧。
安裝postgresql
安裝環(huán)境centos 5.5 32 位
下載源代碼
- wget ftp://ftp3.cn.postgresql.org/pub/mirrors/pgsql/source/v9.1rc1/postgresql-9.1rc1.tar.gz
解壓
- tar -zxvf postgresql-9.1rc1.tar.gz
安裝必備庫
- yum install zlib-devel
新建用戶
- groupadd pgsql
- useradd pgsql -g pgsql
編譯源代碼
- make
- make install
設(shè)置環(huán)境變量,并給用戶pgsql賦權(quán)
- chown -R pgsql:pgsql /usr/local/pgsql
初始化數(shù)據(jù)庫
以pgsql登錄執(zhí)行
- /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
更改listen_addresses 參數(shù),遠(yuǎn)程連接
- vi /usr/local/pgsql/data/postgresql.conf
去掉 listen_addresses 前面的注釋并設(shè)置參數(shù)為 *
去掉 port 前面的注釋
- vi /usr/local/pgsql/data/pg_hba.conf
添加
- host all all 192.168.1.0/24 trust
設(shè)置自動啟動腳本
在源代碼下
- cp src/postgresql-9.0.1/contrib/start-scripts/linux /etc/init.d/postgresql
- chmod +x /etc/init.d/postgresql
啟動數(shù)據(jù)庫
- service postgresql start
- service postgresql stop
- service postgresql restart
- ./bin/postgres -D /usr/local/pgsql/data or ./bin/pg_ctl -D /usr/local/pgsql/data -l logfile start
禁止 iptables (客戶端5432 端口需要打開)
- service iptables stop
用pgsql用戶登錄(注意用戶名為創(chuàng)建該數(shù)據(jù)庫的操作系統(tǒng)的用戶名,密碼為該操作系統(tǒng)的密碼)
安裝pgAgent
安裝
- cmake wget http://www.cmake.org/files/v2.8/cmake-2.8.5.tar.gz
- tar -zxvf cmake-2.8.5.tar.gz
- cd /root/src/cmake-2.8.5
- ./bootstrap
- make
- make install
安裝 wxWidgets(走了很多彎路,實(shí)際上只需要下載 wxGTK-2.8.12.tar.gz 就可以完成任務(wù))
- wget http://nchc.dl.sourceforge.net/project/wxwindows/2.8.12/wxGTK-2.8.12.tar.gz
注意編譯的時候一定要支持unicode 與 靜態(tài)編譯
- ./configure --enable-shared=no --enable-unicode=yes
- make
- make install
- tar -zxvf pgAgent-3.0.1-Source.tar.gz
- cmake ./
- make
- make install
成功后用pgsql 用戶登錄數(shù)據(jù)庫執(zhí)行
- /usr/local/share/pgagent.sql
- /usr/local/share/pgagent_upgrade.sql
以上就是安裝編譯postgresql與pgagent的一系列過程的全部內(nèi)容,本文我們就介紹到這里了,希望本次的介紹能夠?qū)δ兴斋@!
【編輯推薦】
責(zé)任編輯:趙鵬
來源:
CSDN博客


相關(guān)推薦




