网络配置
| cd /etc/sysconfig/network-scripts/ |
| ls |
| vi ifcfg-ens33 |
修改网络配置
| TYPE=Ethernet |
| PROXY_METHOD=none |
| BROWSER_ONLY=no |
| BOOTPROTO=static |
| IPADDR=192.168.66.79 |
| NETMASK=255.255.255.0 |
| GATEWAY=192.168.66.1 |
| DNS1=144.144.144.144 |
| DNS2=223.6.6.6 |
| |
| DEFROUTE=yes |
| IPV4_FAILURE_FATAL=no |
| IPV6INIT=yes |
| IPV6_AUTOCONF=yes |
| IPV6_DEFROUTE=yes |
| IPV6_FAILURE_FATAL=no |
| IPV6_ADDR_GEN_MODE=stable-privacy |
| NAME=ens18 |
| UUID=eaf57a83-dd7f-4f5e-9500-5bf7ef3e412c |
| DEVICE=ens18 |
| ONBOOT=yes |
重启网络服务
查询文件树
| yum -y install tree |
| |
| tree path |
查看监听端口
| yum install -y net-tools |
| |
| netstat -ntlp |
安装oceanbase
https://blog.csdn.net/paicMis/article/details/117456277
| yum install -y yum-utils |
| yum-config-manager --add-repo https://mirrors.aliyun.com/oceanbase/OceanBase.repo |
| |
| |
| echo "export LC_ALL=en_US.UTF-8" >> /etc/profile |
| |
| source /etc/profile |
| |
| yum install -y ob-deploy |
查看防火墙状态
| firewall-cmd --state |
| |
| |
| |
| systemctl stop firewalld |
| |
启动数据库
| obd cluster start demo |
| 若报错 |
| [ERROR] OBD-1007: (127.0.0.1) open files must not be less than 20000 (Current value: 1024) |
| 执行以下命令 |
| echo 1048576 > /proc/sys/fs/file-max |
| limit -HSn 1048576 |
https://blog.csdn.net/qingsui9/article/details/119805863
通过obclient访问数据库
https://www.kancloud.cn/pm1028/kubenetes/2296683
| obclient -h127.0.0.1 -P2881 -uroot |
| |
| |
| obclient -h127.0.0.1 -P2881 -ullf@obcp_t1 -p123456 |
创建unit规格
https://blog.csdn.net/Sebastien23/article/details/124526541
| |
| create resource unit mini max_cpu=2, min_cpu=1, max_memory='1.2G', min_memory='1G', max_iops=10000, min_iops=1000, max_session_num=1000000, max_disk_size='5G'; |
修改
| alter resource unit mini max_memory='3G',min_memory='3G'; |
创建资源池
| |
| create resource pool mini_pool_t1 unit=mini, unit_num=1; |
| create resource pool mini_pool_t2 unit=mini, unit_num=1; |
创建租户
https://www.modb.pro/db/336262
mysql租户
| create tenant obcp_t1 charset='utf8mb4', zone_list=('zone1,zone2,znoe3'), |
| primary_zone='zone1,zone2,zone3', resource_pool_list=('mini_pool_t1') |
| set ob_tcp_invited_nodes='%'; |
| |
| create tenant obcp_t1 charset='utf8mb4', zone_list=('zone1'), |
| primary_zone='zone1', resource_pool_list=('mini_pool_t1') |
| set ob_tcp_invited_nodes='%'; |
Oracle租户
| create tenant obcp_t2 charset='utf8mb4', zone_list=('zone1,zone2,znoe3'), |
| primary_zone='zone1,zone2,zone3', resource_pool_list=('mini_pool_t2') |
| set ob_tcp_invited_nodes='%', ob_compatibility_mode='oracle'; |
查看当前租户
创建用户
https://blog.csdn.net/qyq88888/article/details/122680908
| 先登录到刚刚创建的租户下,再创建用户 |
| obclient -h127.0.0.1 -P2881 -uroot@obcp_t1 |
| |
| create user llf@'%' identified by '123456'; |
| grant all privileges on databaseName.* to llf@'%'; //授权 |
| grant all on *.* to 'llf'@'%'; |
修改隔离度
| SET session TRANSACTION ISOLATION LEVEL Serializable |
| |
| 读未提交(Read Uncommitted) |
| 读已提交(Read Committed) |
| 可重复读(Repeatable Read) |
| 可串行化(Serializable) |
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 【译】Visual Studio 中新的强大生产力特性
· 【设计模式】告别冗长if-else语句:使用策略模式优化代码结构
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义