windows:postgresql

文書の過去の版を表示しています。


PostgreSQL

  1. NPO法人 日本PostgreSQLユーザ会より最新版をダウンロードしてくる。
  2. postgresql-x.x.x-x-windows-x64.exe を実行する。
  3. postgres のパスワードを設定してインストールを完了させる。
  4. Application Stack Builderで pgBouncer、Npgsql(.NETから利用時)、psqlODBC(MS-Accessから利用時)、PostGIS(GIS機能を利用時)をインストールする。
  5. 開発用に利用する場合は、[コントロール パネル] - [システムとセキュリティ] - [管理ツール] - [サービス] より以下のサービスのスタートアップの種類を手動に設定しておく。
    • postgresql-x64-x.x
    • pgbouncer
  6. pgsql_start.cmd ファイルを作成して手動起動できるようにしておく。
    powershell -command start \"net\" -verb runas -argumentlist \"start postgresql-x64-x.x\"
    powershell -command start \"net\" -verb runas -argumentlist \"start pgbouncer\"
  7. pgsql_stop.cmd ファイルを作成して手動停止できるようにしておく。
    powershell -command start \"net\" -verb runas -argumentlist \"stop postgresql-x64-x.x\"
    powershell -command start \"net\" -verb runas -argumentlist \"stop pgbouncer\"
  1. pgbouncer_edit.cmd ファイルを作成して、設定を編集できるようにしておく。
    powershell -command start \"notepad\" -verb runas -argumentlist \"C:\\Program Files (x86)\\PgBouncer\\share\\pgbouncer.ini\"
  2. pgbouncer.ini の以下の部分を修正する。
    [databases]
    database_name  = host=localhost dbname=database_name user=user_name password=********
    ; any, trust, plain, crypt, md5
    auth_type = any
    ;auth_file = 8.0/main/global/pg_auth
    ;auth_file = C:\Program Files (x86)\PgBouncer\etc\userlist.txt
  3. pgBouncer サービスを再起動して設定を反映させる。
  1. pgBouncer を利用するには、6432ポートを利用するように設定する。
  2. DB に接続できない場合は以下のログを確認する。
    C:\Program Files (x86)\PgBouncer\log\pgbouncer.log
  1. pgAdmin: Download - Windows ™より最新版をダウンロードしてくる。
  2. pgadmin3.msi を実行してインストールする。
  • windows/postgresql.1351430830.txt.gz
  • 最終更新: 2019/05/18 02:23
  • (外部編集)