macos - 无法在 Mac OS 启动时加载 postgresql

标签 macos postgresql service postgresql-9.3 launchd

我已经通过 HomeBrew 安装了 postgresql。它有效,但今天我发现 postgresql 服务器在计算机启动时不运行。

我尝试使用 launchctl 通过以下命令再次加载它:

$ launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist

然后我看到消息:

/usr/local/Cellar/postgresql/9.3.4/homebrew.mxcl.postgresql.plist: Service is disabled

我不知道如何启用 postgresql 服务。谁能告诉我?

最佳答案

使用 -w 选项和 launchctl

$ launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist 

-w 覆盖 Disabled 键并将其设置为 false。

关于macos - 无法在 Mac OS 启动时加载 postgresql,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26334414/

相关文章:

go - 如何通过 exec os/exec 执行 sc create 命令?

ios - 删除多对一关系的规则

swift - 如何以编程方式并排捕捉 2 个窗口( Split View)

python - Django 中多个模型的原始查询和行级访问控制

javascript - 如何使用 Node.js 和 express 在 PostgreSQL 中获取不包含方括号的对象?

service - Systemd - 如果服务停止超过 X 次,则始终运行服务并重新启动

macos - 服务 'nginx'无法构建:…只读文件系统

macos - MAC 上 javafx 应用程序上的 NPE

sql - PostGis 最近邻查询

.net - 如何在 .net 中为 Windows 服务设置 ACL?