新聞中心
OrientDB是一個開源NoSQL數(shù)據(jù)庫管理系統(tǒng)。 NoSQL數(shù)據(jù)庫提供了一種用于存儲和檢索引用除表式數(shù)據(jù)之外的數(shù)據(jù)(例如文檔數(shù)據(jù)或圖形數(shù)據(jù))的NO關系或非關系數(shù)據(jù)的機制。OrientDB也屬于NoSQL系列。 OrientDB是第二代分布式數(shù)據(jù)庫,具有靈活性的文檔在一個產(chǎn)品與Apache 2許可證的開放源代碼。

專注于為中小企業(yè)提供成都網(wǎng)站建設、網(wǎng)站設計服務,電腦端+手機端+微信端的三站合一,更高效的管理,為中小企業(yè)臨湘免費做網(wǎng)站提供優(yōu)質的服務。我們立足成都,凝聚了一批互聯(lián)網(wǎng)行業(yè)人才,有力地推動了1000多家企業(yè)的穩(wěn)健成長,幫助中小企業(yè)通過網(wǎng)站建設實現(xiàn)規(guī)模擴充和轉變。
下載 OrientDB
我們可以從最新的服務端上通過輸入下面的指令來下載最新版本的 OrientDB。
$?wget?-O?orientdb-community-2.2.22.tar.gz?http://orientdb.com/download.php?file=orientdb-community-2.2.22.tar.gz&os=linux
這里下載的是一個包含預編譯二進制文件的壓縮包,所以我們可以使用 tar 指令來操作解壓它:
$?tar?-zxf?orientdb-community-2.2.22.tar.gz
將從中提取出來的文件夾整體移動到 /opt:
#?mv?orientdb-community-2.2.22?/opt/orientdb啟動 OrientDB 服務器
啟動 OrientDB 服務器需要運行 orientdb/bin/ 目錄下的?shell?腳本:
#?/opt/orientdb/bin/server.sh如果你是第一次開啟 OrientDB 服務器,安裝程序還會顯示一些提示信息,以及提醒你設置 OrientDB 的 root 用戶密碼:
+---------------------------------------------------------------+
|?WARNING:?FIRST?RUN?CONFIGURATION?|
+---------------------------------------------------------------+
|?This?is?the?first?time?the?server?is?running.?Please?type?a?|
|?password?of?your?choice?for?the?'root'?user?or?leave?it?blank?|
|?to?auto-generate?it.?|
|?|
|?To?avoid?this?message?set?the?environment?variable?or?JVM?|
|?setting?ORIENTDB_ROOT_PASSWORD?to?the?root?password?to?use.?|
+---------------------------------------------------------------+
Root?password?[BLANK=auto?generate?it]:?********
Please?confirm?the?root?password:?********
在完成這些后,OrientDB 數(shù)據(jù)庫服務器將成功啟動:
INFO?OrientDB?Server?is?active?v2.2.22?(build?fb2b7d321ea8a5a5b18a82237049804aace9e3de).?[OServer]
從現(xiàn)在開始,我們需要用第二個終端來與 OrientDB 服務器進行交互。
若要強制停止 OrientDB 執(zhí)行 Ctrl+C 即可。
配置守護進程
此時,我們可以認為 OrientDB 僅僅是一串 shell?腳本,可以用編輯器打開 /opt/orientdb/bin/orientdb.sh:
#?$EDITOR?/opt/orientdb/bin/orientdb.sh在它的首段,我們可以看到:
#!/bin/sh#?OrientDB?service?script##?Copyright?(c)?OrientDB?LTD?(http://orientdb.com/)#?chkconfig:?2345?20?80#?description:?OrientDb?init?script#?processname:?orientdb.sh#?You?have?to?SET?the?OrientDB?installation?directory?here
ORIENTDB_DIR="YOUR_ORIENTDB_INSTALLATION_PATH"
ORIENTDB_USER="USER_YOU_WANT_ORIENTDB_RUN_WITH"我們需要配置ORIENTDB_DIR 以及 ORIENTDB_USER.
然后創(chuàng)建一個用戶,例如我們創(chuàng)建一個名為 orientdb 的用戶,我們需要輸入下面的指令:
#?useradd?-r?orientdb?-s?/sbin/nologinorientdb 就是我們在 ORIENTDB_USER 處輸入的用戶。
再更改 /opt/orientdb 目錄的所有權:
#?chown?-R?orientdb:orientdb?/opt/orientdb改變服務器配置文件的權限:
#?chmod?640?/opt/orientdb/config/orientdb-server-config.xml下載系統(tǒng)守護進程服務
OrientDB 的壓縮包包含一個服務文件 /opt/orientdb/bin/orientdb.service。我們將其復制到 /etc/systemd/system 文件夾下:
#?cp?/opt/orientdb/bin/orientdb.service?/etc/systemd/system編輯該服務文件:
#?$EDITOR?/etc/systemd/system/orientdb.service其中 [service] 內容塊看起來應該是這樣的:
[Service]
User=ORIENTDB_USER
Group=ORIENTDB_GROUP
ExecStart=$ORIENTDB_HOME/bin/server.sh
將其改成如下樣式:
[Service]
User=orientdb
Group=orientdb
ExecStart=/opt/orientdb/bin/server.sh
保存并退出。
重新加載系統(tǒng)守護進程:
#?systemctl?daemon-reload啟動 OrientDB 并使其開機自啟動:
#?systemctl?start?orientdb#?systemctl?enable?orientdb確認 OrientDB 的狀態(tài):
#?systemctl?status?orientdb上述指令應該會輸出:
●?orientdb.service?-?OrientDB?Server
Loaded:?loaded?(/etc/systemd/system/orientdb.service;?disabled;?vendor?preset:?enabled)
Active:?active?(running)?...
流程就是這樣了!OrientDB 社區(qū)版成功安裝并且正確運行在我們的服務器上了。
總結
在這個指導中,我們看到了一些關系型數(shù)據(jù)庫管理系統(tǒng)(RDBMS)以及非關系型數(shù)據(jù)庫管理系統(tǒng)(NoSQL DBMS)的簡單對照。我們也安裝 OrientDB 社區(qū)版的服務器端并完成了其基礎的配置。
新聞標題:在Ubuntu 16.04中安裝 OrientDB
當前鏈接:http://m.fisionsoft.com.cn/article/dpccjdc.html


咨詢
建站咨詢
