92 lines
5.2 KiB
Markdown
92 lines
5.2 KiB
Markdown
---
|
|
|
|
slug: /agent-commands
|
|
---
|
|
|
|
# obshell agent commands
|
|
|
|
This topic describes the obshell agent commands, which are used to manage obshell. You can use the `-h`/`--help` option in a command to view the help information of the command. For example, `obshell agent start -h --seekdb` is used to view the help information of the `start` command for seekdb. `--seekdb` indicates that the help information of the `start` command for seekdb is to be viewed.
|
|
|
|
## obshell agent start
|
|
|
|
Use this command to start obshell.
|
|
|
|
```shell
|
|
obshell agent start [-P] [--password] [--seekdb] [--base-dir] [-6]
|
|
|
|
# example
|
|
obshell agent start -P 2886 --base-dir /var/lib/oceanbase
|
|
```
|
|
|
|
The following table describes the options.
|
|
|
|
| Option | Required | Data type | Default value | Description |
|
|
| --- | --- | --- | --- | --- |
|
|
| -P/--port | No | int | 2886 | The port number to which the obshell is bound. |
|
|
| --password | No | string | N/A | This option is used only for taking over a seekdb instance. When you take over a seekdb instance, you must use this option to specify the password of the root user of the seekdb instance. You can also specify the root user password by using the `OB_ROOT_PASSWORD` environment variable. |
|
|
| --seekdb | No | N/A | N/A | This option does not require a value. If you specify this option, the command applies to seekdb. If you specify `--base-dir`, you can omit `--seekdb`. |
|
|
| --base-dir | No | string | N/A | The working directory of obshell. It must be consistent with the working directory of the corresponding seekdb instance. If you do not specify this option, the default value is the current directory. |
|
|
| -6/--use-ipv6 | No | N/A | N/A | This option does not require a value. If you specify this option, IPv6 is used. |
|
|
|
|
## obshell agent stop
|
|
|
|
Use this command to stop obshell.
|
|
|
|
```shell
|
|
obshell agent stop [--port] [--seekdb] [-6]
|
|
|
|
# example
|
|
obshell agent stop --seekdb --port 2886
|
|
```
|
|
|
|
The following table describes the options.
|
|
|
|
| Option | Required | Data type | Default value | Description |
|
|
| --- | --- | --- | --- | --- |
|
|
| --port | No | int | 2886 | The port number of obshell. If you do not want to specify the port number by using this option, you can specify the obshell port by using the `OBSHELL_PORT_FOR_SEEKDB` environment variable. |
|
|
| --seekdb | No | N/A | N/A | This option does not require a value. If you specify this option, the command applies to seekdb. |
|
|
| -6/--use-ipv6 | No | N/A | N/A | This option does not require a value. If you specify this option, IPv6 is used. |
|
|
|
|
## obshell agent restart
|
|
|
|
Use this command to restart obshell.
|
|
|
|
```shell
|
|
obshell agent restart [-P] [--password] [--seekdb] [-6]
|
|
|
|
# example
|
|
obshell agent restart --seekdb --port 2886
|
|
```
|
|
|
|
The following table describes the options.
|
|
|
|
| Option | Required | Data type | Default value | Description |
|
|
| --- | --- | --- | --- | --- |
|
|
| -P/--port | No | int | 2886 | The port number to which the obshell is bound. |
|
|
| --password | No | string | N/A | This option is used only for taking over a seekdb instance. When you take over a seekdb instance, you must use this option to specify the password of the root user of the seekdb instance. You can also specify the root user password by using the `OB_ROOT_PASSWORD` environment variable. |
|
|
| --seekdb | No | N/A | N/A | This option does not require a value. If you specify this option, the command applies to seekdb. |
|
|
| -6/--use-ipv6 | No | N/A | N/A | This option does not require a value. If you specify this option, IPv6 is used. |
|
|
|
|
## Upgrade obshell
|
|
|
|
You can run this command to upgrade obshell.
|
|
|
|
```shell
|
|
obshell agent upgrade -d [-V] [-t] [--port] [--seekdb] [-6] [-y] [-v]
|
|
|
|
# example
|
|
obshell agent upgrade -d /home/oceanbase/upgrade/ -V 4.2.2.0-20231224224959 --port 2886 --seekdb
|
|
```
|
|
|
|
The following table describes the options.
|
|
|
|
| Option | Required | Data type | Default value | Description |
|
|
| --- | --- | --- | --- | --- |
|
|
| -d/--pkg_directory | Yes | string | N/A | The path where the upgrade package is stored. |
|
|
| -V/--target_version | No | string | N/A | The target version. The value must be in the correct format, such as `4.2.2.0` or `4.2.2.0-20231224224959`. If you do not specify this option, the highest version of the obshell RPM package in the directory specified by the `-d` option is selected. |
|
|
| -t/--tmp_directory | No | string | `${home_path}`/upgrade | The temporary directory for the upgrade process. This directory stores the downloaded installation package and all files generated during the decompression and installation process. The value must be an absolute path. |
|
|
| --port | No | int | 2886 | The port number of obshell. If you do not specify this option, you can specify the obshell port by setting the `OBSHELL_PORT_FOR_SEEKDB` environment variable. |
|
|
| --seekdb | No | N/A | N/A | This option does not require a value. If you specify this option, the command is applied to seekdb. |
|
|
| -6/--use-ipv6 | No | N/A | N/A | This option does not require a value. If you specify this option, IPv6 is used. |
|
|
| -y/--yes | No | N/A | N/A | This option does not require a value. If you specify this option, the system does not prompt you for confirmation when it performs an upgrade. |
|
|
| -v/--verbose | No | N/A | N/A | This option does not require a value. If you specify this option, the system displays detailed execution information. | |