暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

【YashanDB认证】安装崖山数据库

手机用户9955 2024-11-25
131

1.崖山数据库

崖山数据库系统YashanDB是深圳计算科学研究院自主设计研发的新型数据库管理系统,融入原创的有界计算、近似计算、并行可扩展和跨模融合计算理论,可满足金融、政企、能源等关键行业对高性能、高并发及高安全性的要求。

2.初识崖山

根据崖山官网手册,下面来进行初步安装
0.测试环境

[root@node1 ~]# cat /etc/redhat-release CentOS Linux release 7.6.1810 (Core) [root@node1 ~]# lscpu Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian CPU(s): 4 On-line CPU(s) list: 0-3 Thread(s) per core: 1 Core(s) per socket: 4 Socket(s): 1 NUMA node(s): 1 Vendor ID: GenuineIntel CPU family: 6 Model: 154 Model name: 12th Gen Intel(R) Core(TM) i5-1240P Stepping: 3 CPU MHz: 2112.008 BogoMIPS: 4224.01 Hypervisor vendor: KVM Virtualization type: full L1d cache: 48K L1i cache: 32K L2 cache: 1280K L3 cache: 12288K NUMA node0 CPU(s): 0-3 Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx rdtscp lm constant_tsc rep_good nopl xtopology nonstop_tsc eagerfpu pni pclmulqdq ssse3 cx16 pcid sse4_1 sse4_2 movbe popcnt aes rdrand hypervisor lahf_lm abm 3dnowprefetch ibrs_enhanced fsgsbase bmi1 bmi2 invpcid rdseed clflushopt flush_l1d arch_capabilities [root@node1 ~]# free -m total used free shared buff/cache available Mem: 4611 701 2922 79 986 3571 Swap: 3967 0 3967

1.创建yashan用户、组

[root@node1 ~]# useradd yashan [root@node1 ~]# groupadd YASDBA [root@node1 ~]# usermod -a -G YASDBA yashan [root@node1 ~]# passwd yashan Changing password for user yashan. New password: BAD PASSWORD: The password contains the user name in some form Retype new password: Sorry, passwords do not match. New password: BAD PASSWORD: The password contains the user name in some form Retype new password: passwd: all authentication tokens updated successfully.

2.操作系统参数调整

[root@node1 ~]# echo " > * soft nofile 1048576 > * hard nofile 1048576 > * soft nproc 1048576 > * hard nproc 1048576 > * soft rss unlimited > * hard rss unlimited > * soft stack 8192 > * hard stack 8192 > " >> /etc/security/limits.conf

3.创建安装目录

[root@node1 ~]# su - yashan Last login: Mon Nov 25 09:52:17 CST 2024 on pts/1 [yashan@node1 ~]$ mkdir install

将安装包上传到/home/yashan目录下
解压目录

[yashan@node1 ~]$ ls -lrt total 185376 drwxrwxr-x 2 yashan yashan 6 Nov 25 09:52 install -rw-r--r-- 1 yashan yashan 189824423 Nov 25 09:54 yashandb-personal-23.2.4.100-linux-x86_64.tar.gz [yashan@node1 ~]$ tar zxf yashandb-personal-23.2.4.100-linux-x86_64.tar.gz -C install

4.生成参数文件
执行如下命令生成安装参数文件,ssh登录密码为创建yashan用户时指定的密码,
请将–ip参数后面的值更换成安装服务端所在服务器的IP地址(使用127.0.0.1会导致客户端无法连接至服务端)

[yashan@node1 ~]$ ./install/bin/yasboot package se gen --cluster yashandb -u yashan -p yashandb123 --ip 192.168.1.222 --port 22 --install-path /yashan/yasdb_home --data-path /yashan/yasdb_data --begin-port 1688 host host0001 openssl version: OpenSSL 1.1.1l 24 Aug 2021 OpenSSL version is 1.1.1 or greater hostid | group | node_type | node_name | listen_addr | replication_addr | data_path --------------------------------------------------------------------------------------------------------- host0001 | dbg1 | db | 1-1 | 192.168.1.222:1688 | 192.168.1.222:1689 | /yashan/yasdb_data ----------+-------+-----------+-----------+--------------------+--------------------+-------------------- Generate config completed

5.执行安装
执行如下命令安装YashanDB数据库,如实际安装数据库版本与示例中版本不同,请将-i参数后的软件包名称更改成实际名称:

[yashan@node1 ~]$ pwd /home/yashan [yashan@node1 ~]$ ls hosts.toml install yashandb-personal-23.2.4.100-linux-x86_64.tar.gz yashandb.toml [yashan@node1 ~]$ ./install/bin/yasboot package install -t hosts.toml -i yashandb-personal-23.2.4.100-linux-x86_64.tar.gz host host0001 openssl version: OpenSSL 1.1.1l 24 Aug 2021 OpenSSL version is 1.1.1 or greater checking install package... install version: yashandb 23.2.4.100 host0001 100% [====================================================================] 6s update host to yasom...

6.执行部署
执行如下命令部署YashanDB数据库

[yashan@node1 ~]$ ./install/bin/yasboot cluster deploy -t yashandb.toml type | uuid | name | hostid | index | status | return_code | progress | cost ------------------------------------------------------------------------------------------------------------ task | 94272255173f11ad | DeployYasdbCluster | - | yashandb | SUCCESS | 0 | 100 | 39 ------+------------------+--------------------+--------+----------+---------+-------------+----------+------ task completed, status: SUCCESS

7.执行如下命令配置环境变量

[yashan@node1 ~]$ cd /yashan/yasdb_home/yashandb/23.2.4.100/conf [yashan@node1 conf]$ cat yashandb.bashrc export YASDB_HOME=/yashan/yasdb_home/yashandb/23.2.4.100 export PATH=${YASDB_HOME}/bin:$PATH export LD_LIBRARY_PATH=${YASDB_HOME}/lib:$LD_LIBRARY_PATH if command -v rlwrap >/dev/null 2>&1; then alias yasql="rlwrap yasql" fi export YASDB_DATA=/yashan/yasdb_data/db-1-1 [yashan@node1 conf]$ [yashan@node1 conf]$ [yashan@node1 conf]$ cat yashandb.bashrc >>~/.bashrc

8.执行如下命令查看YashanDB数据库状态,如显示出数据库状态信息即为安装成功

[yashan@node1 ~]$ yasboot cluster status -c yashandb host_id | node_type | nodeid | pid -------------------------------------- host0001 | db | 1-1:1 | 7600 ----------+-----------+--------+------

YashanDB|崖山数据库系统YashanDB学习中心-YCA认证详情
https://www.yashandb.com/YCA_courses

「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论