范文健康探索娱乐情感热点
投稿投诉
热点动态
科技财经
情感日志
励志美文
娱乐时尚
游戏搞笑
探索旅游
历史星座
健康养生
美丽育儿
范文作文
教案论文
国学影视

OceanBase学习记录(十)社区版docker安装

  [root@observer01 ~]# cat /etc/redhat-release
  CentOS Linux release 7.6.1810 (Core)
  安装docker
  服务器可以连接互联网,网络配置文件配置DNS1关键字并输入正确的dns服务器地址1.1.1. 配置本地yum源# mount /dev/cdrom /mnt mount: /dev/sr0 is write-protected, mounting read-only # cd /etc/yum.repos.d/ # mkdir bak # mv CentOS-* bak/ # vi centos.repo # yum install yum-utils-1.1.31-50.el7.noarch
  下载docker源# yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo # yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo # wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo # wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo1.1.2. 执行安装docker[root@observer01 yum.repos.d]# yum -y install docker-ce docker-ce-cli containerd.io1.1.3. Docker常用命令# 查看docker版本 docker version # 显示docker系统的信息 docker info # 日志信息 docker logs # 故障检查 service docker status # 启动关闭docker service docker start | stop # 查看容器日志 docker logs -f <容器名orID> # 清理命令,危险!!! # 清理不用的容器 docker container prune # 清理不用的镜像 docker image prune # 清理不用的卷 docker volume prune 1.1.4. 安装ob[root@observer01 yum.repos.d]# systemctl start docker    启动docker [root@observer01 yum.repos.d]# docker search oceanbase   查看docker版的ob镜像 NAME DESCRIPTION STARS OFFICIAL AUTOMATED oceanbase/oceanbase-xe OceanBase Database 2.2 Express Edition 3 oceanbase/obce-mini obce-mini is a mini standalone test image fo… 3 obpilot/oceanbase-ce 3 steps to run an OceanBase-CE docker in you… 2 oceanbase/oceanbase-ce OceanBase is open source now. This is the do… 2 zibuyu886/oceanbase-ce-cluster OceanBase ce cluster 1 oceanbase/obce-operator obce-operator 1 huweijie/oceanbase-ce-deploy 0 oceanbase/centos7 0 superbigfu/oceanbase 0 hongweiqin/anolisos-oceanbase A tentative deploy of oceanbase. 0 stutiredboy/centos_ob Build environment for OceanBase 3.1 CE. Crea… 0 [root@observer01 yum.repos.d]# docker pull obpilot/oceanbase-ce:latest   下载镜像 latest: Pulling from obpilot/oceanbase-ce 7a0437f04f83: Pull complete 615dc48ac9f1: Pull complete b10c1cdae3af: Pull complete 4f4fb700ef54: Pull complete c0f6c94a6a6a: Pull complete 792630f35e24: Pull complete Digest: sha256:7ac28415cf27ba19cb47acb67a55ebf9848ad73a63d80b7e2e85d653233dbaeb Status: Downloaded newer image for obpilot/oceanbase-ce:latest docker.io/obpilot/oceanbase-ce:latest[root@observer01 yum.repos.d]# docker images     查看镜像 REPOSITORY TAG IMAGE ID CREATED SIZE obpilot/oceanbase-ce latest 943379e0b05b 7 weeks ago 2.25GB docker run -itd -m 10G -p 2881:2881 -p 2883:2883 --name oceanbase-ce obpilot/oceanbase-ce:latest docker exec -it oceanbase-ce bash     #启动docker [admin@07f6a5ad8c5c ~]$ obd cluster start obdemo    #启动集群 Get local repositories and plugins ok Open ssh connection ok Cluster param config check ok Check before start observer ok [WARN] (127.0.0.1) The recommended value of fs.aio-max-nr is 1048576 (Current value: 65536) Check before start obproxy ok 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.1 | 2881 | zone1 | active | +-----------+---------+------+-------+--------+  Start obproxy ok obproxy program health check ok Connect to obproxy ok Initialize cluster +---------------------------------------------+ | obproxy | +-----------+------+-----------------+--------+ | ip | port | prometheus_port | status | +-----------+------+-----------------+--------+ | 127.0.0.1 | 2883 | 2884 | active | +-----------+------+-----------------+--------+ obdemo running [admin@07f6a5ad8c5c ~]$
  进入docker容器[root@observer01 ~]# docker exec -it oceanbase-ce bash [admin@07f6a5ad8c5c ~]$ ls bmsql.sql obproxy oceanbase-ce readme.md    readme.md文件里面有集群的部署信息,包括集群名称连接用户名密码等信息
  连接ob集群[admin@07f6a5ad8c5c ~]$ obclient -h127.1 -uroot@sys#obce-single -P2883 -prootPWD123 -c -A oceanbase Welcome to the OceanBase. Commands end with ; or g.   #密码及集群名称查看md文件 Your MySQL connection id is 8 Server version: 5.6.25 OceanBase 3.1.1 (r4-8c615943cbd25a6f7b8bdfd8677a13a21709a05e) (Built Oct 21 2021 10:52:05)  Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.  Type "help;" or "h" for help. Type "c" to clear the current input statement.  MySQL [oceanbase]> MySQL [oceanbase]> MySQL [oceanbase]> show databases; +--------------------+ | Database | +--------------------+ | oceanbase | | information_schema | | mysql | | SYS | | LBACSYS | | ORAAUDITOR | | test | +--------------------+ 7 rows in set (0.002 sec) 1.1.5. 查看集群的config.yaml
  里面包括的相关的密码和集群信息 [admin@07f6a5ad8c5c obdemo]$ pwd /home/admin/.obd/cluster/obdemo [admin@07f6a5ad8c5c obdemo]$ ls config.yaml [admin@07f6a5ad8c5c obdemo]$ cat config.yaml ## Only need to configure when remote login is required # user: # username: your username # password: your password if need # key_file: your ssh-key file path if need # port: your ssh port, default 22 # timeout: ssh connection timeout (second), default 30 oceanbase-ce: servers: # Please don"t use hostname, only IP can be supported - 127.0.0.1 global: # The working directory for OceanBase Database. OceanBase Database is started under this directory. This is a required field. home_path: /home/admin/oceanbase-ce # The directory for data storage. The default value is $home_path/store. # data_dir: /data/1 # The directory for clog, ilog, and slog. The default value is the same as the data_dir value. redo_dir: /data/log1 # Please set devname as the network adaptor"s name whose ip is in the setting of severs. # if set severs as "127.0.0.1", please set devname as "lo" # if current ip is 192.168.1.10, and the ip"s network adaptor"s name is "eth0", please use "eth0" devname: lo mysql_port: 2881 # External port for OceanBase Database. The default value is 2881. rpc_port: 2882 # Internal port for OceanBase Database. The default value is 2882. zone: zone1 cluster_id: 1 # please set memory limit to a suitable value which is matching resource. memory_limit: 8G # The maximum running memory for an observer system_memory: 4G # The reserved system memory. system_memory is reserved for general tenants. The default value is 30G. stack_size: 512K cpu_count: 16 cache_wash_threshold: 1G __min_full_resource_pool_memory: 268435456 workers_per_cpu_quota: 10 schema_history_expire_time: 1d # The value of net_thread_count had better be same as cpu"s core number. net_thread_count: 4 major_freeze_duty_time: Disable minor_freeze_times: 10 enable_separate_sys_clog: 0 enable_merge_by_turn: FALSE #datafile_disk_percentage: 20 # The percentage of the data_dir space to the total disk space. This value takes effect only when datafile_size is 0. The default value is 90. datafile_size: 5G syslog_level: ERROR # System log level. The default value is INFO. enable_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_name appname: obce-single root_password: rootPWD123 # root user password, can be empty proxyro_password: proxyROPWD123 # proxyro user pasword, consistent with obproxy"s observer_sys_password, can be empty obproxy: servers: - 127.0.0.1 depends: - oceanbase-ce global: listen_port: 2883 # External port. The default value is 2883. prometheus_listen_port: 2884 # The Prometheus port. The default value is 2884. home_path: /home/admin/obproxy # oceanbase root server list # format: ip:mysql_port,ip:mysql_port rs_list: 127.0.0.1:2881 enable_cluster_checkout: false # observer cluster name, consistent with oceanbase-ce"s appname cluster_name: obce-single obproxy_sys_password: proxySYSPWD123 # obproxy sys user password, can be empty observer_sys_password: proxyROPWD123 # proxyro user pasword, consistent with oceanbase-ce"s proxyro_password, can be empty automatic_match_work_thread: false work_thread_num: 12 xflush_log_level: ERROR monitor_log_level: ERROR syslog_level: ERROR log_dir_size_threshold: 1G enable_compression_protocol: false [admin@07f6a5ad8c5c obdemo]$1.1.6. 通过obproxy连接集群[admin@07f6a5ad8c5c obdemo]$ obclient -h127.1 -uroot@sys#obce-single -P2883 -prootPWD123 -c -A oceanbase Welcome to the OceanBase. Commands end with ; or g. Your MySQL connection id is 13 Server version: 5.6.25 OceanBase 3.1.1 (r4-8c615943cbd25a6f7b8bdfd8677a13a21709a05e) (Built Oct 21 2021 10:52:05)  Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.  Type "help;" or "h" for help. Type "c" to clear the current input statement.  MySQL [oceanbase]> show databases; +--------------------+ | Database | +--------------------+ | oceanbase | | information_schema | | mysql | | SYS | | LBACSYS | | ORAAUDITOR | | test | +--------------------+ 7 rows in set (0.016 sec)1.1.7. 通过observer连接[admin@07f6a5ad8c5c obdemo]$ obclient -h127.1 -uroot -P2881 -prootPWD123 -c -A oceanbase Welcome to the OceanBase. Commands end with ; or g. Your MySQL connection id is 3221518706 Server version: 5.7.25 OceanBase 3.1.1 (r4-8c615943cbd25a6f7b8bdfd8677a13a21709a05e) (Built Oct 21 2021 10:52:05)  Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.  Type "help;" or "h" for help. Type "c" to clear the current input statement.  MySQL [oceanbase]>1.1.8. 创建租户数据库及表obclient -h127.1 -uroot@sys#obce-single -P2883 -prootPWD123 -c -A oceanbase alter resource unit sys_unit_config min_cpu=5; CREATE resource unit S4C1G max_cpu=4, min_cpu=4, max_memory="1G", min_memory="1G", max_iops=10000, min_iops=1000, max_session_num=1000000, max_disk_size="1024G"; CREATE resource pool my_pool unit = "S4C1G", unit_num = 1; create tenant obmysql resource_pool_list=("my_pool"), primary_zone="RANDOM",comment "mysql tenant/instance", charset="utf8" set ob_tcp_invited_nodes="%", ob_compatibility_mode="mysql"; exit;1.1.9. 登陆obmysql租户$ obclient -h 127.1 -uroot@obmysql#obce-single -P2883 -p -c -A test Enter password: Welcome to the OceanBase. Commands end with ; or g. Your MySQL connection id is 9 Server version: 5.6.25 OceanBase 3.1.1 (r4-8c615943cbd25a6f7b8bdfd8677a13a21709a05e) (Built Oct 21 2021 10:52:05)  Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.  Type "help;" or "h" for help. Type "c" to clear the current input statement.  MySQL [test]> MySQL [test]> show databases; +--------------------+ | Database | +--------------------+ | oceanbase | | information_schema | | mysql | | test | +--------------------+ 4 rows in set (0.002 sec)  MySQL [test]> source bmsql.sql Query OK, 1 row affected (0.034 sec)  Query OK, 0 rows affected (0.054 sec)  Query OK, 0 rows affected (0.023 sec)  Query OK, 0 rows affected (0.038 sec)  +-----------------+------------+---------------+ | Tablegroup_name | Table_name | Database_name | +-----------------+------------+---------------+ | oceanbase | NULL | NULL | | tpcc_group | NULL | NULL | +-----------------+------------+---------------+ 2 rows in set (0.034 sec)  +----------------------------------------------+ | Grants for tpcc@% | +----------------------------------------------+ | GRANT USAGE ON *.* TO "tpcc" | | GRANT SELECT ON `oceanbase`.* TO "tpcc" | | GRANT ALL PRIVILEGES ON `tpccdb`.* TO "tpcc" | +----------------------------------------------+ 3 rows in set (0.072 sec)  Database changed Query OK, 0 rows affected (0.145 sec)  Query OK, 0 rows affected (0.040 sec)  Query OK, 0 rows affected (0.078 sec)  Query OK, 0 rows affected (0.158 sec)  Query OK, 0 rows affected (0.209 sec)  Query OK, 0 rows affected (0.213 sec)  Query OK, 0 rows affected (0.312 sec)  Query OK, 0 rows affected (0.370 sec)  Query OK, 0 rows affected (0.242 sec)  Query OK, 0 rows affected (0.234 sec)  Query OK, 0 rows affected (0.177 sec)  Query OK, 0 rows affected (0.183 sec)  MySQL [tpccdb]>
  1.1.10. 启停命令obd cluster stop obdemo obd cluster start obdemo

