OB社区版3.1安装记录
yum install -y yum-utils
[root@ecs-80f4 ~]# yum-config-manager --add-repo https://mirrors.aliyun.com/oceanbase/OceanBase.repo
Loaded plugins: fastestmirror
adding repo from: https://mirrors.aliyun.com/oceanbase/OceanBase.repo
grabbing file https://mirrors.aliyun.com/oceanbase/OceanBase.repo to /etc/yum.repos.d/OceanBase.repo
repo saved to /etc/yum.repos.d/OceanBase.repo
[root@ecs-80f4 ~]# df -lh
Filesystem Size Used Avail Use% Mounted on
devtmpfs 7.8G 0 7.8G 0% /dev
tmpfs 7.8G 0 7.8G 0% /dev/shm
tmpfs 7.8G 8.7M 7.8G 1% /run
tmpfs 7.8G 0 7.8G 0% /sys/fs/cgroup
/dev/vda1 197G 2.3G 187G 2% /
tmpfs 1.6G 0 1.6G 0% /run/user/0
[root@ecs-80f4 ~]#
mkdir -p /tools/rpm
cd /tools/rpm
cat > rpm_list <<EOF
oceanbase-ce-3.1.0-1.el7.x86_64.rpm
oceanbase-ce-libs-3.1.0-1.el7.x86_64.rpm
obproxy-3.1.0-1.el7.x86_64.rpm
EOF
wget -B https://mirrors.aliyun.com/oceanbase/community/stable/el/7/x86_64/ -i rpm_list -P rpm
[root@ecs-80f4 rpm]# useradd admin
[root@ecs-80f4 rpm]# mkdir -p /data
[root@ecs-80f4 rpm]# chown -R admin:admin /data
[root@ecs-80f4 rpm]# ll /
total 76
lrwxrwxrwx. 1 root root 7 Feb 26 16:10 bin -> usr/bin
dr-xr-xr-x. 5 root root 4096 Aug 23 23:19 boot
drwxr-xr-x 7 root root 4096 Feb 26 16:37 CloudResetPwdUpdateAgent
drwxr-xr-x 6 root root 4096 Feb 26 16:37 CloudrResetPwdAgent
drwxr-xr-x 2 admin admin 4096 Aug 23 23:52 data
drwxr-xr-x 19 root root 3020 Aug 23 23:19 dev
drwxr-xr-x. 76 root root 4096 Aug 23 23:52 etc
drwxr-xr-x. 3 root root 4096 Aug 23 23:52 home
lrwxrwxrwx. 1 root root 7 Feb 26 16:10 lib -> usr/lib
lrwxrwxrwx. 1 root root 9 Feb 26 16:10 lib64 -> usr/lib64
drwx------. 2 root root 16384 Feb 26 16:09 lost+found
drwxr-xr-x. 2 root root 4096 Apr 11 2018 media
drwxr-xr-x. 2 root root 4096 Apr 11 2018 mnt
drwxr-xr-x. 2 root root 4096 Apr 11 2018 opt
dr-xr-xr-x 140 root root 0 Aug 23 23:19 proc
dr-xr-x---. 4 root root 4096 Aug 23 23:19 root
drwxr-xr-x 24 root root 640 Aug 23 23:46 run
lrwxrwxrwx. 1 root root 8 Feb 26 16:10 sbin -> usr/sbin
drwxr-xr-x. 2 root root 4096 Apr 11 2018 srv
dr-xr-xr-x 13 root root 0 Aug 23 23:19 sys
drwxrwxrwt. 11 root root 4096 Aug 23 23:50 tmp
drwxr-xr-x 3 root root 4096 Aug 23 23:50 tools
drwxr-xr-x. 13 root root 4096 Feb 26 16:10 usr
drwxr-xr-x. 19 root root 4096 Feb 26 16:24 var
[root@ecs-80f4 rpm]#
[root@ecs-80f4 rpm]# rpm -ivh rpm/*
warning: rpm/obproxy-3.1.0-1.el7.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID e9b4a7aa: NOKEY
Preparing... ################################# [100%]
Updating / installing...
1:oceanbase-ce-libs-3.1.0-1.el7 ################################# [ 33%]
2:oceanbase-ce-3.1.0-1.el7 ################################# [ 67%]
3:obproxy-3.1.0-1.el7 ################################# [100%]
[root@ecs-80f4 rpm]#
[root@ecs-80f4 rpm]# rpm -ql oceanbase-ce-3.1.0-1.el7.x86_64
/home/admin/oceanbase
/home/admin/oceanbase/bin
/home/admin/oceanbase/bin/import_time_zone_info.py
/home/admin/oceanbase/bin/observer
/home/admin/oceanbase/etc
/home/admin/oceanbase/etc/timezone_V1.log
[root@ecs-80f4 rpm]# rpm -ql obproxy-3.1.0-1.el7
/home/admin/obproxy-3.1.0/bin
/home/admin/obproxy-3.1.0/bin/obproxy
/home/admin/obproxy-3.1.0/bin/obproxyd.sh
[root@ecs-80f4 rpm]#
[root@ecs-80f4 rpm]# su - admin
[admin@ecs-80f4 ~]$ mkdir -p /data/observer01/store/{sort_dir,sstable,clog,ilog,slog}
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/admin/oceanbase/lib/
cd /data/observer01 && /home/admin/oceanbase/bin/observer -r 192.168.1.164:2882:2881 -o __min_full_resource_pool_memory=268435456,memory_limit=8G,system_memory=4G,stack_size=512K,cpu_count=8,cache_wash_threshold=1G,workers_per_cpu_quota=10,schema_history_expire_time=1d,net_thread_count=4,sys_bkgd_migration_retry_num=3,minor_freeze_times=10,enable_separate_sys_clog=0,enable_merge_by_turn=False,datafile_size=50G,enable_syslog_recycle=True,max_syslog_file_count=10 -z zone1 -p 2881 -P 2882 -c 1 -d /data/observer01/store -i eth0 -l INFO
[admin@ecs-80f4 observer01]$ cd /data/observer01 && /home/admin/oceanbase/bin/observer -r 192.168.1.164:2882:2881 -o __min_full_resource_pool_memory=268435456,memory_limit=8G,system_memory=4G,stack_size=512K,cpu_count=8,cache_wash_threshold=1G,workers_per_cpu_quota=10,schema_history_expire_time=1d,net_thread_count=4,sys_bkgd_migration_retry_num=3,minor_freeze_times=10,enable_separate_sys_clog=0,enable_merge_by_turn=False,datafile_size=50G,enable_syslog_recycle=True,max_syslog_file_count=10 -z zone1 -p 2881 -P 2882 -c 1 -d /data/observer01/store -i eth0 -l INFO
/home/admin/oceanbase/bin/observer -r 192.168.1.164:2882:2881 -o __min_full_resource_pool_memory=268435456,memory_limit=8G,system_memory=4G,stack_size=512K,cpu_count=8,cache_wash_threshold=1G,workers_per_cpu_quota=10,schema_history_expire_time=1d,net_thread_count=4,sys_bkgd_migration_retry_num=3,minor_freeze_times=10,enable_separate_sys_clog=0,enable_merge_by_turn=False,datafile_size=50G,enable_syslog_recycle=True,max_syslog_file_count=10 -z zone1 -p 2881 -P 2882 -c 1 -d /data/observer01/store -i eth0 -l INFO
rs list: 192.168.1.164:2882:2881
optstr: __min_full_resource_pool_memory=268435456,memory_limit=8G,system_memory=4G,stack_size=512K,cpu_count=8,cache_wash_threshold=1G,workers_per_cpu_quota=10,schema_history_expire_time=1d,net_thread_count=4,sys_bkgd_migration_retry_num=3,minor_freeze_times=10,enable_separate_sys_clog=0,enable_merge_by_turn=False,datafile_size=50G,enable_syslog_recycle=True,max_syslog_file_count=10
zone: zone1
mysql port: 2881
rpc port: 2882
cluster id: 1
data_dir: /data/observer01/store
devname: eth0
log level: INFO
[2021-08-24 00:00:42.511480] ERROR [LIB] pidfile_test (utility.cpp:1153) [8502][0][Y0-0000000000000000] [lt=0] fid file doesn't exist(pidfile="run/observer.pid") BACKTRACE:0x90a107e 0x90008fb 0x24c152f 0x251bb2d 0x90a6215 0x24be1a8 0x7fb0080b3555 0x24bd4e9
[admin@ecs-80f4 observer01]$
[admin@ecs-80f4 observer01]$
[admin@ecs-80f4 observer01]$ ps -ef|grep observer
admin 8503 1 99 00:00 ? 00:00:47 /home/admin/oceanbase/bin/observer -r 192.168.1.164:2882:2881 -o __min_full_resource_pool_memory=268435456,memory_limit=8G,system_memory=4G,stack_size=512K,cpu_count=8,cache_wash_threshold=1G,workers_per_cpu_quota=10,schema_history_expire_time=1d,net_thread_count=4,sys_bkgd_migration_retry_num=3,minor_freeze_times=10,enable_separate_sys_clog=0,enable_merge_by_turn=False,datafile_size=50G,enable_syslog_recycle=True,max_syslog_file_count=10 -z zone1 -p 2881 -P 2882 -c 1 -d /data/observer01/store -i eth0 -l INFO
admin 9080 8463 0 00:01 pts/2 00:00:00 grep --color=auto observer
[admin@ecs-80f4 observer01]$
[admin@ecs-80f4 observer01]$ netstat -ntlp
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN -
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:2881 0.0.0.0:* LISTEN 8503/observer
tcp 0 0 0.0.0.0:2882 0.0.0.0:* LISTEN 8503/observer
tcp6 0 0 :::22 :::* LISTEN -
tcp6 0 0 ::1:25 :::* LISTEN -
[admin@ecs-80f4 observer01]$
[root@ecs-80f4 rpm]# rpm -ivh obclient-1.2.3-20200814145858.el7.alios7.x86_64.rpm
Preparing... ################################# [100%]
Updating / installing...
1:obclient-1.2.3-20200814145858.el7################################# [100%]
[root@ecs-80f4 rpm]# which obclient
/usr/bin/obclient
[root@ecs-80f4 rpm]#
obclient -h192.168.1.164 -uroot -P2881 -p
[admin@ecs-80f4 ~]$ obclient -h192.168.1.164 -uroot -P2881 -p
Enter password:
Welcome to OceanBase. Commands end with ; or \g.
Your OceanBase connection id is 3221225472
Server version: OceanBase 3.1.0 (r-) (Built May 30 2021 11:21:29)
Copyright (c) 2000, 2020, OceanBase and/or its affiliates. All rights reserved.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
obclient>
set session ob_query_timeout=1000000000;
alter system bootstrap ZONE 'zone1' SERVER '192.168.1.164:2882';
obclient> set session ob_query_timeout=1000000000;
Query OK, 0 rows affected (0.00 sec)
obclient> alter system bootstrap ZONE 'zone1' SERVER '192.168.1.164:2882';
Query OK, 0 rows affected (23.09 sec)
obclient> show databases;
+--------------------+
| Database |
+--------------------+
| oceanbase |
| information_schema |
| mysql |
| SYS |
| LBACSYS |
| ORAAUDITOR |
| test |
+--------------------+
7 rows in set (0.01 sec)
obclient>
obclient> use oceanbase
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
obclient> select * from __all_tenant\G
*************************** 1. row ***************************
gmt_create: 2021-08-24 00:06:39.657761
gmt_modified: 2021-08-24 00:06:39.657761
tenant_id: 1
tenant_name: sys
replica_num: -1
zone_list: zone1
primary_zone: zone1
locked: 0
collation_type: 0
info: system tenant
read_only: 0
rewrite_merge_version: 0
locality: FULL{1}@zone1
logonly_replica_num: 0
previous_locality:
storage_format_version: 0
storage_format_work_version: 0
default_tablegroup_id: -1
compatibility_mode: 0
drop_tenant_time: -1
status: TENANT_STATUS_NORMAL
in_recyclebin: 0
1 row in set (0.00 sec)
obclient>
[admin@ecs-80f4 ~]$ df -lh
Filesystem Size Used Avail Use% Mounted on
devtmpfs 7.8G 0 7.8G 0% /dev
tmpfs 7.8G 0 7.8G 0% /dev/shm
tmpfs 7.8G 8.7M 7.8G 1% /run
tmpfs 7.8G 0 7.8G 0% /sys/fs/cgroup
/dev/vda1 197G 54G 135G 29% /
tmpfs 1.6G 0 1.6G 0% /run/user/0
[admin@ecs-80f4 ~]$
复制
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。
评论
相关阅读
2025年4月国产数据库大事记:4个千万级中标项目诞生!2024年达梦净利3.6亿、金仓净利8006.6万……
墨天轮编辑部
2043次阅读
2025-04-30 17:39:54
2025年4月国产数据库中标情况一览:4个千万元级项目,GaussDB与OceanBase大放异彩!
通讯员
729次阅读
2025-04-30 15:24:06
919万!南航信息中心采购OceanBase数据库软件许可及服务
通讯员
283次阅读
2025-04-29 16:13:34
AI关键场景得到全面支持!OceanBase入选Forrester报告三大领域代表厂商
OceanBase数据库
261次阅读
2025-04-19 22:27:54
1364万!2024年中国联通软研院OceanBase扩容单一来源采购公示
通讯员
180次阅读
2025-04-21 15:55:59
Oceanbase单机版上手示例
潇湘秦
166次阅读
2025-04-18 13:40:24
CloudDM v2.3.0.0 全新发布,支持 OceanBase For Oracle 和 Oracle
ClouGence
133次阅读
2025-04-27 11:04:16
全面进入AI时代|OceanBase 构建智能数据新底座
OceanBase数据库
87次阅读
2025-04-27 16:34:14
OceanBase 单机版可以大批量快速部署吗? YES
AustinDatabases
61次阅读
2025-04-21 10:35:14
鸿门宴讲PostgreSQL -- 被拉去央企救场一天
AustinDatabases
58次阅读
2025-04-24 09:53:40