首页 > 数据库 >Yashandb数据库YCM安装

Yashandb数据库YCM安装

时间:2024-11-14 21:44:13浏览次数:3  
标签:Yashandb YCM deploy 数据库 16 53 ycm go 14

Yashandb YCM安装

到官网下载YCM软件:
https://download.yashandb.com/download

开机自启前提

管理平台开机自启需要确保对rc.local有可执行权限,可执行以下命令:

# chmod +x /etc/rc.local

将软件包上传至yasmanager用户/home/yasmanager路径下:

[root@yashan yasmanager]# tar xf yashandb-cloud-manager-23.3.1.0-linux-x86_64.tar.gz -C /home/yashan/
[root@yashan yasmanager]# cd /home/yashan/ycm/packages


[root@yashan packages]# mkdir  yashandb-client-23.2.4.100-linux-x86_64
[root@yashan packages]# tar xf ./yashandb-clientar xf ./yashandb-clien^C
[root@yashan packages]# tar xf ./yashandb-client-23.2.4.100-linux-x86_64.tar.gz -C ./yashandb-client-23.2.4.100-linux-x86_64
[root@yashan lib]# pwd
/home/yashan/ycm/packages/yashandb-client-23.2.4.100-linux-x86_64/lib

[root@yashan ycm]# vi ./etc/deploy.yml
server:
    ycm_name: 崖山监控运维平台                            # 产品名称
    ycm_name_en: YashanDB Cloud Manager                # 产品英文名称
    product_short_name: 管理平台                        # 产品简称,不推荐修改
    product_short_name_en: Management platform         # 产品英文简称,不推荐修改
    install_path: /home/yashan/ycm
    system_user: yashan
    ycm_port: 9060
    prometheus_port: 9061
    loki_http_port: 9062
    loki_grpc_port: 9063
    yasdb_exporter_port: 9064

    prometheus_collect_interval: 10
    prometheus_data_expired: 180

    monit_enable: true
    grpc_tls_enable: true
    http_tls_enable: false
    manage_ip: ""
    minimumDiskPartitionSize: 1073741824
    ycp_secret: TH1TkOFuUVrjlMBVeB28bsO9JLiFafY5

    dbconfig:
        driver: "yashandb"  # 可填参数:sqlite3,yashandb。默认是sqlite3
        url: "hefei/[email protected]:1688"            # driver为yashandb时,该参数必填。单IP:ip:port,HA多ip:ip:port,ip:port,ip:port
        libPath: "/home/yashan/ycm/packages/yashandb-client-23.2.4.100-linux-x86_64/lib"        # driver为yashandb时,默认为{YCM_INSTALL_PATH}/YCM/tool/yasha
ndb-client/lib

client:
    install_path: /home/yashan/ycm
    system_user: yashan
    system_group: yashan
    agent_port: 9070
    export_port: 9071

user:
    superadmin:
        # 用户和密码为admin,以下密码为加密后的密文
        password: "17521182513677377011312139512002239872235871971452391332822116097549121243198103"
        nickname: superman
        email:
        phone:

    token_key: "cod-base-yasom-auth-token-key1"
    token_expired: 30
    password_expired: 60
    retry_times: 5
    lock_expired: 3

log:
    console: true
    level: "INFO"
    rotationTime: 7
    rotationSize: 10
    maxBackupNum: 30

[root@yashan ycm]# ./ycm-init deploy --conf ./etc/deploy.yml    --报错用下面的
[root@yashan ycm]# ./ycm-init deploy --conf ./etc/deploy.yml   --force
2024-11-14 16:53:22     INFO    deploy/deploy.go:200    yashandb lib path is /home/yasmanager/ycm/packages/yashandb-client-23.2.4.100-linux-x86_64/lib
2024-11-14 16:53:22     INFO    deploy/manage.go:39     conf manager starting...
2024-11-14 16:53:22     INFO    deploy/deploy.go:339    beginning install ycm
2024-11-14 16:53:22     INFO    filectl/filectl.go:211  get dir owner uid: 0 success
2024-11-14 16:53:22     INFO    execer/exec.go:30       exec: bash -c id -u yasmanager starting
2024-11-14 16:53:22     INFO    filectl/filectl.go:221  get agent uid: 1003 success
2024-11-14 16:53:22     WARN    deploy/deploy.go:360    user :yasmanager has not access to path:/home/yasmanager/YCM
2024-11-14 16:53:22     INFO    deploy/deploy.go:248    check install path exec to other success, progress:15

