日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

oceanbase安装

發(fā)布時間:2023/12/16 编程问答 24 豆豆
生活随笔 收集整理的這篇文章主要介紹了 oceanbase安装 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

環(huán)境信息: CentOS Linux release 7.2.1511
安裝版本: 3.1.0 單機

1、安裝步驟
通過 YUM 軟件源安裝 OBD

sudo yum install -y yum-utils sudo yum-config-manager --add-repo https://mirrors.aliyun.com/oceanbase/OceanBase.repo sudo yum install -y ob-deploy

2、部署 OceanBase 數(shù)據(jù)庫
2.1、增加配置文件
本地安裝:即中控機器和目標機器是同一臺機器,配置文件。
單機安裝:即中控機器和目標機器不是同一臺機器,且目標機器只有一臺,配置文件。
分布式安裝:配置文件。
配置信息如下

[root@xlucas1 oceanbase]# pwd /opt/oceanbase [root@xlucas1 oceanbase]# cat mini-local-example.yaml oceanbase-ce:servers:# Please don't use hostname, only IP can be supported- 127.0.0.1global:home_path: /opt/oceanbase/data#這個路徑一定要是是空的,否則會安裝失敗# 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: lomysql_port: 2883rpc_port: 2882zone: zone1cluster_id: 1datafile_size: 8G# please set memory limit to a suitable value which is matching resource. memory_limit: 8Gsystem_memory: 4Gstack_size: 512Kcpu_count: 16cache_wash_threshold: 1G__min_full_resource_pool_memory: 268435456workers_per_cpu_quota: 10schema_history_expire_time: 1d# The value of net_thread_count had better be same as cpu's core number. net_thread_count: 4sys_bkgd_migration_retry_num: 3minor_freeze_times: 10enable_separate_sys_clog: 0enable_merge_by_turn: FALSEdatafile_disk_percentage: 20

2.2、安裝
注意這個路徑是需要指定到配置文件

[root@xlucas1 oceanbase]# obd cluster deploy xlucas -c /opt/oceanbase/mini-local-example.yaml

安裝成功提示

[root@xlucas1 oceanbase]# obd cluster deploy xlucas -c /opt/oceanbase/mini-local-example.yaml oceanbase-ce-3.1.0 already installed +-------------------------------------------------------------------+ | Packages | +--------------+---------+------------------------------------------+ | Repository | Version | Md5 | +--------------+---------+------------------------------------------+ | oceanbase-ce | 3.1.0 | 56f57e9843e719d830ec03c206d914f4b3adc82b | +--------------+---------+------------------------------------------+ Open ssh connection ok Remote oceanbase-ce-3.1.0-56f57e9843e719d830ec03c206d914f4b3adc82b repository install ok Remote oceanbase-ce-3.1.0-56f57e9843e719d830ec03c206d914f4b3adc82b repository lib check ok 127.0.0.1 initializes cluster work home xlucas deployed

3、使用數(shù)據(jù)庫
3.1、啟動數(shù)據(jù)庫

[root@xlucas1 oceanbase]# obd cluster start xlucas Get local repositories and plugins ok [WARN] (127.0.0.1) fs.aio-max-nr must not be less than 1048576 (Current value: 65536) [WARN] (127.0.0.1) open files number must not be less than 655350 (Current value: 65535) 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.0 | 2883 | zone1 | active | +-----------+---------+------+-------+--------+ xlucas running

3.2、查看數(shù)據(jù)庫狀態(tài)

[root@xlucas1 oceanbase]# obd cluster display xlucas Get local repositories and plugins ok Connect to observer ok Wait for observer init ok +---------------------------------------------+ | observer | +-----------+---------+------+-------+--------+ | ip | version | port | zone | status | +-----------+---------+------+-------+--------+ | 127.0.0.1 | 3.1.0 | 2883 | zone1 | active | +-----------+---------+------+-------+--------+

