[Groonga-commit] pgroonga/pgroonga at 44129ae [master] Add document about installing on Windows

Back to archive index

Kouhei Sutou null+****@clear*****
Tue Apr 28 23:24:59 JST 2015


Kouhei Sutou	2015-04-28 23:24:59 +0900 (Tue, 28 Apr 2015)

  New Revision: 44129aeadc97099e9942afbc1624d58001abe199
  https://github.com/pgroonga/pgroonga/commit/44129aeadc97099e9942afbc1624d58001abe199

  Message:
    Add document about installing on Windows

  Modified files:
    README.md

  Modified: README.md (+103 -3)
===================================================================
--- README.md    2015-04-28 22:41:01 +0900 (540ebee)
+++ README.md    2015-04-28 23:24:59 +0900 (c13f3ad)
@@ -58,6 +58,8 @@ pg\_trgmとpg\_bigmが使っているGINやGiSTが対応しています。)
   * CentOS 5
   * CentOS 6
   * CentOS 7
+  * Windows 32bit + PostgreSQL 9.4.1
+  * Windows 64bit + PostgreSQL 9.4.1
 
 その他の環境ではソースからインストールしてください。
 
@@ -157,12 +159,47 @@ PostgreSQLを起動します。
 
 これでインストールは完了です。
 
-### ソースからインストール
+### Windowsにインストール
 
 PostgreSQLをインストールします。
+[インストーラーバージョン](http://www.enterprisedb.com/products-services-training/pgdownload)
+でも
+[zipバージョン](http://www.enterprisedb.com/products-services-training/pgbindownload)
+でも構いません。
+
+PGroongaのパッケージをダウンロードします。
+
+  * [32bit版](http://packages.groonga.org/windows/pgroonga/pgroonga-0.5.0-x86.zip)
+  * [64bit版](http://packages.groonga.org/windows/pgroonga/pgroonga-0.5.0-x64.zip)
+
+PGroongaのパッケージを展開します。展開先としてPostgreSQLのフォルダーを
+指定します。PostgreSQLのフォルダーはインストーラーを使ってPostgreSQLを
+インストールした場合は`C:\Program Files\PostgreSQL\9.4`です。zipを使っ
+てインストールした場合は`%アーカイブを展開したフォルダー%\pgsql`です。
+
+データベースを作成します。
+
+    postgres=# CREATE DATABASE pgroonga_test;
+
+データベースに接続して`CREATE EXTENSION pgroonga`を実行します。
+
+    postgres=# \c pgroonga_test
+    pgroonga_test=# CREATE EXTENSION pgroonga;
+
+これでインストールは完了です。
 
-[Groongaをインストール](http://groonga.org/ja/docs/install.html)します。
-パッケージでのインストールがオススメです。
+### ソースからインストール
+
+Windowsの場合とそれ以外の場合でソースからのインストール方法が違います。
+
+まず、Windows以外の場合を説明し、その後、Windowsの場合を説明します。
+
+#### Windows以外の場合
+
+まずPostgreSQLをインストールします。
+
+次に[Groongaをインストール](http://groonga.org/ja/docs/install.html)し
+ます。パッケージでのインストールがオススメです。
 
 パッケージでインストールするときは次のパッケージをインストールしてください。
 
@@ -187,10 +224,73 @@ PGroongaをビルドしてインストールします。
     % make
     % sudo make install
 
+データベースを作成します。
+
+    % psql --command 'CREATE DATABASE pgroonga_test'
+
+(ここで`pgroonga_test`用のユーザーを作成して、そのユーザーで接続する
+べき。)
+
 データベースに接続して`CREATE EXTENSION pgroonga`を実行します。
 
     % psql -d db --command 'CREATE EXTENSION pgroonga;'
 
+これでインストールは完了です。
+
+#### Windowsの場合
+
+Windowsでソースからインストールするために必要なものは次の通りです。ま
+ずはこれらをインストールしてください。
+
+  * PostgreSQL(インストーラーバージョンでもzipバージョンでも構いません。)
+    * [インストーラーバージョン](http://www.enterprisedb.com/products-services-training/pgdownload)
+    * [zipバージョン](http://www.enterprisedb.com/products-services-training/pgbindownload)
+  * [Microsoft Visual Studio Express 2013 for Windows Desktop](https://www.visualstudio.com/downloads/#d-2013-express)
+  * [CMake](http://www.cmake.org/)
+
+次にWindows用のPGroongaのソースアーカイブをpackages.groonga.orgからダ
+ウンロードしてください。zipがWindows用のソースアーカイブです。Windows
+用のソースアーカイブにはGroongaがバンドルされています。
+
+  * http://packages.groonga.org/source/pgroonga/pgroonga-0.5.0.zip
+
+ソースアーカイブを展開し、ソースフォルダーへ移動します。
+
+    > cd c:\Users\%USERNAME%\Downloads\pgroonga-0.5.0
+
+`cmake`でビルドオプションを設定します。以下のコマンドラインは64bit用の
+PostgreSQL用にビルドするためのものです。32bit用のPostgreSQL用にをビル
+ドする場合は代わりに`-G "Visual Studio 12 2013"`パラメーターを指定して
+ください。
+
+    pgroonga-0.5.0> cmake . -G "Visual Studio 12 2013 Win64" -DCMAKE_INSTALL_PREFIX=%PostgreSQLをインストールしたフォルダー%
+
+`%PostgreSQLをインストールしたフォルダー%`はインストーラーを使って
+PostgreSQLをインストールした場合は`C:\Program Files\PostgreSQL\9.4`で
+す。zipを使ってインストールした場合は`%アーカイブを展開したフォルダー
+%\pgsql`です。
+
+ビルドします。
+
+    pgroonga-0.5.0> cmake --build . --config Release
+
+インストールします。インストールする場所によっては管理者権限が必要にな
+ります。(PostgreSQLをインストーラーでインストールしている場合は管理者
+権限が必要でしょう。)
+
+    pgroonga-0.5.0> cmake --build . --config Release --target Install
+
+データベースを作成します。
+
+    postgres=# CREATE DATABASE pgroonga_test;
+
+データベースに接続して`CREATE EXTENSION pgroonga`を実行します。
+
+    postgres=# \c pgroonga_test
+    pgroonga_test=# CREATE EXTENSION pgroonga;
+
+これでインストールは完了です。
+
 ## 使い方
 
 PGroongaは全文検索はもちろん、数値や文字列の等価条件(`=`)や比較条件
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index