国产亚洲精品福利在线无卡一,国产精久久一区二区三区,亚洲精品无码国模,精品久久久久久无码专区不卡

當前位置: 首頁 > news >正文

做評測好的視頻網(wǎng)站有哪些北京seo關鍵詞優(yōu)化收費

做評測好的視頻網(wǎng)站有哪些,北京seo關鍵詞優(yōu)化收費,html模板免費十個網(wǎng)頁,織夢網(wǎng)站上傳新聞OceanBase社區(qū)版單節(jié)點安裝搭建(Docker) 文章目錄 OceanBase社區(qū)版單節(jié)點安裝搭建(Docker)一、環(huán)境檢查及Docker配置1.1 安裝docker1.2 配置docker鏡像源 二、OB鏡像下載三、obd部署單節(jié)點數(shù)據(jù)庫四、創(chuàng)建業(yè)務租戶、數(shù)據(jù)庫、表4.1 …

OceanBase社區(qū)版單節(jié)點安裝搭建(Docker)

文章目錄

  • OceanBase社區(qū)版單節(jié)點安裝搭建(Docker)
    • 一、環(huán)境檢查及Docker配置
      • 1.1 安裝docker
      • 1.2 配置docker鏡像源
    • 二、OB鏡像下載
    • 三、obd部署單節(jié)點數(shù)據(jù)庫
    • 四、創(chuàng)建業(yè)務租戶、數(shù)據(jù)庫、表
      • 4.1 創(chuàng)建租戶
      • 4.2 創(chuàng)建數(shù)據(jù)庫、表
    • 五、參考鏈接

一、環(huán)境檢查及Docker配置

本文采用redhat7.9作為測試環(huán)境,虛擬機安裝操作系統(tǒng)的步驟不再列出。

官方的docker鏡像要求主機資源至少為2C10G。本機主機資源配置(4c16G,磁盤100G)

[root@rac04 ~]# lscpu
CPU(s):                4
[root@rac04 ~]# free -mtotal        used        free      shared  buff/cache   available
Mem:          15866         981       14534          12         350       14606
Swap:          8063           0        8063
[root@rac04 ~]# df -h
文件系統(tǒng)               容量  已用  可用 已用% 掛載點
devtmpfs               7.8G     0  7.8G    0% /dev
tmpfs                  7.8G     0  7.8G    0% /dev/shm
tmpfs                  7.8G   13M  7.8G    1% /run
tmpfs                  7.8G     0  7.8G    0% /sys/fs/cgroup
/dev/mapper/rhel-root   92G  4.2G   87G    5% /
/dev/sda1             1014M  183M  832M   19% /boot
tmpfs                  1.6G  8.0K  1.6G    1% /run/user/42
tmpfs                  1.6G     0  1.6G    0% /run/user/0

1.1 安裝docker

#內核版本不低于3.10。
uname -a#設置docker源倉庫
yum install -y yum-utils  device-mapper-persistent-data lvm2
yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo#安裝docker
yum install -y docker-ce docker-ce-cli containerd.io#啟動docker服務
systemctl start docker
#激活docker服務開機自啟動
systemctl enable docker.service#校驗
[root@rac04 ~]# docker version
Client: Docker Engine - CommunityVersion:           25.0.3API version:       1.44Go version:        go1.21.6Git commit:        4debf41Built:             Tue Feb  6 21:17:10 2024OS/Arch:           linux/amd64Context:           defaultServer: Docker Engine - CommunityEngine:Version:          25.0.3API version:      1.44 (minimum version 1.24)Go version:       go1.21.6Git commit:       f417435Built:            Tue Feb  6 21:16:08 2024OS/Arch:          linux/amd64Experimental:     falsecontainerd:Version:          1.6.28GitCommit:        ae07eda36dd25f8a1b98dfbf587313b99c0190bbrunc:Version:          1.1.12GitCommit:        v1.1.12-0-g51d5e94docker-init:Version:          0.19.0GitCommit:        de40ad0

1.2 配置docker鏡像源

國內從 DockerHub 拉取鏡像有時會遇到困難,此時可以配置鏡像加速器。Docker 官方和國內很多云服務商都提供了國內加速器服務,參考Docker Hub 鏡像源 - 掘金 (juejin.cn)

vi /etc/docker/daemon.json{"registry-mirrors": ["https://dockerproxy.com","https://hub-mirror.c.163.com","https://mirror.baidubce.com","https://ccr.ccs.tencentyun.com"]
}#重啟docker服務
systemctl restart docker.service #校驗鏡像源
[root@rac04 ~]# docker info |grep Mirrors -A 5Registry Mirrors:https://dockerproxy.com/https://hub-mirror.c.163.com/https://mirror.baidubce.com/https://ccr.ccs.tencentyun.com/Live Restore Enabled: false

