postgresql-server setup

勢いに任せてPostgreSQLも入れちゃう。

  • 「export PGDATA=/home/hoge/pgdata」しておく(以降の-Dが不要に)
  • 「initdb」でデータディレクトリを作成する
  • postgresql.conf:tcpip_socket=true」にしてTCP/IPを有効に
  • 「pg_hba.conf」を編集して許可するクライアントをごにょごにょ
  • postgrespostmaster &」でサーバープロセス起動
  • 「createdb hoge_project」でデータベース作成
  • psql hoge_project」でログイン可能