yum一键安装单机oceanbase报错

–创建用户
useradd admin
passwd admin

–允许用户在不输入该用户的密码的情况下使用所有命令
vi /etc/sudoers
root ALL=(ALL) ALL
admin ALL=(ALL) ALL

–切换到admin用户
su - admin

–一键安装最新的 OceanBase LTS 版本
sudo bash -c “$(curl -s https://obcommunityprod.oss-cn-shanghai.aliyuncs.com/download-center/opensource/oceanbase/x3/installer.sh)”

安装最后提示如下报错:

另开一个窗口,查看一下进程信息

ps -ef |grep observer

另外查看一下监听

netstat -ntlp

查看一下内存

free -h

查看一下文件系统

df -h

[root@localhost ~]# free -h
total used free shared buff/cache available
Mem: 7.8G 1.9G 4.7G 11M 1.2G 5.6G
Swap: 2.0G 0B 2.0G
[root@localhost ~]# df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 3.9G 0 3.9G 0% /dev
tmpfs 3.9G 0 3.9G 0% /dev/shm
tmpfs 3.9G 12M 3.9G 1% /run
tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
/dev/mapper/centos-root 38G 18G 21G 47% /
/dev/sda1 497M 131M 367M 27% /boot
tmpfs 797M 0 797M 0% /run/user/0
[root@localhost ~]# ps -ef | grep observer
root 2543 1 26 17:11 ? 00:01:10 /home/admin/oceanbase/bin/observer -c 1 -z zone1 -p 2881 -n ob -d /home/admin/oceanbase/store -I 192.168.40.53 -P 2882 -o __min_full_resource_pool_memory=1073741824,datafile_maxsize=20G,datafile_next=2G,cpu_count=16,enable_syslog_recycle=true,log_disk_size=13G,max_syslog_file_count=4,memory_limit=6G,datafile_size=2G,enable_syslog_wf=false,system_memory=1G
root 3827 1332 0 17:15 pts/1 00:00:00 grep --color=auto observer
[root@localhost ~]# systemctl status oceanbase
● oceanbase.service - oceanbase
Loaded: loaded (/etc/systemd/system/oceanbase.service; disabled; vendor preset: disabled)
Active: active (running) since Sat 2024-06-22 17:13:03 CST; 3min 10s ago
Process: 1884 ExecStart=/bin/bash /home/admin/oceanbase/profile/oceanbase-service.sh start (code=exited, status=0/SUCCESS)
Main PID: 2543 (observer)
CGroup: /system.slice/oceanbase.service
├─2437 /home/admin/oceanbase/bin/obshell daemon --ip 192.168.40.53 --port 2886
├─2452 /home/admin/oceanbase/bin/obshell server --ip 192.168.40.53 --port 2886
└─2543 /home/admin/oceanbase/bin/observer -c 1 -z zone1 -p 2881 -n ob -d /home/admin/oceanbase/store -I 192.168.40.53 -P 2882 -o __min_full_resource_pool_memory=1073741824,datafile_maxsize=20G,datafile_next=2G,cpu_count=16…

Jun 22 17:12:37 localhost.localdomain bash[1884]: wait 6s and the retry
Jun 22 17:12:43 localhost.localdomain bash[1884]: the response state is RUNNING
Jun 22 17:12:43 localhost.localdomain bash[1884]: wait 6s and the retry
Jun 22 17:12:49 localhost.localdomain bash[1884]: the response state is RUNNING
Jun 22 17:12:49 localhost.localdomain bash[1884]: wait 6s and the retry
Jun 22 17:12:55 localhost.localdomain bash[1884]: the response state is RUNNING
Jun 22 17:12:55 localhost.localdomain bash[1884]: wait 6s and the retry
Jun 22 17:13:01 localhost.localdomain bash[1884]: the response state is SUCCEED
Jun 22 17:13:01 localhost.localdomain bash[1884]: start observer request successfully
Jun 22 17:13:03 localhost.localdomain systemd[1]: Started oceanbase.

[root@localhost ~]# netstat -ntlp
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 1024/sshd
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 1161/master
tcp 0 0 0.0.0.0:2881 0.0.0.0:* LISTEN 2543/observer
tcp 0 0 0.0.0.0:2882 0.0.0.0:* LISTEN 2543/observer
tcp 0 0 192.168.40.53:2886 0.0.0.0:* LISTEN 2452/obshell
tcp6 0 0 :::22 :::* LISTEN 1024/sshd
tcp6 0 0 ::1:25 :::* LISTEN 1161/master

这些命令结果用markdown 的引用语法 引用起来,会好看一下。

free 命令显示主机只有 8G 不到的内存,实际可用内存就更小了,这个内存太小基本上很难成功。
你要把这个 ob 服务停掉,然后释放掉主机上不必要进程的内存,确保 available 内存能达到 7G ,那还有希望成功。

如果有条件扩容内存到 12G+ 就扩容一下,减少不必要的折腾。

软硬件要求

https://www.oceanbase.com/docs/common-oceanbase-database-cn-1000000000819092


可是我这环境都2核8G了,除了oceanbase其他啥服务都没有,就是一个新的测试服务器

内存最低6G-8G 不一定机器必须是8G 把机器资源调整下把,建议16G以上
其中安装包也是需要占内存的。不一定只要部署ob会占内存,其中也包括其他环境资源的。

磁盘空间是30G+ 也可以扩一下。