在同一台服务器上设置多个postgresql 10实例

时间:2018-04-24 21:34:22

标签: postgresql ubuntu-16.04

我的公司有两个开发团队,所以我应该在两台不同的端口上的一台机器上设置两个postgresql实例。我们在测试postgres VM上进行了类似的设置,但版本为9.5 / 9.6。我安装了postgres 10而没有发生任何意外,我正在尝试按照postgres10 docs here上的说明进行操作,但是当我尝试使用initdb或pg_ctl时,我得到以下内容:

postgres@DevPostgres:/usr/local$ whereis pg_ctl
pg_ctl: /usr/share/man/man1/pg_ctl.1.gz
postgres@DevPostgres:/usr/local$ whereis initdb
initdb: /usr/share/man/man1/initdb.1.gz
postgres@DevPostgres:/usr/local$ pg_ctl -D /usr/local/pgsql/data initdb
pg_ctl: command not found

我认为这两个程序将在第一次安装时安装,但是当我按照指向.gz文件的符号链接并解压缩并尝试使用它时,我得到以下内容:

root@DevPostgres:~# /usr/share/postgresql/10/man/man1/initdb.1 
/var/lib/postgresql/10-5433/
/usr/share/postgresql/10/man/man1/initdb.1: line 19: \" t
.\"     Title: initdb
.\"    Author: The PostgreSQL Global Development Group
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\"      Date: 2018
.\"    Manual: PostgreSQL 10.3 Documentation
.\"    Source: PostgreSQL 10.3
.\"  Language: English
.\"
.TH "INITDB" "1" "2018" "PostgreSQL 10.3" "PostgreSQL 10.3 Documentation"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el       .ds Aq : No such file or directory
/usr/share/postgresql/10/man/man1/initdb.1: line 20: .": command not found
/usr/share/postgresql/10/man/man1/initdb.1: line 21: .": command not found
/usr/share/postgresql/10/man/man1/initdb.1: line 22: .": command not found
/usr/share/postgresql/10/man/man1/initdb.1: line 23: .": command not found
/usr/share/postgresql/10/man/man1/initdb.1: line 24: .nh: command not found
/usr/share/postgresql/10/man/man1/initdb.1: line 25: syntax error near unexpected token `('
/usr/share/postgresql/10/man/man1/initdb.1: line 25: `.\" disable justification (adjust text to left margin only)'

非常感谢任何建议!

0 个答案:

没有答案