首页 | 新闻 | 新品 | 文库 | 方案 | 视频 | 下载 | 商城 | 开发板 | 数据中心 | 座谈新版 | 培训 | 工具 | 博客 | 论坛 | 百科 | GEC | 活动 | 主题月 | 电子展
返回列表 回复 发帖

IBM dashDB Local 从入门到精通,第 4 部分 dashDB local MPP Linux 安装指南(12)

IBM dashDB Local 从入门到精通,第 4 部分 dashDB local MPP Linux 安装指南(12)

安装 Docker Engine 1.12.6 for IBM dashDB Local使用 dashDB Local on Linux 必须安装 Docker Engine 1.12.6。我们可以使用 yum install 命令来安装 Docker            Engine,如下所示:
  • 使用下面命令安装 yum-utils package,它包含了 yum-config-manager 命令
1
yum install -y yum-utils




  • 使用下面命令添加 Docker Engine repository
1
2
yum-config-manager --add-repo https://docs.docker.com/v1.13/en ... /centos/docker.repo
yum makecache fast




  • 下载并安装 Docker Engine 1.12.6
1
2
3
# 查看 docker-engine 的所有版本,找到期望版本的精确名字,如 1.12.6-1.el7.centos <br>
yum list docker-engine --showduplicates<br>
yum -y install docker-engine-1.12.6-1.el7.centos




  • 启动 Docker Engine
1
systemctl start docker<br> systemctl enable docker




如果系统已经存在其他版本的 Docker Engine,我们需要使用如下命令替换为 Docker Engine 1.12.6 ,如下所示:
  • 使用以下命令卸载 Docker utilities
1
2
3
yum list installed | grep docker<br>
yum remove -y <em>docker_name</em><br>
yum-config-manager --disable<em>address_of_repository_for_existing_Docker_version</em>




  • 使用以下命令删除 Docker 目录
1
rm -rf /var/lib/docker




  • 使用下面命令安装 yum-utils package,它包含了 yum-config-manager 命令
1
yum install -y yum-utils




  • 使用下面命令添加 Docker Engine repository
1
2
yum-config-manager --add-repo https://docs.docker.com/v1.13/en ... /centos/docker.repo
yum makecache fast




  • 下载并安装 Docker Engine 1.12.6
1
yum -y install docker-engine-1.12.6-1.el7.centos<br>




  • 启动 Docker Engine
1
systemctl start docker<br> systemctl enable docker




部署 dashDB Local MPP我们可以从 dashDB Local Docker repository 或 Box 获取 dashDB Local 镜像并部署 dashDB Local MPP。在部署            dashDB Local MPP 时,要确保所有节点日期及时间保持同步。
  • 创建节点配置文件/mnt/clusterfs/nodes
节点配置文件/mnt/clusterfs/nodes 需要按如下格式指定每一个节点的类型、主机名及 IP              地址:node_type=node_hostname:node_IP_address,其中主机名是短机器名,可以通过执行            hostname -s 命令得到,而不是包含域名的长机器名。本次示例,我们使用三台 Linux 服务器,其中,i-8t7n6xp2 为 head            节点,i-oisebqqf、i-si5oq07a 为 data 节点,其节点配置文件如下所示:
1
2
3
4
[root@i-8t7n6xp2 clusterfs]# vi /mnt/clusterfs/nodes<br>
head_node=i-8t7n6xp2:192.168.0.2<br>
data_node1=i-oisebqqf:192.168.0.3<br>
ata_node2=i-si5oq07a:192.168.0.4




  • 获取 dashDB Local 镜像
如果从 Docker Hub 来获取 dashDB Local 镜像,需要执行以下步骤:
  • 在每台机器上,使用如下命令登录 Docker Hub:
1
2
3
4
5
6
docker login -u=docker_hub_id -e=email -p='password'<br>
本次示例:<br>
[root@i-8t7n6xp2]# <strong>docker login -u=gyzhang -e=gyzhang@cn.ibm.com
     -p='</strong><strong>xxxxxx</strong><strong>'</strong><br>
