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!


For years, Linux software distribution relied on native formats like DEB and RPM, deeply ingrained in each distribution's ecosystem. However, Flatpak and Snap have emerged, promising a universal approach to application packaging. This article exami

The differences between Linux and Windows in handling device drivers are mainly reflected in the flexibility of driver management and the development environment. 1. Linux adopts a modular design, and the driver can be loaded and uninstalled dynamically. Developers need to have an in-depth understanding of the kernel mechanism. 2. Windows relies on the Microsoft ecosystem, and the driver needs to be developed through WDK and signed and certified. The development is relatively complex but ensures the stability and security of the system.

The security models of Linux and Windows each have their own advantages. Linux provides flexibility and customizability, enabling security through user permissions, file system permissions, and SELinux/AppArmor. Windows focuses on user-friendliness and relies on WindowsDefender, UAC, firewall and BitLocker to ensure security.

Linux and Windows differ in hardware compatibility: Windows has extensive driver support, and Linux depends on the community and vendors. To solve Linux compatibility problems, you can manually compile drivers, such as cloning RTL8188EU driver repository, compiling and installing; Windows users need to manage drivers to optimize performance.

The main differences between Linux and Windows in virtualization support are: 1) Linux provides KVM and Xen, with outstanding performance and flexibility, suitable for high customization environments; 2) Windows supports virtualization through Hyper-V, with a friendly interface, and is closely integrated with the Microsoft ecosystem, suitable for enterprises that rely on Microsoft software.

The main tasks of Linux system administrators include system monitoring and performance tuning, user management, software package management, security management and backup, troubleshooting and resolution, performance optimization and best practices. 1. Use top, htop and other tools to monitor system performance and tune it. 2. Manage user accounts and permissions through useradd commands and other commands. 3. Use apt and yum to manage software packages to ensure system updates and security. 4. Configure a firewall, monitor logs, and perform data backup to ensure system security. 5. Troubleshoot and resolve through log analysis and tool use. 6. Optimize kernel parameters and application configuration, and follow best practices to improve system performance and stability.

Learning Linux is not difficult. 1.Linux is an open source operating system based on Unix and is widely used in servers, embedded systems and personal computers. 2. Understanding file system and permission management is the key. The file system is hierarchical, and permissions include reading, writing and execution. 3. Package management systems such as apt and dnf make software management convenient. 4. Process management is implemented through ps and top commands. 5. Start learning from basic commands such as mkdir, cd, touch and nano, and then try advanced usage such as shell scripts and text processing. 6. Common errors such as permission problems can be solved through sudo and chmod. 7. Performance optimization suggestions include using htop to monitor resources, cleaning unnecessary files, and using sy


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

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

Zend Studio 13.0.1
Powerful PHP integrated development environment

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

WebStorm Mac version
Useful JavaScript development tools
