简体   繁体   English

Mac上的Postgres-psql自动运行

[英]Postgres on Mac - psql runs automatically

I installed postgres recently using the postgres mac app. 我最近使用postgres mac应用安装了postgres。 Now every time i start a new terminal (bash), it triggers and starts psql on the terminal. 现在,每次我启动一个新终端(bash)时,它将触发并在终端上启动psql。 I'm not able to find the place where this is configured. 我找不到配置它的地方。 This is not part of .bashrc or .bash_profile for sure. 当然,这不是.bashrc or .bash_profile一部分。 So it only happens if I start new terminal tab, not if I source bash_profile/rc 因此,仅当我启动新的终端选项卡时才会发生,而如果我的源代码为bash_profile / rc

Nothing in terminal > preferences > startup script . terminal > preferences > startup script没有任何内容。 I'm clueless! 我无能为力!

OBSELETE open this file : Library/LaunchDaemons/com.edb.launchd.postgresql-9.0.plist (change 9.0 to your version number) OBSELETE打开此文件: Library/LaunchDaemons/com.edb.launchd.postgresql-9.0.plist (将9.0更改为您的版本号)

EDIT for 9.4.4 (open or create this file instead) : ~/Library/LaunchAgents/org.postgresql.postgres.plist . 编辑 9.4.4(打开或创建此文件): ~/Library/LaunchAgents/org.postgresql.postgres.plist Then, follow the steps in the section called automatically Start the Server at Boot from this blog post . 然后,按照本博客文章中的“在启动时自动启动服务器”部分中的步骤进行操作。

after the line : <key>RunAtLoad</key> 在行之后: <key>RunAtLoad</key>

replace <true/> to <false/> <true/> to <false/>替换<true/> to <false/>

save your file then restart the terminal and it should work 保存文件,然后重新启动终端,它应该可以工作

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

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