天天看点

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