OceanBase之rpm包离线安装


aihuafeng66t
克里斯蒂亚诺诺 2024-01-09 16:00:45 50736 赞同 0 反对 0
分类: 资源
OceanBase之rpm包离线安装

一、场景简介
  有些系统环境因为安全考虑,服务器本身是未连接到互联网的,这种情况下我们需要进行离线部署。通过将所需的程序软件包下载后通过局域网或者U盘等方式上传到服务器,在服务器上完成离线安装。OceanBase离线安装很方便,我们需要将OBD包安装好,配置后软件镜像,还是一样的可以通过OBD的方式部署OceanBase数据库。博文实验环境如下:

操作系统:centos7.6
oceanbase数据库:oceanbase-ce-3.1.3
obclient版本:obclient-2.0.1
————————————————

https://open.oceanbase.com/softwareCenter/community

2、将下载的rpm包上传到服务器
[root@s153 opt]# ll
总用量 268000
-rw-r–r–. 1 root root 181499124 6月 6 15:08 obclient-2.0.1-2.el7.x86_64.rpm
-rw-r–r–. 1 root root 33460200 6月 6 14:58 ob-deploy-1.3.3-11.el7.x86_64.rpm
-rw-r–r–. 1 root root 9911060 6月 22 14:15 obproxy-ce-3.2.3-2.el7.x86_64.rpm
-rw-r–r–. 1 root root 49396832 5月 30 16:45 oceanbase-ce-3.1.3-10000292022032916.el7.x86_64.rpm
-rw-r–r–. 1 root root 158348 6月 6 14:58 oceanbase-ce-libs-3.1.3-10000292022032916.el7.x86_64.rpm

3、安装OBD
[root@s153 opt]# yum install -y ob-deploy-1.3.3-11.el7.x86_64.rpm

已安装:
ob-deploy.x86_64 0:1.3.3-11.el7

完毕!
[root@s153 opt]# source /etc/profile.d/obd.sh

4、禁用远程镜像仓库
[wuhs@s153 opt]$ obd mirror disable remote
Disable remote ok

5、设置本地镜像
  运行以下命令,将 OceanBase 数据库安装包设置为本地镜像。

[wuhs@s153 opt]$ obd mirror clone obclient-2.0.1-2.el7.x86_64.rpm
name: obclient
version: 2.0.1
release:2.el7
arch: x86_64
md5: dab6af95a05f551702589e1f5f043f0ea9f4bfa0
add obclient-2.0.1-2.el7.x86_64.rpm to local mirror
[wuhs@s153 opt]$ obd mirror clone oceanbase-ce-libs-3.1.3-10000292022032916.el7.x86_64.rpm
name: oceanbase-ce-libs
version: 3.1.3
release:10000292022032916.el7
arch: x86_64
md5: c68c3aca8a1329a360fe5d65e1c3d4fa0f93f2d5
add oceanbase-ce-libs-3.1.3-10000292022032916.el7.x86_64.rpm to local mirror
[wuhs@s153 opt]$ obd mirror clone oceanbase-ce-3.1.3-10000292022032916.el7.x86_64.rpm
name: oceanbase-ce
version: 3.1.3
release:10000292022032916.el7
arch: x86_64
md5: eab08e5d473bd4884fdf2ac4d7dff6a329b68abe
add oceanbase-ce-3.1.3-10000292022032916.el7.x86_64.rpm to local mirror
[wuhs@s153 opt]$ obd mirror clone obproxy-ce-3.2.3-2.el7.x86_64.rpm
name: obproxy-ce
version: 3.2.3
release:2.el7
arch: x86_64
md5: bdd299bda2bdf71fd0fd3f155b6a2e39dffd2be1
add obproxy-ce-3.2.3-2.el7.x86_64.rpm to local mirror

6、查看仓库的 RPM 列表
[wuhs@s153 opt]$ obd mirror list local
±--------------------------------------------------------------------------------------------------------+
| local Package List |
±------------------±--------±----------------------±-------±-----------------------------------------+
| name | version | release | arch | md5 |
±------------------±--------±----------------------±-------±-----------------------------------------+
| obclient | 2.0.1 | 2.el7 | x86_64 | dab6af95a05f551702589e1f5f043f0ea9f4bfa0 |
| oceanbase-ce-libs | 3.1.3 | 10000292022032916.el7 | x86_64 | c68c3aca8a1329a360fe5d65e1c3d4fa0f93f2d5 |
| oceanbase-ce | 3.1.3 | 10000292022032916.el7 | x86_64 | eab08e5d473bd4884fdf2ac4d7dff6a329b68abe |
| obproxy-ce | 3.2.3 | 2.el7 | x86_64 | bdd299bda2bdf71fd0fd3f155b6a2e39dffd2be1 |
±------------------±--------±----------------------±-------±-----------------------------------------+

