cluster = "yashandb"create_simple_schema = falseuuid = "655eb2496767a825e8dda1d6c4da4d4e"yas_type = "SE"[[group]]group_type = "db"name = "dbg1"[group.config]CHARACTER_SET = "utf8"ISARCHIVELOG = trueREDO_FILE_NUM = 4REDO_FILE_SIZE = "128M"[group.create_sql][[group.node]]data_path = "/usr/local/yashandb/yasdb_data"hostid = "host0001"role = 1[group.node.config]LISTEN_ADDR = "192.168.112.121:1688"REPLICATION_ADDR = "192.168.112.121:1689"RUN_LOG_FILE_PATH = "/usr/local/yashandb/yasdb_home/yashandb/log/yashandb/db-1-1/run"RUN_LOG_LEVEL = "INFO"SLOW_LOG_FILE_PATH = "/usr/local/yashandb/yasdb_home/yashandb/log/yashandb/db-1-1/slow"[[group.node]]data_path = "/usr/local/yashandb/yasdb_data"hostid = "host0002"role = 2[group.node.config]LISTEN_ADDR = "192.168.112.122:1688"REPLICATION_ADDR = "192.168.112.122:1689"RUN_LOG_FILE_PATH = "/usr/local/yashandb/yasdb_home/yashandb/log/yashandb/db-1-2/run"RUN_LOG_LEVEL = "INFO"SLOW_LOG_FILE_PATH = "/usr/local/yashandb/yasdb_home/yashandb/log/yashandb/db-1-2/slow"
2.2.2 执行安装使用以下命令执行安装#./bin/yasboot package install -t hosts.toml -i /usr/local/src/yashandb-personal-23.1.1.100-linux-x86_64.tar.gz -fchecking install package...install version: yashandb 23.1.1.100host0001 100% [====================================================================]6shost0002 100% [====================================================================]6supdate host to yasom...
注:指定参数-f不强制校验环境是否满足部署条件 , 否则会提示:192.168.112.121ip:192.168.112.121 cpu cores is less than 2ip:192.168.112.121 memroy is less than 4096MB
2.2.3 数据库部署1)执行部署命令$ ./bin/yasboot cluster deploy -t yashandb.toml type | uuid| name| hostid | index| status| return_code | progress | cost ------------------------------------------------------------------------------------------------------------ task | 3190567c61c193bc | DeployYasdbCluster | -| yashandb | SUCCESS | 0| 100| 59------+------------------+--------------------+--------+----------+---------+-------------+----------+------task completed, status: SUCCESS
2)生效环境变量#部署命令成功执行后将会在$YASDB_HOME目录下的conf文件夹中生成<<集群名称>>.bashrc环境变量文件$ cd /usr/local/yashandb/yasdb_home/yashandb/23.1.1.100/conf# 如~/.bashrc中已存在YashanDB相关的环境变量,将其清除$ cat yashandb.bashrc >> ~/.bashrc$ source ~/.bashrc
3)开机后启动命令yashoot process yasom start -c yashandbyasboot process yasagent start -c yashandbyasboot cluster start -c yashandb
2.2.4 修改sys用户口令通过yasboot工具设置集群内所有节点sys用户的密码#./bin/yasboot cluster password set -n xxxx -c yashandbtype | uuid| name| hostid | index| status| return_code | progress | cost ---------------------------------------------------------------------------------------------------------- task | ce83dacc3c2e4246 | YasdbPasswordSet | -| yashandb | SUCCESS | 0| 100| 2------+------------------+------------------+--------+----------+---------+-------------+----------+------task completed, status: SUCCESS
2.2.5 验证安装1)查看数据库状态$ ./bin/yasboot cluster status -c yashandb -d hostid| node_type | nodeid | pid| instance_status | database_status | database_role | listen_address| data_path---------------------------------------------------------------------------------------------------------------------------------------------------------- host0001 | db| 1-1:1| 16119 | open| normal| primary| 192.168.112.121:1688 | /usr/local/yashandb/yasdb_data/db-1-1 ----------+-----------+--------+-------+-----------------+-----------------+---------------+----------------------+--------------------------------------- host0002 | db| 1-2:2| 15363 | open| normal| standby| 192.168.112.122:1688 | /usr/local/yashandb/yasdb_data/db-1-2 ----------+-----------+--------+-------+-----------------+-----------------+---------------+----------------------+---------------------------------------
推荐阅读
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 集中式数据库与分布式数据库的战场与战争
- 解读向量数据库
- Python内置数据库:轻量级SQLite
- Oracle数据库存在不可用索引性能问题
- 每个程序员都必须了解的十种数据库
- 深度优化数据库性能:Linux 内核参数调整解析
- 14个开源免费数据库监控工具,MySQL、Oracle、Postgres或MSSQL
- 初识向量数据库与pgvector实践
- 直面数据库的“崖山海战”:YashanDB另辟蹊径站上新高地
- 国内首个向量数据库标准发布