【Postgresql】PgAgent源码安装

软件清单

软件的版本如下,因为如果版本不一样的话,好像会出现奇怪的问题:

-rw-r--r--. 1 root root 34950376 Mar  3 16:44 cmake-3.12.2-Linux-x86_64.tar.gz
-rw-r--r--. 1 root root    63561 Mar  3 16:42 pgAgent-4.0.0-Source.tar.gz
-rw-r--r--. 1 root root 22220762 Mar  3 16:44 wxWidgets-3.1.5.tar.bz2

在这里插入图片描述

操作步骤

安装cmake

建议直接从官网下载编译好的版本,源码编译鬼知道会出现什么问题,下载下来解压后目录结构如下:

[root@bigdata-m-001 cmake-3.12.2-Linux-x86_64]# ll
total 0
drwxr-xr-x. 2 centos centos 76 Sep  7  2018 bin
drwxr-xr-x. 3 centos centos 19 Sep  7  2018 doc
drwxr-xr-x. 4 centos centos 30 Sep  7  2018 man
drwxr-xr-x. 7 centos centos 84 Sep  7  2018 share

配置环境变量并生效:

mv cmake-3.12.2-Linux-x86_64 /usr/local/cmake
echo 'export CMAKE_HOME=/usr/local/cmake' >> /etc/profile
echo 'export PATH=$PATH:$CMAKE_HOME/bin' >> /etc/profile
source /etc/profile

安装后验证一下:

[root@bigdata-m-001 pgagent]# cmake --version
cmake version 3.12.2

CMake suite maintained and supported by Kitware (kitware.com/cmake).

安装wxWidgets

只有源码安装的方法,解压源码包:

tar -xvf wxWidgets-3.1.5.tar.bz2
cd wxWidgets-3.1.5

编译软件:

./configure --enable-shared=no --enable-unicode=yes --prefix=/usr/local/wxWidgets

安装过程中出现如下报错需要安装相关依赖:

configure: error: 
The development files for GTK+ were not found. For GTK+ 2, please
ensure that pkg-config is in the path and that gtk+-2.0.pc is
installed. For GTK+ 1.2 please check that gtk-config is in the path,
and that the version is 1.2.3 or above. Also check that the
libraries returned by 'pkg-config gtk+-2.0 --libs' or 'gtk-config
--libs' are in the LD_LIBRARY_PATH or equivalent.

使用yum直接安装:

yum install gtk*

在这里插入图片描述
重新编译后进行安装,安装时间会有点久:

make && make install

安装成功后返回结果如下:
在这里插入图片描述

安装pgAgent

先安装boost,不然会报错,直接yum安装:

yum install boost*

在这里插入图片描述
安装pgAgent:

cmake ./

在这里插入图片描述

make && make install

在这里插入图片描述
接下来按照官网进行数据库的配置即可

posted @ 2022-08-25 18:03  风灵动铭  阅读(271)  评论(0)    收藏  举报