2024-11-14 16:53:22     WARN    ycm-init/ycm-init.go:109        residual data: /home/yasmanager/YCM/ycm/backup is detected
2024-11-14 16:53:22     WARN    ycm-init/ycm-init.go:109        residual data: /home/yasmanager/YCM/ycm/bin is detected
2024-11-14 16:53:22     WARN    ycm-init/ycm-init.go:109        residual data: /home/yasmanager/YCM/ycm/data is detected
2024-11-14 16:53:22     WARN    ycm-init/ycm-init.go:109        residual data: /home/yasmanager/YCM/ycm/installation_resource is detected
2024-11-14 16:53:22     WARN    ycm-init/ycm-init.go:109        residual data: /home/yasmanager/YCM/ycm/log_backup is detected
2024-11-14 16:53:22     WARN    ycm-init/ycm-init.go:109        residual data: /home/yasmanager/YCM/ycm/log_collect is detected
2024-11-14 16:53:22     WARN    ycm-init/ycm-init.go:109        residual data: /home/yasmanager/YCM/ycm/loki is detected
2024-11-14 16:53:23     WARN    ycm-init/ycm-init.go:109        residual data: /home/yasmanager/YCM/ycm/monit is detected
2024-11-14 16:53:23     WARN    ycm-init/ycm-init.go:109        residual data: /home/yasmanager/YCM/ycm/notify_script is detected
2024-11-14 16:53:23     WARN    ycm-init/ycm-init.go:109        residual data: /home/yasmanager/YCM/ycm/prometheus is detected
2024-11-14 16:53:23     WARN    ycm-init/ycm-init.go:109        residual data: /home/yasmanager/YCM/ycm/promtail is detected
2024-11-14 16:53:23     WARN    ycm-init/ycm-init.go:109        residual data: /home/yasmanager/YCM/ycm/tool is detected
2024-11-14 16:53:23     WARN    ycm-init/ycm-init.go:109        residual data: /home/yasmanager/YCM/ycm/yashandb_exporter is detected
2024-11-14 16:53:23     INFO    deploy/deploy.go:248    check ycm install residual data success, progress:17

2024-11-14 16:53:23     INFO    deploy/deploy.go:248    mkdir ycm installpath success, progress:20

2024-11-14 16:53:23     INFO    deploy/deploy.go:248    mkdir ycm-agent installpath success, progress:21

2024-11-14 16:53:23     INFO    execer/exec.go:30       exec: bash /home/yasmanager/ycm/scripts/install.sh ycm yasmanager /home/yasmanager/YCM/ycm starting
2024-11-14 16:53:33     INFO    deploy/deploy.go:261    unzip packages success, progress:30

2024-11-14 16:53:33     INFO    deploy/deploy.go:248    mkdir cert path success, progress:32

2024-11-14 16:53:33     INFO    deploy/deploy.go:248    generate self signed cert key success, progress:35

2024-11-14 16:53:33     INFO    deploy/deploy.go:420    beginning generate ycm config file
2024-11-14 16:53:33     INFO    deploy/deploy.go:248    generate ycm.yaml success, progress:40

2024-11-14 16:53:33     INFO    deploy/deploy.go:248    generate config.ini success, progress:43

2024-11-14 16:53:33     INFO    deploy/deploy.go:248    generate prometheus.yml success, progress:45

