YashanDB服务端个人版安装部署

介绍

崖山数据库系统YashanDB是深圳计算科学研究院完全自主研发设计的新型数据库系统,融入原创理论,支持单机/主备、共享集群、分布式等多种部署方式,覆盖OLTP/HTAP/OLAP交易和分析混合负载场景,为客户提供一站式的企业级融合数据管理解决方案。
YashanDB基于原创内核架构,全面支持众核、RDMA、智能计算、云基础设施等面向未来的软硬件技术,采用异步并行、基于代价的事务调度、Raft、有界计算等创新技术和算法,满足企业级核心应用对高兼容、高性能、高扩展、高可用等全生命周期数据管理诉求。

版本描述

  • 个人版:YashanDB面向个人用户推出的免费试用版本,除不支持多模数据类型、高级安全能力、数据库集群等企业级功能,该版本包含YashanDB数据库 所有基础核心能力,支持单机主备部署形态,配套开发者工具,供个人用户或开发者用于学习、测试、开发用途。
  • 标准版:YashanDB面向小规模用户推出的商业版本,该版本价格适中,除不支持多模数据类型、高级安全能力等企业级功能,该版本包含YashanDB数据 库所有基础核心能力,支持单机主备、分布式、共享集群部署形态,配套完整数据迁移和监控运维工具,可以为政府或中小企业提供支撑其业务所需的基 本能力。
  • 企业版:YashanDB面向大规模用户推出的商业版本,该版本包含YashanDB数据库完整核心能力,支持PB级海量数据存储和大量的并发用户,支持多模数 据类型、高级安全能力,支持单机主备、分布式、共享集群部署形态,配套完整数据迁移和监控运维工具,可以满足支撑各类企业应用。

数据库架构

image.png

下载地址

登录官方下载地址https://download.yashandb.com/download,下载x86的安装介质
image.png

安装前准备

服务器环境

** 类别 ****软件名称 **版本最低内存要求最低cpu要求
操作系统CentosCentOS Linux release 7.9.2009 (Core) x86_644G2核
数据库YashanDBv23.1

操作系统参数调整

cat >> /etc/security/limits.conf  << "EOF"
#add by yashandb* soft nofile 65536    #文件句柄* hard nofile 65536* soft nproc 65536  #最大用户线程数* hard nproc 65536* soft rss unlimited #最大内存限制* hard rss unlimited* soft stack 8192  #堆栈大小* hard stack 8192
EOF

创建用户

groupadd YASDBA
useradd -d /home/yashan -m yashan
echo "yashan"|passwd --stdin  yashan
usermod -a -G YASDBA yashan

目录规划

/yashandb/install:安装目录
/yashandb/data:数据目录

mkdir -p /yashandb/{install,data}

解压安装介质

上传yashandb-personal-23.1.1.100-linux-x86_64.tar.gz至/opt

--解压
cd /opt
tar -xvf yashandb-personal-23.1.1.100-linux-x86_64.tar.gz -C /yashandb/install--赋予权限
chown -R yashan:yashan /yashandb
chmod -R 755 /yashandb

安装步骤

数据库安装过程中将实例自动切换成OPEN阶段,并创建名为yashandb的数据库。

生成参数文件

su - yashan
[yashan@localhost]$ cd /yashandb/install/bin
[yashan@localhost]$ yasboot package se gen --cluster yashandb -u yashan -p yashan --ip 192.168.40.152 --port 22 --install-path /yashandb/install  --data-path /yashandb/data --begin-port 1688
192.168.40.152ip: memroy is less than 4096MBhostid   | group | node_type | node_name | listen_addr         | replication_addr    | data_path      
-------------------------------------------------------------------------------------------------------host0001 | dbg1  | db        | 1-1       | 192.168.40.152:1688 | 192.168.40.152:1689 | /yashandb/data 
----------+-------+-----------+-----------+---------------------+---------------------+----------------Generate config success
[yashan@localhost]$ ls -l
total 8
-rw-------. 1 yashan yashan 504 Nov 10 19:29 hosts.toml
-rw-------. 1 yashan yashan 666 Nov 10 19:29 yashandb.toml参数说明:
-p  ssh密码

