OS X Mavericks 上是否存在 PostgreSQL?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/19611505/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-21 01:09:59  来源:igfitidea点击:

Does PostgreSQL exist on OS X Mavericks?

postgresqlhomebrewosx-mavericks

提问by CristianOrellanaBak

I knew there was a version of PostgreSQL installed on OS X Mountain Lion and if you want to work with this database engine you must install a new version and make some changes (http://nextmarvel.net/blog/2011/09/brew-install-postgresql-on-os-x-lion/). I didn't do this at that time because it was not necessary for me.

我知道 OS X Mountain Lion 上安装了一个 PostgreSQL 版本,如果你想使用这个数据库引擎,你必须安装一个新版本并进行一些更改(http://nextmarvel.net/blog/2011/09/brew -install-postgresql-on-os-x-lion/)。当时我没有这样做,因为这对我来说没有必要。

Now I have my Mac with OS X Mavericks (clean install) and if I run psql -- versionas can be seen in this article (http://russbrooks.com/2010/11/25/install-postgresql-9-on-os-x), the terminal tells me that there is no such command.

现在我的 Mac 装有 OS X Mavericks(全新安装),如果我psql -- version按照本文中的说明运行(http://russbrooks.com/2010/11/25/install-postgresql-9-on-os-x),终端告诉我没有这样的命令。

~ ? psql --version                                                                                                                                                          
zsh: correct 'psql' to 'sl' [nyae]? n
zsh: command not found: psql

Does PostgreSQL get installed by default when I do a clean install of OS X Mavericks?

当我全新安装 OS X Mavericks 时,是否会默认安装 PostgreSQL?

If i want to try PostgreSQL on Mavericks, do I just need to run brew install postgresqland it`d be OK?

如果我想在 Mavericks 上试用 PostgreSQL,是否只需要运行brew install postgresql就可以了?

Has anyone tried this?

有没有人试过这个?

Thank you very much.

非常感谢你。

回答by Aaron Adams

Yes, it should be safe to brew install postgresql, provided brew doctorindicates no problems.

是的,它应该是安全的brew install postgresql,只要brew doctor表明没有问题。

My preferred approach is always to leave OS X builtins untouched, and use Homebrew to install separate versions of everything I'd like to work with. I've tried using OS X builtins in the past, and things have a way of getting messy in a hurry, especially when updating OS X.

我的首选方法是始终保持 OS X 内置程序不变,并使用 Homebrew 安装我想要使用的所有内容的单独版本。我过去曾尝试使用 OS X 内置程序,但事情总有一种匆忙变得混乱的方式,尤其是在更新 OS X 时。

回答by Marcin Kubala

For everyone who is looking for guide about how to install and configure postgres on the fresh Mavericks installation: http://marcinkubala.wordpress.com/2013/11/11/postgresql-on-os-x-mavericks/

对于正在寻找有关如何在新安装的 Mavericks 上安装和配置 postgres 的指南的每个人:http: //marcinkubala.wordpress.com/2013/11/11/postgresql-on-os-x-mavericks/

I hope it will be helpful.

我希望它会有所帮助。

回答by dougpan

You can download different versions of PostgreSQL from Apple.

您可以从 Apple下载不同版本的 PostgreSQL 。

回答by HEDMON

Also for a development environment you can use Postgres.app (http://postgresapp.com/):

同样对于开发环境,您可以使用 Postgres.app ( http://postgresapp.com/):

Postgres.appis a simple, native Mac OS X app that runs in the menubar without the need of an installer. Open the app, and you have a PostgreSQL server ready and awaiting new connections. Close the app, and the server shuts down. [http://www.postgresql.org/download/macosx/]

Postgres.app是一个简单的原生 Mac OS X 应用程序,无需安装程序即可在菜单栏中运行。打开应用程序,您已经准备好一个 PostgreSQL 服务器并等待新的连接。关闭应用程序,服务器将关闭。[ http://www.postgresql.org/download/macosx/]