栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Java

Orientdb 概览

Java 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

Orientdb 概览


文章目录
    • 关于 Orientdb
    • 安装、启动
      • macOS 上安装
    • 基本使用
      • 启动服务
      • 服务器配置日志
      • 访问网页 GUI
      • 终端开启交互
    • Java JDBC 操作 OrientDB
    • PyOrient : Python 操作 OrientDB


关于 Orientdb

OrientDB is the most versatile DBMS supporting Graph, Document, Reactive, Full-Text and Geospatial models in one Multi-Model product.
OrientDB can run distributed (Multi-Master), supports SQL, ACID Transactions, Full-Text indexing and Reactive Queries.


  • 官网:https://orientdb.org
  • Github: https://github.com/orientechnologies/orientdb
  • 官方文档
    http://www.orientdb.com/docs/last/index.html
    https://github.com/orientechnologies/orientdb-docs
  • 文档中文翻译
    https://orientdb-cn.gitbooks.io/doc2-1-x/content/Tutorial-Installation.html

相关教程/资源

  • 易百教程:OrientDB 教程
    https://www.yiibai.com/orientdb/
  • 代纪章Kisho: 《图数据库OrientDB-基础篇》 – 推荐
    https://mp.weixin.qq.com/s/Jkjo8AZvqcLZBS7_STHQ9Q
  • 求和的小熊猫:OrientDB 系列 —— 初识 OrientDB
    https://blog.csdn.net/qq_38219153/article/details/124099272
  • 曲健Nicholas : 《OrientDB进阶 - 存储》
    https://mp.weixin.qq.com/s/2hQa-awYpqkMNO0DquYxlA

安装、启动

OrientDB提供了两个版本:

  • 社区版
    提供了一个二进制包下载,在Github上提供了源码。
  • 企业版
    是一个建立在社区版上的商业软件,提供了企业应用的一些特性,例如:
    • 查询分析器
    • 分布式集群配置
    • 指标度量记录
    • 在线监控,配置报警

OrientDB需要 Java1.7版本及以上

在OSGi容器中, OrientDB使用ConcurrentLinkedHashMap concurrentlinkedhashmap 去建立内存的LRU队列. 这个类库使用了sun.misc包,而sun.misc不在java系统包中。为了克服这个问题,你需要配置你的框架属性列表中增加属性org.osgi.framework.system.packages.extra,赋值sun.misc。

在启动平台的时候配置VM的参数:

$ java -Dorg.osgi.framework.system.packages.extra=sun.misc

macOS 上安装

官网下载安装包
https://orientdb.org/download

这里我下载的是3.2.6版本,解压后放到如下路径:
~/software/orientdb-community-3.2.6

这是一个二进制包,不需要再额外安装之类的,可以直接使用.


配置环境变量
如果想直接调用安装包bin中的命令,可以将安装包 bin 文件夹添加到环境变量。


修改 ~/.bash_profile 文件,添加内容:

export OrientDB_HOME='~/software/orientdb-community-3.2.6/'
alias orientdb-server=$ORIENTDB_HOME/bin/orientdb.sh
alias orientdb-console=$ORIENTDB_HOME/bin/console.sh

使配置生效

source ~/.bash_profile

基本使用 启动服务
进入安装包所在文件夹
cd ~/software/orientdb-community-3.2.6/bin/

# 启动 OrientDB 服务
./server.sh

# 关闭 OrientDB
./shutdown.sh -p ROOT_PASSWORD

# 停止运行在 远程机器的服务 或者 本机不同端口
$ ./shutdown.sh -h odb1.mydomain.com -P 2424-2430 -u root -p ROOT_PASSWORD


参数如下:

  • -h | --host : HOSTNAME or IP ADDRESS : the host or ip where OrientDB is running, default to localhost
  • -P | --potrs : PORT or PORT RANGE : single port value or range of ports; default to 2424-2430
  • -u | --user : ROOT USERNAME : root’s username; deafult to root
  • -p | --password : ROOT PASSWORD : root’s user password; mandatory

注意: 在Windows系统上,密码一直是 mandatory,因为脚本无法获取OrientDB进程的PID。


服务器配置日志

从下面文件加载日志配置 $ORIENTDB_HOME/config/orientdb-server-config.xml


更多关于服务的说明:
https://orientdb-cn.gitbooks.io/doc2-1-x/content/DB-Server.html


终端上启动后效果如下:
第一次启动,会提醒你输入 root 密码,输入后再次确认一次就好。


访问网页 GUI

确认后,可以访问网页:http://localhost:2480/studio/index.html
OrientDB 可以通过系统的端口2424(TCP)和2480(HTTP)访问



终端开启交互
$ orientdb-console

OrientDB console v.3.2.6 (build 92f0b7006cf27a25e80d0ef401ce09618f64189d, branch UNKNOWN) https://www.orientdb.com
Type 'help' to display all the supported commands.
orientdb> 


Java JDBC 操作 OrientDB

OrientDB 由 Java 编写,官方教程如下:
http://www.orientdb.com/docs/last/fiveminute/java.html


PyOrient : Python 操作 OrientDB
  • Github
    https://github.com/mogui/pyorient
  • 官方介绍
    http://orientdb.com/docs/2.2.x/PyOrient.html

待补充…


2022-05-15(六)

人生无常,欢笑的背后有时是沧桑,然而还是要欢笑

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/888029.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号