在Docker中快速体验崖山YashanDB数据库

2023-11-23 14:38:12 浏览数 (1)

环境部署

如下几步可快速体验:

代码语言:javascript复制
docker rm -f lhryashandb
docker run -itd --name lhryashandb -h lhryashandb 
  -p 1688:1688 -p 33389:3389 
  -v /sys/fs/cgroup:/sys/fs/cgroup 
  --privileged=true  lhrbest/yashandb:23.1.1 
  /usr/sbin/init

docker exec -it lhryashandb bash

su - yashan


sh start_yashan.sh


yasql / as sysdba


select open_mode from v$database;


-- 密码:lhr

日志:

代码语言:javascript复制
[root@lhrdb ~]# docker run -itd --name lhryashandb -h lhryashandb 
>   -p 1688:1688 -p 33389:3389 
>   -v /sys/fs/cgroup:/sys/fs/cgroup 
>   --privileged=true  lhrbest/yashandb:23.1.1 
>   /usr/sbin/init
b751899f4e0b34405eebde3aab5f9fc1b0d452fd5aea3d5b756ca763ad432556
[root@lhrdb ~]#   
[root@lhrdb ~]# docker exec -it lhryashandb bash

su - yashan

[root@lhryashandb /]# 
[root@lhryashandb /]# su - yashan
Last login: Wed Nov 22 10:15:14 CST 2023 on pts/1
[yashan@lhryashandb ~]$ 
[yashan@lhryashandb ~]$                 
[yashan@lhryashandb ~]$ sh start_yashan.sh 
start yasom successfully
start local agent successfully!
 type | uuid             | name              | hostid | index    | status  | return_code | progress | cost 
-----------------------------------------------------------------------------------------------------------
 task | b7981804a9b5367f | StartYasdbCluster | -      | yashandb | SUCCESS | 0           | 100      | 4    
------ ------------------ ------------------- -------- ---------- --------- ------------- ---------- ------
task completed, status: SUCCESS
 host_id  | node_type | nodeid | pid 
-------------------------------------
 host0001 | db        | 1-1:1  | 660 
---------- ----------- -------- -----
[yashan@lhryashandb ~]$ netstat -tulnp 
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 0.0.0.0:1688            0.0.0.0:*               LISTEN      660/yasdb           
tcp        0      0 127.0.0.1:1689          0.0.0.0:*               LISTEN      660/yasdb           
tcp        0      0 127.0.0.1:1675          0.0.0.0:*               LISTEN      599/yasom           
tcp        0      0 127.0.0.1:1676          0.0.0.0:*               LISTEN      632/yasagent        
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      -                   
tcp6       0      0 :::3389                 :::*                    LISTEN      -                   
tcp6       0      0 :::22                   :::*                    LISTEN      -                   
tcp6       0      0 127.0.0.1:3350          :::*                    LISTEN      -                   
[yashan@lhryashandb ~]$ yasql / as sysdba

YashanDB SQL Personal Edition Release 23.1.1.100 x86_64

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

SQL> 
SQL> select open_mode from v$database;

OPEN_MODE         
----------------- 
READ_WRITE       

1 row fetched.

SQL> 

客户端软件DBeaver for YashanDB

巡检脚本

参考:https://www.xmmup.com/yashanyashandbshujukuxunjianjiaoben.html

崖山YashanDB数据库运行方式

需要有yasql客户端,运行方式如下:

代码语言:javascript复制
yasql / as sysdba  -f DB_YashanDB_HC_lhr_v7.0.0.sql > /dev/null

输入密码,回车即可。

注意: 1、该脚本的字符集为utf8,请使用utf8格式打开该文件。

html巡检结果

其它不再截图。

0 人点赞