暂无图片
暂无图片
暂无图片
暂无图片
暂无图片
使用 systemd 部署 OceanBase 数据库4.x.txt
210
3页
1次
2025-03-20
5墨值下载
使用 systemd 部署 OceanBase 数据库
声明
本文档操作仅适用于学习或测试场景,请不要应用于生产环境。
逻辑
安装 rpm--->编辑配置文件--->启动数据库
---创建用户
useradd admin
echo admin|passwd --stdin admin
--设置 sudo 权限
cat /etc/sudoers
admin ALL=(ALL) NOPASSWD:ALL ---添加
--安装 ob rpm
[admin@wsxdba Data]$ sudo rpm -ivh oceanbase-ce-libs-4.3.5.0-
100000202024123117.el7.x86_64.rpm
准备中... ################################# [100%]
正在升级/安装...
1:oceanbase-ce-libs-4.3.5.0-1000002################################# [100%]
[admin@wsxdba Data]$
[admin@wsxdba Data]$ sudo rpm -ivh oceanbase-ce-4.3.5.0-
100000202024123117.el7.x86_64.rpm
准备中... ################################# [100%]
execute pre install script
正在升级/安装...
1:oceanbase-ce-4.3.5.0-100000202024 ( 1%)
################################# [100%]
execute post install script
To configure OceanBase : edit /etc/oceanbase.cnf
To start OceanBase : systemctl start oceanbase
To enable OceanBase auto reboot : systemctl enable oceanbase
To get more infomation : https://www.oceanbase.com/docs/common-oceanbase-
database-cn-1000000000640297
--编辑配置文件
sudo mkdir -p /Data/oceanbase/redo
sudo mkdir -p /Data/oceanbase/data
sudo vim /etc/oceanbase.cnf
ip=127.0.0.1
mysql_port=2881
rpc_port=2882
obshell_port=2886
root_pwd=""
redo_dir=/Data/oceanbase/redo
data_dir=/Data/oceanbase/data
datafile_size=2G
datafile_next=1G
datafile_maxsize=30G
cpu_count=8
memory_limit=6G
system_memory=1G
log_disk_size=13G
enable_syslog_wf=true
enable_syslog_recycle=true
max_syslog_file_count=10
__min_full_resource_pool_memory=1073741824
ip=127.0.0.1OceanBase 服务的监听 IP 地址。
mysql_port=2881MySQL 协议的端口号。
rpc_port=2882RPC 通信的端口号。
obshell_port=2886OceanBase Shell 的端口号。
root_pwd=""root 用户的密码,默认为空。
redo_dir=/Data/oceanbase/redoredo 日志的存储目录。
data_dir=/Data/oceanbase/data:数据文件的存储目录。
datafile_size=2G:数据文件的初始大小。
datafile_next=2G:数据文件扩展时每次增加的大小。
datafile_maxsize=20G:数据文件的最大大小。
cpu_count=16:可用的 CPU 核心数量。
memory_limit=6GOceanBase 实例的内存限制。
system_memory=1G:系统保留的内存大小。
log_disk_size=13G:日志磁盘的大小。
enable_syslog_wf=true:是否启用 syslog 的警告和错误日志。
enable_syslog_recycle=true:是否启用 syslog 日志的循环使用。
max_syslog_file_count=10syslog 日志文件的最大数量。
__min_full_resource_pool_memory=1073741824 表示资源池的最小内存限制为 1073741824 字节,
1 GB
--修改 OceanBase 安装目录(默认是 /home/admin/oceanbase)下 etc 目录的属主
sudo chown root /home/admin/oceanbase/etc
[admin@wsxdba ~]$ ls -ld /home/admin/oceanbase/etc
drwxr-sr-x. 2 admin admin 4096 3 20 14:37 /home/admin/oceanbase/etc
[admin@wsxdba ~]$ sudo chown root /home/admin/oceanbase/etc
[admin@wsxdba ~]$ ls -ld /home/admin/oceanbase/etc
drwxr-sr-x. 2 root admin 4096 3 20 14:37 /home/admin/oceanbase/etc
[admin@wsxdba ~]$
--启动数据库
[admin@wsxdba ~]$ sudo systemctl status oceanbase
oceanbase.service - oceanbase
Loaded: loaded (/etc/systemd/system/oceanbase.service; disabled; vendor
preset: disabled)
Active: active (running) since 2025-03-20 15:26:41 CST; 2min 56s ago
Process: 23274 ExecStart=/bin/bash /home/admin/oceanbase/profile/oceanbase-
service.sh start (code=exited, status=0/SUCCESS)
Main PID: 24052 (observer)
Tasks: 360
CGroup: /system.slice/oceanbase.service
├─23881 /home/admin/oceanbase/bin/obshell daemon --ip 127.0.0.1 --port
2886
├─23903 /home/admin/oceanbase/bin/obshell server --ip 127.0.0.1 --port
2886
└─24052 /home/admin/oceanbase/bin/observer -n ob -p 2881 -P 2882 -c 1
-d /home/admin/oceanbase/store -z zone1 -I 127.0.0.1 -...
3 20 15:26:17 wsxdba bash[23274]: wait 6s and the retry
3 20 15:26:23 wsxdba bash[23274]: the response state is RUNNING
3 20 15:26:23 wsxdba bash[23274]: wait 6s and the retry
3 20 15:26:29 wsxdba bash[23274]: the response state is RUNNING
3 20 15:26:29 wsxdba bash[23274]: wait 6s and the retry
3 20 15:26:35 wsxdba bash[23274]: the response state is RUNNING
3 20 15:26:35 wsxdba bash[23274]: wait 6s and the retry
of 3
5墨值下载
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文档的来源(墨天轮),文档链接,文档作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论

关注
最新上传
暂无内容,敬请期待...
下载排行榜
Top250 周榜 月榜