【数据库】在Kylin V10/ARM架构上部署oceanbase开源版

单zone,资源利用最大化

一、确认环境

主机配置: 

kc1.4xlarge.4 16c 64G 极速型SSD

# cat /etc/kylin-release 
Kylin Linux Advanced Server release V10 (Tercel)

二、源码编译

(略过)

参考:kylin/ARM源码编译oceanbase

三、创建用户并信任

[root@ecs0003 ob]# groupadd admin
[root@ecs0003 ob]# useradd -g admin admin
[root@ecs0003 ob]# 
[root@ecs0003 ob]# 
[root@ecs0003 ob]# passwd admin
Changing password for user admin.
New password: 
BAD PASSWORD: The password is shorter than 8 characters
Retype new password: 
passwd: all authentication tokens updated successfully.
[root@ecs0003 ob]# 

信任关系可以用oracle sshUserSetup.sh快速配置

sh sshUserSetup.sh -hosts "ecs0001 ecs0002 ecs0003 ecs0004 ecs0005 ecs0006" -user admin -advanced

四、在各个节点启动observer

节点1、2、3、4、5、6分别执行:

节点1:
su - admin
mkdir -p /data/ob/observer01/store/{sort_dir,sstable,clog,ilog,slog}
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/data/ob/oceanbase/build_release/src/observer/lib/

su - root
cd /data/ob/observer01 && /data/ob/oceanbase/build_release/src/observer/observer -r 192.168.0.187:2882:2881 -o __min_full_resource_pool_memory=268435456,memory_limit=35G,system_memory=4G,stack_size=512K,cpu_count=16,cache_wash_threshold=1G,workers_per_cpu_quota=10,schema_history_expire_time=1d,net_thread_count=4,sys_bkgd_migration_retry_num=3,minor_freeze_times=10,enable_separate_sys_clog=0,enable_merge_by_turn=False,datafile_size=120G,enable_syslog_recycle=True,max_syslog_file_count=10 -z zone1 -p 2881 -P 2882 -c 1 -d /data/ob/observer01/store -i eth0 -l INFO

[root@ecs-ac3e-0004 oceanbase]# su - admin
Last login: Thu Oct 28 02:08:38 CST 2021 on pts/0
[admin@ecs-ac3e-0004 ~]$ mysql -h127.0.0.1 -uroot -P2881
Welcome to the MariaDB monitor.  Commands end with ; or \\g.
Your MySQL connection id is 3221225472
Server version: 5.7.25 OceanBase 3.1.1 (r1-895dd335327983c2fb9a7362e8bb149a7e1343cd) (Built Oct 28 2021 01:21:37)

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\\h' for help. Type '\\c' to clear the current input statement.

MySQL [(none)]> set session ob_query_timeout=1000000000;
Query OK, 0 rows affected (0.001 sec)

MySQL [(none)]> alter system bootstrap ZONE 'zone1' SERVER '192.168.0.187:2882' ;             
Query OK, 0 rows affected (17.929 sec)

MySQL [(none)]> alter user root identified by 'root1234';
Query OK, 0 rows affected (0.034 sec)

MySQL [(none)]> quit
Bye
[admin@ecs-ac3e-0004 ~]$ mysql -h127.0.0.1 -uroot@sys -P2881 -proot1234 -c -A oceanbase
Welcome to the MariaDB monitor.  Commands end with ; or \\g.
Your MySQL connection id is 3221487634
Server version: 5.7.25 OceanBase 3.1.1 (r1-895dd335327983c2fb9a7362e8bb149a7e1343cd) (Built Oct 28 2021 01:21:37)

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\\h' for help. Type '\\c' to clear the current input statement.

MySQL [oceanbase]> show databases;
+--------------------+
| Database           |
+--------------------+
| oceanbase          |
| information_schema |
| mysql              |
| SYS                |
| LBACSYS            |
| ORAAUDITOR         |
| test               |
+--------------------+
7 rows in set (0.003 sec)

MySQL [oceanbase]>

节点2:
su - admin
mkdir -p /data/ob/observer02/store/{sort_dir,sstable,clog,ilog,slog}
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/data/ob/oceanbase/build_release/src/observer/lib/

su - root
cd /data/ob/observer02 && /data/ob/oceanbase/build_release/src/observer/observer -r 192.168.0.187:2882:2881 -o __min_full_resource_pool_memory=268435456,memory_limit=35G,system_memory=4G,stack_size=512K,cpu_count=16,cache_wash_threshold=1G,workers_per_cpu_quota=10,schema_history_expire_time=1d,net_thread_count=4,sys_bkgd_migration_retry_num=3,minor_freeze_times=10,enable_separate_sys_clog=0,enable_merge_by_turn=False,datafile_size=120G,enable_syslog_recycle=True,max_syslog_file_count=4 -z zone1 -p 2881 -P 2882 -c 1 -d /data/ob/observer02/store -i eth0 -l INFO

节点3:
su - admin
mkdir -p /data/ob/observer03/store/{sort_dir,sstable,clog,ilog,slog}
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/data/ob/oceanbase/build_release/src/observer/lib/

su - root
cd /data/ob/observer03 &
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值