当前位置: 首页 > article >正文

YashanDB 23.2.3安装过程,并使用DBeaver进行连接

Yashandb安装

环境准备

虚拟机环境说明

虚拟机系统:centos 7.9,2c,8g,100GB;内存至少4G+,否则无法安装;
安装用户:yashan
软件目录:/app/install
安装目录:/app/yasdb_home
数据目录:/app/yasdb_data

修改主机名称

hostnamectl set-hostname yashan && bash 

依赖项确认–openssl版本

openssl version

OpenSSL 1.0.2k-fips 26 Jan 2017 --版本必须要1.1以上

find / -name openssl 

mv /usr/bin/openssl /usr/bin/openssl_old 
mv /usr/lib64/openssl/ /usr/lib64/openssl_old 
  • 安装openssl-1.1.1
$ tar xzf openssl-1.1.1l.tar.gz 
$ cd openssl-1.1.1l/ 
$ ./config --prefix=/usr/local/openssl 
$ make && make install 
$ ln -s /usr/local/openssl/bin/openssl /usr/bin/openssl 
$ ln -s /usr/local/openssl/include/openssl/ /usr/include/openssl 
$ echo "/usr/local/openssl/lib/" >> /etc/ld.so.conf 
$ ldconfig -v 
$ openssl version -a

image-20241112200239885

系统环境配置

系统参数配置

echo "vm.swappiness = 0">> /etc/sysctl.conf
echo "net.ipv4.ip_local_port_range = 32768 60999" >> /etc/sysctl.conf
echo "vm.max_map_count=2000000" >> /etc/sysctl.conf
sysctl -p

资源配置

cat >> /etc/security/limits.conf << EOF
yashan  soft nofile 65536
yashan  hard nofile 65536
yashan  soft nproc 65536
yashan  hard nproc 65536
yashan  soft rss unlimited
yashan  hard rss unlimited
yashan  soft stack 8192
yashan  hard stack 8192
EOF

关闭防火墙

systemctl stop firewalld 
systemctl disable firewalld

添加用户及用户组

useradd yashan 
echo "Asdf123." |passwd --stdin yashan
groupadd YASDBA
usermod -a -G YASDBA yashan

创建目录并授权

mkdir -p /app/yasdb_home
mkdir -p /app/yasdb_data
mkdir -p /app/install
chown -R yashan:yashan /app

配置sudo

chmod +w /etc/sudoers
cat >> /etc/sudoers << EOF
yashan  ALL=(ALL)NOPASSWD:ALL
EOF

执行安装

上传安装包到install目录并解压:yashandb-personal-23.2.3.100-linux-x86_64.tar.gz

su yashan
tar -zxf yashandb-personal-23.2.3.100-linux-x86_64.tar.gz

生成参数文件

[yashan@yashan install]$ ./bin/yasboot package se gen --cluster yashandb -u yashan -p Asdf123. --ip 192.168.50.183 --port 22 --install-path /app/yasdb_home  --data-path /app/yasdb_data --begin-port 1688
host host0001 openssl version: OpenSSL 1.1.1l  24 Aug 2021
OpenSSL version is 1.1.1 or greater
192.168.50.183
  ip:192.168.50.183 memory is less than 4096MB   --我这里的内存是4G,安装失败,后面改成8G安装就可以了。
 hostid   | group | node_type | node_name | listen_addr         | replication_addr    | data_path
--------------------------------------------------------------------------------------------------------
 host0001 | dbg1  | db        | 1-1       | 192.168.50.183:1688 | 192.168.50.183:1689 | /app/yasdb_data
----------+-------+-----------+-----------+---------------------+---------------------+-----------------

Generate config success

执行安装

yashandb-personal-23.1.1.100-linux-x86_64.tar.gz

[yashan@yashan install]$ ./bin/yasboot package install -t hosts.toml -i yashandb-personal-23.2.3.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.3.100
host0001 100% [====================================================================]  1m0s
update host to yasom...

执行部署

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

配置环境变量:

[yashan@yashan install]$ cd /app/yasdb_home/yashandb/23.2.3.100/conf/

[yashan@yashan conf]$  cat yashandb.bashrc   -- 不用改变
    export YASDB_HOME=/app/yasdb_home/yashandb/23.2.3.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=/app/yasdb_data/db-1-1
---------------------------------------------------------------------

