Dict.CN 在线词典, 英语学习, 在线翻译 ------------- MyGitee My腾云code My51cto

Happy_EveryDay

可以平凡 不可以平庸 无爱则无忧,无欲则无求,无怒而无敌,无怨才是佛。所有烦恼,都是放不下的执著 开源技群 328035181 MyGitee

博客园 首页 管理
--memory=6g \
--ulimit nofile=20000:20000 \


1、宿主机上执行
# 1. 修改系统 limits 配置
echo -e "* soft nofile 20000\n* hard nofile 20000" >> /etc/security/limits.d/nofile.conf

# 2. 检查 PAM 配置(确保 limits 生效)
grep -q "UsePAM yes" /etc/ssh/sshd_config || sed -i 's/#UsePAM yes/UsePAM yes/' /etc/ssh/sshd_config

# 3. 重启 SSH 服务
systemctl restart sshd

# 4. 重新登录使配置生效(必须重新登录或新开终端)
exit
 
然后新开一个 SSH 连接,验证:
bash
复制
ulimit -n
# 应该显示 20000



2、容器
oceanbase-mini


# 先彻底清理
docker rm -f oceanbase-mini
rm -rf /data/oceanbase
mkdir -p /data/oceanbase/ob
mkdir -p /data/oceanbase/obd

 
docker run -d \
  --name oceanbase-mini \
  -p 2881:2881 -p 8080:8080 \
  -e MINI_MODE=true \
  -e OB_ROOT_PASSWORD=root \
  -v /data/oceanbase/ob:/root/ob \
  -v /data/oceanbase/obd:/root/.obd \
  --memory=6g \
  --ulimit nofile=20000:20000 \
  oceanbase/oceanbase-ce
 
注意加了 --ulimit nofile=20000:20000,让容器继承宿主机的文件描述符限制。

image

 




3、进入容器
docker exec -it oceanbase-mini bash
# 销毁旧的 OBD 配置(不删数据)
obd cluster destroy obcluster

# 重新部署
obd cluster deploy obcluster
obd cluster start obcluster

或者查看 OBD 部署状态
obd cluster list

image

 


4、
进入容器
docker exec -it oceanbase-mini bash
查看root密码
# 查看 OBD 配置中的密码

image

 

image

 

 

5、连接

image

 

 
 
posted on 2026-07-02 23:29  2026cn  阅读(3)  评论(0)    收藏  举报