After you install obd, you can execute the obd demo or obd perf command to quickly deploy a single-node OceanBase Database locally.
Note
The operations in this topic are only for quick experience. For more information about how to deploy OceanBase Database in a production environment, see Deploy an OceanBase cluster by using the graphical interface.
Prerequisites
Before you start, make sure that you meet the following conditions:
If you deploy OceanBase Database on an x86 server, make sure that the OBServer node supports the AVX instruction set. You can execute the
lscpu | grep Flags | grep avxcommand to check whether the AVX instruction set is supported.Note
If you use an x86 server, the AVX instruction set is not required for OceanBase Database of the following versions:
- V4.2.5.6 or later for V4.2.x
- V4.3.5.4 or later for V4.3.x
- V4.4.1.0 or later for V4.4.x
If you deploy OceanBase Database on an ARM server in an offline environment, make sure that the OBServer node supports the LSE instruction set. You can execute the
lscpu | grep Flags | grep atomicscommand to check whether the LSE instruction set is supported. If the LSE instruction set is not supported, you need to download an OceanBase Database installation package with thenonlseoption and use theobd mirror clonecommand to upload the package to the local obd image library.Note
The OceanBase Database installation package with the
nonlseoption is not included in the OceanBase All-in-One package.You have installed obd. We recommend that you install the latest version. For more information, see Install obd.
Note
We recommend that you install obd by using the OceanBase All-in-One package. The OceanBase All-in-One package contains all the components required for deployment (except the obbinlog component). The components have been tested for compatibility with each other and are the officially recommended versions.
The default ports of the deployment components are not occupied.
If you deploy only OceanBase Database, you need at least 2 vCPUs, 6 GB of memory, and 20 GB of disk space. Note that the memory limit refers to the value in the
availablecolumn of the output obtained by executing thefree -gcommand.If you deploy the default components, you need at least 2 vCPUs, 6 GB of memory, and 25 GB of disk space. Note that the memory limit refers to the value in the
availablecolumn of the output obtained by executing thefree -gcommand.If you deploy all components, you need at least 4 vCPUs, 10 GB of memory, and 25 GB of disk space. We recommend that you use 16 GB or more of memory. Note that the memory limit refers to the value in the
availablecolumn of the output obtained by executing thefree -gcommand.Your server can access the Internet, or the local obd image library contains the required installation packages.
You can execute the
obd mirror list localcommand to view the installation packages in the local image library. If you install obd by using the OceanBase All-in-One package, the local image library contains the installation packages of all the components required for deployment.
Note
When the number of CPU cores is small, the minimum CPU count is set to 8 by default. A low CPU count will negatively affect the performance of OceanBase Database.
For more information about the
obd demoandobd perfcommands, see the documentation Quick deployment commands.
Examples
Deploy the Community Edition of OceanBase Database in the minimum specification
obd demo -c oceanbase-ceDeploy the Community Edition of OceanBase Database in the maximum specification
obd perf -c oceanbase-ceDeploy the default components in the minimum specification
After you execute the
obd democommand, the Community Edition of OceanBase Database, the Community Edition of OBProxy, OBAgent, Prometheus, and Grafana are automatically deployed. The default versions are the latest versions in the image library.obd demoDeploy the default components in the maximum specification and specify the OceanBase Database version
After you execute the
obd perfcommand, the Community Edition of OceanBase Database, the Community Edition of OBProxy, OBAgent, Prometheus, and Grafana are automatically deployed. The default versions are the latest versions in the image library. In this example, the OceanBase Database version is specified as V4.3.3.0.obd perf --oceanbase-ce.version=4.3.3.0
After the deployment is successful, copy the connection string from the output and use the OBClient client to connect to OceanBase Database. Here is an example:
obclient -h127.0.0.1 -P2881 -uroot@sys -p'*******' -Doceanbase -A
