OceanBase 4.2.1 离线安装

发布于:2024-06-30 ⋅ 阅读:(14) ⋅ 点赞:(0)

OceanBase 4.2.1 离线安装

4.2 版本的OceanBase支持一键安装,所以在线版本的安装简单了很多,但在无法连接网络的情况下安装就只能手动离线安装。

注:如下安装过程都是在同一台机器上面进行,也就是只有一个节点,多个节点安装以此类推即可。

离线安装步骤
下载安装包
建议使用最上面的OceanBase 数据库一键离线安装包,选择适合的版本号下载,里面包含的内容比较全

下载安装部署工具包
安装部署工具OceanBase Deployer(简称OBD),官方解释上面的All in One 包里已经包含这个包了,可以直接运行安装。

进入下载目录解压,然后进入oceanbase-all-in-one/rpms
tar -zxvf ocp-all-in-one-4.2.1-20231208144448.el7.x86_64.tar.gz

安装obd
yum install ob-deploy-2.4.0-7.el7.x86_64.rpm

然后执行如下命令,将安装工具的安装源改完本地
obd  mirror disable remote #禁用远程仓库
obd mirror clone *.rpm #设置本地仓库
obd mirror list local #查看本地仓库

启动web部署工具,web界面操作起来更方便一些
#启动OBD部署界面,可以使用obd web -h 查看可用参数
obd web -p 8000 #会输出web界面的网址,如下:
[root@ocpsys ~]# obd web -p 8000
start OBD WEB in 0.0.0.0:8000
please open http://192.168.142.12:8000

注意:所有部署过程均为web图形界面操作部署,具体过程OceanBase官方有详细的操作步骤。

vi /etc/security/limits.d/20-nproc.conf
*       soft    nproc   655350          #最大线程数
root       soft    nproc   unlimited          #最大线程数

vi /etc/security/limits.conf在文件尾部添加
*       soft    nofile  655350
*       hard    nofile  655350
*       soft    nproc  655350
*       hard    nproc  655350
*       soft    stack   unlimited
*       hard    stack   unlimited
*       soft    core    unlimited
*       hard    core    unlimited

vi /etc/sysctl.conf在文件尾部添加
vm.max_map_count=655360
vm.min_free_kbytes=2097152
fs.file-max = 6573688
fs.aio-max-nr = 1048576

设置免密码sudo
vi /etc/sudoers 在文件尾部添加
vi /etc/sudoers
admin       ALL=(ALL)       NOPASSWD: ALL

用户名密码记录:192.168.142.12
root@sys/zzh!@#123QAZ

部署日志:
+---------------------------------------------------------------------------------------------+
|                                           Packages                                          |
+---------------+---------+------------------------+------------------------------------------+
| Repository    | Version | Release                | Md5                                      |
+---------------+---------+------------------------+------------------------------------------+
| oceanbase-ce  | 4.2.1.2 | 102000042023120514.el7 | b2ccb524f200a9ef0fad2cddf59d309ddaa2e3e4 |
| obproxy-ce    | 4.2.1.0 | 11.el7                 | 0aed4b782120e4248b749f67be3d2cc82cdcb70d |
| ocp-server-ce | 4.2.1   | 20231208144448.el7     | 58cf72891d75a2fa7c754bafc42d336525baf0b5 |
+---------------+---------+------------------------+------------------------------------------+
Repository integrity check ok
Parameter check ok
Generate ocp server configuration ok
Cluster status check ok
Initializes observer work home ok
Initializes obproxy work home ok
Initializes ocp-server work home ok
Remote oceanbase-ce-4.2.1.2-102000042023120514.el7-b2ccb524f200a9ef0fad2cddf59d309ddaa2e3e4 repository install ok
Remote oceanbase-ce-4.2.1.2-102000042023120514.el7-b2ccb524f200a9ef0fad2cddf59d309ddaa2e3e4 repository lib check !!
Remote obproxy-ce-4.2.1.0-11.el7-0aed4b782120e4248b749f67be3d2cc82cdcb70d repository install ok
Remote obproxy-ce-4.2.1.0-11.el7-0aed4b782120e4248b749f67be3d2cc82cdcb70d repository lib check ok
Remote ocp-server-ce-4.2.1-20231208144448.el7-58cf72891d75a2fa7c754bafc42d336525baf0b5 repository install ok
Remote ocp-server-ce-4.2.1-20231208144448.el7-58cf72891d75a2fa7c754bafc42d336525baf0b5 repository lib check ok
Try to get lib-repository
Remote oceanbase-ce-libs-4.2.1.2-102000042023120514.el7-b4ae00ee729404557fa858d4cdd87250bca1aa63 repository install ok
Remote oceanbase-ce-4.2.1.2-102000042023120514.el7-b2ccb524f200a9ef0fad2cddf59d309ddaa2e3e4 repository lib check ok
obcluster deployed
Search plugins ok
Load cluster param plugin ok
Check before start observer ok
[WARN] OBD-1012: (192.168.142.12) clog and data use the same disk (/data)

Start observer ok
observer program health check ok
Connect to observer ok
Initialize oceanbase-ce ok
Wait for observer init ok
+--------------------------------------------------+
|                     observer                     |
+----------------+---------+------+-------+--------+
| ip             | version | port | zone  | status |
+----------------+---------+------+-------+--------+
| 192.168.142.12 | 4.2.1.2 | 2881 | zone1 | ACTIVE |
+----------------+---------+------+-------+--------+
obclient -h192.168.142.12 -P2881 -uroot -p'zzh!@#123QAZ' -Doceanbase -A

succeed
Search plugins ok
Load cluster param plugin ok
Check before start obproxy ok
Start obproxy ok
obproxy program health check ok
Connect to obproxy ok
Initialize obproxy-ce ok
+--------------------------------------------------+
|                     obproxy                      |
+----------------+------+-----------------+--------+
| ip             | port | prometheus_port | status |
+----------------+------+-----------------+--------+
| 192.168.142.12 | 2883 | 2884            | active |
+----------------+------+-----------------+--------+
obclient -h192.168.142.12 -P2883 -uroot -p'zzh!@#123QAZ' -Doceanbase -A
succeed
Search plugins ok
Load cluster param plugin ok
Check before start ocp-server ok
Create tenant ocp_meta ok
Create tenant ocp_monitor ok
Start ocp-server ok
ocp-server program health check ok
Start ocp-server ok
ocp-server program health check ok
Connect to ocp-server ok
+---------------------------------------------------------------+
|                           ocp-server                          |
+----------------------------+----------+--------------+--------+
| url                        | username | password     | status |
+----------------------------+----------+--------------+--------+
| http://192.168.142.12:8080 | admin    | zzh!@#123QAZ | active |
+----------------------------+----------+--------------+--------+
succeed