2024-11-14 16:53:33     INFO    deploy/deploy.go:248    generate loki-local-config.yaml success, progress:47

2024-11-14 16:53:33     INFO    deploy/deploy.go:248    generate promtail-local-config.yaml success, progress:48

2024-11-14 16:53:33     INFO    deploy/deploy.go:248    generate yasdbpasswd.ini success, progress:50

2024-11-14 16:53:33     INFO    deploy/deploy.go:248    check backend database exists table success, progress:59

2024-11-14 16:53:34     INFO    model/auto_migrate.go:260       auto migrate all of 91 tables success
2024-11-14 16:53:34     WARN    alarm/add_default.go:365        query alarm notify strategy is incorrect, just add default, allns: [], err: <nil>
2024-11-14 16:53:34     INFO    execer/exec.go:30       exec: cp -f /home/yasmanager/YCM/ycm/loki/rules/fake/loki-rules.yaml /home/yasmanager/YCM/ycm/loki/loki-rules.yaml.bak starting
2024-11-14 16:53:34     INFO    execer/exec.go:30       exec: cp -f /home/yasmanager/YCM/ycm/prometheus/rules.yml /home/yasmanager/YCM/ycm/prometheus/rules.yml.bak starting
2024-11-14 16:53:35     INFO    deploy/deploy.go:248    set conf success, progress:60

2024-11-14 16:53:35     INFO    deploy/deploy.go:248    set conf success, progress:65

2024-11-14 16:53:35     INFO    deploy/deploy.go:248    init db success, progress:70

2024-11-14 16:53:35     INFO    deploy/deploy.go:546    beginning start ycm process
2024-11-14 16:53:35     INFO    execer/exec.go:30       exec: chown -R yasmanager:yasmanager /home/yasmanager/YCM/ycm starting
2024-11-14 16:53:35     INFO    deploy/deploy.go:261    chown ycm path success, progress:75

2024-11-14 16:53:35     INFO    execer/exec.go:30       exec: chown -R yasmanager:yasmanager /home/yasmanager/YCM/ycm-agent starting
2024-11-14 16:53:35     INFO    deploy/deploy.go:261    chown ycm-agent path success, progress:76

2024-11-14 16:53:35     INFO    execer/exec.go:30       exec: chmod 0755 /home/yasmanager/YCM starting
2024-11-14 16:53:35     INFO    deploy/deploy.go:261    chmod path success, progress:78

2024-11-14 16:53:35     INFO    execer/exec.go:30       exec: bash /home/yasmanager/YCM/ycm/scripts/ycm.sh start starting
2024-11-14 16:53:36     INFO    deploy/deploy.go:261    start server success, progress:80

2024-11-14 16:53:36     INFO    execer/exec.go:30       exec: bash /home/yasmanager/YCM/ycm/scripts/yashandb_exporter.sh start starting
2024-11-14 16:53:37     INFO    deploy/deploy.go:261    start yashandb_exporter success, progress:85

2024-11-14 16:53:37     INFO    execer/exec.go:30       exec: bash /home/yasmanager/YCM/ycm/scripts/prometheus.sh start starting
2024-11-14 16:53:38     INFO    deploy/deploy.go:261    start monitor success, progress:88

2024-11-14 16:53:38     INFO    execer/exec.go:30       exec: bash /home/yasmanager/YCM/ycm/scripts/loki.sh start starting
2024-11-14 16:53:39     INFO    deploy/deploy.go:261    start loki success, progress:90

2024-11-14 16:53:39     INFO    execer/exec.go:30       exec: bash /home/yasmanager/YCM/ycm/scripts/promtail.sh start starting
2024-11-14 16:53:40     INFO    deploy/deploy.go:261    start promtail success, progress:91

2024-11-14 16:53:40     INFO    execer/exec.go:30       exec: bash /home/yasmanager/YCM/ycm/monit/monitctl reload starting
2024-11-14 16:53:40     INFO    deploy/deploy.go:261    reload monit success, progress:93

