2016-08-21 37 views
0

我試圖在AWS上以分佈模式啓動OrientDB。啓動沒有用戶輸入的OrientDB

我有一個自動縮放組,可根據需要創建新節點。在創建節點時,它們以默認配置開始,而沒有節點名稱。這個想法是節點名稱是隨機生成的。

我的問題是,服務器啓動並要求用戶輸入。

+---------------------------------------------------------------+ 
|   WARNING: FIRST DISTRIBUTED RUN CONFIGURATION   | 
+---------------------------------------------------------------+ 
| This is the first time that the server is running as   | 
| distributed. Please type the name you want to assign to the | 
| current server node.           | 
|                | 
| To avoid this message set the environment variable or JVM  | 
| setting ORIENTDB_NODE_NAME to the server node name to use. | 
+---------------------------------------------------------------+ 

Node name [BLANK=auto generate it]: 

我不想設置節點的名字,因爲我需要一個隨機的名字,從來沒有啓動服務器,因爲它在等待用戶輸入。

是否有一個參數我可以傳遞給dserver.sh這將通過此檢查並生成隨機節點名稱?

回答

1

您可以使用ORIENTDB_NODE_NAME變量創建一個隨機字符串作爲節點名稱傳遞給OrientDB。例如:

ORIENTDB_NODE_NAME=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1) 

有關它的更多信息,請看:https://gist.github.com/earthgecko/3089509

相關問題