arm服务器OceanBase初始化安装体验

本文涉及的产品
RDS MySQL Serverless 基础系列,0.5-2RCU 50GB
云数据库 RDS MySQL,集群系列 2核4GB
推荐场景:
搭建个人博客
云数据库 RDS PostgreSQL,集群系列 2核4GB
简介: OceanBase初始化安装体验

OceanBase初始化安装体验

通过本次测试,可以了解到oceanbase已经可以完美支持Kunpeng ARM服务器的安装,简单通过yum命令即可完成了数据库的安装。

一、环境准备

本次安装测试采用Huawei Kunpeng 920 2.6GHz,系统版本为:CentOS Linux release 7.6。

[root@ecs-29d7 ~]# cat /etc/redhat-release
CentOS Linux release 7.6.1810 (AltArch)
[root@ecs-29d7 ~]# cat /proc/cpuinfo
processor       : 0
BogoMIPS        : 200.00
Features        : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma dcpop asimddp asimdfhm
CPU implementer : 0x48
CPU architecture: 8
CPU variant     : 0x1
CPU part        : 0xd01
CPU revision    : 0

cpuinfo.png

二,oceanbase软件安装

本次安装使用obd进行单节点安装和测试。

2.1 部署 OBD 软件

yum install -y yum-utils
yum-config-manager --add-repo https://mirrors.aliyun.com/oceanbase/OceanBase.repo
yum install -y ob-deploy

安装日志:

[root@ecs-29d7 ~]# yum install -y ob-deploy
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
oceanbase.community.stable                                                                                            | 3.0 kB  00:00:00
oceanbase.development-kit                                                                                             | 3.0 kB  00:00:00
(1/2): oceanbase.community.stable/7/aarch64/primary_db                                                                |  13 kB  00:00:00
(2/2): oceanbase.development-kit/7/aarch64/primary_db                                                                 |  22 kB  00:00:00
Resolving Dependencies
--> Running transaction check
---> Package ob-deploy.aarch64 0:1.3.3-11.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================================================================================
 Package                      Arch                       Version                         Repository                                     Size
=============================================================================================================================================
Installing:
 ob-deploy                    aarch64                    1.3.3-11.el7                    oceanbase.community.stable                     19 M

Transaction Summary
=============================================================================================================================================
Install  1 Package

Total download size: 19 M
Installed size: 28 M
Downloading packages:
warning: /var/cache/yum/aarch64/7/oceanbase.community.stable/packages/ob-deploy-1.3.3-11.el7.aarch64.rpm: Header V4 RSA/SHA1 Signature, key ID e9b4a7aa: NOKEY
Public key for ob-deploy-1.3.3-11.el7.aarch64.rpm is not installed
ob-deploy-1.3.3-11.el7.aarch64.rpm                                                                                    |  19 MB  00:02:32
Retrieving key from http://mirrors.aliyun.com/oceanbase/RPM-GPG-KEY-OceanBase
Importing GPG key 0xE9B4A7AA:
 Userid     : "OceanBase"
 Fingerprint: ef7d e8e3 6987 b60c acf9 9a53 2ff8 45a6 e9b4 a7aa
 From       : http://mirrors.aliyun.com/oceanbase/RPM-GPG-KEY-OceanBase
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : ob-deploy-1.3.3-11.el7.aarch64                                                                                            1/1
Installation of obd finished successfully
Please source /etc/profile.d/obd.sh to enable it
  Verifying  : ob-deploy-1.3.3-11.el7.aarch64                                                                                            1/1

Installed:
  ob-deploy.aarch64 0:1.3.3-11.el7

Complete!

2.2 编辑配置文件

配置文件下载地址:

https://github.com/oceanbase/obdeploy/tree/master/example
https://open.oceanbase.com/docs/tutorials-cn/V1.0.0/10000000000012298

部署单节点 observer 进程:

