简体   繁体   English

如何在 Windows 上为 PostgreSQL 9.5 安装 pgAgent?

[英]How can I install pgAgent for PostgreSQL 9.5 on Windows?

Everything I see about pgAgent says that it can be installed using the StackBuilder wizard that runs after installing PostgreSQL.我看到的关于 pgAgent 的所有内容都表明它可以使用安装 PostgreSQL 后运行的 StackBuilder 向导进行安装。 But the StackBuilder wizards I have do not include pgAgent.但是我拥有的 StackBuilder 向导不包括 pgAgent。 How can I get pgAgent?我怎样才能得到 pgAgent?

A screenshot of my StackBuilder dialog box showing the lack of pgAgent can be found here: https://imgur.com/PTopsAA我的 StackBuilder 对话框的屏幕截图显示缺少 pgAgent 可以在这里找到: https://imgur.com/PTopsAA

I think it can't be possible, 9.5 is dead (EOL).我认为不可能,9.5 已死(EOL)。 but the binaries still can be downloaded from EDB ( https://www.enterprisedb.com/downloads/postgres-postgresql-downloads )但仍然可以从 EDB 下载二进制文件( https://www.enterprisedb.com/downloads/postgres-postgresql-downloads

NOTE: pgAgent is available in Debian/Ubuntu (DEB) and Redhat/Fedora (RPM) packages for Linux users, as well as source code注意:pgAgent 可用于 Linux 用户的 Debian/Ubuntu (DEB) 和 Redhat/Fedora (RPM) 软件包,以及源代码

In the official doc says how: https://www.pgadmin.org/docs/pgadmin4/latest/pgagent_install.html#service-installation-on-windows在官方文档中说如何: https://www.pgadmin.org/docs/pgadmin4/latest/pgagent_install.html#service-installation-on-windows

Service installation on Windows Windows上的服务安装

pgAgent can install itself as a service on Windows systems. pgAgent 可以将自身作为服务安装在 Windows 系统上。 The command line options available are similar to those on Unix systems, but include an additional parameter to tell the service what to do:可用的命令行选项类似于 Unix 系统上的命令行选项,但包括一个额外的参数来告诉服务要做什么:

Usage:
  pgAgent REMOVE <serviceName>
  pgAgent INSTALL <serviceName> [options] <connect-string>
  pgAgent DEBUG [options] <connect-string>

  options:
    -u <user or DOMAIN\user>
    -p <password>
    -d <displayname>
    -t <poll time interval in seconds (default 10)>
    -r <retry period after connection abort in seconds (>=10, default 30)>
    -l <logging verbosity (ERROR=0, WARNING=1, DEBUG=2, default 0)>

The service may be quite simply installed from the command line as follows (adjust the path as required):该服务可以很简单地从命令行安装,如下所示(根据需要调整路径):

"C:\Program Files\pgAgent\bin\pgAgent" INSTALL pgAgent -u postgres -p secret hostaddr=127.0.0.1 dbname=postgres user=postgres

You can then start the service at the command line using net start pgAgent, or from the Services control panel applet.然后,您可以使用 net start pgAgent 在命令行或从服务控制面板小程序启动服务。 Any logging output or errors will be reported in the Application event log.任何日志记录 output 或错误都将在应用程序事件日志中报告。 The DEBUG mode may be used to run pgAgent from a command prompt. DEBUG 模式可用于从命令提示符运行 pgAgent。 When run this way, log messages will output to the command window.以这种方式运行时,日志消息将 output 到命令 window。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM