LoginSignup
13
9

More than 5 years have passed since last update.

MacでPostgreSQLをバックグラウンドで起動(デーモン化)する

Posted at

PostgreSQLをBackGround起動(Daemon化)する。

前提条件

  • PostgreSQLが通常起動すること
$ postgres -D /usr/local/var/postgres # パスは任意
  • まだインストールしていない場合は入れる
$ brew install postgresql
$ initdb /usr/local/var/postgres # パスは任意

手順

起動

以下のどちらか

$ pg_ctl start -D /usr/local/var/postgres -l logfile
$ postgres -D /usr/local/var/postgres >logfile 2>&1 &

終了

$ pg_ctl stop -D /usr/local/var/postgres

参考

13
9
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
13
9