特斯拉将牵手比亚迪,你看好这对cp吗?近日有传闻称比亚迪将于明年第二季度向特斯拉供应刀片电池,且目前配备刀片电池的特斯拉车型已进入C样测试阶段。所谓C样,就是批量生产的样件,用于工艺和生产试验验证,一旦通过了验证,就能消防安全在充电桩面前不值一提,是谁给海南省的勇气?近日,海南省发布了电动汽车充电设施建设消防技术服务5项措施。措施中明确指出任何居住小区单位个人在既有停车位安装电动汽车充电设施,无需向当地消防救援机构申报审批手续全省各级物业服务企警用摩托车仅维修费就1。7万元?深圳交警回应这只是评估价格大家都知道,从摩托车问世到现在已经有上百年的时间了,早在前一个世纪的1872年,德国人戴姆勒就设计出四冲程发动机,然后在1883年,他与好友威尔赫姆迈巴赫合作,于1885年发明了摩大连10岁女童被杀案昨天开庭,受害者母亲被气哭了曾经引起广泛关注的大连10岁女童被杀案昨天终于开庭了,本来很多网友都希望看看这次开庭,杀害10岁女童的13岁少年也就是本案的嫌疑人蔡某某的家长会怎么说,法庭会怎么判,而令人意想不到柬埔寨不再是中国人的天堂西港发生多起绑架凶杀中国公民案件柬埔寨是世界上最不发达的国家之一,其主要支柱产业就是农业,这些年开始搞引进外资,大力发展旅游业和纺织服装业等,并且成立了西哈努克经济特区,当地人称其为西港。西港成立的时候,为了吸引卢伟冰解释Redmi红米8处理器,不输骁龙625前几天小米发布了Redmi红米8系列入门手机,对于这款手机,699起步的价格,还有超强的续航,还有潮流的外观,这样看着已经可以了哈。但是呢,网友还是找到了吐槽的地方,笔者在此不得不vivo最抢眼!手机性价比和性能排行出炉国产手机霸榜5G时代来啦,很多人对于5G的认知还是停留在网上,大部分小伙伴是没有体验过5G的,那么它到底真的有网上说的那么快吗,其实最好的也是最直接的办法就是去体验一下。现在很多手机都已经支持仅1798起!国产骁龙855新旗舰4500大电池男士焕颜双WIF开篇之前,笔者直接问小伙伴,你们买手机的需求是啥呢?估计很多人都说要求不高,外观好看,拍照够用,玩游戏不卡。其实看似简单的要求实际上并不简单,毕竟这样的手机至少也是旗舰级别的。当然与麒麟9000肩并肩!三星Exynos1080跑分超69万对于智能手机产品而言,处理器就如同大脑对于人一样重要。毕竟,只有处理器性能足够强悍,智能手机产品各个部分的运行状态才能保持流畅和顺滑。因此,大家对于高性能处理器的关注度一直都是比较节假日高峰,需要多少充电桩才不会让车主大打出手?在刚过去几天的国庆假期,有车主驾驶纯电动车在服务区给车辆充电时足足花费了五个多小时,其中四个小时的时间都在排队等待也有车主为了抢夺充电桩大打出手。补能困难的问题在平时或许没有那么突太凶残!51岁老汉因被交警扣押电动车,拿起水果刀刺向交警脖子现在,有些人就是容易冲动,因为一点小事情就动刀子,结果不但害了别人,也害了自己,最终把自己送进了大牢里,结果后悔莫及。今天我们要说的,就是一名51岁的农村老汉,这件事就发生在江苏扬
厉害了!国内高管个人年薪50强,这潮商家族一家四口全上榜近日,钛媒体通过分析各大科技型上市公司(涵盖A股港股和美股)的高管薪酬数据,整理发布了高管薪酬排行公司Top20高管薪资排行Top50榜单,引发行业关注。高管薪酬排行Top20图片字节跳动布局教师服务新赛道!双减政策下,这些教培公司选择跨界转型餐饮新能源双减政策下,教培公司业务调整与转型动作持续受到市场关注。日前,有媒体报道称,字节跳动旗下大力教育推出教师服务平台潭水源,该平台旨在通过研修课程培训学习教学素材专家引领等多元服务,系苹果员工欲成立工会,目的是要集体使用安卓手机?大家严肃点,说点正事。在智能手机领域,苹果的iPhone可谓占据了半壁江山,抛开品牌因素,自然也是因为iPhone自身品质过硬。就连华为老总任正非在接受采访时也曾表示自己的家人在使苹果分享iPhone13Pro拍摄的最新短片人生不过是一场梦IT之家2月18日消息,苹果公司今天分享了一部名为人生不过是一场梦的短片,该短片由韩国电影导演朴赞郁创作,他以老男孩小姐亲切的金子等影片而闻名。这部21分钟的影片是由苹果公司委托制苹果手机那么贵没人觉得贵,华为比苹果便宜总有人说贵?很有意思的提问,这里面涉及很多心理因素。第一大家觉得曾经的手机霸主,诺基亚贵不贵?提到了贵,不要下意识的去想那些昂贵的诺基亚机型,大体上的感觉呢?是不是感觉并不贵?这款机子是诺基亚苹果很快支持面容ID的维修不再需要更换整个设备根据MacRumors从可靠消息来源获得的一份内部备忘录,AppleStore和苹果授权服务提供商很快就可以维修iPhoneXS和更新机型的面容ID,而不必更换整个设备。苹果公司表全球最大黑客组织宣布对俄发起网络战争俄罗斯卫星通讯社刚刚消息,全球最大的黑客组织宣布对俄罗斯发起网络战争。国际黑客组织匿名者(Anonymous)就俄罗斯在乌克兰的军事行动宣布对俄发动网络战争,并声称对今日俄罗斯(R纳米碳酸钙常用5大类表面改性剂及研究进展2022年粉体表面改性技术培训交流会将于2022年4月21日22日在江苏南京举行,报名请关注V信公众号粉体技术网,涉及非金属矿粉体企业碳酸钙,硅微粉,滑石,重晶石,硅灰石,高岭土,字节跳动员工猝死?当事人妻子怀孕两个月,房贷是否需要继续还?2月22日深夜,脉脉上字节跳动同事圈板块,一则字节(字节跳动)又猝死一位,妻子怀孕两个月,惨的消息被广泛传开。图脉脉随着热度不断发酵,更多细节被曝出,经由这位妻子在社交平台的发声,身份威胁安全方案提供商中安网星完成战略融资,投资方为微步在线36氪获悉,身份威胁安全方案提供商中安网星已于日前完成战略融资。本轮投资方为微步在线。航行资本担任本轮融资财务顾问。根据介绍,中安网星成立于2020年8月,是一家提供身份威胁安全保米尔MYDT网络管理开发笔记1。概述systemdnetworkd是一个管理网络服务程序,可以用来管理以太网,WIFI,网桥,EC20等模块的网络优先级,以及连接情况。配合systemdresolved服务一