使用obd離線安裝oceanbase


標籤:pass   plugin   erro   glob   net   deploy   eth   使用   _id   

 

1、在可以聯網的機器上下載需要的安裝包

https://open.oceanbase.com/softwareCenter/community
ob-deploy-*.x86_64.rpm
oceanbase-ce-*.x86_64.rpm
oceanbase-ce-libs-*.x86_64.rpm

 

2、將離線包上傳到中控機

[[email protected] rpm]# pwd
/home/rpm
[[email protected] rpm]# ll
總用量 66140
-rw-r--r--. 1 root root     1399 7月  27 14:20 mini_local.yaml
-rw-r--r--. 1 root root 12894260 6月  28 19:49 ob-deploy-1.0.2-2.el7.x86_64.rpm
-rw-r--r--. 1 root root 46315968 5月  30 19:53 oceanbase-ce-3.1.0-1.el7.x86_64.rpm
-rw-r--r--. 1 root root   422984 5月  30 19:53 oceanbase-ce-libs-3.1.0-1.el7.x86_64.rpm

 

3、安裝ob-deploy軟體

[[email protected] rpm]# rpm -ivh ob-deploy-1.0.2-2.el7.x86_64.rpm 
警告:ob-deploy-1.0.2-2.el7.x86_64.rpm: 頭V4 RSA/SHA1 Signature, 金鑰 ID e9b4a7aa: NOKEY
準備中...                          ################################# [100%]
正在升級/安裝...
   1:ob-deploy-1.0.2-2.el7            ################################# [100%]
Installation of obd finished successfully
Please source /etc/profile.d/obd.sh to enable it
[[email protected] rpm]# source /etc/profile.d/obd.sh 
[[email protected] rpm]# 

 

4、將離線rpm包加入到本地映象

[[email protected] rpm]# obd mirror clone /home/rpm/*.rpm
name: ob-deploy
version: 1.0.2
release:2.el7
arch: x86_64
md5: 64615337b41fb1261a7ed271944f61b09f9669c7
add /home/rpm/ob-deploy-1.0.2-2.el7.x86_64.rpm to local mirror
name: obproxy
version: 3.1.0
release:1.el7
arch: x86_64
md5: 0b17cf0459a3b53c5a2febb6572894d183154c64
add /home/rpm/obproxy-3.1.0-1.el7.x86_64.rpm to local mirror
name: oceanbase-ce
version: 3.1.0
release:1.el7
arch: x86_64
md5: 56f57e9843e719d830ec03c206d914f4b3adc82b
add /home/rpm/oceanbase-ce-3.1.0-1.el7.x86_64.rpm to local mirror
name: oceanbase-ce-libs
version: 3.1.0
release:1.el7
arch: x86_64
md5: b70d3839280f145a86af26811bbfcdfaeb645509
add /home/rpm/oceanbase-ce-libs-3.1.0-1.el7.x86_64.rpm to local mirror
[[email protected] rpm]# 

  

5、clone後驗證

clone成功後在對應的local目錄確認,已將安裝包從最初的/home/rpm拷貝到/root/.obd/mirror/local
[[email protected] local]# pwd
/root/.obd/mirror/local
[[email protected] local]# ll
總用量 66132
-rw-r--r--. 1 root root 12894260 7月  27 14:17 ob-deploy-1.0.2-2.el7.x86_64.rpm
-rw-r--r--. 1 root root 46315968 7月  27 14:17 oceanbase-ce-3.1.0-1.el7.x86_64.rpm
-rw-r--r--. 1 root root   422984 7月  27 14:17 oceanbase-ce-libs-3.1.0-1.el7.x86_64.rpm

#檢視local倉庫映象的包情況
[[email protected] local]# obd mirror list local
+-------------------------------------------------------------------------------------------+
|                                     local Package List                                    |
+-------------------+---------+---------+--------+------------------------------------------+
| name              | version | release | arch   | md5                                      |
+-------------------+---------+---------+--------+------------------------------------------+
| ob-deploy         | 1.0.2   | 2.el7   | x86_64 | 64615337b41fb1261a7ed271944f61b09f9669c7 |
| oceanbase-ce      | 3.1.0   | 1.el7   | x86_64 | 56f57e9843e719d830ec03c206d914f4b3adc82b |
| oceanbase-ce-libs | 3.1.0   | 1.el7   | x86_64 | b70d3839280f145a86af26811bbfcdfaeb645509 |
+-------------------+---------+---------+--------+------------------------------------------+
[[email protected] local]# 

 

6、重點(預設obd部署的時候使用線上遠端安裝,如果要本地安裝需刪除或者重新命名remote目錄)

[[email protected] mirror]# pwd
/root/.obd/mirror
[[email protected] mirror]# mv remote/ remote_bak

 

  

7、部署ob叢集(for local ok再次說明是使用的本地倉庫的離線安裝包)

[[email protected] ~]# obd cluster deploy myob_test8 -c /home/rpm/mini_local.yaml
Package oceanbase-ce-3.1.0 is available.
install oceanbase-ce-3.1.0 for local ok
+-----------------------------------------------------------------------------+
|                                   Packages                                  |
+--------------+---------+---------+------------------------------------------+
| Repository   | Version | Release | Md5                                      |
+--------------+---------+---------+------------------------------------------+
| oceanbase-ce | 3.1.0   | 1.el7   | 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] z1(192.168.68.63) oceanbase-ce-3.1.0-56f57e9843e719d830ec03c206d914f4b3adc82b require: libmariadb.so.3

Try to get lib-repository
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
Cluster status check ok
z1(192.168.68.63) initializes cluster work home
myob_test8 deployed

 

8、啟動ob叢集

[[email protected] ~]# obd cluster start myob_test8
Get local repositories and plugins ok
Open ssh connection ok
Cluster param config check ok
Check before start observer 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 |
+---------------+---------+-------+-------+--------+
| 192.168.68.63 | 3.1.0   | 13881 | zone1 | active |
+---------------+---------+-------+-------+--------+

myob_test8 running
[[email protected] ~]# 

 

9、mini_local.yaml示例

## Only need to configure when remote login is required
#https://gitee.com/oceanbase/obdeploy/blob/master/example/mini-distributed-example.yaml
user:
  username: root
  password: root
#  key_file: your ssh-key file path if need
oceanbase-ce:
  servers:
    - name: z1
      # Please don‘t use hostname, only IP can be supported
      ip: 192.168.68.63
  global:
    # 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"
    syslog_level: ERROR
    devname: em1
    cluster_id: 1
    datafile_size: 8G
    # please set memory limit to a suitable value which is matching resource. 
    memory_limit: 8G
    system_memory: 4G
    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
    appname: myob_test8
  z1:
    mysql_port: 13881
    rpc_port: 13882
    home_path: /home/test/observer_13881
    zone: zone1

使用obd離線安裝oceanbase

標籤:pass   plugin   erro   glob   net   deploy   eth   使用   _id   

原文地址:https://www.cnblogs.com/imdba/p/15066267.html


上一篇:整理下部分基礎的Redis面試題
下一篇:TypeError: ('Keyword argument not understood:', 'input')