二、OB鏡像下載

下載地址:https://hub.docker.com/r/oceanbase/oceanbase-ce/tags,該地址可能需要使用代理訪問。這里直接貼出來docker pull oceanbase/oceanbase-ce:3.1.3

找到3.1.3版本,復制拉取命令

[root@rac04 ~]# docker pull oceanbase/oceanbase-ce:3.1.3
3.1.3: Pulling from oceanbase/oceanbase-ce
13add961a70d: Pull complete 
1cf396138e36: Pull complete 
de207e7387d3: Pull complete 
Digest: sha256:22c2d82e5e7223ee510b1c53400edd05e622d9a09bc33987bd85ce560bb0781a
Status: Downloaded newer image for oceanbase/oceanbase-ce:3.1.3
docker.io/oceanbase/oceanbase-ce:3.1.3
[root@rac04 ~]# docker images
REPOSITORY               TAG       IMAGE ID       CREATED         SIZE
oceanbase/oceanbase-ce   3.1.3     66c986c2d478   23 months ago   783MB

三、obd部署單節(jié)點數(shù)據(jù)庫

運行docker容器

[root@rac04 ~]# docker run -d -m 12G --cpus 4 --name oceanbase-ce oceanbase/oceanbase-ce:3.1.3
61d0ccd3ea95e36938527701c07d85f89fe950921004c4b133302dd32051dc5c[root@rac04 ~]# docker ps
CONTAINER ID   IMAGE                          COMMAND              CREATED         STATUS         PORTS     NAMES
61d0ccd3ea95   oceanbase/oceanbase-ce:3.1.3   "/bin/sh -c _boot"   8 seconds ago   Up 8 seconds             oceanbase-ce

檢查docker日志

[root@rac04 ~]# docker logs oceanbase-ce 
generate boot.yaml ...
create boot dirs and deploy ob cluster ...
Package oceanbase-ce-3.1.3 is available.
install oceanbase-ce-3.1.3 for local ok
Cluster param config check ok
Open ssh connection ok
Generate observer configuration ok
oceanbase-ce-3.1.3 already installed.
+-------------------------------------------------------------------------------------------+
|                                          Packages                                         |
+--------------+---------+-----------------------+------------------------------------------+
| Repository   | Version | Release               | Md5                                      |
+--------------+---------+-----------------------+------------------------------------------+
| oceanbase-ce | 3.1.3   | 10000292022032916.el7 | eab08e5d473bd4884fdf2ac4d7dff6a329b68abe |
+--------------+---------+-----------------------+------------------------------------------+
Repository integrity check ok
Parameter check ok
Open ssh connection ok
Remote oceanbase-ce-3.1.3-eab08e5d473bd4884fdf2ac4d7dff6a329b68abe repository install ok
Remote oceanbase-ce-3.1.3-eab08e5d473bd4884fdf2ac4d7dff6a329b68abe repository lib check !!
[WARN] 127.0.0.1 oceanbase-ce-3.1.3-eab08e5d473bd4884fdf2ac4d7dff6a329b68abe require: libmariadb.so.3Try to get lib-repository
Package oceanbase-ce-libs-3.1.3 is available.
install oceanbase-ce-libs-3.1.3 for local ok
Use oceanbase-ce-libs-3.1.3-c68c3aca8a1329a360fe5d65e1c3d4fa0f93f2d5 for oceanbase-ce-3.1.3-eab08e5d473bd4884fdf2ac4d7dff6a329b68abe
Remote oceanbase-ce-libs-3.1.3-c68c3aca8a1329a360fe5d65e1c3d4fa0f93f2d5 repository install ok
Remote oceanbase-ce-3.1.3-eab08e5d473bd4884fdf2ac4d7dff6a329b68abe repository lib check ok
Cluster status check ok
Initializes observer work home ok
obcluster deployed
Get local repositories and plugins ok
Open ssh connection ok
Load cluster param plugin ok
Check before start observer ok
[WARN] (127.0.0.1) clog and data use the same disk (/)Start observer ok
observer program health check ok
Connect to observer ok
Initialize cluster
Cluster bootstrap ok
Wait for observer init ok
+---------------------------------------------+
|                   observer                  |
+-----------+---------+------+-------+--------+
| ip        | version | port | zone  | status |
+-----------+---------+------+-------+--------+
| 127.0.0.1 | 3.1.3   | 2881 | zone1 | active |
+-----------+---------+------+-------+--------+obcluster running
Get local repositories and plugins ok
Open ssh connection ok
Connect to observer ok
Create tenant test ok
start ob cluster ...
Get local repositories and plugins ok
Open ssh connection ok
Load cluster param plugin ok
Cluster status check ok
Deploy "obcluster" is running
boot success!
#切換終端到docker容器
[root@rac04 ~]# docker exec -it oceanbase-ce bash
#檢查集群狀態(tài)
[root@61d0ccd3ea95 /]# obd cluster list
+------------------------------------------------------------+
|                        Cluster List                        |
+-----------+------------------------------+-----------------+
| Name      | Configuration Path           | Status (Cached) |
+-----------+------------------------------+-----------------+
| obcluster | /root/.obd/cluster/obcluster | running         |

