Does PostgreSQL exist on OS X Mavericks?

余生长醉 提交于 2020-01-03 08:09:05

问题


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.

Now I have my Mac with OS X Mavericks (clean install) and if I run psql -- version as 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.

~ » 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?

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

Has anyone tried this?

Thank you very much.


回答1:


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

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.




回答2:


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/

I hope it will be helpful.




回答3:


You can download different versions of PostgreSQL from Apple.




回答4:


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

Postgres.app is 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/ ]



来源:https://stackoverflow.com/questions/19611505/does-postgresql-exist-on-os-x-mavericks

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!