[Groonga-commit] droonga/droonga.org at 73d20b2 [gh-pages] Use DROONGA_BASE_DIR environment variable

Back to archive index

YUKI Hiroshi null+****@clear*****
Fri Jul 11 12:52:14 JST 2014


YUKI Hiroshi	2014-07-11 12:52:14 +0900 (Fri, 11 Jul 2014)

  New Revision: 73d20b2f86e1d5ee524a93abb61472d4a68e4d73
  https://github.com/droonga/droonga.org/commit/73d20b2f86e1d5ee524a93abb61472d4a68e4d73

  Message:
    Use DROONGA_BASE_DIR environment variable

  Modified files:
    tutorial/1.0.5/add-replica/index.md
    tutorial/1.0.5/basic/index.md
    tutorial/1.0.5/dump-restore/index.md
    tutorial/1.0.5/groonga/index.md

  Modified: tutorial/1.0.5/add-replica/index.md (+4 -6)
===================================================================
--- tutorial/1.0.5/add-replica/index.md    2014-07-10 14:37:35 +0900 (526b5fc)
+++ tutorial/1.0.5/add-replica/index.md    2014-07-11 12:52:14 +0900 (6b81696)
@@ -70,7 +70,7 @@ Note, you cannot add a non-empty node to an existing cluster.
 If the computer was used as a Droonga node in old days, then you must clear old data at first.
 
     (on 192.168.0.12)
-    # kill $(cat $PWD/droonga-engine.pid)
+    # kill $(cat ~/droonga/droonga-engine.pid)
     # rm -rf ~/droonga
     # mkdir ~/droonga
     # scp 192.168.0.10:~/droonga/catalog.json ~/droonga/
@@ -78,9 +78,8 @@ If the computer was used as a Droonga node in old days, then you must clear old
 Let's start the server.
 
     (on 192.168.0.12)
-    # cd ~/droonga
     # host=192.168.0.12
-    # DROONGA_BASE_DIR=$PWD
+    # export DROONGA_BASE_DIR=$HOME/droonga
     # droonga-engine --host=$host \
                      --log-file=$DROONGA_BASE_DIR/droonga-engine.log \
                      --daemon \
@@ -298,10 +297,9 @@ Next, setup the new replica.
 Install required packages and starts the server with the `catalog.json` copied from an existing node of the cluster.
 
     (on 192.168.0.12)
-    # cd ~/droonga
-    # scp 192.168.0.10:~/droonga/catalog.json ./
+    # scp 192.168.0.10:~/droonga/catalog.json ~/droonga/
     # host=192.168.0.12
-    # DROONGA_BASE_DIR=$PWD
+    # export DROONGA_BASE_DIR=$HOME/droonga
     # droonga-engine --host=$host \
                      --log-file=$DROONGA_BASE_DIR/droonga-engine.log \
                      --daemon \

  Modified: tutorial/1.0.5/basic/index.md (+7 -9)