补充:参数文件说明

hosts.toml
[yashan@localhost ~]$ cat hosts.toml 
uuid = "654e148df857e766e33e42c332d2087c"
cluster = "yashandb"
yas_type = "SE"
secret_key = "7bafb2221442e2ef"
isLocal = true
add_yasdba = true[om]hostid = "host0001"[om.config]LISTEN_ADDR = "192.168.40.152:1675"[[host]]hostid = "host0001"group = "yashan"user = "yashan"password = "yashan"ip = "192.168.40.152"port = 22path = "/yashandb/install"jvm_path = ""total_memory = 0[host.yasagent][host.yasagent.config]LISTEN_ADDR = "192.168.40.152:1676"
yashandb.toml
[yashan@localhost ~]$ cat yashandb.toml 
cluster = "yashandb"
create_simple_schema = false
uuid = "654e148df857e766e33e42c332d2087c"
yas_type = "SE"[[group]]group_type = "db"name = "dbg1"[group.config]CHARACTER_SET = "utf8"ISARCHIVELOG = trueREDO_FILE_NUM = 4REDO_FILE_SIZE = "128M"[group.create_sql][[group.node]]data_path = "/yashandb/data"hostid = "host0001"role = 1[group.node.config]LISTEN_ADDR = "192.168.40.152:1688"REPLICATION_ADDR = "192.168.40.152:1689"RUN_LOG_FILE_PATH = "/yashandb/install/log/yashandb/db-1-1/run"RUN_LOG_LEVEL = "INFO"SLOW_LOG_FILE_PATH = "/yashandb/install/log/yashandb/db-1-1/slow"

安装YashanDB数据库

[yashan@localhost]$ cd /yashandb/install/bin
[yashan@localhost ~]$ yasboot package install -t hosts.toml -i yashandb-personal-23.1.1.100-linux-x86_64.tar.gz
checking install profile.toml...
install version: yashandb 23.1.1.100
update host to yasom...

补充:
查看帮助信息

[yashan@localhost]$ cd /yashandb/install/bin
[yashan@localhost bin]$ yasboot package install --help
Usages: yasboot package install [<flags>]
install package
Flags:-h,--help         Show detailed help information.-i,--install-pkg  yasdb install package(.tar.gz)-f,--force        ignore check errors and force install(default: false)--disable      shield running progress(default: false)-t,--toml         hosts toml config, such as 'hosts.toml'  即上一步生成的参数文件hosts.toml

部署YashanDB数据库

[yashan@localhost]$ cd /yashandb/install/bin
[yashan@localhost ~]$ yasboot cluster deploy -t yashandb.tomltype | uuid             | name               | hostid | index    | status  | return_code | progress | cost 
------------------------------------------------------------------------------------------------------------task | 81091c90e4fcc9f9 | DeployYasdbCluster | -      | yashandb | SUCCESS | 0           | 100      | 18   
------+------------------+--------------------+--------+----------+---------+-------------+----------+------
task completed, status: SUCCESS

配置环境变量

$ cd /yashandb/install/conf
# 如~/.bashrc中已存在YashanDB相关的环境变量,将其清除$ cat yashandb.bashrc >> ~/.bashrc
$ source ~/.bashrc

补充:查看环境变量

[yashan@localhost conf]$ cat yashandb.bashrc 
export YASDB_HOME=/yashandb/install
export PATH=${YASDB_HOME}/bin:$PATH
export LD_LIBRARY_PATH=${YASDB_HOME}/lib:$LD_LIBRARY_PATH
if command -v rlwrap >/dev/null 2>&1; thenalias yasql="rlwrap yasql"
fiexport YASDB_DATA=/yashandb/data/db-1-1

设置YashanDB数据库中sys用户的密码

