pgAgent是PostgreSQL的一个job引擎,可以执行数据库job任务。本文简述其安装步骤
一 安装cmake
#检查是否安装
[root@bogon ~]# cmake --version
cmake version 2.8.11
#如果未安装执行下面的语句
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
wget https://github.com/wxWidgets/wxWidgets/releases/download/v2.8.12/wxGTK-2.8.12.tar.gz
#注意编译的时候一定要支持unicode 与 静态编译
./configure --enable-shared=no --enable-unicode=yes
make
make install
./configure可能报错如下:
*** Could not run GTK+ test program, checking why...
*** The test program failed to compile or link. See the file config.log for the
*** exact error that occured.
This usually means GTK+ is incorrectly installed.
configure: error:The development files for GTK+ were not found. For GTK+ 2, please
需要安装gkt+,笔者源码安装又发现一堆依赖,这里先不管了,直接yum安装
yum install gtk2-devel
然后编译就通过了。
三 安装pgAgent
#在root账户下执行
# tar -zxvf pgAgent-3.0.1-Source.tar.gz
# source /home/postgres/.bashrc #引入postgres的环境变量
# cmake ./
# make
# make install
cmake可能报错如下:
/bin/ld:cannot find -lcrypto
简单的执行以下语句:
yum install openssl-devel
成功后用pgsql 用户登录数据库执行
[postgres@bogon ~]$ psql
psql (9.6.0)
Type "help" for help.
postgres=# \i /usr/local/share/pgagent.sql
postgres=# \i /usr/local/share/pgagent_upgrade.sql
网友评论