3.3、安裝 OceanBase 數(shù)據(jù)庫客戶端 OBClient

sudo yum install -y obclient

運行以下命令,使用 OBClient 客戶端連接 OceanBase 數(shù)據(jù)庫:

obclient -h<your_ip> -P<observer_mysql_port> -uroot [root@xlucas1 ~]# obclient -h127.0.0.1 -P2883 -uroot Welcome to the OceanBase. Commands end with ; or \g. Your MySQL connection id is 3221487655 Server version: 5.7.25 OceanBase 3.1.0 (r-) (Built May 30 2021 11:21:29)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 [(none)]>

3.4、簡單使用

MySQL [oceanbase]> select svr_ip,svr_port, cpu_total, mem_total, disk_total, zone from __all_virtual_server_stat; +-----------+----------+-----------+------------+------------+-------+ | svr_ip | svr_port | cpu_total | mem_total | disk_total | zone | +-----------+----------+-----------+------------+------------+-------+ | 127.0.0.1 | 2882 | 14 | 4294967296 | 8589934592 | zone1 | +-----------+----------+-----------+------------+------------+-------+ 1 row in set (0.007 sec)

5、遇到問題:
1、沒有指定到配置文件,安裝會報錯,找不到配置文件

[root@xlucas1 oceanbase]# obd cluster deploy xlucas -c /opt/oceanbase/ [ERROR] copy error [ERROR] Failed to create deploy: xlucas. please check you configuration file

2、在部署數(shù)據(jù)庫的時候,配置文件中的home_path參數(shù)對應的路徑要是空路徑,否則會報錯

[root@xlucas1 oceanbase]# obd cluster deploy xlucas -c /opt/oceanbase/mini-local-example.yaml Update OceanBase-community-stable-el7 ok Update OceanBase-development-kit-el7 ok Download oceanbase-ce-3.1.0-1.el7.x86_64.rpm (44.17 M): 100% [####################################################################################################################################################] Time: 0:00:59 777.72 kB/s Package oceanbase-ce-3.1.0 is available install oceanbase-ce-3.1.0 for local ok +-------------------------------------------------------------------+ | Packages | +--------------+---------+------------------------------------------+ | Repository | Version | Md5 | +--------------+---------+------------------------------------------+ | oceanbase-ce | 3.1.0 | 56f57e9843e719d830ec03c206d914f4b3adc82b | +--------------+---------+------------------------------------------+ Open ssh connection ok Remote oceanbase-ce-3.1.0-56f57e9843e719d830ec03c206d914f4b3adc82b repository install ok Remote oceanbase-ce-3.1.0-56f57e9843e719d830ec03c206d914f4b3adc82b repository lib check !! [WARN] 127.0.0.1 oceanbase-ce-3.1.0-56f57e9843e719d830ec03c206d914f4b3adc82b require: libmariadb.so.3Try to get lib-repository Download oceanbase-ce-libs-3.1.0-1.el7.x86_64.rpm (413.07 K): 100% [##############################################################################################################################################] Time: 0:00:00 826.11 kB/s Package oceanbase-ce-libs-3.1.0 is available install oceanbase-ce-libs-3.1.0 for local ok Use oceanbase-ce-libs-3.1.0-b70d3839280f145a86af26811bbfcdfaeb645509 for oceanbase-ce-3.1.0-56f57e9843e719d830ec03c206d914f4b3adc82b Remote oceanbase-ce-libs-3.1.0-b70d3839280f145a86af26811bbfcdfaeb645509 repository install ok Remote oceanbase-ce-3.1.0-56f57e9843e719d830ec03c206d914f4b3adc82b repository lib check ok 127.0.0.1 initializes cluster work home [ERROR] fail to init 127.0.0.1 home path: /opt/oceanbase is not empty

總結

以上是生活随笔為你收集整理的oceanbase安装的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內容還不錯,歡迎將生活随笔推薦給好友。