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

server/2024/10/19 3:35:47/

 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

http://www.ppmy.cn/server/32999.html

相关文章

YOLO系列改进,自研模块助力涨点

目录 一、原理 二、代码 三、添加到YOLOv5中 一、原理 论文地址:

使用独立的 centos 7 安装软件后 commit 为新的镜像并自启动进程

使用独立的 centos 7 安装软件后 commit 为新的镜像,在 dockerfile 里通过添加 CMD ["/usr/sbin/init"] 这个命令来实现程序在容器中的开机自启动,并在 docker run 时添加参数 --privileged 获取容器内真正的 root 权限。 在 docker run 命令…

移动网络学习笔记

移动网络 蜂窝通信移动通信系统大区制和小区制频率复用信道分配方式GSM 数字通信系统承载业务电信业务附加业务系统结构信道类型业务信道控制信道多址方式功率控制越区切换位置管理GPRS3GWCDMACDMA 2000TD-SCDMA4G5G三个应用场景5G的技术指标峰值速率体验速率流量密度连接密度端…

【Nginx 开发】反向代理配置,负载均衡配置,动静分离配置

nginx 配置 反向代理配置负载均衡配置动静分离 反向代理 我们根据实例进行讲解,效果是通过在浏览器访问www.hlh.com,跳转到Linux系统的tomcat主页面中 第一步:在windows系统的host文件进行域名和ip对应关系的配置 在host文件中添加自己的地址映射 192.…

QT, 查看局域网内在线主机的mac地址

如题, QProcess 通过 调用 windows 系统 arp.exe 并解析其获取的数据,得到其mac地址,关键代码如下(从项目中摘取,放心使用): //arp for mac;m_process->start("c:/windows/system32/arp.exe -a "ipAddre…

python在Django中,模板加载器(Template Loaders)是负责查找和加载模板文件的组件

在Django中,模板加载器(Template Loaders)是负责查找和加载模板文件的组件。Django默认使用django.template.loaders.filesystem.Loader和django.template.loaders.app_directories.Loader这两个加载器,它们分别用于从文件系统和D…

003 登录rsa+token

文章目录 rsa加密解密原理密钥存储jwt支持两种类型的签名rsatoken思路使用私钥签名token私钥安全需改善代码sqlUserController.javaLoginUserDto.javaUser.javaJwtInterceptor.javaUserMapper.javaRSAKeyPairGenerator.javaUserServiceImpl.javaJwtUtil.javaR(重复)ResponseCod…

Codeforces Round 943 (Div. 3 ABCDEFG1G2题) 视频讲解

A. Maximize? Problem Statement You are given an integer x x x. Your task is to find any integer y y y ( 1 ≤ y < x ) (1\le y<x) (1≤y<x) such that gcd ⁡ ( x , y ) y \gcd(x,y)y gcd(x,y)y is maximum possible. Note that if there is more tha…