網路配置 cd /etc/sysconfig/network-scripts/ ls vi ifcfg-ens33 修改網路配置 TYPE=Ethernet PROXY_METHOD=none BROWSER_ONLY=no BOOTPROTO=static #設置靜態 IPADDR=192.168 ...
網路配置
cd /etc/sysconfig/network-scripts/
ls
vi ifcfg-ens33
修改網路配置
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=static #設置靜態
IPADDR=192.168.66.79 #設置自己的IP
NETMASK=255.255.255.0 #設置子網掩碼
GATEWAY=192.168.66.1 #設置網關
DNS1=144.144.144.144 #設置DNS
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
重啟網路服務
nmcli c reload
查詢文件樹
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執行文件
source /etc/profile
yum install -y ob-deploy
查看防火牆狀態
firewall-cmd --state
# 顯示running即運行中
# 停止防火牆
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
--創建名稱為mini的資源單元
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';
創建資源池
--利用定義好的unit規格創建兩個資源池
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';
查看當前租戶
SHOW TENANT;
創建用戶
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)