su - yash
cd /yashandb/data/db-1-1/instance--备份原密码文件
mv yasdb.pwd yasdb.pwdbak--重新生成密码文件
yaspwd file=yasdb.pwd password=Admin@2023

查看YashanDB数据库状态

[yashan@localhost instance]$ yasboot cluster status -c yashandbhost_id  | node_type | nodeid | pid  
--------------------------------------host0001 | db        | 1-1:1  | 2000 
----------+-----------+--------+------

连接数据库

[yashan@localhost instance]$ yasql 'sys/"Admin@2023"'
YashanDB SQL Personal Edition Release 23.1.1.100 x86_64Connected to:
YashanDB Server Personal Edition Release 23.1.1.100 x86_64 - X86 64bit Linux

补充:不包含@ 特殊字符的登录方式如下:

[yashan@localhost instance]$ yasql sys/Admin_2023
YashanDB SQL Personal Edition Release 23.1.1.100 x86_64Connected to:
YashanDB Server Personal Edition Release 23.1.1.100 x86_64 - X86 64bit Linux

实例启停

查看状态

方式1:SQL命令查看当前实例状态及数据库名称

[yashan@localhost instance]$ yasql 'sys/"Admin@2023"'
YashanDB SQL Personal Edition Release 23.1.1.100 x86_64Connected to:
YashanDB Server Personal Edition Release 23.1.1.100 x86_64 - X86 64bit LinuxSQL> SELECT status FROM V$INSTANCE;STATUS        
------------- 
OPEN         1 row fetched.SQL> SELECT database_name FROM V$DATABASE;DATABASE_NAME                                                    
---------------------------------------------------------------- 
yashandb                                                        1 row fetched.

方式2:命令方式查看YashanDB状态

[yashan@localhost ~]$ yasboot cluster status -c yashandbhost_id  | node_type | nodeid | pid  
--------------------------------------host0001 | db        | 1-1:1  | 2000 
----------+-----------+--------+------

启动数据库服务

[yashan@localhost instance]$ yasboot cluster start -c yashandbtype | uuid             | name              | hostid | index    | status  | return_code | progress | cost 
-----------------------------------------------------------------------------------------------------------task | 89b8f2f3de1ae5cd | StartYasdbCluster | -      | yashandb | RUNNING | -           | 0        | -    
------+------------------+-------------------+--------+----------+---------+-------------+----------+------

停止数据库服务

[yashan@localhost instance]$ yasboot cluster stop -c yashandbtype | uuid             | name             | hostid | index    | status  | return_code | progress | cost 
----------------------------------------------------------------------------------------------------------task | 0679fa02218a24ec | StopYasdbCluster | -      | yashandb | SUCCESS | 0           | 100      | 2    
------+------------------+------------------+--------+----------+---------+-------------+----------+------
task completed, status: SUCCESS

重启数据库服务

重启数据库服务至nomount状态

[yashan@localhost instance]$ yasboot cluster restart -c yashandb -m nomounttype | uuid             | name                | hostid | index    | status  | return_code | progress | cost 
-------------------------------------------------------------------------------------------------------------task | cf25f60bab690234 | ReStartYasdbCluster | -      | yashandb | SUCCESS | 0           | 100      | 3    
------+------------------+---------------------+--------+----------+---------+-------------+----------+------
task completed, status: SUCCESS

重启数据库服务至mount状态

[yashan@localhost instance]$ yasboot cluster restart -c yashandb -m mounttype | uuid             | name                | hostid | index    | status  | return_code | progress | cost 
-------------------------------------------------------------------------------------------------------------task | 5a75a4d77aa01e88 | ReStartYasdbCluster | -      | yashandb | SUCCESS | 0           | 100      | 4    
------+------------------+---------------------+--------+----------+---------+-------------+----------+------
task completed, status: SUCCESS

重启数据库服务至open状态

[yashan@localhost instance]$ yasboot cluster restart -c yashandb type | uuid             | name                | hostid | index    | status  | return_code | progress | cost 
-------------------------------------------------------------------------------------------------------------task | 78018f5b05a212c8 | ReStartYasdbCluster | -      | yashandb | SUCCESS | 0           | 100      | 4    
------+------------------+---------------------+--------+----------+---------+-------------+----------+------
task completed, status: SUCCESS

