This topic describes how to install OceanBase Diagnostic Tool (obdiag).
Environment requirements
The server where obdiag is to be installed runs on Linux.
Prerequisites
To collect fault information, inspect a cluster, perform root cause analysis, analyze logs online, and perform online end-to-end diagnostics, network access must be available between the server where obdiag is to be installed and the hosts of the target OceanBase cluster whose information is to be collected.
Procedure
You can use obdiag independently or in combination with OceanBase Deployer (obd).
Method 1: Use obdiag independently
If the cluster to be diagnosed is not deployed by using obd, you can run the following commands to install and deploy obdiag:
Online deployment (when Internet access is available)
sudo yum install -y yum-utils sudo yum-config-manager --add-repo https://mirrors.aliyun.com/oceanbase/OceanBase.repo sudo yum install -y oceanbase-diagnostic-tool sh /usr/local/oceanbase-diagnostic-tool/init.shNote
The online deployment method is supported on CentOS 7 and 8. If you use CentOS 9, perform the following operations for offline deployment.
Offline deployment (when Internet access is unavailable): Download the obdiag package from OceanBase Download Center.
yum localinstall -y oceanbase-diagnostic-tool*.rpm sh /usr/local/oceanbase-diagnostic-tool/init.shDeployment on a Debian-based system, such as Ubuntu: Download the obdiag package from OceanBase Download Center.
apt-get update apt-get install alien -y alien --scripts --to-deb oceanbase-diagnostic-tool*.rpm # Convert the RPM package to a DEB package. dpkg -i oceanbase-diagnostic-tool*.deb sh /usr/local/oceanbase-diagnostic-tool/init.shNote
Package conversion is supported in Alien 8.95.0 and earlier. We recommend that you use the native image of Debian 10.
Method 2: Use obdiag in combination with obd
If the cluster to be diagnosed is deployed by using obd, we recommend that you upgrade obd to V2.5.0 or later. Then, you can directly run obdiag commands on obd without the need to configure the ~/.obdiag/config.yml file. For more information about the commands, see obdiag commands.
Online deployment (when Internet access is available)
# Enable obd to pull remote images obd mirror enable remote # Deploy obdiag by using obd obd obdiag deployOffline deployment (when Internet access is unavailable)
Download the obdiag package from OceanBase Download Center.
# Copy the offline obdiag package to the image repository of obd obd mirror clone oceanbase-diagnostic-tool-xxxxxxxx.rpm # Deploy obdiag by using obd obd obdiag deploy