Linux上OcenBase单机版部署及基本信息查询

 OceanBase单机版部署可以通过在线和离线两种方式部署。在线部署可以通过yum源或者apt源部署,直接拉取官方源码即可。实际使用中,大部分环境连不了外网,本文介绍离线方式安装。

  下载“OceanBase All in One”离线安装包下载官方地址:https://www.oceanbase.com/softwarecenter?_gl=1*14gauzt*_ga*MTQzNzg0MDI0Ny4xNzEzMzM4MzYx*_ga_T35KTM57DZ*MTcxNDU3NTk5OC4yMy4xLjE3MTQ1NzY3MzAuNTguMC4w

1. 解压安装包

[root@tidb01 db_ob]# ll
-rwxr-xr-x 1 root root 692947447 May 1 19:23 oceanbase-all-in-one-4.3.0.1-100000242024032211.el7.x86_64.tar.gz
[root@tidb01 db_ob]# tar -xzvf oceanbase-all-in-one-4.3.0.1-100000242024032211.el7.x86_64.tar.gz
[root@tidb01 db_ob]# ll
total 676708
drwxr-xr-x 6 root root 88 Mar 29 11:46 oceanbase-all-in-one
-rwxr-xr-x 1 root root 692947447 May 1 19:23 oceanbase-all-in-one-4.3.0.1-100000242024032211.el7.x86_64.tar.gz

2. 一键部署并添加到系统环境变量

[root@tidb01 db_ob]# cd oceanbase-all-in-one/bin/
[root@tidb01 bin]# ./install.sh
[root@tidb01 bin]# source ~/.oceanbase-all-in-one/bin/env.sh
[root@tidb01 bin]# obd demo

3. 连接数据库

#通过2881端口直连数据库
[root@tidb01 ~]# obclient -h127.0.0.1 -P2881 -uroot@sys -Doceanbase -A
Welcome to the OceanBase. Commands end with ; or \g.
Your OceanBase connection id is 3221497482
Server version: OceanBase_CE 4.3.0.1 (r100000242024032211-0193a343bc60b4699ec47792c3fc4ce166a182f9) (Built Mar 22 2024 13:19:48)

Copyright (c) 2000, 2018, OceanBase and/or its affiliates. All rights reserved.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

obclient [oceanbase]>

#通过ODP代理访问数据库
[root@tidb01 ~]# obclient -h127.0.0.1 -P2883 -uroot@sys -Doceanbase -A
Welcome to the OceanBase. Commands end with ; or \g.
Your OceanBase connection id is 1815347202
Server version: OceanBase_CE 4.3.0.1 (r100000242024032211-0193a343bc60b4699ec47792c3fc4ce166a182f9) (Built Mar 22 2024 13:19:48)

Copyright (c) 2000, 2018, OceanBase and/or its affiliates. All rights reserved.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

obclient [oceanbase]>

4. 查询数据库版本、字符集等基本信息

obclient [oceanbase]> SELECT VERSION();
+------------------------------+
| VERSION() |
+------------------------------+
| 5.7.25-OceanBase_CE-v4.3.0.1 |
+------------------------------+
1 row in set (0.002 sec)

obclient [oceanbase]>

#查看字符集
obclient [oceanbase]> SHOW SESSION VARIABLES LIKE 'character\_set\_%';
+--------------------------+---------+
| Variable_name | Value |
+--------------------------+---------+
| character_set_client | utf8mb4 |
| character_set_connection | utf8mb4 |
| character_set_database | utf8mb4 |
| character_set_filesystem | binary |
| character_set_results | utf8mb4 |
| character_set_server | utf8mb4 |
| character_set_system | utf8mb4 |
+--------------------------+---------+
7 rows in set (0.003 sec)
obclient [oceanbase]> SHOW SESSION VARIABLES LIKE 'collation\_%';
+----------------------+--------------------+
| Variable_name | Value |
+----------------------+--------------------+
| collation_connection | utf8mb4_general_ci |
| collation_database | utf8mb4_general_ci |
| collation_server | utf8mb4_general_ci |
+----------------------+--------------------+
3 rows in set (0.003 sec

相关推荐

  1. LinuxOcenBase单机部署基本信息查询

    2024-05-05 00:38:02       36 阅读
  2. 通过docker容器部署oceanbase单机测试

    2024-05-05 00:38:02       40 阅读
  3. Linux基本指令查询硬件信息001

    2024-05-05 00:38:02       32 阅读
  4. OceanBase社区手动部署单副本集群OBProxy

    2024-05-05 00:38:02       32 阅读
  5. linux信息查询

    2024-05-05 00:38:02       33 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-05-05 00:38:02       94 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-05-05 00:38:02       100 阅读
  3. 在Django里面运行非项目文件

    2024-05-05 00:38:02       82 阅读
  4. Python语言-面向对象

    2024-05-05 00:38:02       91 阅读

热门阅读

  1. Jar Summery 2 Linux Service Configure Example

    2024-05-05 00:38:02       32 阅读
  2. VBA 拆分Excel中的各sheet为文件

    2024-05-05 00:38:02       35 阅读
  3. 【代码随想录】day48

    2024-05-05 00:38:02       36 阅读
  4. 代码随想录leetcode200题之数组

    2024-05-05 00:38:02       35 阅读
  5. 品味酱香酒与浓香酒,选择最适合您的白酒

    2024-05-05 00:38:02       29 阅读
  6. 每日一练算法

    2024-05-05 00:38:02       31 阅读
  7. 绕过Windows 11的安装门槛

    2024-05-05 00:38:02       35 阅读
  8. Ubuntu22安装docker

    2024-05-05 00:38:02       33 阅读