问题处理

cpu和memory config check failed

问题描述

安装数据库时提示cpu和memory检测失败,查看官方文档最低配置为:cpu:2C memory:4G

[yashan@localhost bin]$ yasboot package install -t hosts.toml -i yashandb-personal-23.1.1.100-linux-x86_64.tar.gz
192.168.40.152ip: cpu cores is less than 2ip: memroy is less than 4096MB
config check failed

处理办法

升级硬件配置,cpu:2C,内存5G

hosts.toml is not exist

问题描述

安装数据库时提示hosts.toml参数文件不存在

[yashan@localhost conf]$ yasboot package install -t hosts.toml -i yashandb-personal-23.1.1.100-linux-x86_64.tar.gz
hosts.toml is not exist

处理办法

未切换到配置文件目录,切换到hosts.toml文件所在目录重新安装成功

YASPW-00002 password complexity failed

问题描述

重置sys密码文件时提示密码复杂度失败

[yashan@localhost instance]$ yaspwd file=yasdb.pwd password=yashan
YASPW-00002 password complexity failed for SYS user : password must contain at least 8 characters

解决办法

密码复杂度不够,增加密码复杂度解决
yaspwd file=yasdb.pwd password=Admin@2023

YAS-00404 address 2023 is an invalid IPV4

问题描述

sys用户登录时提示YAS-00404 address 2023 is an invalid IPV4

[yashan@localhost ~]$ yasql sys/Admin@2023
YashanDB SQL Personal Edition Release 23.1.1.100 x86_64
YAS-00404 address 2023 is an invalid IPV4 URL/Ip address/hostname

解决办法

由于密码中含有@特殊字符,和Oracle一样需特殊处理。其他字符则不受影响

[yashan@localhost instance]$ yasql 'sys/"Admin@2023"'
YashanDB SQL Personal Edition Release 23.1.1.100 x86_64Connected to:
YashanDB Server Personal Edition Release 23.1.1.100 x86_64 - X86 64bit Linux

YAS-02193 the account is locked

问题描述

重启后重新输入密码提示错误导致账户被锁

[yashan@localhost instance]$ yasql 'sys/"admin_2023"'
YashanDB SQL Personal Edition Release 23.1.1.100 x86_64YAS-02193 the account is locked

解决办法

--免密登录
[yashan@localhost instance]$ yasql / as sysdba
--更改sys用户密码
SQL> alter user sys identified by "Admin@2023";

免密登录失败

问题描述

[yashan@localhost instance]$ yasql / as sysdba
YashanDB SQL Personal Edition Release 23.1.1.100 x86_64YAS-02143 invalid username/password, login denied

问题原因

[yashan@localhost instance]$ id yashan
uid=1000(yashan) gid=1000(yashan) groups=1000(yashan)
yashan用户未在YASDBA组

解决办法

groupadd YASDBA
usermod -a -G YASDBA yashan
groups yashan
echo "yashan"|passwd --stdin  yashan

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.hqwc.cn/news/188712.html

如若内容造成侵权/违法违规/事实不符,请联系编程知识网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

Linux中的进程等待(超详细)

Linux中的进程等待 1. 进程等待必要性2. 进程等待的方法2.1 wait方法2.2 waitpid方法 3. 获取子进程status4. 具体代码实现 1. 进程等待必要性 我们知道&#xff0c;子进程退出&#xff0c;父进程如果不管不顾&#xff0c;就可能造成‘僵尸进程’的问题&#xff0c;进而造成内…

vue3 ts vite 主题色功能

开发工具&#xff1a;vue3 ts vite 如上图&#xff0c;选择个颜色整个变化&#xff0c;如下图 默认主题为绿色 切换成其它色。 这里面的颜色块&#xff0c;你也可以给个取器色组件&#xff0c;可切换成任意色。切换时主要执行下方的方法&#xff0c;有兴趣可自己研究下。 /…

