vmware 17.6
系统: openEuler22.03 LTS
4核8G,磁盘50,没装别的东西
安装操作
sudo groupadd admin
# 创建 admin 用户并加入 admin 组
sudo useradd -g admin admin
# 设置 admin 用户密码(可选)
sudo passwd admin
# 配置admin sudo权限
sudo visudo
## 允许 admin 用户免密码执行所有命令(适合测试环境)
admin ALL=(ALL) NOPASSWD: ALL
su - admin
sudo rpm -ivh oceanbase-ce-libs-4.3.5.1-101000042025031818.el7.x86_64.rpm
sudo rpm -ivh oceanbase-ce-4.3.5.1-101000042025031818.el7.x86_64.rpm
vi /etc/oceanbase.cnf
# The IP can only be configured during the initial startup.
# By default, the IP is set to the output of hostname -i unless specified otherwise.
# To modify the observer IP after startup, you must uninstall OceanBase and remove the data directory.
# Afterward, you can reinstall and launch OceanBase with the new IP address.
# For instance, to set the observer IP to 127.0.0.1, you would use the line:
# ip=127.0.0.1
mysql_port=2881
rpc_port=2882
obshell_port=2886
root_pwd="ewq@123456"
redo_dir=/var/lib/oceanbase/redo
data_dir=/var/lib/oceanbase/data
datafile_size=2G
datafile_next=2G
datafile_maxsize=20G
cpu_count=0
memory_limit=6G
system_memory=1G
log_disk_size=13G
enable_syslog_wf=false
enable_syslog_recycle=true
max_syslog_file_count=4
__min_full_resource_pool_memory=1073741824
然后启动
sudo systemctl start oceanbase
…然后就一直等待,半个钟都没结果,新开终端,查看端口又占用着了
[admin@linux ~]$ netstat -netlp
(No info could be read for "-p": geteuid()=1000 but you should be root.)
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State User Inode PID/Program name
tcp 0 0 0.0.0.0:2881 0.0.0.0:* LISTEN 0 31431 -
tcp 0 0 0.0.0.0:2882 0.0.0.0:* LISTEN 0 31425 -
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 0 21644 -
tcp6 0 0 :::2882 :::* LISTEN 0 31428 -
tcp6 0 0 :::2886 :::* LISTEN 0 31279 -
tcp6 0 0 :::22 :::* LISTEN 0 21646 -
[admin@linux ~]$
启动的终端,一直卡着,然后我ctrl+C终止,端口还占用着
[admin@linux ~]$ sudo systemctl start oceanbase
^C
[admin@linux ~]$
[admin@linux ~]$
[admin@linux ~]$ sudo systemctl stop oceanbase
sudo systemctl stop oceanbase 也停不掉,没任何反应,只能重启机器,重启后再启动,又是这样,100%复现,端口开起来了数据库是可以连接,要不我直接把数据库杀了?还是每次重启就重启机器好了…
[root@linux ~]# sudo systemctl status oceanbase
● oceanbase.service - oceanbase
Loaded: loaded (/etc/systemd/system/oceanbase.service; disabled; vendor preset: disabled)
Active: active (running) since Thu 2025-04-24 16:22:31 CST; 16s ago
Process: 2448 ExecStart=/bin/bash /home/admin/oceanbase/profile/oceanbase-service.sh start (code=exited, status=0/SUCCESS)
Main PID: 3262 (observer)
Tasks: 325 (limit: 47170)
Memory: 1.9G
CGroup: /system.slice/oceanbase.service
├─ 3028 /home/admin/oceanbase/bin/obshell daemon --ip 192.168.12.11 --port 2886
├─ 3049 /home/admin/oceanbase/bin/obshell server --ip 192.168.12.11 --port 2886
└─ 3262 /home/admin/oceanbase/bin/observer -c 1 -d /home/admin/oceanbase/store -n ob -I 192.168.12.11 -p 2881 -P 2882 -z zone1 -o cpu_count=0,memory_limit=6G,system_memory=1G,datafi>
4月 24 16:22:13 linux bash[2448]: the response state is RUNNING
4月 24 16:22:13 linux bash[2448]: wait 6s and the retry
4月 24 16:22:19 linux bash[2448]: the response state is RUNNING
4月 24 16:22:19 linux bash[2448]: wait 6s and the retry
4月 24 16:22:25 linux bash[2448]: the response state is RUNNING
4月 24 16:22:25 linux bash[2448]: wait 6s and the retry
4月 24 16:22:31 linux systemd[1]: /etc/systemd/system/oceanbase.service:7: Unit configured to use KillMode=none. This is unsafe, as it disables systemd's process lifecycle management for the ser>
4月 24 16:22:31 linux bash[2448]: the response state is SUCCEED
4月 24 16:22:31 linux bash[2448]: start observer request successfully
4月 24 16:22:31 linux systemd[1]: Started oceanbase.
然后我想用docekr部署,但是一映射数据卷就无法正常启动
[Bug]: docker映射数据卷无法启动 · Issue #56 · oceanbase/docker-images