docker鏡像已經(jīng)部署好了一個集群——obcluster,這里不再部署。附上obd操作集群的常用命令

#啟動集群
obd cluster start 集群名
#停止集群
obd cluster stop 集群名
#重啟集群
obd cluster restart 集群名
#查看集群狀況
obd cluster list
obd cluster display 集群名
#查看集群配置,也可以根據(jù)模板,重新建一個配置文件,重新部署新集群
obd cluster edit-config 集群名

四、創(chuàng)建業(yè)務租戶、數(shù)據(jù)庫、表

連接數(shù)據(jù)庫,默認root密碼為空

obclient -h127.0.0.1 -P2881 -uroot@sys -p -c -A -Doceanbase
-- 修改root密碼
alter user root identified by 'root';

4.1 創(chuàng)建租戶

檢查資源狀況


select zone,
concat(svr_ip, ':', svr_port) observer,
cpu_capacity,
cpu_total,
cpu_assigned,
cpu_assigned_percent,
mem_capacity/1024/1024,
mem_total/1024/1024,
mem_assigned/1024/1024,
mem_assigned_percent,
disk_total/1024/1024,
disk_assigned/1024/1024,
disk_assigned_percent,
unit_Num,
round('load', 2) 'load',
round('cpu_weight', 2) 'cpu_weight',
round('memory_weight', 2) 'mem_weight',
leader_count
from __all_virtual_server_stat
order by zone, svr_ip\G*************************** 1. row ***************************zone: zone1observer: 127.0.0.1:2882cpu_capacity: 14cpu_total: 14cpu_assigned: 11.5cpu_assigned_percent: 82mem_capacity/1024/1024: 4096.00000000mem_total/1024/1024: 4096.00000000mem_assigned/1024/1024: 3891.20000076mem_assigned_percent: 95disk_total/1024/1024: 27648.00000000
disk_assigned/1024/1024: 55296.00000000disk_assigned_percent: 200unit_Num: 2load: 0.00cpu_weight: 0.00mem_weight: 0.00leader_count: 1318
1 row in set, 3 warnings (0.001 sec)MySQL [oceanbase]> show parameters like 'system_memory'\G
*************************** 1. row ***************************zone: zone1svr_type: observersvr_ip: 127.0.0.1svr_port: 2882name: system_memorydata_type: NULLvalue: 4Ginfo: the memory reserved for internal use which cannot be allocated to any outer-tenant, and should be determined to guarantee every server functions normally. Range: [0M,)section: OBSERVERscope: CLUSTERsource: DEFAULT
edit_level: DYNAMIC_EFFECTIVE
1 row in set (0.002 sec)MySQL [oceanbase]> select * from __all_unit_config;
+----------------------------+----------------------------+----------------+-----------------+---------+---------+------------+------------+----------+----------+---------------+---------------------+
| gmt_create                 | gmt_modified               | unit_config_id | name            | max_cpu | min_cpu | max_memory | min_memory | max_iops | min_iops | max_disk_size | max_session_num     |
+----------------------------+----------------------------+----------------+-----------------+---------+---------+------------+------------+----------+----------+---------------+---------------------+
| 2024-03-07 14:35:29.704258 | 2024-03-07 14:35:29.704258 |              1 | sys_unit_config |       5 |     2.5 | 1288490188 | 1073741824 |    10000 |     5000 |   28991029248 | 9223372036854775807 |
| 2024-03-07 14:35:40.537529 | 2024-03-07 14:35:40.537529 |           1001 | test_unit       |       9 |       9 | 3006477108 | 3006477108 |      128 |      128 |   28991029248 |                  64 |
+----------------------------+----------------------------+----------------+-----------------+---------+---------+------------+------------+----------+----------+---------------+---------------------+
2 rows in set (0.001 sec)MySQL [oceanbase]> select * from gv$unit;
+---------+----------------+------------------+------------------+--------------------+-------+-----------+-------------+-----------+----------+---------------------+-----------------------+---------+---------+------------+------------+----------+----------+---------------+---------------------+
| unit_id | unit_config_id | unit_config_name | resource_pool_id | resource_pool_name | zone  | tenant_id | tenant_name | svr_ip    | svr_port | migrate_from_svr_ip | migrate_from_svr_port | max_cpu | min_cpu | max_memory | min_memory | max_iops | min_iops | max_disk_size | max_session_num     |
+---------+----------------+------------------+------------------+--------------------+-------+-----------+-------------+-----------+----------+---------------------+-----------------------+---------+---------+------------+------------+----------+----------+---------------+---------------------+
|       1 |              1 | sys_unit_config  |                1 | sys_pool           | zone1 |         1 | sys         | 127.0.0.1 |     2882 |                     |                     0 |       5 |     2.5 | 1288490188 | 1073741824 |    10000 |     5000 |   28991029248 | 9223372036854775807 |
|    1001 |           1001 | test_unit        |             1001 | test_pool          | zone1 |      1001 | test        | 127.0.0.1 |     2882 |                     |                     0 |       9 |       9 | 3006477108 | 3006477108 |      128 |      128 |   28991029248 |                  64 |
+---------+----------------+------------------+------------------+--------------------+-------+-----------+-------------+-----------+----------+---------------------+-----------------------+---------+---------+------------+------------+----------+----------+---------------+---------------------+
2 rows in set (0.001 sec)-- 剩余的資源已經(jīng)不足,修改system_memory參數(shù)為2G,調小test租戶的資源占用
alter system set system_memory='2G';
alter resource unit test_unit min_cpu=1,max_cpu=2,min_memory='1G',max_memory='1G';-- 再次檢查資源
*************************** 1. row ***************************zone: zone1observer: 127.0.0.1:2882cpu_capacity: 14cpu_total: 14cpu_assigned: 3.5cpu_assigned_percent: 25mem_capacity/1024/1024: 6144.00000000mem_total/1024/1024: 6144.00000000mem_assigned/1024/1024: 2048.00000000mem_assigned_percent: 33disk_total/1024/1024: 27648.00000000
disk_assigned/1024/1024: 55296.00000000disk_assigned_percent: 200unit_Num: 2load: 0.00cpu_weight: 0.00mem_weight: 0.00leader_count: 1318

