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

本文涉及的产品
RDS MySQL Serverless 基础系列,0.5-2RCU 50GB
云服务器 ECS,每月免费额度200元 3个月
云服务器ECS,u1 2核4GB 1个月
简介: 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)

相关实践学习
一小时快速掌握 SQL 语法
本实验带您学习SQL的基础语法,快速入门SQL。
7天玩转云服务器
云服务器ECS(Elastic Compute Service)是一种弹性可伸缩的计算服务,可降低 IT 成本,提升运维效率。本课程手把手带你了解ECS、掌握基本操作、动手实操快照管理、镜像管理等。了解产品详情: https://www.aliyun.com/product/ecs
相关文章
|
1月前
|
网络安全 Apache
Apache服务器安装SSL证书
Apache服务器安装SSL证书
30 0
|
1月前
|
消息中间件 网络安全 数据安全/隐私保护
麒麟系统ARM安装rabbitmq
麒麟系统ARM安装rabbitmq
|
4天前
|
NoSQL 关系型数据库 MySQL
涉及rocketMQ,jemeter等性能测试服务器的安装记录
涉及rocketMQ,jemeter等性能测试服务器的安装记录
16 1
|
4天前
|
JSON 应用服务中间件 Linux
skywalking内部测试服务器安装记录
skywalking内部测试服务器安装记录
10 0
|
5天前
|
运维 监控 安全
2023年最详细的:本地Linux服务器安装宝塔面板,并内网穿透实现公网远程登录
2023年最详细的:本地Linux服务器安装宝塔面板,并内网穿透实现公网远程登录
|
9天前
|
存储 Linux Docker
arm安装docker与docker-copose
现在,你已经成功在ARM架构的设备上安装了Docker和Docker Compose。你可以使用它们来管理容器和容器化应用程序。请注意,ARM设备上的Docker支持可能受到限制,某些容器可能不兼容。确保你的容器映像支持ARM架构,以便在ARM设备上正确运行。
22 6
|
12天前
|
Apache 项目管理 数据安全/隐私保护
Windows安装TortoiseSVN客户端结合Cpolar实现公网提交文件到本地服务器
Windows安装TortoiseSVN客户端结合Cpolar实现公网提交文件到本地服务器
|
13天前
|
Shell 数据安全/隐私保护 Docker
如何使用Docker安装FTP服务器?
【4月更文挑战第25天】
27 0
如何使用Docker安装FTP服务器?
|
20天前
|
监控 安全 Linux
Linux系统之安装ServerBee服务器监控工具
【4月更文挑战第22天】Linux系统之安装ServerBee服务器监控工具
59 2
|
20天前
|
存储 分布式计算 NoSQL
MongoDB的简介和安装(在服务器上)
MongoDB的简介和安装(在服务器上)
30 0