[yashan@yashan conf]$  cat yashandb.bashrc >> ~/.bashrc
[yashan@yashan conf]$ source ~/.bashrc
[yashan@yashan conf]$ env|grep YAS
    YASDB_HOME=/app/yasdb_home/yashandb/23.2.3.100
    YASDB_DATA=/app/yasdb_data/db-1-1
或者直接执行下面这个,配置环境变量
cd /app/yasdb_home/yashandb/23.2.3.100/conf/
source yashandb.bashrc
cat yashandb.bashrc >> ~/.bashrc

设置sys用户密码:

至少8位,至少包含1个特殊字符,好像没有限制大写字母

[yashan@yashan instance]$ yasboot cluster password set -n yasdb_123 -c yashandb
 type | uuid             | name             | hostid | index    | status  | return_code | progress | cost
----------------------------------------------------------------------------------------------------------
 task | 956c8f977ef3ef86 | YasdbPasswordSet | -      | yashandb | SUCCESS | 0           | 100      | 2
------+------------------+------------------+--------+----------+---------+-------------+----------+------
task completed, status: SUCCESS

使用YasBoot查看YashanDB数据库状态,显示以下信息表示安装成功

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

登陆验证,显示以下信息表示登陆成功

[yashan@yashan instance]$ yasql sys/yasdb_123
YashanDB SQL Personal Edition Release 23.2.3.100 x86_64

Connected to:
YashanDB Server Personal Edition Release 23.2.3.100 x86_64 - X86 64bit Linux


SQL>
SQL> select database_name,open_mode from v$database;

DATABASE_NAME                                                    OPEN_MODE
---------------------------------------------------------------- -----------------
yashandb                                                         READ_WRITE

1 row fetched.

SQL> select instance_name,status from v$instance;

INSTANCE_NAME                                                    STATUS
---------------------------------------------------------------- -------------
yasdb                                                            OPEN

1 row fetched.

关闭与开启

yasboot cluster stop -c yashandb

yasboot cluster start -c yashandb

卸载

yasboot cluster clean --cluster yashandb --purge

yasboot package uninstall --cluster yashandb

清理环境变量

使用图形工具连接数据库

添加yanshandb驱动器:

image-20241112215846078

下载崖山数据库的驱动包(官网或者文末网盘):

image-20241112215928065

连接数据库,测试成功。

image-20241112220310144

通过百度网盘分享的文件:Yashandb 23.2.3.100 (openssl-1.1.1l.tar.gz、yashandb-personal-23.2.3.100-linux-x86_64.tar.gz、yashandb-jdbc-1.6.9.jar)
链接:https://pan.baidu.com/s/1v9NJe5QIj0RqWnI-FmVTRA
提取码:9p4y


http://www.kler.cn/a/397716.html

相关文章:

  • Python_爬虫3_Requests库网络爬虫实战(5个实例)
  • 【Apache Paimon】-- 1 -- Apache Paimon 是什么?
  • 工作时发现自己手写SQL能力很低,特此再来学习一遍SQL
  • 狼蛛F87Pro键盘常用快捷键的使用说明
  • 六、volatile
  • 移除元素(leetcode 27)
  • 【如何获取股票数据47】Python、Java等多种主流语言实例演示获取股票行情api接口之沪深指数历史分时KDJ数据获取实例演示及接口API说明文档
  • windows C#-创建记录类型(下)
  • Vue3 -- 项目配置之eslint【企业级项目配置保姆级教程1】
  • mysql数据迁移PolarDB
  • ubuntu安装 Pycharm
  • Prometheus面试内容整理-数据持久化和高可用
  • cocosCreator视频web模式播放踩坑解决
  • 分页查询我的课表
  • 性能高于Transformer模型1.7-2倍,彩云科技发布基于DCFormer架构通用大模型云锦天章
  • 什么是Spring Boot Actuator
  • 第二十二章 TCP 客户端 服务器通信 - TCP设备的OPEN和USE命令关键字
  • 【网络云计算】2024第46周周考-磁盘管理的基础知识-RAID篇
  • rust逆向初探
  • Flutter开发应用安装二次打开闪退,ios解决方案
  • AI技术对软件开发带来的发展
  • http自动发送请求工具(自动化测试http请求)
  • mysql中explain之possible_keys、key及key_len介绍
  • HTML之表单学习记录
  • [ 网络安全介绍 1 ] 什么是网络安全?
  • candence : 通孔焊盘、插装器件封装绘制