设为首页 收藏本站
查看: 584|回复: 0

[经验分享] centos7安装配置pgAgent

[复制链接]

尚未签到

发表于 2019-2-16 08:14:12 | 显示全部楼层 |阅读模式
  centos7安装pgagent:
  默认cmake已经安装
  编译wxGTK
  https://excellmedia.dl.sourceforge.net/project/wxwindows/2.8.7/wxGTK-2.8.7.tar.gz
  # yum install gcc gcc-c++
  # tar -zxf wxGTK-2.8.7.tar.gz
  # cd wxGTK-2.8.7
  [wxGTK-2.8.7]# vi /etc/profile
  export PGHOME=/usr/local/postgresql
  export PGDATA=/data/pg_data
  export PATH=$PATH:$PGHOME/bin:/usr/local/wxGTK-2.8.7/bin
  export LD_LIBRARY_PATH=/usr/local/wxGTK-2.8.7/lib:$PGHOME/lib:$LD_LIBRARY_PATH
  [wxGTK-2.8.7]# source /etc/profile
  bash: TMOUT: readonly variable
  # echo $TMOUT
  # export TMOUT=1700
  # exit
  # export TMOUT=1700
  [wxGTK-2.8.7]# ./configure --enable-shared=no --enable-unicode=yes --prefix=/usr/local/wxGTK-2.8.7
  checking for GTK+ version...
  checking for pkg-config... /usr/bin/pkg-config
  checking for GTK+ - version >= 2.0.0... no
  *** 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
  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 -y install gtk2-devel binutils-devel
  [wxGTK-2.8.7]# ./configure --enable-shared=no --enable-unicode=yes --prefix=/usr/local/wxGTK-2.8.7
  [wxGTK-2.8.7]# make
  In file included from ./include/wx/gsocket.h:179,
  from ./src/gtk/gsockgtk.cpp:21:
  ./include/wx/unix/gsockunx.h:40: error: using typedef-name ‘GSocket’ after ‘class’
  /usr/include/glib-2.0/gio/giotypes.h:141: error: ‘GSocket’ has a previous declaration here
  ./src/gtk/gsockgtk.cpp: In function ‘void _GSocket_GDK_Input(void*, gint, GdkInputCondition)’:
  ./src/gtk/gsockgtk.cpp:34: error: ‘struct _GSocket’ has no member named ‘Detected_Read’
  ./src/gtk/gsockgtk.cpp:36: error: ‘struct _GSocket’ has no member named ‘Detected_Write’
  ./src/gtk/gsockgtk.cpp: In member function ‘virtual bool GSocketGUIFunctionsTableConcrete::Init_Socket(GSocket*)’:
  ./src/gtk/gsockgtk.cpp:56: error: ‘struct _GSocket’ has no member named ‘m_gui_dependent’
  ./src/gtk/gsockgtk.cpp:57: error: ‘struct _GSocket’ has no member named ‘m_gui_dependent’
  ./src/gtk/gsockgtk.cpp: In member function ‘virtual void GSocketGUIFunctionsTableConcrete::Destroy_Socket(GSocket*)’:
  ./src/gtk/gsockgtk.cpp:67: error: ‘struct _GSocket’ has no member named ‘m_gui_dependent’
  ./src/gtk/gsockgtk.cpp: In member function ‘virtual void GSocketGUIFunctionsTableConcrete::Install_Callback(GSocket*, GSocketEvent)’:
  ./src/gtk/gsockgtk.cpp:72: error: ‘struct _GSocket’ has no member named ‘m_gui_dependent’
  ./src/gtk/gsockgtk.cpp:75: error: ‘struct _GSocket’ has no member named ‘m_fd’
  ./src/gtk/gsockgtk.cpp:83: error: ‘struct _GSocket’ has no member named ‘m_server’
  ./src/gtk/gsockgtk.cpp:90: error: ‘struct _GSocket’ has no member named ‘m_fd’
  ./src/gtk/gsockgtk.cpp: In member function ‘virtual void GSocketGUIFunctionsTableConcrete::Uninstall_Callback(GSocket*, GSocketEvent)’:
  ./src/gtk/gsockgtk.cpp:98: error: ‘struct _GSocket’ has no member named ‘m_gui_dependent’
  ./src/gtk/gsockgtk.cpp:108: error: ‘struct _GSocket’ has no member named ‘m_server’
  make: *** [corelib_gsockgtk.o] Error 1
  [wxGTK-2.8.7]# vi src/gtk/gsockgtk.cpp
  #define GSocket GlibGSocket
  #include
  #include
  #undef GSocket
  #undef GSocket和#define GSocket GlibGSocket是添加的内容
  [wxGTK-2.8.7]# make install
  https://ftp.postgresql.org/pub/pgadmin/pgagent/pgAgent-3.4.0-Source.tar.gz
  # tar -zxf pgAgent-3.4.0-Source.tar.gz
  # cd pgAgent-3.4.0-Source
  [pgAgent-3.4.0-Source]# cmake ./
  --
  -- ================================================================================
  -- Configuration summary:
  --
  --   Project                     : pgagent
  --   Description                 : pgAgent is a job scheduling engine for PostgreSQL
  --   Version                     : 3.4.0
  --
  --   PostgreSQL version string   : PostgreSQL 9.4.18
  --   PostgreSQL version parts    : 9.4.18
  --   PostgreSQL path             : /usr/pgsql-9.4
  --   PostgreSQL config binary    : /usr/pgsql-9.4/bin/pg_config
  --   PostgreSQL include path     : /usr/pgsql-9.4/include
  --   PostgreSQL library path     : /usr/pgsql-9.4/lib
  --   PostgreSQL share path       : /usr/pgsql-9.4/share
  --
  --   wxWidgets version           : 2.8.7
  --   wxWidgets path              : /usr/local/wxGTK-2.8.7
  --   wxWidgets config binary     : /usr/local/wxGTK-2.8.7/bin/wx-config
  --   wxWidgets Static linking    : YES
  --   wxWidgets Debug?            : NO
  -- ================================================================================
  --
  -- Configuring done
  -- Generating done
  -- Build files have been written to: /usr/openv/pg_packges/pgAgent-3.4.0-Source
  [pgAgent-3.4.0-Source]# make
  Scanning dependencies of target pgagent
  [ 12%] Building CXX object CMakeFiles/pgagent.dir/unix.cpp.o
  [ 25%] Building CXX object CMakeFiles/pgagent.dir/job.cpp.o
  [ 37%] Building CXX object CMakeFiles/pgagent.dir/precomp.cpp.o
  [ 50%] Building CXX object CMakeFiles/pgagent.dir/win32.cpp.o
  [ 62%] Building CXX object CMakeFiles/pgagent.dir/pgAgent.cpp.o
  [ 75%] Building CXX object CMakeFiles/pgagent.dir/connection.cpp.o
  [ 87%] Building CXX object CMakeFiles/pgagent.dir/misc.cpp.o
  Linking CXX executable pgagent
  /usr/bin/ld: cannot find -lssl
  collect2: ld returned 1 exit status
  make[2]: *** [pgagent] Error 1
  make[1]: *** [CMakeFiles/pgagent.dir/all] Error 2
  make: *** [all] Error 2
  [pgAgent-3.4.0-Source]# find / -name "libcrypto.so"
  /opt/cloud/chef/embedded/lib/libcrypto.so
  # ln -sv /opt/cloud/chef/embedded/lib/libcrypto.so /usr/lib/libcrypto.so
  ‘/usr/lib/libcrypto.so’ -> ‘/opt/cloud/chef/embedded/lib/libcrypto.so’
  [pgAgent-3.4.0-Source]# make
  Linking CXX executable pgagent
  [ 87%] Built target pgagent
  Scanning dependencies of target run
  [100%] Generating pgagent--3.4.sql, pgagent.control
  [100%] Built target run
  [pgAgent-3.4.0-Source]# make install
  postgres=# create extension pgagent;
  CREATE EXTENSION
  # pgagent
  pgagent: error while loading shared libraries: libcrypto.so.1.0.0: cannot open shared object file: No such file or directory
  # yum install openssl
  Loaded plugins: fastestmirror, langpacks
  Loading mirror speeds from cached hostfile
  Resolving Dependencies
  --> Running transaction check
  ---> Package openssl.x86_64 1:1.0.1e-42.el7 will be updated
  ---> Package openssl.x86_64 1:1.0.1e-51.el7_2.5 will be an update
  --> Processing Dependency: openssl-libs(x86-64) = 1:1.0.1e-51.el7_2.5 for package: 1:openssl-1.0.1e-51.el7_2.5.x86_64
  --> Finished Dependency Resolution
  Error: Package: 1:openssl-1.0.1e-51.el7_2.5.x86_64 (CentOS.7.updates.x86_64)
  Requires: openssl-libs(x86-64) = 1:1.0.1e-51.el7_2.5
  Installed: 1:openssl-libs-1.0.1e-42.el7.x86_64 (@anaconda)
  openssl-libs(x86-64) = 1:1.0.1e-42.el7
  Available: 1:openssl-libs-1.0.1e-51.el7_2.4.x86_64 (CentOS.7.updates.x86_64)
  openssl-libs(x86-64) = 1:1.0.1e-51.el7_2.4
  You could try using --skip-broken to work around the problem
  You could try running: rpm -Va --nofiles --nodigest
  http://mirror.switch.ch/ftp/pool/4/mirror/scientificlinux/7.2/x86_64/updates/security/openssl-libs-1.0.1e-51.el7_2.5.x86_64.rpm
  # rpm -ivh openssl-libs-1.0.1e-51.el7_2.5.x86_64.rpm --nodeps --force
  # yum install openssl
  # yum install openssl-devel
  # rpm -ql openssl-libs-1.0.1e-51.el7_2.5.x86_64
  /etc/pki/tls
  /etc/pki/tls/certs
  /etc/pki/tls/misc
  /etc/pki/tls/openssl.cnf
  /etc/pki/tls/private
  /usr/lib64/.libcrypto.so.1.0.1e.hmac
  /usr/lib64/.libcrypto.so.10.hmac
  /usr/lib64/.libssl.so.1.0.1e.hmac
  /usr/lib64/.libssl.so.10.hmac
  /usr/lib64/libcrypto.so.1.0.1e
  /usr/lib64/libcrypto.so.10
  /usr/lib64/libssl.so.1.0.1e
  /usr/lib64/libssl.so.10
  /usr/lib64/openssl
  /usr/lib64/openssl/engines
  /usr/lib64/openssl/engines/lib4758cca.so
  /usr/lib64/openssl/engines/libaep.so
  /usr/lib64/openssl/engines/libatalla.so
  /usr/lib64/openssl/engines/libcapi.so
  /usr/lib64/openssl/engines/libchil.so
  /usr/lib64/openssl/engines/libcswift.so
  /usr/lib64/openssl/engines/libgmp.so
  /usr/lib64/openssl/engines/libnuron.so
  /usr/lib64/openssl/engines/libpadlock.so
  /usr/lib64/openssl/engines/libsureware.so
  /usr/lib64/openssl/engines/libubsec.so
  /usr/share/doc/openssl-libs-1.0.1e
  /usr/share/doc/openssl-libs-1.0.1e/LICENSE
  # ldconfig -p
  查看到库文件都存在/lib64目录下
  # ln -sv /usr/lib64/libcrypto.so.10 /lib64/libcrypto.so.1.0.0
  # pgagent
  Usage:
  pgagent [options]
  options:
  -f run in the foreground (do not detach from the terminal)
  -t
  -r =10, default 30)>
  -s
  -l
  参考:
  参考:
  https://blog.csdn.net/ctypyb2002/article/details/77855209
  https://blog.csdn.net/ssl2009/article/details/7062621
  https://blog.csdn.net/shawnkong/article/details/40826599




运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-672897-1-1.html 上篇帖子: centos 6.8安装postgresql9.6.9实战 下篇帖子: centos7 安装 vmware
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表