創(chuàng)建資源單元

CREATE resource unit u1 max_cpu=1, min_cpu=1, max_memory='1G', min_memory='1G', max_iops=10000,
min_iops=1000, max_session_num=1000000, max_disk_size='5G';

創(chuàng)建資源池

create resource pool pool1 unit='u1', unit_num=1, zone_list=('zone1') ;

創(chuàng)建mysql類型業(yè)務租戶,允許所有連接,關閉回收站

create tenant yw charset='utf8mb4',zone_list=('zone1'),resource_pool_list=('pool1'),comment='業(yè)務租戶1' 
set ob_compatibility_mode=mysql,ob_tcp_invited_nodes='%',recyclebin = off;

檢查

MySQL [oceanbase]> select * from __all_tenant where tenant_name='yw'\G
*************************** 1. row ***************************gmt_create: 2024-03-07 15:50:54.994276gmt_modified: 2024-03-07 15:50:54.994276tenant_id: 1002tenant_name: ywreplica_num: -1zone_list: zone1primary_zone: RANDOMlocked: 0collation_type: 0info: 業(yè)務租戶1read_only: 0rewrite_merge_version: 0locality: FULL{1}@zone1logonly_replica_num: 0previous_locality: storage_format_version: 0
storage_format_work_version: 0default_tablegroup_id: -1compatibility_mode: 0drop_tenant_time: -1status: TENANT_STATUS_NORMALin_recyclebin: 0
1 row in set (0.002 sec)

4.2 創(chuàng)建數(shù)據(jù)庫、表

連接業(yè)務租戶yw

 obclient -h127.0.0.1 -P2881 -uroot@yw -p -c -A -Doceanbase
