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

當(dāng)前位置: 首頁 > news >正文

新疆做網(wǎng)站的公司品牌推廣方案

新疆做網(wǎng)站的公司,品牌推廣方案,免費活動策劃方案的網(wǎng)站,網(wǎng)頁設(shè)計圖片全覆蓋前一篇文章介紹了OBD白屏可視化方式部署OceanBase集群 ,其原理是把可視化設(shè)置生成為一個配置文件,然后使用OBD命令部署集群 本篇想使用命令行加配置文件方式,只部署OceanBase和ODProxy兩個組件 服務(wù)器參數(shù)配置和 oceanbase-all-in-one-*.ta…

前一篇文章介紹了OBD白屏可視化方式部署OceanBase集群 ,其原理是把可視化設(shè)置生成為一個配置文件,然后使用OBD命令部署集群

本篇想使用命令行加配置文件方式,只部署OceanBase和ODProxy兩個組件

服務(wù)器參數(shù)配置和 oceanbase-all-in-one-*.tar.gz 軟件包下載,請參考上一篇文章

三臺服務(wù)器 192.168.113.161 、162、163 ,都需要在 /etc/sysctl.conf 中加入配置:

vm.max_map_count=655360
fs.file-max=6573688

使配置生效:sysctl -p

1.安裝 all-in-one包

在192.168.113.161下安裝all-in-one包,且會自動安裝好ODB軟件

tar -xzf oceanbase-all-in-one-*.tar.gz
cd oceanbase-all-in-one/bin/
./install.sh
source ~/.oceanbase-all-in-one/bin/env.sh

tar解壓后,在 oceanbase-all-in-one/obd/usr/obd/example/ 目錄下,有示例配置文件,因我只要部署OceanBase和OBProxy,就使用了 distributed-with-obproxy-example.yaml ,復(fù)制到root目錄:cp distributed-with-obproxy-example.yaml /root/zycluster-deploy.yaml

# 解壓在 /mnt/software/oceanbase-all-in-one 目錄
[root@db1 ~]# cd /mnt/software/oceanbase-all-in-one/obd/usr/obd/example/
[root@db1 example]# ll
total 112
-rw-r--r-- 1 root root 15398 Dec  6 08:34 all-components-min.yaml
-rw-r--r-- 1 root root 15601 Dec  6 08:34 all-components.yaml
drwxrwxrwx 2 root root   262 Dec  6 08:34 autodeploy
-rw-r--r-- 1 root root  7193 Dec  6 08:34 default-components-min.yaml
-rw-r--r-- 1 root root  7396 Dec  6 08:34 default-components.yaml
-rw-r--r-- 1 root root  4240 Dec  6 08:34 distributed-example.yaml
-rw-r--r-- 1 root root  5765 Feb 18 08:48 distributed-with-obproxy-example.yaml
drwxrwxrwx 2 root root   129 Dec  6 08:34 grafana
-rw-r--r-- 1 root root  2289 Dec  6 08:34 local-example.yaml
-rw-r--r-- 1 root root  4226 Dec  6 08:34 mini-distributed-example.yaml
-rw-r--r-- 1 root root  5736 Dec  6 08:34 mini-distributed-with-obproxy-example.yaml
-rwxr-xr-x 1 root root  2453 Dec  6 08:34 mini-local-example.yaml
-rwxr-xr-x 1 root root  2721 Dec  6 08:34 mini-single-example.yaml
-rw-r--r-- 1 root root  4197 Dec  6 08:34 mini-single-with-obproxy-example.yaml
drwxrwxrwx 2 root root   135 Dec  6 08:34 obagent
drwxrwxrwx 2 root root   109 Dec  6 08:34 ob-configserver
drwxrwxrwx 2 root root    84 Dec  6 08:34 obproxy
drwxrwxrwx 2 root root  4096 Dec  6 08:34 oceanbase-3.x
drwxrwxrwx 2 root root    35 Dec  6 08:34 ocp-express
drwxrwxrwx 2 root root   102 Dec  6 08:34 prometheus
-rw-r--r-- 1 root root  2557 Dec  6 08:34 single-example.yaml
-rw-r--r-- 1 root root  4068 Dec  6 08:34 single-with-obproxy-example.yaml

根據(jù)我服務(wù)器配置調(diào)整 zycluster-deploy.yaml ,內(nèi)容如下:

## Only need to configure when remote login is required
user:username: rootpassword: 123456key_file: /root/.ssh/id_rsa
#   port: your ssh port, default 22
#   timeout: ssh connection timeout (second), default 30
oceanbase-ce:servers:- name: server1# Please don't use hostname, only IP can be supportedip: 192.168.113.161- name: server2ip: 192.168.113.162- name: server3ip: 192.168.113.163global:# Starting from observer version 4.2, the network selection for the observer is based on the 'local_ip' parameter, and the 'devname' parameter is no longer mandatory.# If the 'local_ip' parameter is set, the observer will first use this parameter for the configuration, regardless of the 'devname' parameter.# If only the 'devname' parameter is set, the observer will use the 'devname' parameter for the configuration.# If neither the 'devname' nor the 'local_ip' parameters are set, the 'local_ip' parameter will be automatically assigned the IP address configured above.# devname: eth0# if current hardware's memory capacity is smaller than 50G, please use the setting of "mini-single-example.yaml" and do a small adjustment.memory_limit: 10G # The maximum running memory for an observer# The reserved system memory. system_memory is reserved for general tenants. The default value is 30G.system_memory: 3Gdatafile_size: 12G # Size of the data file. datafile_next: 2Gdatafile_maxsize: 20Glog_disk_size: 12G # The size of disk space used by the clog files.cpu_count: 8mysql_port: 2881rpc_port: 2882production_mode: falseenable_syslog_wf: false # Print system logs whose levels are higher than WARNING to a separate log file. The default value is true.enable_syslog_recycle: true # Enable auto system log recycling or not. The default value is false.max_syslog_file_count: 4 # The maximum number of reserved log files before enabling auto recycling. The default value is 0.# observer cluster name, consistent with obproxy's cluster_nameappname: zyclusterroot_password: /aVi*H8(0%FS_YwZ-|dmo&[hjlT7pe@E # root user password, can be emptyproxyro_password: /aVi*H8(0%FS_YwZ-|dmo&[hjlT7pe@E # proxyro user pasword, consistent with obproxy's observer_sys_password, can be empty# In this example , support multiple ob process in single node, so different process use different ports.# If deploy ob cluster in multiple nodes, the port and path setting can be same. server1:mysql_port: 2881 # External port for OceanBase Database. The default value is 2881. DO NOT change this value after the cluster is started.rpc_port: 2882 # Internal port for OceanBase Database. The default value is 2882. DO NOT change this value after the cluster is started.#  The working directory for OceanBase Database. OceanBase Database is started under this directory. This is a required field.home_path: /root/zycluster# The directory for data storage. The default value is $home_path/store.# data_dir: /data# The directory for clog, ilog, and slog. The default value is the same as the data_dir value.# redo_dir: /redozone: zone1server2:mysql_port: 2881 # External port for OceanBase Database. The default value is 2881. DO NOT change this value after the cluster is started.rpc_port: 2882 # Internal port for OceanBase Database. The default value is 2882. DO NOT change this value after the cluster is started.#  The working directory for OceanBase Database. OceanBase Database is started under this directory. This is a required field.home_path: /root/zycluster# The directory for data storage. The default value is $home_path/store.# data_dir: /data# The directory for clog, ilog, and slog. The default value is the same as the data_dir value.# redo_dir: /redozone: zone2server3:mysql_port: 2881 # External port for OceanBase Database. The default value is 2881. DO NOT change this value after the cluster is started.rpc_port: 2882 # Internal port for OceanBase Database. The default value is 2882. DO NOT change this value after the cluster is started.#  The working directory for OceanBase Database. OceanBase Database is started under this directory. This is a required field.home_path: /root/zycluster# The directory for data storage. The default value is $home_path/store.# data_dir: /data# The directory for clog, ilog, and slog. The default value is the same as the data_dir value.# redo_dir: /redozone: zone3
obproxy-ce:# Set dependent components for the component.# When the associated configurations are not done, OBD will automatically get the these configurations from the dependent components.depends:- oceanbase-ceservers:- 192.168.113.161global:listen_port: 2883 # External port. The default value is 2883.prometheus_listen_port: 2884 # The Prometheus port. The default value is 2884.home_path: /root/obproxy# oceanbase root server list# format: ip:mysql_port;ip:mysql_port. When a depends exists, OBD gets this value from the oceanbase-ce of the depends.rs_list: 192.168.113.161:2881;192.168.113.162:2881;192.168.113.163:2881enable_cluster_checkout: false# observer cluster name, consistent with oceanbase-ce's appname. When a depends exists, OBD gets this value from the oceanbase-ce of the depends.cluster_name: zyclusterskip_proxy_sys_private_check: trueenable_strict_kernel_release: falseobproxy_sys_password: /aVi*H8(0%FS_YwZ-|dmo&[hjlT7pe@E # obproxy sys user password, can be empty. When a depends exists, OBD gets this value from the oceanbase-ce of the depends.observer_sys_password: /aVi*H8(0%FS_YwZ-|dmo&[hjlT7pe@E # proxyro user pasword, consistent with oceanbase-ce's proxyro_password, can be empty. When a depends exists, OBD gets this value from the oceanbase-ce of the depends.
2.部署集群

