Oceanbase体验之(一)运维管理工具OCP部署(社区版4.2.2)

资源规划建议

ocp主机1台 内存:64G CPU1:2C及以上 硬盘大于500G

observer服务器3台 内存32G CPU:4C以上 硬盘大于1T 建议存储硬盘与操作系统硬盘隔开实现IO隔离

一、OBD、OCP安装包准备

root@observer /\]# chown -R admin:admin /software/ \[root@observer /\]# ls -ld /software/ drwxr-xr-x 6 admin admin 4096 Apr 16 05:00 /software/ ## 二、OBD部署 ### 2.1本地安装obd rpm -ivh ob-deploy-2.7.0-5.el7.x86_64.rpm source /etc/profile.d/obd.sh ![](https://file.jishuzhan.net/article/1784015601673441282/0479225856a5734c047462c133404c29.webp) ## 三、OCP部署 ### 3.1解压ocp tar -zxf ocp-all-in-one-4.2.2-20240329111923.el7.x86_64.tar.gz ![](https://file.jishuzhan.net/article/1784015601673441282/07e70bab0e16ee2b637adc2c6d977be6.webp) ### 3.2解压部署程序并安装 执行如下命令进入解压后软件包的 bin 目录下安装部署程序 cd /software/obsq/ocp-all-in-one/bin \&\& bash install.sh ![](https://file.jishuzhan.net/article/1784015601673441282/bbbdfa46728ba422ec09e933333c0f7d.webp) Setup Environment: source \~/.oceanbase-all-in-one/bin/env.sh Quick Start: obd demo Use Web Service to install: obd web Use Web Service to upgrade: obd web upgrade More Details: obd -h 生效环境变量 source \~/.oceanbase-all-in-one/bin/env.sh 配置环境变量 \[admin@observer bin\]$ cd \~/.oceanbase-all-in-one/bin/ \[admin@observer bin\]$ ls env.sh install.sh uninstall.sh \[admin@observer bin\]$ cat env.sh #!/bin/bash export OBD_INSTALL_PRE=\~/.oceanbase-all-in-one/obd source $OBD_INSTALL_PRE/etc/profile.d/obd.sh export OBCLIENT_HOME=\~/.oceanbase-all-in-one/obclient export PATH=$OBD_INSTALL_PRE/usr/bin:$OBCLIENT_HOME/u01/obclient/bin:$PATH \[admin@observer bin\]$ vi \~/.bash_profile \[admin@observer bin\]$ cat \~/.bash_profile # Source /root/.bashrc if user has one \[ -f \~/.bashrc \] \&\& . \~/.bashrc export OBD_INSTALL_PRE=\~/.oceanbase-all-in-one/obd source $OBD_INSTALL_PRE/etc/profile.d/obd.sh export OBCLIENT_HOME=\~/.oceanbase-all-in-one/obclient export PATH=$OBD_INSTALL_PRE/usr/bin:$OBCLIENT_HOME/u01/obclient/bin:$PATH \[admin@observer bin\]$ . \~/.bash_profile ### 3.3 启动obd #### 3.3.1执行 obd web install在返回信息中获取部署向导页面的 IP 地址 ![](https://file.jishuzhan.net/article/1784015601673441282/88c0e743eebf38f814bf6e5a24b44d24.webp) #### 3.3.2进入浏览器登录输出结果的网址 ![](https://file.jishuzhan.net/article/1784015601673441282/107a3e1b615f5f18b0cd0a85e31ef440.webp) #### 3.4 选择OCP产品并点击确定 ![](https://file.jishuzhan.net/article/1784015601673441282/78e034ac43244fbaaeecce17bc6cdc25.webp) #### 3.5 选择创建全新的 OceanBase 数据库 ![](https://file.jishuzhan.net/article/1784015601673441282/a9944f19361bd087954287e2652df6c9.webp) #### 3.6 配置部署信息 1. 自定义待管理的 OceanBase 集群名称 该名称具有唯一性,且集群名称必须以英文字母开头,英文或数字结尾,长度为 2\~32 字符。 1. 选择要部署的产品版本 OceanBase 与 OBProxy 的版本具有关联性。例如,当选择部署 V4.1.0 及以上版本的 OceanBase 数据库时,仅支持部署 V4.1.0 及以上版本的 OBProxy。 ![](https://file.jishuzhan.net/article/1784015601673441282/71c6fdeb36d54b93c3c58a899bb9c65c.webp) 下一步 ![](https://file.jishuzhan.net/article/1784015601673441282/1483ad11050661b3e4878b54bc417510.webp) #### 3.7 metadb配置 ##### 3.7.1部署用户配置 这里注意zone1设置为ocp的服务器其他的zone删除即可,如果ocp是集群可以选择多个zone对应的服务器。 ![](https://file.jishuzhan.net/article/1784015601673441282/80a902fba183614623a56b201aecfb30.webp) ![](https://file.jishuzhan.net/article/1784015601673441282/77efa55bdcb89288816eec9aeba4a5ac.webp) ##### 3.7.2集群配置 注意ocp主机内存为64G,确保主机有足够的内存否则在分配组件资源的时候无法正常完成安装。 ![](https://file.jishuzhan.net/article/1784015601673441282/f40b35008663d637eba7ce8d5b7b06f4.webp) ![](https://file.jishuzhan.net/article/1784015601673441282/64edc860b4ce030056f6478efcda6e06.webp) 更多配置 ![](https://file.jishuzhan.net/article/1784015601673441282/42df07a8e34639d625cdba6509661c29.webp) ![](https://file.jishuzhan.net/article/1784015601673441282/6da74350fd6c9a340eaad26f1fc460b1.webp) #### 3.8 OCP配置 ##### 3.8.1服务配置 ![](https://file.jishuzhan.net/article/1784015601673441282/2b3c5f32712f9dfdd014ce7d5a39e960.webp) 校验端口 ![](https://file.jishuzhan.net/article/1784015601673441282/8d408f641d9aab0807f8eedf6b42f051.webp) ##### 3.8.2资源规划 注意:资源有限的情况下默认即可,如果主机内存及CPU资源远超过文档的资源按找实际资源分配ocp组件的资源,资源越多性能越好. ![](https://file.jishuzhan.net/article/1784015601673441282/ef7b80966cfeee0f0566104d4dee96d1.webp) ##### 3.8.3确认信息后预检查 ![](https://file.jishuzhan.net/article/1784015601673441282/d24a473ea6bc8b09a46089e3870f2043.webp) 遇到可以自动修复的选择自动修复,这里为了演示搭建直接选择自动修复 注意:该问题是磁盘目录资源不足,文档资源为500G,正常存储盘需要单独挂载划分需大于1T ![](https://file.jishuzhan.net/article/1784015601673441282/e36ec540a005b51a6c49231c6d089e12.webp) 没有报错直接下一步 ![](https://file.jishuzhan.net/article/1784015601673441282/c91d930574b599695fc6e51d1dfb906f.webp) ##### 3.8.4部署过程及日志查看 ![](https://file.jishuzhan.net/article/1784015601673441282/f04cad17c236fd50a2792e1a16f33104.webp) ![](https://file.jishuzhan.net/article/1784015601673441282/1a93b2b7da7f93948008169691359d89.webp) 记录ocp obproxy相关的obclient登录信息便于后期黑屏登录使用。 后台安装日志: ![](https://file.jishuzhan.net/article/1784015601673441282/271054d985667a35a76b9daa78849d97.webp) ##### 3.8.5 OCP部署成功(整体部署时间在5\~10分钟左右) ![](https://file.jishuzhan.net/article/1784015601673441282/843993287690067beec8607a5e0c6e5c.webp) 记录ocp登录ip、用户名、密码便于登录使用。 ## 四、登录OCP进行ocp集群相关白屏take over操作 ![](https://file.jishuzhan.net/article/1784015601673441282/30784b27d7f3daa4b1259764fac57892.webp) 按照之前安装完成给的用户密码登录 ![](https://file.jishuzhan.net/article/1784015601673441282/96f3249e3cda04ec42cb8b49d7c8af4a.webp) ### 4.1执行任务Take over primary OB cluster ![](https://file.jishuzhan.net/article/1784015601673441282/e043bfe306802cc418aead3ab4d76ea2.webp) 第二步报错选择跳过即可。 ![](https://file.jishuzhan.net/article/1784015601673441282/4173de0d7927f4038ad70c86885b0575.webp) ![](https://file.jishuzhan.net/article/1784015601673441282/a75517f0b0cb788372010040733d1bc1.webp)![](https://file.jishuzhan.net/article/1784015601673441282/52935e8535f2cc0d6e015e8d28de6acb.webp) ### 4.2查看租户状态 ![](https://file.jishuzhan.net/article/1784015601673441282/70a52d59ea00cc34294d24edbd687762.webp) ![](https://file.jishuzhan.net/article/1784015601673441282/89b87e0084c348f076e23c39cb818fff.webp) ### 4.2OCP集群重启 obd cluster list ****obd cluster stop cluster_obtest**** ![](https://file.jishuzhan.net/article/1784015601673441282/919d411f06e3ede8b9dd1ee91fba7d1e.webp) 启动过程稍长,请耐心等待(3-5分钟) ****obd cluster start cluster_obtest**** ![](https://file.jishuzhan.net/article/1784015601673441282/08bd1aae2927dcf268fd87270e4dc020.webp)

