原 在Docker中快速体验崖山YashanDB数据库
Tags: 原创Docker巡检快速体验数据库Docker镜像国产数据库YashanDB崖山数据库
环境部署
如下几步可快速体验:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | 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 |
日志:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | [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.dbaup.com/yashanyashandbshujukuxunjianjiaoben.html
崖山YashanDB数据库运行方式
需要有yasql客户端,运行方式如下:
1 | yasql / as sysdba -f DB_YashanDB_HC_lhr_v7.0.0.sql > /dev/null |