{"id":154,"date":"2018-10-17T04:56:27","date_gmt":"2018-10-17T04:56:27","guid":{"rendered":"https:\/\/www.appservgrid.com\/paw92\/index.php\/2018\/10\/17\/orientdb-how-to-install-the-nosql-database-on-centos-7\/"},"modified":"2018-10-17T04:56:27","modified_gmt":"2018-10-17T04:56:27","slug":"orientdb-how-to-install-the-nosql-database-on-centos-7","status":"publish","type":"post","link":"https:\/\/www.appservgrid.com\/paw92\/index.php\/2018\/10\/17\/orientdb-how-to-install-the-nosql-database-on-centos-7\/","title":{"rendered":"OrientDB: How To Install the NoSQL DataBase on CentOS 7"},"content":{"rendered":"<p>&#xD;<br \/>\n&#xD;<br \/>\n <a href=\"https:\/\/s24255.pcdn.co\/wp-content\/uploads\/2017\/07\/orientdb.png\"><img loading=\"lazy\" decoding=\"async\" alt=\"OrientDB NoSQL DBMS\" height=\"318\" src=\"https:\/\/s24255.pcdn.co\/wp-content\/uploads\/2017\/07\/orientdb-696x318.png\" width=\"696\" \/><\/a>&#xD;<\/p>\n<h3>Introduction \u2013 NoSQL and OrientDB<\/h3>\n<p>When talking about databases, in general, we refer to two major families: RDBMS (Relational Database Management System), which use as user and application program interface a language named Structured Query Language (or SQL) and non-relational database management systems, or NoSQL databases. OrientDB is part of the second family.<\/p>\n<p>Between the two models there is a huge difference in the way they consider (and store) data.<\/p>\n<h4>Relational Database Management Systems<\/h4>\n<p>In the relational model (like MySQL, or its fork, MariaDB), a database is a set of tables, each containing one or more data categories organized in columns. Each row of the DB contains a unique instance of data for categories defined by columns.<\/p>\n<p>Just as an example, consider a table containing customers. Each row correspond to a customer, with columns for name, address, and every required information.<br \/>\nAnother table could contain an order, with product, customer, date and everything else. A user of this DB can obtain a view that fits its needs, for example a report about customers that bought products in a specific range of prices.<\/p>\n<h4>NoSQL Database Management Systems<\/h4>\n<p>In the NoSQL (or Not only SQL) database management systems, databases are designed implementing different \u201cformats\u201d for data, like a document, key-value, graph and others. The database systems realized with this paradigm are built especially for large-scale database clusters, and huge web applications. Today, NoSQL databases are used by major companies like Google and Amazon.<\/p>\n<h5>Document databases<\/h5>\n<p>Document databases store data in document format. The usage of this kind of DBs is usually raised with JavaScript and JSON, however, XML and other formats are accepted. An example is MongoDB.<\/p>\n<h5>Key-value databases<\/h5>\n<p>This is a simple model pairing a unique key with a value. These systems are performant and highly scalable for caching. Examples include BerkeleyDB and MemcacheDB.<\/p>\n<h5>Graph databases<\/h5>\n<p>As the name predicts, these databases store data using graph models, meaning that data is organized as nodes and interconnections between them. This is a flexible model which can evolve over time and use. These systems are applied where there is the necessity of mapping relationships.<br \/>\nExamples are IBM Graphs and Neo4j and OrientDB.<\/p>\n<h3>OrientDB<\/h3>\n<p>OrientDB, as stated by the company behind it, is a multi-model NoSQL Database Management System that \u201c<em>combines the power of graphs with documents, key\/value, reactive, object-oriented and geospatial models into one scalable, high-performance operational database\u201c.<\/em><\/p>\n<p>OrientDB has also support for SQL, with extensions to manipulate trees and graphs.<\/p>\n<h3>Prerequisites<\/h3>\n<ul>\n<li>One server running CentOS 7<\/li>\n<li>OpenJDK or Oracle Java installed on the server<\/li>\n<\/ul>\n<h3>Goals<\/h3>\n<p>This tutorial explains how to install and configure OrientDB Community on a server powered by CentOS 7.<\/p>\n<h3>OrientDB Installation<\/h3>\n<h4>Step 1 \u2013 Create a New User<\/h4>\n<p>First of all, create a new user to run OrientDB. Doing this will let to run the database on an \u201cisolated environment\u201d. To create a new user, execute the following command:<\/p>\n<p># adduser orientdb -d \/opt\/orientdb<\/p>\n<h4>Step 2 \u2013 Download OrientDB Binary Archive<\/h4>\n<p>At this point, download the OrientDB archive in the \/opt\/orientdb directory:<\/p>\n<p># wget https:\/\/orientdb.com\/download.php?file=orientdb-community-importers-2.2.29.tar.gz -O \/opt\/orientdb\/orientdb.tar.gz<\/p>\n<p><em>Note: at the time we write, 2.2.29 is the latest stable version.<\/em><\/p>\n<h4>Step 3 \u2013 Install OrientDB<\/h4>\n<p>Extract the downloaded archive:<\/p>\n<p># cd \/opt\/orientdb&#xD;<br \/>\n# tar -xf orientdb.tar.gz<\/p>\n<p>tar will extract the files in a directory named orientdb-community-importers-2.2.29. Move everything in \/opt\/orientdb:<\/p>\n<p># mv orientdb-community*\/* .<\/p>\n<p>Make the orientdb user the owner of the extracted files:<\/p>\n<p># chown -R orientdb:orientdb \/opt\/orientdb<\/p>\n<h3>Start OrientDB Server<\/h3>\n<p>Starting the OrientDB server requires the execution of the shell script contained in orientdb\/bin\/:<\/p>\n<p># \/opt\/orientdb\/bin\/server.sh<\/p>\n<p>During the first start, this installer will display some information and will ask for an OrientDB root password:<\/p>\n<p>+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+&#xD;<br \/>\n| WARNING: FIRST RUN CONFIGURATION |&#xD;<br \/>\n+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+&#xD;<br \/>\n| This is the first time the server is running. Please type a |&#xD;<br \/>\n| password of your choice for the &#8216;root&#8217; user or leave it blank |&#xD;<br \/>\n| to auto-generate it. |&#xD;<br \/>\n| |&#xD;<br \/>\n| To avoid this message set the environment variable or JVM |&#xD;<br \/>\n| setting ORIENTDB_ROOT_PASSWORD to the root password to use. |&#xD;<br \/>\n+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+&#xD;<br \/>\n&#xD;<br \/>\nRoot password [BLANK=auto generate it]: ********&#xD;<br \/>\nPlease confirm the root password: ********<\/p>\n<p>To stop OrientDB, hit Ctrl+C.<\/p>\n<h3>Create a systemd Service for OrientDB<\/h3>\n<p>Create a new ststemd service to easily manage OrientDB start and stop. With a text editor, create a new file:<\/p>\n<p># $EDITOR \/etc\/systemd\/system\/orientdb.service<\/p>\n<p>In this file, paste the following content:<\/p>\n<p>[Unit]&#xD;<br \/>\nDescription=OrientDB service&#xD;<br \/>\nAfter=network.target&#xD;<br \/>\n&#xD;<br \/>\n[Service]&#xD;<br \/>\nType=simple&#xD;<br \/>\nExecStart=\/opt\/orientdb\/bin\/server.sh&#xD;<br \/>\nUser=orientdb&#xD;<br \/>\nGroup=orientdb&#xD;<br \/>\nRestart=always&#xD;<br \/>\nRestartSec=9&#xD;<br \/>\nStandardOutput=syslog&#xD;<br \/>\nStandardError=syslog&#xD;<br \/>\nSyslogIdentifier=orientdb&#xD;<br \/>\n&#xD;<br \/>\n[Install]&#xD;<br \/>\nWantedBy=multi-user.target<\/p>\n<p>Save the file and exit.<\/p>\n<p>Reload systemd daemon service:<\/p>\n<p># systemctl daemon-reload<\/p>\n<p>At this point, start OrientDB with the following command:<\/p>\n<p># systemctl start orientdb<\/p>\n<p>Enable it to start at boot time:<\/p>\n<p># systemctl enable orientdb<\/p>\n<h3>Conclusion<\/h3>\n<p>In this tutorial we have seen a brief comparison between RDBMS and NoSQL DBMS. We have also installed and completed a basic configuration of OrientDB Community server-side.<\/p>\n<p>This is the first step for deploying a full OrientDB infrastructure, ready for managing large-scale systems data.<\/p>\n<p> <a href=\"https:\/\/www.unixmen.com\/orientdb-install-nosql-database-centos-7\/\" target=\"_blank\">Source<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>&#xD; &#xD; &#xD; Introduction \u2013 NoSQL and OrientDB When talking about databases, in general, we refer to two major families: RDBMS (Relational Database Management System), which use as user and application program interface a language named Structured Query Language (or SQL) and non-relational database management systems, or NoSQL databases. OrientDB is part of the second &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.appservgrid.com\/paw92\/index.php\/2018\/10\/17\/orientdb-how-to-install-the-nosql-database-on-centos-7\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;OrientDB: How To Install the NoSQL DataBase on CentOS 7&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-154","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/154","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/comments?post=154"}],"version-history":[{"count":0,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/154\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/media?parent=154"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/categories?post=154"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/tags?post=154"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}