部署: obd cluster deploy zycluster -c zycluster-deploy.yaml
銷毀: obd cluster destory zycluster ,然后刪除目錄 rm -rf xxxx
在這里插入圖片描述
部署成功后,在/root 目錄下生成了一個 zycluster 目錄,數(shù)據(jù)和日志默認(rèn)存儲 home_path (也就是 zycluster/store 目錄下),在真實場景下,請把data_dir 和 redo_dir 分別配置在獨立的磁盤上,以提高IO性能和可用性
在這里插入圖片描述

3.啟動集群

啟動:obd cluster start zycluster
在這里插入圖片描述

4.使用Navicat連接集群sys系統(tǒng)租戶

在這里插入圖片描述
use oceanbase
查看資源,創(chuàng)建租戶mq_t1


1.1.查看所有資源規(guī)格信息
SELECT * FROM DBA_OB_UNIT_CONFIGS;
1.2.刪除資源規(guī)格
drop resource unit S1_unit_config;
1.3.創(chuàng)建資源規(guī)格(請按服務(wù)器真實配置和業(yè)務(wù)需求來設(shè)置合適資源大小)
CREATE RESOURCE UNIT S1_unit_config MEMORY_SIZE = '4G', MAX_CPU = 1, MIN_CPU = 1, LOG_DISK_SIZE = '2G',  MAX_IOPS = 10000, MIN_IOPS = 10000, IOPS_WEIGHT=1;2.1.查看所有資源池信息
SELECT * FROM DBA_OB_RESOURCE_POOLS;
2.2.創(chuàng)建資源池
CREATE RESOURCE POOL mq_pool_01  UNIT='S1_unit_config', UNIT_NUM=1, ZONE_LIST=('zone1','zone2','zone3');3.1.查看所有的租戶信息,其LOCALITY字段為租戶副本分布
SELECT * FROM DBA_OB_TENANTS;
3.2.創(chuàng)建租戶mq_t1,primary_zone=zone1
CREATE TENANT IF NOT EXISTS mq_t1  PRIMARY_ZONE='zone1', RESOURCE_POOL_LIST=('mq_pool_01') set OB_TCP_INVITED_NODES='%';
3.3.創(chuàng)建租戶mq_t1, primary_zone=zone1;zone2;zone3,3個主zone同時讀寫提升數(shù)據(jù)庫性能
CREATE TENANT IF NOT EXISTS mq_t1  PRIMARY_ZONE='zone1;zone2;zone3', RESOURCE_POOL_LIST=('mq_pool_01') set OB_TCP_INVITED_NODES='%';
3.4.刪除租戶
drop tenant mq_t1;
3.5查詢租戶
SELECT * FROM DBA_OB_TENANTS WHERE TENANT_NAME = 'mq_t1';4.關(guān)聯(lián)查詢租戶資源配置信息
SELECT c.TENANT_ID, e.TENANT_NAME, concat(c.NAME, ': ', d.NAME) `pool:conf`,concat(c.UNIT_COUNT, ' unit: ', d.min_cpu, 'C/', ROUND(d.MEMORY_SIZE/1024/1024/1024,0), "G") unit_info FROM DBA_OB_RESOURCE_POOLS c, DBA_OB_UNIT_CONFIGS d, DBA_OB_TENANTS e  WHERE c.UNIT_CONFIG_ID=d.UNIT_CONFIG_ID AND c.TENANT_ID=e.TENANT_ID AND c.TENANT_ID>1000 ORDER BY c.TENANT_ID;5.查看租戶的資源單元部署位置
SELECT a.TENANT_NAME,a.TENANT_ID,b.SVR_IP FROM DBA_OB_TENANTS a,GV$OB_UNITS b WHERE a.TENANT_ID=b.TENANT_ID;6.查看節(jié)點的 Unit 信息
SELECT * FROM GV$OB_UNITS;
SELECT * FROM GV$OB_UNITS where TENANT_ID=1002;7.查看 OBServer 的信息
SELECT * FROM GV$OB_SERVERS;-- 停止服務(wù)節(jié)點
-- alter system start server '192.168.113.162:2882';
-- ALTER SYSTEM  MINOR FREEZE SERVER = ('192.168.113.162:2882');