alter user root identified by 'root';-- 創(chuàng)建數(shù)據(jù)庫
MySQL [oceanbase]> create database ywdb charset='utf8mb4' read write;
Query OK, 1 row affected (0.013 sec)
MySQL [oceanbase]> use ywdb
Database changed
MySQL [ywdb]> create table t1(name char(20));
Query OK, 0 rows affected (0.072 sec)
-- 創(chuàng)建分區(qū)表
MySQL [ywdb]> create table t3(id int(10),t3name char(20)) partition by hash(id) partitions 5;
Query OK, 0 rows affected (0.058 sec)
-- 創(chuàng)建表組
MySQL [ywdb]> create tablegroup tbgroup1 partition by hash partitions 5;
Query OK, 0 rows affected (0.019 sec)
-- 創(chuàng)建分區(qū)表并加入表組
MySQL [ywdb]> create table t4(t4id int(10)) tablegroup=tbgroup1 partition by hash(t4id) partitions 5;
Query OK, 0 rows affected (0.033 sec)
-- 將表加入表組
MySQL [ywdb]> alter table t3 tablegroup=tbgroup1;
Query OK, 0 rows affected (0.021 sec)
-- 查看表的創(chuàng)建語句
MySQL [ywdb]> SHOW CREATE TABLE t3;
+-------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Table | Create Table                                                                                                                                                                                                                                                                                                                                                                        |
+-------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| t3    | CREATE TABLE `t3` (`id` int(10) DEFAULT NULL,`t3name` char(20) DEFAULT NULL
) DEFAULT CHARSET = utf8mb4 ROW_FORMAT = COMPACT COMPRESSION = 'zstd_1.3.8' REPLICA_NUM = 1 BLOCK_SIZE = 16384 USE_BLOOM_FILTER = FALSE TABLET_SIZE = 134217728 PCTFREE = 0 TABLEGROUP = 'tbgroup1'partition by hash(id)
(partition p0,
partition p1,
partition p2,
partition p3,
partition p4) |
+-------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.027 sec)

五、參考鏈接

Linux安裝Docker完整教程 - 哈哈哈嗝 - 博客園 (cnblogs.com)

Docker Hub 鏡像源 - 掘金 (juejin.cn)

快速體驗 OceanBase-OceanBase 數(shù)據(jù)庫-OceanBase文檔中心-分布式數(shù)據(jù)庫使用文檔

http://aloenet.com.cn/news/46470.html

相關文章:

  • 做設計一般用什么素材網(wǎng)站會計培訓班要多少錢
  • 建設銀行網(wǎng)站是多少錢成都網(wǎng)站優(yōu)化排名
  • 游戲類網(wǎng)站怎么做長春模板建站代理
  • 廣州網(wǎng)站制作有什么平臺可以推廣
  • 一個網(wǎng)站按鈕怎么做今日頭條號官網(wǎng)
  • 什么網(wǎng)站可以用視頻做背景域名收錄查詢工具
  • 全國軟件公司排名seo還有用嗎
  • 做一個b2c網(wǎng)站網(wǎng)址關鍵詞查詢
  • 電信電信網(wǎng)站備案系統(tǒng)在線網(wǎng)站建設平臺
  • 北京產品網(wǎng)站設計哪家專業(yè)超級外鏈工具
  • 做網(wǎng)站的公司風險大不大濟南seo小黑seo
  • 網(wǎng)站回答問題app怎么做頭條發(fā)布視頻成功顯示404
  • 四川省紀委網(wǎng)站建設今日武漢最新消息
  • 西安網(wǎng)站建設云闊網(wǎng)絡熊掌號東莞seo報價
  • 便利的響應式網(wǎng)站建設百度競價什么意思
  • 長治招聘網(wǎng)站建設百度推廣登錄平臺網(wǎng)址
  • 網(wǎng)站做記錄訪客百度貼吧網(wǎng)頁版
  • 網(wǎng)站子域名查詢怎么注冊中視頻賬號
  • 做網(wǎng)站購買備案域名app怎么推廣運營
  • 天津公司建設網(wǎng)站外貿獨立站怎么做
  • 東營做網(wǎng)站公司東莞做網(wǎng)站公司首選
  • 網(wǎng)站建設教程培訓做網(wǎng)站用什么軟件
  • 動易醫(yī)院網(wǎng)站管理系統(tǒng)市場調研分析報告
  • 可以賺錢做任務的網(wǎng)站怎么投放廣告是最有效的
  • 滄州網(wǎng)站建設公司百度瀏覽器網(wǎng)頁
  • 網(wǎng)站建設需求表鏈接網(wǎng)
  • 公司網(wǎng)站建設費用入什么費用建設網(wǎng)站需要多少錢
  • 騰訊云域名價格seo神器
  • 國外著名購物網(wǎng)站排名關鍵詞排名零芯互聯(lián)排名
  • 做企業(yè)門戶網(wǎng)站都南寧網(wǎng)站快速排名提升