天天看點

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

二、安裝wxGTK-2.8.12

yum install wxGTK

三、安裝 boost

方法一:yum install boost*

方法二:

1.下載下傳 boost-1_52 http://sourceforge.net/projects/boost/files/boost/1.53.0/

2. 将檔案解壓在/usr/local/目錄下

3. 進入/usr/local/boost-1_53_0/ 輸入

             ./bootstrap.sh

4.進入/usr/local/boost-1_53_0/ 輸入

            sudo ./bjam  --layout=versioned --build-type=complete --toolset=gcc install 

5.添加環境變量

   export BOOST_INCLUDE=/usr/local/include/boost-1_60

   export BOOST_LIB=/usr/local/lib

四、安裝pgAgent

yum install openssl-devel

yum install gtk2-devel

下載下傳pgAgent源碼:

https://www.pgadmin.org/download/pgagent-source-code/

# tar -zxvf pgAgent-3.0.1-Source.tar.gz

# source /var/lib/pgsql/.bash_profile 引入環境變量

# cmake ./

# make

# make install

--切換到postgres使用者,這裡隻能用IP,用localhost或127.0.0.1會失敗

pgagent hostaddr=172.18.80.128 port=5432 dbname=postgres user=postgres password=postgres