主要配置ip地址,网卡名称,内存和磁盘大小。
## Only need to configure when remote login is required
# user:
#   username: your username
#   password: your password if need
#   key_file: your ssh-key file path if need
#   port: your ssh port, default 22
#   timeout: ssh connection timeout (second), default 30
oceanbase-ce:
  servers:
    # Please don't use hostname, only IP can be supported
    - 192.168.0.174
  global:
    #  The working directory for OceanBase Database. OceanBase Database is started under this directory. This is a required field.
    home_path: /root/observer
    # The directory for data storage. The default value is $home_path/store.
    # data_dir: /data
    # The directory for clog, ilog, and slog. The default value is the same as the data_dir value.
    # redo_dir: /redo
    # Please set devname as the network adaptor's name whose ip is  in the setting of severs.
    # if set severs as "127.0.0.1", please set devname as "lo"
    # if current ip is 192.168.1.10, and the ip's network adaptor's name is "eth0", please use "eth0"
    devname: eth0
    mysql_port: 2881 # External port for OceanBase Database. The default value is 2881. DO NOT change this value after the cluster is started.
    rpc_port: 2882 # Internal port for OceanBase Database. The default value is 2882. DO NOT change this value after the cluster is started.
    zone: zone1
    cluster_id: 1
    # please set memory limit to a suitable value which is matching resource. 
    memory_limit: 6G # The maximum running memory for an observer
    system_memory: 3G # The reserved system memory. system_memory is reserved for general tenants. The default value is 30G.
    stack_size: 512K
    cpu_count: 16
    cache_wash_threshold: 1G
    __min_full_resource_pool_memory: 268435456
    workers_per_cpu_quota: 10
    schema_history_expire_time: 1d
    # The value of net_thread_count had better be same as cpu's core number. 
    net_thread_count: 4
    major_freeze_duty_time: Disable
    minor_freeze_times: 10
    enable_separate_sys_clog: 0
    enable_merge_by_turn: FALSE
    datafile_disk_percentage: 20 # The percentage of the data_dir space to the total disk space. This value takes effect only when datafile_size is 0. The default value is 90.
    syslog_level: INFO # System log level. The default value is INFO.
    enable_syslog_wf: false # Print system logs whose levels are higher than WARNING to a separate log file. The default value is true.
    enable_syslog_recycle: true # Enable auto system log recycling or not. The default value is false.
    max_syslog_file_count: 4 # The maximum number of reserved log files before enabling auto recycling. The default value is 0.
    # observer cluster name, consistent with obproxy's cluster_name
    appname: obcluster
    # root_password: # root user password, can be empty

2.3软件部署

软件部署:

部署之前主机ssh 需要配置免密钥登录:

参考:2.4 如何初始化服务器环境 (oceanbase.com)

obd  cluster deploy obtest -c ob.yaml

日志输出:

[root@ecs-29d7 ~]# obd  cluster deploy obtest -c ob.yaml
Update OceanBase-community-stable-el7 ok
Update OceanBase-development-kit-el7 ok
Download oceanbase-ce-3.1.3-10100032022041510.el7.aarch64.rpm (36.59 M): 100% [###################################] Time: 0:03:59 160.51 kB/s
Package oceanbase-ce-3.1.3 is available.
install oceanbase-ce-3.1.3 for local ok
+-------------------------------------------------------------------------------------------+
|                                          Packages                                         |
+--------------+---------+-----------------------+------------------------------------------+
| Repository   | Version | Release               | Md5                                      |
+--------------+---------+-----------------------+------------------------------------------+
| oceanbase-ce | 3.1.3   | 10100032022041510.el7 | 4ceb42d85806be52cbcf24425a34b22f810c9aad |
+--------------+---------+-----------------------+------------------------------------------+
Repository integrity check ok
Parameter check ok
Open ssh connection ok
Remote oceanbase-ce-3.1.3-4ceb42d85806be52cbcf24425a34b22f810c9aad repository install ok
Remote oceanbase-ce-3.1.3-4ceb42d85806be52cbcf24425a34b22f810c9aad repository lib check !!
[WARN] 192.168.0.174 oceanbase-ce-3.1.3-4ceb42d85806be52cbcf24425a34b22f810c9aad require: libaio.so.1
[WARN] 192.168.0.174 oceanbase-ce-3.1.3-4ceb42d85806be52cbcf24425a34b22f810c9aad require: libmariadb.so.3
[WARN] 192.168.0.174 oceanbase-ce-3.1.3-4ceb42d85806be52cbcf24425a34b22f810c9aad require: libatomic.so.1

Try to get lib-repository
Download oceanbase-ce-libs-3.1.3-10100032022041510.el7.aarch64.rpm (144.66 K): 100% [########################################################] Time: 0:00:00 239.41 kB/s
Package oceanbase-ce-libs-3.1.3 is available.
install oceanbase-ce-libs-3.1.3 for local ok
Use oceanbase-ce-libs-3.1.3-f931a9f4a03af69fa946ee3cc3c90f24ed9d967a for oceanbase-ce-3.1.3-4ceb42d85806be52cbcf24425a34b22f810c9aad
Remote oceanbase-ce-libs-3.1.3-f931a9f4a03af69fa946ee3cc3c90f24ed9d967a repository install ok
Remote oceanbase-ce-3.1.3-4ceb42d85806be52cbcf24425a34b22f810c9aad repository lib check ok
Cluster status check ok
Initializes observer work home ok
obtest deployed

2.4 启动集群

[root@ecs-29d7 ~]#  obd cluster start obtest
Get local repositories and plugins ok
Open ssh connection ok
Load cluster param plugin ok
Check before start observer ok
[WARN] (192.168.0.174) The recommended number of open files is 655350 (Current value: 65535)
[WARN] (192.168.0.174) clog and data use the same disk (/)
Start observer ok
observer program health check ok
Connect to observer ok
Initialize cluster
Cluster bootstrap ok
Wait for observer init ok
+-------------------------------------------------+
|                     observer                    |
+---------------+---------+------+-------+--------+
| ip            | version | port | zone  | status |
+---------------+---------+------+-------+--------+
| 192.168.0.174 | 3.1.3   | 2881 | zone1 | active |
+---------------+---------+------+-------+--------+
obtest running

2.5 状态检查

[root@ecs-29d7 ~]# obd cluster list
+------------------------------------------------------+
|                     Cluster List                     |
+--------+---------------------------+-----------------+
| Name   | Configuration Path        | Status (Cached) |
+--------+---------------------------+-----------------+
| obtest | /root/.obd/cluster/obtest | running         |
+--------+---------------------------+-----------------+

[root@ecs-29d7 ~]#  obd cluster display  obtest
Get local repositories and plugins ok
Open ssh connection ok
Cluster status check ok
Connect to observer ok
Wait for observer init ok
+-------------------------------------------------+
|                     observer                    |
+---------------+---------+------+-------+--------+
| ip            | version | port | zone  | status |
+---------------+---------+------+-------+--------+
| 192.168.0.174 | 3.1.3   | 2881 | zone1 | active |
+---------------+---------+------+-------+--------+

2.6 ob数据库连接

客户端软件安装:

 yum install obclient -y
 
#安装日志:
[root@ecs-29d7 ~]#  yum install obclient -y
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package obclient.aarch64 0:2.0.1-2.el7 will be installed
--> Processing Dependency: libobclient >= 2.0.0 for package: obclient-2.0.1-2.el7.aarch64
--> Running transaction check
---> Package libobclient.aarch64 0:2.0.1-3.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

======================================================================================================================================================
 Package                          Arch                         Version                          Repository                                       Size
======================================================================================================================================================
Installing:
 obclient                         aarch64                      2.0.1-2.el7                      oceanbase.community.stable                      170 M
Installing for dependencies:
 libobclient                      aarch64                      2.0.1-3.el7                      oceanbase.community.stable                      839 k

Transaction Summary
======================================================================================================================================================
Install  1 Package (+1 Dependent package)

Total download size: 170 M
Installed size: 721 M
Downloading packages:
(1/2): libobclient-2.0.1-3.el7.aarch64.rpm                                                                                     | 839 kB  00:00:05
(2/2): obclient-2.0.1-2.el7.aarch64.rpm                                                                                        | 170 MB  00:13:52
------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                 210 kB/s | 170 MB  00:13:52
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : libobclient-2.0.1-3.el7.aarch64                                                                                                    1/2
  Installing : obclient-2.0.1-2.el7.aarch64                                                                                                       2/2
  Verifying  : obclient-2.0.1-2.el7.aarch64                                                                                                        1/2
  Verifying  : libobclient-2.0.1-3.el7.aarch64                                                                                                     2/2

Installed:
  obclient.aarch64 0:2.0.1-2.el7

Dependency Installed:
  libobclient.aarch64 0:2.0.1-3.el7

Complete!

数据库连接:

 obclient -h 127.0.0.1 -uroot@sys -P2881 -c -A oceanbase
 
[root@ecs-29d7 ~]# obclient -h 127.0.0.1 -uroot@sys -P2881 -c -A oceanbase
Welcome to the OceanBase.  Commands end with ; or \g.
Your MySQL connection id is 3221487826
Server version: 5.7.25 OceanBase 3.1.3 (r10100032022041510-a09d3134c10665f03fd56d7f8bdd413b2b771977) (Built Apr 15 2022 02:16:17)

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.002 sec)

MySQL [oceanbase]>
 

3,软件信息

OBD版本信息:
[root@ecs-29d7 ~]# obd --version
OceanBase Deploy: 1.3.3
REVISION: c20488ffee26b0c9dfe4b30374687349a427ab15
BUILD_BRANCH: publish
BUILD_TIME: Apr 26 2022 03:39:17OURCE
Copyright (C) 2021 OceanBase
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

[root@ecs-29d7 ~]# obclient --version
obclient Ver 15.1 Distrib 10.4.18-MariaDB, for Linux (aarch64) using readline 5.1

[root@ecs-29d7 ~]# obclient -h 127.0.0.1 -uroot@sys -P2881 -c -A oceanbase
Welcome to the OceanBase. Commands end with ; or \g.
Your MySQL connection id is 3221487988
Server version: 5.7.25 OceanBase 3.1.3 (r10100032022041510-a09d3134c10665f03fd56d7f8bdd413b2b771977) (Built Apr 15 2022 02:16:17)

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]> select version();
version()
3.1.3-OceanBase CE

