📜  ArangoDB-Web界面

📅  最后修改于: 2020-11-28 13:09:15             🧑  作者: Mango


在本章中,我们将学习如何启用/禁用身份验证,以及如何将ArangoDB绑定到公共网络接口。

# arangosh --server.endpoint tcp://127.0.0.1:8529 --server.database "_system"

它将提示您输入先前保存的密码-

Please specify a password:

在配置中使用您为root创建的密码。

您还可以使用curl来检查您是否实际上正在获取需要身份验证的请求的HTTP 401(未经授权)服务器响应-

# curl --dump - http://127.0.0.1:8529/_api/version

输出

HTTP/1.1 401 Unauthorized
X-Content-Type-Options: nosniff
Www-Authenticate: Bearer token_type = "JWT", realm = "ArangoDB"
Server: ArangoDB
Connection: Keep-Alive
Content-Type: text/plain; charset = utf-8
Content-Length: 0

为了避免在学习过程中每次输入密码,我们将禁用身份验证。为此,打开配置文件-

# vim /etc/arangodb3/arangod.conf

如果代码不正确可见,则应更改配色方案。

:colorscheme desert

如下面的屏幕快照所示,将身份验证设置为false。

输出窗口根密码

重新启动服务-

# service arangodb3 restart

在使身份验证为假时,您无需输入任何密码即可(在本例中为root用户或已创建的用户,如Harry )登录,请输入密码

让我们检查身份验证关闭时的api版本-

# curl --dump - http://127.0.0.1:8529/_api/version

输出

HTTP/1.1 200 OK
X-Content-Type-Options: nosniff
Server: ArangoDB
Connection: Keep-Alive
Content-Type: application/json; charset=utf-8
Content-Length: 60
{"server":"arango","version":"3.1.27","license":"community"}