前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >在Docker中快速体验崖山YashanDB数据库

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

作者头像
小麦苗DBA宝典
发布2023-11-23 14:38:12
4591
发布2023-11-23 14:38:12
举报

环境部署

如下几步可快速体验:

代码语言: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巡检结果

其它不再截图。

本文参与 腾讯云自媒体同步曝光计划,分享自微信公众号。
原始发表:2023-11-22,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 DB宝 微信公众号,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 环境部署
  • 客户端软件DBeaver for YashanDB
  • 巡检脚本
    • 崖山YashanDB数据库运行方式
      • html巡检结果
      相关产品与服务
      容器镜像服务
      容器镜像服务(Tencent Container Registry,TCR)为您提供安全独享、高性能的容器镜像托管分发服务。您可同时在全球多个地域创建独享实例,以实现容器镜像的就近拉取,降低拉取时间,节约带宽成本。TCR 提供细颗粒度的权限管理及访问控制,保障您的数据安全。
      领券
      问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档