下圖可看到mq_t1租戶創(chuàng)建成功,該租戶初始密碼為空,使用:obclient -h192.168.113.161 -P2883 -uroot -p’/aVi*H8(0%FS_YwZ-|dmo&[hjlT7pe@E’ -Doceanbase -A 進(jìn)入mq_t1租戶
在這里插入圖片描述
還可通過Navicat進(jìn)入 mq_t1租戶,初始密碼為空,進(jìn)入oceanbase后修改租戶密碼
在這里插入圖片描述
在這里插入圖片描述

5.創(chuàng)建數(shù)據(jù)庫和添加數(shù)據(jù)

在 mq_t1 租戶下創(chuàng)建zypcy數(shù)據(jù)庫,創(chuàng)建person表,添加2條數(shù)據(jù)
在這里插入圖片描述

http://m.aloenet.com.cn/news/42545.html

相關(guān)文章:

  • 如何查詢自己的企業(yè)郵箱江陰網(wǎng)站優(yōu)化公司
  • 做58同城這樣的網(wǎng)站有哪些廣告營銷推廣
  • 電子書網(wǎng)站模板今日熱點新聞事件及評論
  • 自助建站好嗎鄭州網(wǎng)絡(luò)推廣公司
  • 手機(jī)網(wǎng)站建設(shè) 豆丁關(guān)鍵詞挖掘長尾詞工具
  • 為什么選php語言做網(wǎng)站手機(jī)百度網(wǎng)盤下載慢怎么解決
  • 三級分銷網(wǎng)站制作打開網(wǎng)址資料網(wǎng)站
  • 政府集約化網(wǎng)站群建設(shè)aso推廣公司
  • 鄭州小程序制作流程及費用aso優(yōu)化服務(wù)
  • 網(wǎng)站頁面設(shè)計風(fēng)格今日網(wǎng)站收錄查詢
  • 德陽企業(yè)品牌網(wǎng)站建設(shè)引流推廣廣告怎么寫
  • 怎么利用網(wǎng)站做cpa推廣傳播易廣告投放平臺
  • 網(wǎng)站必須備案嗎社群營銷怎么做
  • 我要自學(xué)網(wǎng)ps視頻教程免費寧波網(wǎng)站優(yōu)化公司哪家好
  • 自己開發(fā)一款游戲怎么做搜索引擎seo優(yōu)化
  • 企業(yè)網(wǎng)站手機(jī)版模板免費下載上海關(guān)鍵詞優(yōu)化外包
  • php婚慶網(wǎng)站競價賬戶托管哪家好
  • 大理市住房和城鄉(xiāng)建設(shè)局網(wǎng)站磁力棒
  • wordpress 漏洞 掃描seo網(wǎng)站推廣專員
  • web網(wǎng)站開發(fā)用什么語言網(wǎng)絡(luò)廣告電話
  • 服飾網(wǎng)站模板設(shè)計百度搜索引擎怎么弄
  • 廣西網(wǎng)站建設(shè)運營費用專業(yè)代寫文案的公司
  • html網(wǎng)站開發(fā)工具有哪些互聯(lián)網(wǎng)登錄的網(wǎng)站名
  • 做sns網(wǎng)站需要什么百度熱線電話
  • 網(wǎng)站建設(shè)技術(shù)哪個好seo管理系統(tǒng)
  • qt科技感ui界面sem優(yōu)化軟件哪家好
  • 石家莊做網(wǎng)站價格網(wǎng)站優(yōu)化的關(guān)鍵詞
  • 網(wǎng)站做流量怎么賺錢的培訓(xùn)后的收獲和感想
  • 濟(jì)南網(wǎng)站建設(shè)工作室網(wǎng)球排名即時最新排名
  • 有沒有做網(wǎng)站的聯(lián)系方式經(jīng)典營銷案例分析