torch - 张量Tensor简介与创建

张量是什么&#xff1f; 张量就是多维数组&#xff0c;0维张量叫标量&#xff0c;1维张量是向量&#xff0c;2维张量是矩阵&#xff0c;灰度图片大多都使用2维张量所表示的&#xff0c;3维张量一般用于RGB图片的表示。 张量的属性 其中后四个是用于Tensor自动求导。前四个和T…

C语言--写一个函数返回bool值,来判断给定的字符串A和B(假设都是小写字母),是否是B中的字符都存在于A中,如果是返回true,否则返回false

一.题目描述 写一个函数返回bool值&#xff0c;来判断给定的字符串A和B&#xff08;假设都是小写字母&#xff09;&#xff0c;是否是B中的字符都存在于A中&#xff0c;如果是返回true&#xff0c;否则返回false。例如&#xff1a; 字符串A&#xff1a;abcde 字符串B&#xff…

C++ string类(一)

1.C语言中的字符串 C语言中&#xff0c;字符串是以\0结尾的一些字符的集合&#xff0c;为了操作方便&#xff0c;C标准库中提供了一些str系列的库函数&#xff0c;但是这些库函数与字符串是分离开的&#xff0c;不太符 OOP(Object Oriented Programming)的思想&#xff0c;而且…

现货黄金休市时间长不长?科普一下交易时间

先告诉你答案&#xff0c;现货黄金市场每天的交易时间很长&#xff0c;因为它全天的盘面是由亚洲、欧洲和北美时间无缝地连接而成&#xff0c;无论投资者身处何方&#xff0c;通过哪里的平台入市&#xff0c;每天基本上都可以享受到连续20多个小时的行情。 只要投资者有足够的精…

Gooxi国鑫金秋发布会圆满召开,引领数智新未来

10月24日&#xff0c;主题为“芯加速创鑫局”的2023 Gooxi第四代英特尔至强可扩展处理器平台新品发布会隆重召开&#xff0c;Gooxi重磅发布基于第四代英特尔至强可扩展处理器平台系列新品&#xff0c;Gooxi英特尔平台算力迎来全新升级进化&#xff0c;为AI注入全新发展动力&…

Qt HTTP 摘要认证(海康球机摄像机ISAPI开发)

接到一个需求是开发下海康的球机,控制云台,给到我的是一个开发手册,当然了是海康的私有协议 ISAPI开发手册https://download.csdn.net/download/qq_37059136/88547425关于开发这块读文档就可以理解了,海康使用的是摘要认证,当然了海康已经给出使用范例 通过libcurl就可以直接连…

Mars3d-vue最简项目模板集成使用Mars3d的UI控件样板

备注说明&#xff1a; 1.小白可看步骤一二&#xff0c;进阶小白可直接看步骤三 步骤一&#xff1a;新建文件夹<uitest>&#xff0c;在mars3d仓库拉一份最简项目模板&#xff1a; git clone mars3d-vue-template: Vue3.x 技术栈下的Mars3D项目模板 步骤二&#xff1a;运…

云网络流量分析工具的关键优势有哪些?

在当今数字化的时代&#xff0c;企业依赖云计算和网络服务以实现高效运营。随着云网络的复杂性不断增加&#xff0c;对网络流量的分析变得至关重要。云网络流量分析工具应运而生&#xff0c;为管理员提供了深入洞察、实时监控的能力。本文将探讨此工具的关键优势以及它们在现代…

如何利用大模型蒸馏出小模型实现降本

如何让小模型的推理效果在某些领域比 ChatGPT 这样的大模型还要更强&#xff1f;这篇论文提供了一个思路&#xff1a;https://arxiv.org/abs/2212.10071&#xff0c;借助思维链&#xff08;CoT&#xff09;逐步解决复杂推理任务的能力&#xff0c;可以使用大模型作为推理教师&a…

JDK 9 Map.of()

//Java 9 Map.of //private static final int SIZE 10;