LoginSignup
11
7

More than 5 years have passed since last update.

MacにPostgreSQLをインストール 2019年版

Last updated at Posted at 2019-02-14

Homebrewを使用してインストール

brew install postgresql

2019年2月時点では、PostgreSQL 11がインストールされる。

出力

==> Downloading https://homebrew.bintray.com/bottles/postgresql-11.1_1.mojave.bottle.1.tar.gz
######################################################################## 100.0%
==> Pouring postgresql-11.1_1.mojave.bottle.1.tar.gz
==> /usr/local/Cellar/postgresql/11.1_1/bin/initdb /usr/local/var/postgres
==> Caveats
To migrate existing data from a previous major version of PostgreSQL run:
  brew postgresql-upgrade-database

To have launchd start postgresql now and restart at login:
  brew services start postgresql
Or, if you don't want/need a background service you can just run:
  pg_ctl -D /usr/local/var/postgres start
==> Summary
🍺  /usr/local/Cellar/postgresql/11.1_1: 3,548 files, 40.3MB

起動

brew services コマンドを使用して起動する。

brew services start postgresql

停止

brew services stop postgresql

参照

11
7
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
11
7