资源要求:
- 可用内存不少于8G
- 安装目录空间不少于50G(默认安装在当前安装用户的家目录下)
1. 什么是obd?
odb是oceanbase社区版部署工具oceanbase deployer的简称,通过obd可以快速完成oceanbase clusterr的部署。
不传入配置文件的情况下,在单机通过执行obd demo可以快速部署oceanbase cluster的最新版本,集群名称是demo。
使用obd demo快速部署安装的是最新的版本,默认安装的组件:grafana、obproxy-ce、oceanbase-ce、obagent、prometheus。
也可以制定安装组件的版本。
2. 下载obd、obclient、observer、obproxy相关软件包
下载社区版本:https://www.oceanbase.com/softwarecenter
3. 安装obd,默认安装路径是:/usr/obd,obd的工作在当前用户的HOME目录下:.obd
[root]# rpm -ivh ob-deploy-2.0.0-10.el7.x86_64.rpm
[root]# source /etc/profile.d/obd.sh
4. 将observer、obproxy加载离线仓库
1)删除远程仓库
[root]# rm -fr .obd/mirror/remote/OceanBase.repo
2)将下载的软件包复制到本地仓库
[root]# obd mirror clone /home/admin/*.rpm
5. 查看本地仓库的RPM列表
[root]# obd mirror list local
+----------------------------------------------------------------------------------------------------------+
| local Package List |
+-------------------+---------+------------------------+--------+------------------------------------------+
| name | version | release | arch | md5 |
+-------------------+---------+------------------------+--------+------------------------------------------+
| libobclient | 2.2.2 | 3.el7 | x86_64 | c27a06e49690660f747a5935adab7a034629bcd2 |
| obclient | 2.2.2 | 1.el7 | x86_64 | 9d1b3d21f9274f74bdca36ed19f127842849923f |
| ob-deploy | 2.0.0 | 10.el7 | x86_64 | 130fee987e0c1ab430fbdd0d733d3f135ab977a2 |
| obproxy-ce | 4.0.0 | 5.el7 | x86_64 | de53232a951184fad75b15884458d85e31d2f6c3 |
| oceanbase-ce | 4.0.0.0 | 100000272022110114.el7 | x86_64 | 42611dc51ca9bb28f36e60e4406ceea4a74914c7 |
| oceanbase-ce-libs | 4.0.0.0 | 100000272022110114.el7 | x86_64 | 188919f8128394bf9b62e3989220ded05f1d14da |
+-------------------+---------+------------------------+--------+------------------------------------------+
Trace ID: 8ced1040-ddf4-11ed-b414-000c29501e19
If you want to view detailed obd logs, please run: obd display-trace 8ced1040-ddf4-11ed-b414-000c29501e19
6. 执行obd demo快速部署单副本集群(使用本地仓库),指定安装的组件(obceanbase-ce、obproxy-ce)
[root]# obd demo -c oceanbase-ce,obproxy-ce,obclient
7. 查看集群信息
[root]# obd cluster list
+--------------------------------------------------+
| Cluster List |
+------+-------------------------+-----------------+
| Name | Configuration Path | Status (Cached) |
+------+-------------------------+-----------------+
| demo | /root/.obd/cluster/demo | running |
+------+-------------------------+-----------------+
Trace ID: 5259e298-ddf2-11ed-b577-000c29501e19
If you want to view detailed obd logs, please run: obd display-trace 5259e298-ddf2-11ed-b577-000c29501e19
# 已经到底了