我安装了 Cygwin
并启用了 Perl 和 Postgresql
包。
然后输入:
/usr/bin/cygserver-config (This will install the service)
然后输入:<\p>
net start cygserver(This starts the service)
接下来我需要在Cygwin中启用Postgresql,所以我尝试了下面提到的命令:
cygrunsrv -S cygserver
initdb -D /usr/share/postgresql/data
pg_ctl start -D /usr/share/postgresql/data -l /var/log/postgresql.log
createdb
psql
我遇到了一个错误:
$ initdb -D /usr/share/postgresql/data
-bash: initdb: command not found
$ pg_ctl start -D /usr/share/postgresql/data -l /var/log/postgresql.log
-bash: pg_ctl: command not found
有人能告诉我如何做对它吗?
pg_ctl
甚至还没有启动。您应该先检查一下。 - buruzaemonexport CYGWIN=server; /usr/sbin/cygserver -E &
。等待cygserver
完成启动,然后尝试启动pg_ctl
。 - buruzaemon