How to install and configure ArangoDB
ArangoDB is an open source distributed native multi-model database. It is a NoSQL database with three data models: graph, document and key/value. ArangoDB uses SQL-like query language (AQL) to build high-performance applications.
ArangoDB supports installation on Windows, Linux, Docker, Mac and other systems.
Under Windows, you can download the compressed package version or the executable file version. I prefer to use the compressed package version. After downloading, just select a directory and decompress it directly. The directory structure after decompression roughly includes:
- etc: All configuration files are in this directory
- usr: including database execution files and js module libraries
- var: data directory and FOXX program directory
The startup file is in the usr/bin/ directory. When starting, open a terminal, switch to this directory, execute the startup file, or it can also be made into a windows service.
This article takes CentOS 7 as an example. For other Linux distributions, just follow the official instructions.
Execute the following command with root privileges:
cd <span class="hljs-regexp">/etc/</span>yum.repos.d/ curl -OL <span class="hljs-string">https:</span><span class="hljs-comment">//download.arangodb.com/arangodb33/CentOS_7/arangodb.repo</span> yum -y install arangodb3<span class="hljs-number">-3.3</span><span class="hljs-number">.7</span> yum -y install arangodb3-debuginfo<span class="hljs-number">-3.3</span><span class="hljs-number">.7</span>(默认情况下不是必须的)
After successful installation, carefully check the terminal output information:
SECURITY HINT:
run 'arango-secure-installation' to set a root password
the current password is '894a31beb567898c6dc0easdefga1eb6b'
It can be found that the default user is root, and a temporary password is provided, as well as the command to change the root password: arango-secure-installation. This command is actually a soft link to arangod, and arangod is the database server command of ArangoDB. Can be used to start the database, change passwords, etc.
At the same time, ArangoDB provides a web client to operate the database. It can be opened after starting the database server. The default port is 8529. You can also change the password after logging in with the initial password. It is much more convenient for students who are new to the command line. After all, The graphical interface is more intuitive.
ArangoDB has many configuration files. The one we usually configure most is arangod.conf. The directory of this file under Linux is usually under /etc/arangodb3/. Under Windows, because I am often used to using compressed package version, its configuration file Just in the etc/arangodb3 directory of the unzipped directory.
The content that usually needs to be configured includes the data storage path, log path, access address, etc.
Configure data path:
directory = /var/lib/arangodb3
Configure log path:
file = /var/log/arangodb3/arangod.log
Configure access path:
endpoint = tcp://127.0.0.1:8529
If you only access it locally, there is no problem, but if you want to access it on the LAN or external network, you must also add the access address of the LAN or external network:
endpoint = tcp://192.168.1.101:8529
After modification, restart the database and it can be accessed outside the local machine.
初始安装后会提供一串很长的密码,不太容易记住,所以我们要修改一下密码。我主要介绍两种修改密码的方法:在终端使用命令修改和在图形界面中修改。
1,在终端修改密码
在终端输入以下命令:
<span class="hljs-attribute">sudo</span> arango-secure-installation
系统会提示你输入 root 的密码:
Please enter password for root user:
输入两遍新密码即完成了密码更改,貌似不校验旧密码。
密码修改完后启动数据库登陆即可。
2,图形界面修改密码
使用图形界面操作,首先要启动 ArangoDB 数据库,有两种方式可启动数据库,一是直接使用上面提到的 arangod 命令:
<span class="hljs-attribute">sudo</span> arangod
或者使用系统的服务 systemd 操作
<span class="hljs-attribute">sudo</span> systemctl start arangodb3
......
INFO ArangoDB (version 3.3.7 [linux]) is ready for business. Have fun!
启动后查看终端或日志中有以上提示,表示启动成功。
查看一下 ArangoDB 的状态:
<span class="hljs-attribute">sudo</span> systemctl status arangodb3
如果显示类似如下:
Active: active (running) since ...
表明启动成功。
两种启动方式比较推荐后一种,通过系统启动可以方便统一管理。
启动后即可在浏览器中打开客户端界面,输入 http://localhost:8529:
username 默认为 root,密码就是那初始的一长串字符,登陆后,数据库选择 _system,进入到主页中,在左边栏中选择 USERS,在右边点击 root 用户,进去后就会看到修改密码的按钮,点击就可以修改密码了。
到此基本安装配置就完成了。
The above is the detailed content of How to install and configure ArangoDB. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics





VS Code system requirements: Operating system: Windows 10 and above, macOS 10.12 and above, Linux distribution processor: minimum 1.6 GHz, recommended 2.0 GHz and above memory: minimum 512 MB, recommended 4 GB and above storage space: minimum 250 MB, recommended 1 GB and above other requirements: stable network connection, Xorg/Wayland (Linux)

The reasons for the installation of VS Code extensions may be: network instability, insufficient permissions, system compatibility issues, VS Code version is too old, antivirus software or firewall interference. By checking network connections, permissions, log files, updating VS Code, disabling security software, and restarting VS Code or computers, you can gradually troubleshoot and resolve issues.

VS Code is available on Mac. It has powerful extensions, Git integration, terminal and debugger, and also offers a wealth of setup options. However, for particularly large projects or highly professional development, VS Code may have performance or functional limitations.

VS Code is the full name Visual Studio Code, which is a free and open source cross-platform code editor and development environment developed by Microsoft. It supports a wide range of programming languages and provides syntax highlighting, code automatic completion, code snippets and smart prompts to improve development efficiency. Through a rich extension ecosystem, users can add extensions to specific needs and languages, such as debuggers, code formatting tools, and Git integrations. VS Code also includes an intuitive debugger that helps quickly find and resolve bugs in your code.

Visual Studio Code (VSCode) is a cross-platform, open source and free code editor developed by Microsoft. It is known for its lightweight, scalability and support for a wide range of programming languages. To install VSCode, please visit the official website to download and run the installer. When using VSCode, you can create new projects, edit code, debug code, navigate projects, expand VSCode, and manage settings. VSCode is available for Windows, macOS, and Linux, supports multiple programming languages and provides various extensions through Marketplace. Its advantages include lightweight, scalability, extensive language support, rich features and version

Although Notepad cannot run Java code directly, it can be achieved by using other tools: using the command line compiler (javac) to generate a bytecode file (filename.class). Use the Java interpreter (java) to interpret bytecode, execute the code, and output the result.

The main uses of Linux include: 1. Server operating system, 2. Embedded system, 3. Desktop operating system, 4. Development and testing environment. Linux excels in these areas, providing stability, security and efficient development tools.

To view the Git repository address, perform the following steps: 1. Open the command line and navigate to the repository directory; 2. Run the "git remote -v" command; 3. View the repository name in the output and its corresponding address.
