在本章中,我们将讨论ArangoDB的系统要求.
ArangoDB的系统要求如下 :
安装了Ubuntu的VPS服务器
RAM:1 GB; CPU:2.2 GHz
对于本教程中的所有命令,我们使用了一个RAM 1GB的Ubuntu 16.04(xenial)实例和一个具有处理能力2.2 GHz.本教程中的所有arangosh命令都针对ArangoDB 3.1.27版进行了测试.
如何安装ArangoDB?
在本节中,我们将了解如何安装ArangoDB. ArangoDB是为许多操作系统和发行版预先构建的.有关更多详细信息,请参阅ArangoDB文档.如前所述,在本教程中,我们将使用Ubuntu 16.04x64.
第一步是下载其存储库的公钥 :
# wget https://www.arangodb.com/repositories/arangodb31/xUbuntu_16.04/Release.key
输出
--2017-09-03 12:13:24-- https://www.arangodb.com/repositories/arangodb31/xUbuntu_16.04/Release.key Resolving https://www.arangodb.com/(www.arangodb.com)... 104.25.1 64.21, 104.25.165.21,2400:cb00:2048:1::6819:a415, ... Connecting to https://www.arangodb.com/(www.arangodb.com)|104.25. 164.21|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 3924 (3.8K) [application/pgpkeys]Saving to: ‘Release.key’Release.key 100%[===================>] 3.83K - .-KB/s in 0.001s2017-09-03 12:13:25 (2.61 MB/s) - ‘Release.key’ saved [39 24/3924]
重要的一点是,您应该看到发布.
让我们使用以下代码行安装保存的密钥 :
# sudo apt-key add Release.key
输出
OK
运行以下命令添加apt存储库并更新索引 :
# sudo apt-add-repository 'debhttps://www.arangodb.com/repositories/arangodb31/xUbuntu_16.04/ /'# sudo apt-get update
最后一步,我们可以安装ArangoDB :
# sudo apt-get install arangodb3
输出
Reading package lists... DoneBuilding dependency treeReading state information... DoneThe following package was automatically installed and is no longer required:grub-pc-binUse 'sudo apt autoremove' to remove it.The following NEW packages will be installed:arangodb30 upgraded, 1 newly installed, 0 to remove and 17 not upgraded.Need to get 55.6 MB of archives.After this operation, 343 MB of additional disk space will be used.
按 Enter .现在安装ArangoDB的过程将开始 :
Get:1 https://www.arangodb.com/repositories/arangodb31/xUbuntu_16.04arangodb3 3.1.27 [55.6 MB]Fetched 55.6 MB in 59s (942 kB/s)Preconfiguring packages ...Selecting previously unselected package arangodb3.(Reading database ... 54209 files and directories currently installed.)Preparing to unpack .../arangodb3_3.1.27_amd64.deb ...Unpacking arangodb3 (3.1.27) ...Processing triggers for systemd (229-4ubuntu19) ...Processing triggers for ureadahead (0.100.0-19) ...Processing triggers for man-db (2.7.5-1) ...Setting up arangodb3 (3.1.27) ...Database files are up-to-date.
当ArangoDB的安装即将完成时,会出现以下屏幕 :
在这里,您将被要求提供ArangoDB root 用户的密码.请仔细注意.
当出现以下对话框时,选择是选项;
当您单击上面的对话框中的是时,将出现以下对话框.点击是.
您还可以使用以下命令检查ArangoDB的状态 :
# sudo systemctl status arangodb3
输出
arangodb3.service - LSB: arangodbLoaded: loaded (/etc/init.d/arangodb3; bad; vendor pre set: enabled)Active: active (running) since Mon 2017-09-04 05:42:35 UTC;4min 46s agoDocs: man:systemd-sysv-generator(8)Process: 2642 ExecStart=/etc/init.d/arangodb3 start (code = exited,status = 0/SUCTasks: 22Memory: 158.6MCPU: 3.117sCGroup: /system.slice/arangodb3.service├─2689 /usr/sbin/arangod --uid arangodb--gid arangodb --pid-file /va└─2690 /usr/sbin/arangod --uid arangodb--gid arangodb --pid-file /vaSep 04 05:42:33 ubuntu-512 systemd[1]: Starting LSB: arangodb...Sep 04 05:42:33 ubuntu-512 arangodb3[2642]: * Starting arango database server aSep 04 05:42:35 ubuntu-512 arangodb3[2642]: {startup} starting up in daemon modeSep 04 05:42:35 ubuntu-512 arangodb3[2642]: changed working directory for childSep 04 05:42:35 ubuntu-512 arangodb3[2642]: ...done. Sep 04 05:42:35 ubuntu-512 systemd[1]: StartedLSB: arang odb.Sep 04 05:46:59 ubuntu-512 systemd[1]: Started LSB: arangodb. lines 1-19/19 (END)
现在可以使用ArangoDB了.
调用arangosh终端,在终端输入以下命令 :
# arangosh
输出
Please specify a password:
提供 root 密码在安装时创建 :
___ _ _ __ __ _ _ __ __ _ ___ | |/ | '__/ _ | ’ \ / ` |/ _ / | ’| (| | | | (| | | | | (| | () _ \ | | |_,|| _,|| ||_, |_/|/| |||__/
arangosh (ArangoDB 3.1.27 [linux] 64bit, using VPack 0.1.30, ICU 54.1, V85.0.71.39, OpenSSL 1.0.2g 1 Mar 2016)Copyright (c) ArangoDB GmbHPretty printing values.Connected to ArangoDB 'http+tcp://127.0.0.1:8529' version: 3.1.27 [server],database: '_system', username: 'root'Please note that a new minor version '3.2.2' is availableType 'tutorial' for a tutorial or 'help' to see common examples127.0.0.1:8529@_system> exit
要从ArangoDB注销,请键入以下命令 :
127.0.0.1:8529@_system> exit
输出
Uf wiederluege! Na shledanou! Auf Wiedersehen! Bye Bye! Adiau! ¡Hasta luego!Εις το επανιδείν!להתראות ! Arrivederci! Tot ziens! Adjö! Au revoir! さようなら До свидания! AtéBreve! !خداحافظ