===================================================================
--- tutorial/1.0.5/basic/index.md    2014-07-10 14:37:35 +0900 (98167fb)
+++ tutorial/1.0.5/basic/index.md    2014-07-11 12:52:14 +0900 (eea1878)
@@ -214,11 +214,11 @@ For more details of the configuration file `catalog.json`, see [the reference ma
 
 Start a Droonga engine, you can start it with the command `droonga-engine`, like:
 
-    # base_path=$PWD
+    # export DROONGA_BASE_DIR=$PWD
     # droonga-engine --host 192.168.0.10 \
-                     --log-file=$base_path/droonga-engine.log \
+                     --log-file=$DROONGA_BASE_DIR/droonga-engine.log \
                      --daemon \
-                     --pid-file $base_path/droonga-engine.pid
+                     --pid-file $DROONGA_BASE_DIR/droonga-engine.pid
 
 ### Stop an instance of droonga-engine
 
@@ -226,17 +226,16 @@ First, you need to know how to stop droonga-engine.
 
 Send SIGTERM to droonga-engine:
 
-    # kill $(cat droonga-engine.pid)
+    # kill $(cat $DROONGA_BASE_DIR/droonga-engine.pid)
 
 This is the way to stop droonga-engine.
 
 Start droonga-engine again:
 
-    # base_path=$PWD
     # droonga-engine --host 192.168.0.10 \
-                     --log-file=$base_path/droonga-engine.log \
+                     --log-file=$DROONGA_BASE_DIR/droonga-engine.log \
                      --daemon \
-                     --pid-file $base_path/droonga-engine.pid
+                     --pid-file $DROONGA_BASE_DIR/droonga-engine.pid
 
 ### Create a database
 
@@ -1325,11 +1324,10 @@ Let's use the `droonga-http-server` as an HTTP protocol adapter. It is an npm pa
 
 Then, run it.
 
-    # base_path=$PWD
     # droonga-http-server --receive-host-name=192.168.0.10 \
                           --droonga-engine-host-name=192.168.0.10 \
                           --daemon \
-                          --pid-file $base_path/droonga-http-server.pid
+                          --pid-file $DROONGA_BASE_DIR/droonga-http-server.pid
 
 
 ### Search request via HTTP

  Modified: tutorial/1.0.5/dump-restore/index.md (+9 -9)
===================================================================
--- tutorial/1.0.5/dump-restore/index.md    2014-07-10 14:37:35 +0900 (deb9ff0)
+++ tutorial/1.0.5/dump-restore/index.md    2014-07-11 12:52:14 +0900 (ad21d6f)
@@ -141,20 +141,20 @@ If you are reading this tutorial sequentially, you'll have an existing cluster a
 Make it empty with these commands:
 
     (on 192.168.0.10)
-    # cd ~/droonga
-    # kill $(cat $DROONGA_BASE_DIR/droonga-engine.pid)
-    # rm -r 000
     # host=192.168.0.10
+    # export DROONGA_BASE_DIR=$HOME/droonga
+    # kill $(cat $DROONGA_BASE_DIR/droonga-engine.pid)
+    # rm -r $DROONGA_BASE_DIR/000
     # droonga-engine --host=$host \
                      --log-file=$DROONGA_BASE_DIR/droonga-engine.log \
                      --daemon \
                      --pid-file=$DROONGA_BASE_DIR/droonga-engine.pid
 
     (on 192.168.0.11)
-    # cd ~/droonga
-    # kill $(cat $DROONGA_BASE_DIR/droonga-engine.pid)
-    # rm -r 000
     # host=192.168.0.11
+    # export DROONGA_BASE_DIR=$HOME/droonga
+    # kill $(cat $DROONGA_BASE_DIR/droonga-engine.pid)
+    # rm -r $DROONGA_BASE_DIR/000
     # droonga-engine --host=$host \
                      --log-file=$DROONGA_BASE_DIR/droonga-engine.log \
                      --daemon \
@@ -239,10 +239,10 @@ Construct two clusters by `droonga-engine-catalog-modify` and make one cluster e
                                     --replica-hosts=$host
 
     (on 192.168.0.11)
-    # cd ~/droonga
-    # kill $(cat $PWD/droonga-engine.pid)
-    # rm -r 000
     # host=192.168.0.11
+    # export DROONGA_BASE_DIR=$HOME/droonga
+    # kill $(cat $DROONGA_BASE_DIR/droonga-engine.pid)
+    # rm -r $DROONGA_BASE_DIR/000
     # droonga-engine-catalog-modify --source=$PWD/catalog.json \
                                     --update \
                                     --replica-hosts=$host

  Modified: tutorial/1.0.5/groonga/index.md (+2 -3)
===================================================================
--- tutorial/1.0.5/groonga/index.md    2014-07-10 14:37:35 +0900 (5d45a5c)
+++ tutorial/1.0.5/groonga/index.md    2014-07-11 12:52:14 +0900 (2fc0320)
@@ -107,9 +107,8 @@ On the other hand, you have to run multiple servers for each Droonga node to use
 
 To start them, run commands like following on each Droonga node:
 
-    # cd ~/droonga
     # host=192.168.0.10
-    # DROONGA_BASE_DIR=$PWD
+    # export DROONGA_BASE_DIR=$HOME/droonga
     # droonga-engine --host=$host \
                      --log-file=$DROONGA_BASE_DIR/droonga-engine.log \
                      --daemon \
@@ -126,8 +125,8 @@ Note that you have to specify the host name of the Droonga node itself via some
 It will be used to communicate with other Droonga nodes in the cluster.
 So you have to specify different host name on another Droonga node, like:
 
-    # cd ~/droonga
     # host=192.168.0.11
+    # export DROONGA_BASE_DIR=$HOME/droonga
     # droonga-engine --host=$host \
     ...
 
-------------- next part --------------
HTML����������������������������...
Download 



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