我安装了Cygwin
与 Perl 和Postgresql
已启用软件包。
然后输入:
/usr/bin/cygserver-config (This will install the service)
然后输入:
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
有人可以告诉我如何做对吗?
PostgreSQLinitdb
and pg_ctl
可执行文件位于/usr/sbin
.
我猜/usr/sbin
不在你的PATH
环境。添加它应该可以解决问题。
我使用保存在下面的启动/停止脚本$HOME/bin
called pg
。这是gist https://gist.github.com/buruzaemon/5351379.
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)