Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install OrientDB on Ubuntu16.04

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly explains "how to install OrientDB on Ubuntu16.04". The content in the article is simple and clear, easy to learn and understand. Please follow the editor's train of thought to study and learn "how to install OrientDB on Ubuntu16.04".

OrientDB is part of the NoSQL series database management system, OrientDB is the second generation distributed database with flexible documentation in a product with Apache 2 license open source code.

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

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

What is downloaded here is a zip package containing precompiled binaries, so we can use the tar directive to extract it:

$tar-zxf orientdb-community-2.2.22.tar.gz

Move the extracted folder as a whole to / opt:

# mv orientdb-community-2.2.22 / opt/orientdb

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

# / opt/orientdb/bin/server.sh

If you are starting the OrientDB server for the first time, the installer will also display some prompts and remind you to set the root password for 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: *

When this is done, the OrientDB database server starts successfully:

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

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

To force OrientDB to stop executing Ctrl+C.

When configuring the daemon, 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

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"

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 instruction:

# useradd-r orientdb-s / sbin/nologin

Orientdb is the user we entered at ORIENTDB_USER.

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

# chown-R orientdb:orientdb / opt/orientdb

Change the permissions of the server profile:

# chmod 640 / opt/orientdb/config/orientdb-server-config.xml

The zip package for the system daemon service OrientDB contains a service file / opt/orientdb/bin/orientdb.service. Let's copy it to the / etc/systemd/system folder:

# cp / opt/orientdb/bin/orientdb.service / etc/systemd/system

Edit the service file:

# $EDITOR / etc/systemd/system/orientdb.service

The [service] content block should look like this:

[Service]

User=ORIENTDB_USER

Group=ORIENTDB_GROUP

ExecStart=$ORIENTDB_HOME/bin/server.sh

Change it to the following style:

[Service]

User=orientdb

Group=orientdb

ExecStart=/opt/orientdb/bin/server.sh

Save and exit.

Reload the system daemon:

# systemctl daemon-reload

Start OrientDB and make it self-boot:

# systemctl start orientdb

# systemctl enable orientdb

Confirm the status of the OrientDB:

# systemctl status orientdb

The above instruction should output:

● orientdb.service-OrientDB Server

Loaded: loaded (/ etc/systemd/system/orientdb.service; disabled; vendor preset: enabled)

Active: active (running)...

Thank you for your reading, the above is the content of "how to install OrientDB on Ubuntu16.04". After the study of this article, I believe you have a deeper understanding of how to install OrientDB on Ubuntu16.04, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report