相关推荐
与数据交流的路上6 天前
oceanbase-oms的部署
oceanbase
weixin_445476687 天前
一天一个设计模式——开闭原则
服务器·设计模式·开闭原则
养生技术人10 天前
Oracle OCP认证考试题目详解082系列第49题
运维·数据库·sql·oracle·database·开闭原则·ocp
养生技术人11 天前
Oracle OCP认证考试题目详解082系列第57题
运维·数据库·sql·oracle·开闭原则
养生技术人12 天前
Oracle OCP认证考试题目详解082系列第53题
数据库·sql·oracle·database·开闭原则·ocp
养生技术人12 天前
Oracle OCP认证考试题目详解082系列第48题
运维·数据库·sql·oracle·database·开闭原则·ocp
养生技术人13 天前
Oracle OCP认证考试题目详解082系列第45题
运维·数据库·sql·oracle·开闭原则·ocp
养生技术人14 天前
Oracle OCP认证考试题目详解082系列第54题
数据库·sql·oracle·运维开发·database·开闭原则·ocp
我真的是大笨蛋15 天前
开闭原则详解(OCP)
java·设计模式·性能优化·开闭原则·设计规范
养生技术人15 天前
Oracle OCP认证考试题目详解082系列第50题
运维·数据库·sql·oracle·database·开闭原则