首页 > 其他 > 详细

安装pgagent,并配置job

时间:2020-01-16 12:33:03      阅读:84      评论:0      收藏:0      [点我收藏+]

环境:

Centos 7


1.查找相关介质
yum search pgagent
[root@localhost yum.repos.d]# yum -y install pgagent_11.x86_64


2..在数据库上配置pgAgent
找到pgagent.sql和pgagent_upgrade.sql文件路径,并在需要job功能的数据库上执行
将会在数据库中创建一个pgagent模式,并创建相应的功能表和函数
[root@localhost pgagent_11-4.0.0]# su - postgres
psql -U postgres
postgres=# \i /usr/share/pgagent_11-4.0.0/pgagent.sql
postgres=# \q

或是使用简易安装模式
可使用简易安装模式:
[root@localhost pgagent_95-3.4.0]# psql -U postgres
psql (9.5.9)
Type "help" for help.
postgres=# CREATE EXTENSION pgagent;


3.启动pgAgent守护程序
pgagent_11 hostaddr=192.168.1.130 dbname=postgres user=postgres password=postgres

4.在另外的数据库安装agent
需要以超级管理员的账号登陆执行,指定具体的数据库
psql -h localhost -U postgres -d hxl
hxl=# \i /usr/share/pgagent_11-4.0.0/pgagent.sql

启动
pgagent_11 hostaddr=192.168.1.130 dbname=hxl user=postgres password=postgres

安装pgagent,并配置job

原文:https://www.cnblogs.com/hxlasky/p/12200431.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!