zoukankan      html  css  js  c++  java
  • CentOS7下载配置PostgreSQL的pgAgent运行代理作业

    1、安装PostgreSQL

    参考官方文档https://www.postgresql.org/download/linux/redhat/,运行如下命令

    yum install https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm  
    
    yum install postgresql96
    
    yum install postgresql96-server
    
    
    /usr/pgsql-9.6/bin/postgresql96-setup initdb
    systemctl enable postgresql-9.6
    systemctl start postgresql-9.6

    2、安装pgAgent

    运行下列命令搜索pgAgent相关安装包

    yum search pgagent

     选取对应版本进行安装,本次安装的是9.6

    yum install pgagent_96.x86_64 

    默认pgAgent会被安装在/usr/share/pgagent_96-4.0.0目录下,可执行文件位于/usr/bin/pgagent_96

    软件包安装完成后在需要进行作业调度的数据库执行以下脚本完成作业调度相关数据库对象的创建工作

    psql -U postgres -d postgres -f /usr/share/pgagent_96-4.0.0/pgagent.sql

    启动pgAgent,否则作业创建成功不会执行

    /usr/bin/pgagent_96 -s /PostgreSQL/96/data/pgagent.log hostaddr=127.0.0.1 port=5432 dbname=postgres user=postgres password=123456

     接下来就是用pgAdmin创建一个作业,查看执行情况

    参考:

    https://www.cnblogs.com/aegis1019/p/9085133.html

  • 相关阅读:
    Jenkins和pipeline
    Docker摘要
    javascript文件加载模式与加载方法
    Pre-shared key
    持续集成CI相关的几个概念
    Fetch诞生记
    Content Security Policy介绍
    vivalidi 一款由Web技术诞生的Web浏览器
    Javascript async异步操作库简介
    Polymer初探
  • 原文地址:https://www.cnblogs.com/weiweictgu/p/11441472.html
Copyright © 2011-2022 走看看