7、系统参数配置
  系统参数配置参照博文OceanBase社区版之OBD方式部署方式本地安装中的环境准备章节。

8、使用obd部署
  如果需要使用普通用户部署记得在要使用普通用户执行克隆软件包镜像,否则会找不到软件包。

[wuhs@s153 ~]$ obd cluster deploy myob -c local.yaml
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 | 10000292022032916.el7 | eab08e5d473bd4884fdf2ac4d7dff6a329b68abe |
±-------------±--------±----------------------±-----------------------------------------+
Repository integrity check ok
Parameter check ok
Open ssh connection ok
Remote oceanbase-ce-3.1.3-eab08e5d473bd4884fdf2ac4d7dff6a329b68abe repository install ok
Remote oceanbase-ce-3.1.3-eab08e5d473bd4884fdf2ac4d7dff6a329b68abe repository lib check !!
[WARN] 192.168.0.153 oceanbase-ce-3.1.3-eab08e5d473bd4884fdf2ac4d7dff6a329b68abe require: libmariadb.so.3

Try to get lib-repository
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-c68c3aca8a1329a360fe5d65e1c3d4fa0f93f2d5 for oceanbase-ce-3.1.3-eab08e5d473bd4884fdf2ac4d7dff6a329b68abe
Remote oceanbase-ce-libs-3.1.3-c68c3aca8a1329a360fe5d65e1c3d4fa0f93f2d5 repository install ok
Remote oceanbase-ce-3.1.3-eab08e5d473bd4884fdf2ac4d7dff6a329b68abe repository lib check ok
Cluster status check ok
Initializes observer work home ok
myob deployed

9、启动集群
[wuhs@s153 ~]$ obd cluster display myob
Deploy “myob” is deployed
See https://open.oceanbase.com/docs/obd-cn/V1.3.0/10000000000099584.
[wuhs@s153 ~]$ obd cluster start myob
Get local repositories and plugins ok
Open ssh connection ok
Load cluster param plugin ok
Check before start observer ok
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.153 | 3.1.3 | 2881 | zone1 | active |
±--------------±--------±-----±------±-------+

myob running

10、安装obclient
  离线安装obclient,注意obclient依赖libobclient,所以我们需要先安装libobclient,然后安装obclient。

[root@s153 opt]# yum install -y libobclient-2.0.0-2.el7.x86_64.rpm
[root@s153 opt]# yum install -y obclient-2.0.1-2.el7.x86_64.rpm

11、连接数据库
[root@s153 opt]# obclient -uroot -P2881 -h 127.0.0.1
Welcome to the OceanBase. Commands end with ; or \g.
Your MySQL connection id is 3221487961
Server version: 5.7.25 OceanBase 3.1.3 (r10000292022032916-3d79cacb37012cf61b7cb8faf00d9a6bb152bcd1) (Built Mar 29 2022 08:20:39)

Copyright © 2000, 2018, Oracle, MariaDB Corporation Ab and others.

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

MySQL [(none)]> select version();
±-------------------+
| version() |
±-------------------+
| 3.1.3-OceanBase CE |
±-------------------+
1 row in set (0.022 sec)
————————————————

  • 报错原因:内存不足8G
  • 解决方案:扩容内存后重新启动。

如果您发现该资源为电子书等存在侵权的资源或对该资源描述不正确等,可点击“私信”按钮向作者进行反馈;如作者无回复可进行平台仲裁,我们会在第一时间进行处理!

评价 0 条
克里斯蒂亚诺诺L1
粉丝 0 资源 831 + 关注 私信
最近热门资源
银河麒麟桌面操作系统 V10-SP1用户密码修改  563
统信桌面专业版【全盘安装UOS系统】介绍  447
银河麒麟桌面操作系统安装佳能打印机驱动方法  271
银河麒麟桌面操作系统备份用户数据  246
麒麟系统连接打印机常见问题及解决方法  143
最近下载排行榜
银河麒麟桌面操作系统 V10-SP1用户密码修改 0
统信桌面专业版【全盘安装UOS系统】介绍 0
银河麒麟桌面操作系统安装佳能打印机驱动方法 0
银河麒麟桌面操作系统备份用户数据 0
麒麟系统连接打印机常见问题及解决方法 0
作者收入月榜
1

prtyaa 收益393.62元

2

zlj141319 收益218元

3

1843880570 收益214.2元

4

IT-feng 收益210.13元

5

风晓 收益208.24元

6

777 收益172.71元

7

Fhawking 收益106.6元

8

信创来了 收益105.84元

9

克里斯蒂亚诺诺 收益91.08元

10

技术-小陈 收益79.5元

请使用微信扫码

加入交流群

请使用微信扫一扫!