This topic describes how to install and configure OceanBase Deployer (OBD).
If your server can connect to the Internet and runs on CentOS or RedHat, you can run the following commands to install OBD online.
sudo yum install -y yum-utils
sudo yum-config-manager --add-repo https://mirrors.aliyun.com/oceanbase/OceanBase.repo
sudo yum install -y ob-deploy
source /etc/profile.d/obd.sh
The yum
command automatically installs the latest version. You can declare a version number to install the specified version. If you use the yum install -y ob-deploy
command to install OBD, we recommend that you install the latest version.
If your server cannot connect to the Internet, you can download the desired OBD version from OceanBase Download Center. After you download the OBD installation package, copy it to your central control server. We recommend that you download the latest version.
To install OBD on CentOS or RedHat, run the following command:
sudo yum install ob-deploy-*.rpm
To install OBD on Ubuntu or Debian, run the following command:
sudo alien --scripts -i ob-deploy-*.rpm
OceanBase Database provides an all-in-one package since V4.0.0. You can use this package to install OBD, OceanBase Database, OceanBase Database Proxy (ODP), OceanBase Agent (OBAgent), Grafana, Prometheus, and OceanBase Cloud Platform (OCP) Express at a time.
If your server can connect to the Internet, run the following commands to install OBD online.
bash -c "$(curl -s https://obbusiness-private.oss-cn-shanghai.aliyuncs.com/download-center/opensource/oceanbase-all-in-one/installer.sh)"
source ~/.oceanbase-all-in-one/bin/env.sh
If your server cannot connect to the Internet, perform the following steps to install OBD offline.
-
Download the latest all-in-one package from OceanBase Download Center and copy it to the central control server.
-
In the directory where the package is located, run the following commands to decompress and install the package.
tar -xzf oceanbase-all-in-one-*.tar.gz cd oceanbase-all-in-one/bin/ ./install.sh source ~/.oceanbase-all-in-one/bin/env.sh
Before you use the source code to install OBD, make sure that the following dependencies are installed:
-
GCC
-
wget
-
Python-devel
-
openssl-devel
-
xz-devel
-
mysql-devel
To compile the source code to build OBD, you must use the Python 2.7 and Python 3.8 environments. Perform the following steps:
-
Run the following command in Python 2.7:
sh rpm/build.sh executer
The preceding command compiles the interpreter needed in OceanBase Database upgrades. If no upgrade is needed, skip this step.
-
Run the following commands in Python 3.8:
sh rpm/build.sh build_obd source /etc/profile.d/obd.sh
OBD does not support source code-based installation in Python 2 since V2.0.0.
The repository information is built in OBD. When the server can connect to the Internet, you do not need to configure OBD. In this case, you can run the obd mirror list
command to view the software in the OBD repository.
# View OBD repository information
[admin@test001 ~]$ obd mirror list
+-----------------------------------------------------------------------------+
| Mirror Repository List |
+----------------------------+--------+---------+----------+------------------+
| SectionName | Type | Enabled | Available | Update Time |
+----------------------------+--------+---------+----------+------------------+
| oceanbase.community.stable | remote | True | True | 2023-03-20 11:21 |
| oceanbase.development-kit | remote | True | True | 2023-03-20 11:21 |
| local | local | - | True | 2023-03-20 11:23 |
+----------------------------+--------+---------+----------+------------------+
Use `obd mirror list <section name>` for more details
Trace ID: 8a4da3a0-c6ce-11ed-91cc-00163e030166
If you want to view detailed obd logs, please run: obd display-trace 8a4da3a0-c6ce-11ed-91cc-00163e030166
# View information about the software in the repository
[admin@test001 ~]$ obd mirror list oceanbase.community.stable
Update OceanBase-community-stable-el7 ok
Update OceanBase-development-kit-el7 ok
+--------------------------------------------------------------------------------------------------------------------------------------------------+
| oceanbase.community.stable Package List |
+-----------------------------------+---------+------------------------+--------+------------------------------------------------------------------+
| name | version | release | arch | md5 |
+-----------------------------------+---------+------------------------+--------+------------------------------------------------------------------+
| grafana | 7.5.17 | 1 | x86_64 | f0c86571a2987ee6338a42b79bc1a38aebe2b07500d0120ee003aa7dd30973a5 |
| libobclient | 2.0.0 | 1.el7 | x86_64 | 7bbb2aeb9c628ee35c79d6dc2c1668ebbf97a3323f902e8fd33ff1a5ea95220f |
| libobclient | 2.0.0 | 2.el7 | x86_64 | 6c1587b80df64b68343479aecddb0ca912d5ccd3d085cb41c7a37a1e38effc34 |
| libobclient | 2.0.1 | 3.el7 | x86_64 | 4f92926496dec89936422f41f2f2206eb61c5e62e7b0dde1006c6e02eaebec6e |
| libobclient | 2.0.2 | 2.el7 | x86_64 | eed33520e6911140dad65197cff53652310609ab79d7960ec4d2d6d4b2318ba7 |
# Subsequent outputs omitted
If your server cannot connect to the Internet, download the desired installation package in advance and add it to the local repository of OBD.
Download links:
We recommend that you download the latest software version.
Perform the following steps as the system user that deployed OBD. In this example, the admin
user is used.
-
Run the following command to disable remote repositories:
obd mirror disable remote
Run the
obd mirror list
command to confirm whether the remote repositories are disabled. If the values of the remote repositories in theEnabled
column are changed toFalse
, the remote image sources are disabled. -
In the directory where the installation package is located, run the following command to upload the installation package to the local repository.
obd mirror clone *.rpm
-
View the list of installation packages in the local repository.
obd mirror list local
If the desired installation package is in the list, the installation package is uploaded.