Home System Tutorial LINUX Install OrientDB on Ubuntu 16.04

Install OrientDB on Ubuntu 16.04

Jan 16, 2024 pm 12:08 PM
linux linux tutorial Red Hat linux system linux command linux certification red hat linux linux video

Introduction Usually when we mention databases, we think of two main categories: using a type of interface between users and applications called Structured Query Language (Structured Query Language, (SQL) relational database management system (RDBMS) and non-relational database management systems (NoSQL database).

There are huge differences between these two models in how they process (store) data.

Relational database management system

In a relational model (such as MySQL, or its offshoot MariaDB), a database is a collection of tables, each of which contains one or more data categories organized in columns. Each row of the database contains a unique instance of data, whose classification is defined by columns.

As an example, imagine a table containing customers. Each row is equivalent to a customer, and each column corresponds to the name, address and other necessary information.

The other table may contain orders, products, customers, dates and others. Users of this database can get a view that meets their needs, such as a report on a customer's purchases of products within a specific price range.

Non-relational database management system

In a non-relational database (or not only SQL) management system, the database is designed to store data in different ways, such as document storage, key-value pair storage, graph relational storage, and other methods. storage. Database systems implemented in this form are specifically used for large database clusters and large web applications. Today, non-relational databases are used by some large companies such as Google and Amazon.

Document storage database

Document storage database stores data in the form of documents. This type of use is typically represented by JavaScript and JSON, although XML and other forms of storage can also be used. An example here is MongoDB.

Key-value pair storage database

This is a simple model with a unique key key paired with a value value. This system is high-performance and highly scalable in terms of caching. Examples here include BerkeleyDB and MemacacheDB.

Graph relational database

As the name suggests, this kind of database stores data by using a graph model, which means that data is organized through nodes and interconnections between nodes. This is a flexible model that can evolve over time and use. This system should be used where mapping relationships are emphasized. Examples here are IBM Graphs, Neo4j, and OrientDB.

OrientDB

OrientDB is a multi-mode non-relational database management system. As the company that developed it puts it "It is a scalable, high-performance database that combines graph relationships with document, key-value, reactive, object-oriented and geospatial models".

OrientDB also supports SQL, which can be used to operate trees and graphs after expansion.

content

Target
This tutorial is designed to teach you how to download and configure OrientDB Community Edition on a server running Ubuntu 16.04.

Download OrientDB

We can download the latest version of OrientDB from the latest server by entering the following command.

$ wget -O orientdb-community-2.2.22.tar.gz http://orientdb.com/download.php?file=orientdb-community-2.2.22.tar.gz&os=linux
Copy after login

What is downloaded here is a compressed package containing precompiled binary files, so we can use the tar command to decompress it:

$ tar -zxf orientdb-community-2.2.22.tar.gz
Copy after login

Move the extracted folder as a whole to /opt:

# mv orientdb-community-2.2.22 /opt/orientdb
Copy after login
Start OrientDB server

To start the OrientDB server, you need to run the shell script in the orientdb/bin/ directory:

# /opt/orientdb/bin/server.sh
Copy after login

If you start the OrientDB server for the first time, the installation program will also display some prompt information and remind you to set the root user password of OrientDB:

+---------------------------------------------------------------+
| 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: ********
Copy after login

After completing these, the OrientDB database server will start successfully:

INFO OrientDB Server is active v2.2.22 (build fb2b7d321ea8a5a5b18a82237049804aace9e3de). [OServer]
Copy after login

From now on, we need to use a second terminal to interact with the OrientDB server.

To force stop OrientDB, just press Ctrl C.

Configuration daemon

At this point, we can think of OrientDB as just a string of shell scripts, which can be opened with an editor /opt/orientdb/bin/orientdb.sh:

# $EDITOR /opt/orientdb/bin/orientdb.sh
Copy after login

In its first paragraph, we can see:

#!/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"
Copy after login

We need to configure ORIENTDB_DIR and ORIENTDB_USER.

Then create a user. For example, if we create a user named orientdb, we need to enter the following command:

# useradd -r orientdb -s /sbin/nologin
Copy after login

orientdb is the user we entered at ORIENTDB_USER.

Then change the ownership of the /opt/orientdb directory:

# chown -R orientdb:orientdb /opt/orientdb
Copy after login

Change the permissions of the server configuration file:

# chmod 640 /opt/orientdb/config/orientdb-server-config.xml
Copy after login
Download system daemon service

The compressed package of OrientDB contains a service file /opt/orientdb/bin/orientdb.service. We copy it to the /etc/systemd/system folder:

# cp /opt/orientdb/bin/orientdb.service /etc/systemd/system
Copy after login

Edit the service file:

# $EDITOR /etc/systemd/system/orientdb.service
Copy after login

其中 [service] 内容块看起来应该是这样的:

[Service]
User=ORIENTDB_USER
Group=ORIENTDB_GROUP
ExecStart=$ORIENTDB_HOME/bin/server.sh
Copy after login

将其改成如下样式:

[Service]
User=orientdb
Group=orientdb
ExecStart=/opt/orientdb/bin/server.sh
Copy after login

保存并退出。

重新加载系统守护进程:

# systemctl daemon-reload
Copy after login

启动 OrientDB 并使其开机自启动:

# systemctl start orientdb
# systemctl enable orientdb
Copy after login

确认 OrientDB 的状态:

# systemctl status orientdb
Copy after login

上述指令应该会输出:

● orientdb.service - OrientDB Server
Loaded: loaded (/etc/systemd/system/orientdb.service; disabled; vendor preset: enabled)
Active: active (running) ...
Copy after login

流程就是这样了!OrientDB 社区版成功安装并且正确运行在我们的服务器上了。

总结

在这个指导中,我们看到了一些关系型数据库管理系统(RDBMS)以及非关系型数据库管理系统(NoSQL DBMS)的简单对照。我们也安装 OrientDB 社区版的服务器端并完成了其基础的配置。

这是我们部署完全的 OrientDB 基础设施的第一步,也是我们用于管理大型系统数据的起步。


The above is the detailed content of Install OrientDB on Ubuntu 16.04. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Difference between centos and ubuntu Difference between centos and ubuntu Apr 14, 2025 pm 09:09 PM

The key differences between CentOS and Ubuntu are: origin (CentOS originates from Red Hat, for enterprises; Ubuntu originates from Debian, for individuals), package management (CentOS uses yum, focusing on stability; Ubuntu uses apt, for high update frequency), support cycle (CentOS provides 10 years of support, Ubuntu provides 5 years of LTS support), community support (CentOS focuses on stability, Ubuntu provides a wide range of tutorials and documents), uses (CentOS is biased towards servers, Ubuntu is suitable for servers and desktops), other differences include installation simplicity (CentOS is thin)

How to use docker desktop How to use docker desktop Apr 15, 2025 am 11:45 AM

How to use Docker Desktop? Docker Desktop is a tool for running Docker containers on local machines. The steps to use include: 1. Install Docker Desktop; 2. Start Docker Desktop; 3. Create Docker image (using Dockerfile); 4. Build Docker image (using docker build); 5. Run Docker container (using docker run).

Centos options after stopping maintenance Centos options after stopping maintenance Apr 14, 2025 pm 08:51 PM

CentOS has been discontinued, alternatives include: 1. Rocky Linux (best compatibility); 2. AlmaLinux (compatible with CentOS); 3. Ubuntu Server (configuration required); 4. Red Hat Enterprise Linux (commercial version, paid license); 5. Oracle Linux (compatible with CentOS and RHEL). When migrating, considerations are: compatibility, availability, support, cost, and community support.

How to install centos How to install centos Apr 14, 2025 pm 09:03 PM

CentOS installation steps: Download the ISO image and burn bootable media; boot and select the installation source; select the language and keyboard layout; configure the network; partition the hard disk; set the system clock; create the root user; select the software package; start the installation; restart and boot from the hard disk after the installation is completed.

Detailed explanation of docker principle Detailed explanation of docker principle Apr 14, 2025 pm 11:57 PM

Docker uses Linux kernel features to provide an efficient and isolated application running environment. Its working principle is as follows: 1. The mirror is used as a read-only template, which contains everything you need to run the application; 2. The Union File System (UnionFS) stacks multiple file systems, only storing the differences, saving space and speeding up; 3. The daemon manages the mirrors and containers, and the client uses them for interaction; 4. Namespaces and cgroups implement container isolation and resource limitations; 5. Multiple network modes support container interconnection. Only by understanding these core concepts can you better utilize Docker.

How to view the docker process How to view the docker process Apr 15, 2025 am 11:48 AM

Docker process viewing method: 1. Docker CLI command: docker ps; 2. Systemd CLI command: systemctl status docker; 3. Docker Compose CLI command: docker-compose ps; 4. Process Explorer (Windows); 5. /proc directory (Linux).

What computer configuration is required for vscode What computer configuration is required for vscode Apr 15, 2025 pm 09:48 PM

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)

What to do if the docker image fails What to do if the docker image fails Apr 15, 2025 am 11:21 AM

Troubleshooting steps for failed Docker image build: Check Dockerfile syntax and dependency version. Check if the build context contains the required source code and dependencies. View the build log for error details. Use the --target option to build a hierarchical phase to identify failure points. Make sure to use the latest version of Docker engine. Build the image with --t [image-name]:debug mode to debug the problem. Check disk space and make sure it is sufficient. Disable SELinux to prevent interference with the build process. Ask community platforms for help, provide Dockerfiles and build log descriptions for more specific suggestions.

See all articles