2024-11-14 16:53:40     INFO    deploy/deploy.go:304    success, progress:100

查看YCM配置的自动启动脚本:

cat /etc/rc.local
su yashan -c '/home/yashan/ycm/ycm/monit/bin/monit -c /home/yashan/ycm/ycm/monit/data/monitrc'
[root@yashan ycm]# netstat -lntup | grep ycm
tcp6       0      0 :::9060                 :::*                    LISTEN      10987/ycm

[root@yashan ycm]# ps -ef | grep ycm
yasmana+  4149     1  0 16:06 ?        00:00:26 /app/install/ycm/monit/bin/monit -c /app/install/ycm/monit/data/monitrc
yasmana+  4643     1  0 16:09 ?        00:00:24 /app/install/ycm/monit/bin/monit -c /app/install/ycm/monit/data/monitrc
yasmana+  5653     1  0 16:16 ?        00:00:22 /app/install/ycm/monit/bin/monit -c /app/install/ycm/monit/data/monitrc
yasmana+  7173     1  0 16:29 ?        00:00:17 /home/yasmanager/YCM/ycm/monit/bin/monit -c /home/yasmanager/YCM/ycm/monit/data/monitrc
yasmana+  9570     1  0 16:44 ?        00:00:12 /home/yasmanager/YCM/ycm/monit/bin/monit -c /home/yasmanager/YCM/ycm/monit/data/monitrc
yasmana+ 10415     1  0 16:50 ?        00:00:10 /home/yasmanager/YCM/ycm/monit/bin/monit -c /home/yasmanager/YCM/ycm/monit/data/monitrc
yasmana+ 10947     1  0 16:53 ?        00:00:09 /home/yasmanager/YCM/ycm/monit/bin/monit -c /home/yasmanager/YCM/ycm/monit/data/monitrc
yasmana+ 10987     1  2 16:53 ?        00:00:38 /home/yasmanager/YCM/ycm/bin/ycm
yasmana+ 11018     1  0 16:53 ?        00:00:00 /home/yasmanager/YCM/ycm/yashandb_exporter/yashandb_exporter --web.listen-address=:9064 --yashandb.metrics=/home/yasmanager/YCM/ycm/etc/yasexporter.metrics.yml --yashandb.targets=/home/yasmanager/YCM/ycm/etc/yasexporter.targets.yml
yasmana+ 11054     1  0 16:53 ?        00:00:07 /home/yasmanager/YCM/ycm/prometheus/prometheus --config.file=/home/yasmanager/YCM/ycm/prometheus/prometheus.yml --storage.tsdb.path=/home/yasmanager/YCM/ycm/data/prometheus --web.enable-admin-api --web.enable-lifecycle --web.listen-address=0.0.0.0:9061 --storage.tsdb.retention.time=180d --log.level=error --query.lookback-delta=30s
yasmana+ 11085     1  1 16:53 ?        00:00:19 /home/yasmanager/YCM/ycm/loki/loki -config.file=/home/yasmanager/YCM/ycm/loki/loki-local-config.yaml -log.level=error
yasmana+ 11114     1  1 16:53 ?        00:00:17 /home/yasmanager/YCM/ycm/promtail/promtail -config.file=/home/yasmanager/YCM/ycm/promtail/promtail-local-config.yaml -log.level=error
root     14013  1535  0 17:16 pts/3    00:00:00 grep --color=auto ycm

访问管理平台

部署完成即可打开浏览器访问 IP:9060,使用管理平台服务。 – Asdf1357.

image-20241114165511376

image-20241114200342170

卸载

[root@yashan scripts]# pwd
/home/yasmanager/YCM/ycm/scripts
[root@yashan scripts]# sh clean.sh

标签:Yashandb,YCM,deploy,数据库,16,53,ycm,go,14
From: https://blog.csdn.net/hf191850699/article/details/143781777

