简体   繁体   English

如何在 mamp 中使用 postgresql

[英]How to use postgresql with mamp

I would like to use mamp and postgresql, do you know how this is possible?我想使用 mamp 和 postgresql,你知道这是怎么可能的吗?

I have a postgresql database, and I already use mamp and mysql, but I can not find documentation to use postgresql with mamp我有一个 postgresql 数据库,并且我已经使用了 mamp 和 mysql,但是我找不到将 postgresql 与 mamp 结合使用的文档

Sorry for my bad english ;)对不起,我的英语不好 ;)

"mamp" appears to be a canned installer for MySQL + Apache + PHP for Mac OS X. “mamp”似乎是适用于 Mac OS X 的 MySQL + Apache + PHP 的预装安装程序。

There are related things for PostgreSQL; PostgreSQL 有相关的东西; see the download page .请参阅下载页面 But otherwise, all the components are easily installed individually.但除此之外,所有组件都可以轻松单独安装。 Many people use things like Homebrew.许多人使用 Homebrew 之类的东西。

Look at this for the answer.看看这个答案。

https://www.drupal.org/node/1438206 https://www.drupal.org/node/1438206

Postgres on Max OS X with MAMP带有 MAMP 的 Max OS X 上的 Postgres

Last updated February 13, 2012. Created on February 13, 2012. Edited by diricia.最后更新于 2012 年 2 月 13 日。创建于 2012 年 2 月 13 日。由 diricia 编辑。 Log in to edit this page.登录编辑此页。 At the moment I'm running MAMP Pro, but the setup should work with MAMP free version as well.目前我正在运行 MAMP Pro,但设置也应该适用于 MAMP 免费版本。 Requirments;要求; Download and install MAMP from MAMP从 MAMP 下载并安装 MAMP

1. Download and install postgres 8.4 or higher from Enterprise DB
2. Add the bin directory of postgres, /Library/PostgreSQL/8.4/bin to the PATH in your .bashrc file in your home directory. Remember to run ./.bashrc to update the path.
3. Sudo to your root user and execute the following commands. '>' is the prompt on your terminal and should be excluded. Text in () is an explanation and should not excluded.
    a. > su postgres (log in as the postgres user)
    b. > createuser --no-createdb --no-password (choose as a super user)
    c. > createuser --no-createdb ----pwprompt devel (enter a password 'drupal', and choose as a super user, this is if your site is using the standard devel user with password drupal)
> exit
4. Edit table at the bottom of the /Library/PostgreSQL/8.4/data/pg_hba.conf file to so that the options for local look like this. This states that the devel (or your user) must have a md5 password and all other users can log in with no password. (This is only recommended for your local host and is not secure on a server)
        # "local" is for Unix domain socket connections only
        local all devel md5
        local all all trust 
5. In your applications folder stop and start the postgres server using the apps under the Postgres folder
6. Log out of your root user
7. Create your postgres database as specified in INSTALL.pgsql.txt:
    a. > createdb --encoding=UTF8 --owner=username databasename (The owner is devel or the user you created)

I installed Bitnami's MAMP Stack, and then also the Bitnami Postgresql module:我安装了 Bitnami 的 MAMP Stack,然后还安装了 Bitnami Postgresql 模块:

Bitnami MAMP Stack: https://bitnami.com/stack/mamp/installer Bitnami MAMP 堆栈: https : //bitnami.com/stack/mamp/installer

Bitnami MAMP Postgresql Module: https://bitnami.com/stack/mamp/modules Bitnami MAMP Postgresql 模块: https : //bitnami.com/stack/mamp/modules

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

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