1 row in set (0.001 sec)

相关实践学习
2分钟自动化部署人生模拟器
本场景将带你借助云效流水线Flow实现人生模拟器小游戏的自动化部署
7天玩转云服务器
云服务器ECS(Elastic Compute Service)是一种弹性可伸缩的计算服务,可降低 IT 成本,提升运维效率。本课程手把手带你了解ECS、掌握基本操作、动手实操快照管理、镜像管理等。了解产品详情: https://www.aliyun.com/product/ecs
相关文章
|
7月前
|
消息中间件 网络安全 数据安全/隐私保护
麒麟系统ARM安装rabbitmq
麒麟系统ARM安装rabbitmq
|
2月前
|
编解码 弹性计算 应用服务中间件
阿里云服务器Arm计算架构解析:Arm计算架构云服务器租用收费标准价格参考
阿里云服务器架构分为X86计算、Arm计算、高性能计算等多种架构,其中Arm计算架构以其低功耗、高效率的特点受到广泛关注。本文将深入解析阿里云Arm计算架构云服务器的技术特点、适用场景以及包年包月与按量付费的收费标准与最新活动价格情况,以供选择参考。
|
2月前
|
人工智能 安全 大数据
ARM 服务器上安装 OpenEuler (欧拉)
openEuler 是华为于2019年开源的操作系统,支持多种处理器架构,包括X86和鲲鹏。截至2020年底,openEuler 拥有3万社区用户、2万多个拉取请求、2000多名贡献者和7032款软件。openEuler 提供高效、稳定、安全的系统,适用于数据库、大数据、云计算和人工智能等场景。本文介绍了在神州鲲泰 R522 服务器上安装 openEuler 的详细步骤,包括下载镜像、配置 RAID 和 BIOS 设置等。
326 0
ARM 服务器上安装 OpenEuler (欧拉)
|
4月前
|
Ubuntu Windows
ARM架构安装ubuntu系统
8月更文挑战第19天
1436 0
|
7月前
|
存储 Linux Docker
arm安装docker与docker-copose
现在,你已经成功在ARM架构的设备上安装了Docker和Docker Compose。你可以使用它们来管理容器和容器化应用程序。请注意,ARM设备上的Docker支持可能受到限制,某些容器可能不兼容。确保你的容器映像支持ARM架构,以便在ARM设备上正确运行。
808 6
|
6月前
|
Ubuntu 编译器 C语言
蓝易云 - ubuntu上安装boost库为SOMEIP的X86和ARM下编译做准备(编译两种版本)
以上就是在Ubuntu上安装Boost库并为SOME/IP的X86和ARM架构编译做准备的全部步骤。
84 0
|
6月前
|
Ubuntu Windows
ubuntu 安装vnc_vnc4server arm架构
ubuntu 安装vnc_vnc4server arm架构
133 0
|
7月前
|
存储 机器学习/深度学习 并行计算
阿里云服务器X86计算、Arm计算、GPU/FPGA/ASIC、高性能计算架构区别
在我们选购阿里云服务器的时候,云服务器架构有X86计算、ARM计算、GPU/FPGA/ASIC、弹性裸金属服务器、高性能计算可选,有的用户并不清楚他们之间有何区别,本文主要简单介绍下不同类型的云服务器有何不同,主要特点及适用场景有哪些。
阿里云服务器X86计算、Arm计算、GPU/FPGA/ASIC、高性能计算架构区别
|
7月前
|
消息中间件 网络安全 数据安全/隐私保护
麒麟系统ARM安装rabbitmq
记录下麒麟liunx系统安装rabbitmq的踩坑记录,按照我这个步骤来,100%解决问题。 希望对您有帮助!
麒麟系统ARM安装rabbitmq
|
7月前
|
SQL 关系型数据库 数据库
OceanBase数据库常见问题之OAT添加服务器预检查的时候报错如何解决
OceanBase 是一款由阿里巴巴集团研发的企业级分布式关系型数据库,它具有高可用、高性能、可水平扩展等特点。以下是OceanBase 数据库使用过程中可能遇到的一些常见问题及其解答的汇总,以帮助用户更好地理解和使用这款数据库产品。