相关文章

  • MySQL数据库:SQL语言入门 【3】(学习笔记)
    5,TCL—— 事务控制语言(TransactionControlLanguage)     用于数据库的事务管理。(1)事务的概念+作用     事务(Transaction)指的是一个操作序列,该操作序列中的多个操作要么都做,要么都不做,是一个不可分割的工作单位,是数据库环境中的逻辑工作单位,由DBMS(数......
  • MySQL数据库:SQL语言入门 【2】(学习笔记)
    目录 2,DML—— 数据操作语言(DataManipulationLanguage)(1)insert  增加 数据(2)delete 删除 数据    truncate 删除表和数据,再创建一个新表(3)update 修改 数据3,DDL——数据定义语言(DataDefinitionLanguage)(1)create 创建数据库对象(2)drop 删除......
  • MySQL数据库:SQL语言入门 【1】(学习笔记)
    SQL(StructuredQueryLanguage)是结构化查询语言的简称,它是一种数据库查询和程序设计语言,同时也是目前使用最广泛的关系型数据库操作语言。(95%适用于所有关系型数据库)【 SQL是关系型数据库通用的操作语言】在数据库管理系统中,使用SQL语言来实现数据的存取、查询、更新等功能......
  • DBeaver如何设置自动刷新数据库表的数据,彻底解放双手!
    前言大家好,我是小徐啊。DBeaver是一款常用的数据库连接工具,它的优点是免费使用,而且支持的数据库类型超级多,甚至可以直接安装数据库对应的驱动jar包来连接数据库。比如达梦数据库,之前版本是可以通过jar包方式设置驱动来连接达梦数据库的。好了,言归正传,今天小徐要介绍一个DBeaver......
  • 数据库---重点汇总(复习必用)
    数据库(增删改查)别纠结什么事数据库了,直接新建数据库、新建表格、插入数据、删除数据、查询数据、修改数据增加insert为表格增加行:insertinto表名(//列段)values(//值);删除delete删除表格数据:deletefrom表名;删除表格/删除数据库droptable表格名称......
  • 如何使用 MySQL Workbench 自动生成 ER 图、同步更新远程数据库 - MySQL Workbench 使
    https://zhuanlan.zhihu.com/p/438270644       ......
  • MySQL数据库innodb_fast_shutdown参数
    innodb_fast_shutdown是MySQLInnoDB存储引擎的一个配置参数,控制在关闭MySQL服务时InnoDB的关机速度和数据恢复的方式。它有三个值,分别是0、1和2,每个值的作用如下:1.innodb_fast_shutdown=0功能:关闭时不会快速退出。MySQL会执行完全的InnoDB日志回滚过程,即使没......
  • MySQL 数据库操作详解:DDL、DML、DQL 和 DCL
    MySQL数据库操作详解:DDL、DML、DQL和DCL在MySQL数据库中,数据定义语言(DDL)、数据操作语言(DML)、数据查询语言(DQL)和数据控制语言(DCL)是四种基本的数据库操作语言。本文将详细介绍这些语言的定义、常用命令以及如何使用它们来管理和操作数据库。1.数据定义语言(DDL)定义:DDL(DataD......
  • 科普文:软件架构数据库系列之【MySQL状态参数:open table浅析和[ERROR] Error in accept
    概叙科普文:软件架构数据库系列之【MySQL状态参数:tablecache源码浅析】-CSDN博客MySQL经常会遇到Toomanyopenfiles,MySQL上的open_files_limit和OS层面上设置的openfilelimit有什么关系?源码中也会看到不同的数据结构,TABLE,TABLE_SHARE,跟表是什么关系?MySQLflushtable......
  • IDEA如何生成数据库的ER图?
    https://www.cnblogs.com/wzyzq/p/182762551.打开IDEA,并连接到MySQL数据库2.在菜单栏中选择"View"->"Toolwindows"->"Database"3.在"Database"工具窗口中,展开你想要査看的数据库,并选择"ERDiagrams"。4.右键单击"ERDiagrams",选择"NewE......