Flag --email has been deprecated,will be removed in 1.13.<br>
Login Succeeded




  • 在每台机器上,使用如下命令抓取 dashDB Local 最新版本镜像
1
2
3
4
5
6
7
8
9
10
11
12
13
For Linux operating systems on X86 hardware:<br><strong>docker pull ibmdashdb/local:latest-linux</strong><br>
For the Ubuntu operating system on POWER LE hardware:<br><strong>docker pull ibmdashdb/local:latest-ppcle</strong><br>
本次示例:<br><strong>docker pull ibmdashdb/local:latest-linux</strong><br>
Unable to find image'ibmdashdb/local:latest-linux' locally<br>
latest-linux: Pulling from ibmdashdb/local<br>
a3ed95caeb02: Pulling fs layer<br>
da71393503ec: Pulling fs layer<br>
6c10d4976ba0: Pull complete<br>
8c00dd263789: Pull complete<br>
... ...<br>
Digest:sha256:44c2a86d69f75cf8edbbd2e9731ff2a4765c2ac6b445923261285c7e8f25306a<br>
Status: Downloaded newer image for ibmdashdb/local:latest-linux<br>
8ce6b3be54c575290d0fdb95a4cacb5afdb44af1694229494fe5767631482f3b




从上述命令输出我们可以看到,ibmdashdb/local:latest-linux Docker 镜像被成功下载,其中,ibmdashdb/local            是镜像名称,latest-linux 是镜像的标记,标明该镜像是 linux 的镜像,同时该版本是目前最新版本。
如果从 Box 来获取 dashDB Local 镜像,需要执行以下步骤:
  • 下载 dashDB Local 安装包
1
2
3
4
5
For the Ubuntu operating system on POWER LE hardware:
<strong>dashdb_local_version_ppcle.tar.gz</strong><br>
For Linux operating systems on other hardware:<br><strong>dashdb_local_version.tar.gz</strong><br>
本次示例:<br>
使用<strong>dashdb_local_version.tar.gz</strong>




  • 拷贝 dashDB Local 安装包到每台机器上
  • 在每台机器上,运行如下命令解压安装包
1
2
gunzip dashdb_local_version.tar.gz<br>
gunzip dashdb_local_version_ppcle.tar.gz




  • 在每台机器上,运行如下命令获取 dashDB Local 镜像
1
2
docker load < dashdb_local_version.tar<br>
docker load <dashdb_local_version_ppcle.tar




  • 在每台机器上,创建、初始化 dashDB Local              容器
1
2
3
4
5
6
7
For the Ubuntu operating system on POWER LE hardware:<br><strong>docker run -d -it --privileged=true --net=host --name=dashDB</strong><br><strong>-v /mnt/clusterfs:/mnt/bludata0</strong><br><strong>-v /mnt/clusterfs:/mnt/blumeta0 ibmdashdb/local:latest-ppcle</strong><br>
For Linux operating systems on other hardware:<br><strong>docker run -d -it --privileged=true --net=host --name=dashDB</strong><br><strong>-v /mnt/clusterfs:/mnt/bludata0</strong><br><strong>-v /mnt/clusterfs:/mnt/blumeta0 ibmdashdb/local:latest-linux</strong><br>
本次示例:<br>
[root@i-8t7n6xp2 clusterfs]#<strong> docker run -d -it --privileged=true
     --net=host --name=dashDB -v /mnt/clusterfs:/mnt/bludata0 -v /mnt/clusterfs:/mnt/blumeta0
     ibmdashdb/local:latest-linux</strong><br>
ab5570cf56ca6a20df6d1f9c2fa13b6572793eee32ae094a378fc43ef9713156




从 dashDB Local 1.5.0 版本开始,我们也可以在 docker run 命令中指定-e            <configuration_value>=<option> 选项来改变默认的配置信息。目前,dashDB Local 最新版本是            1.9.0,目前支持的配置选项包括如下列表:
返回列表