使用mysql存放Ambari元数据的配置案例

                                              作者:尹正杰

版权声明:原创作品,谢绝转载!否则将追究法律责任。

 

 

 

一.环境准备

   详情请参考我之前的笔记:离线方式部署Ambari2.6.0.0 中关于第三步和第四步的操作。

 

二.安装ambari-server(需要配置好本地yum源哟~也就是第一步骤) 

[root@node101 ~]# yum -y install ambari-server
Loaded plugins: fastestmirror, priorities
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * extras: mirrors.tuna.tsinghua.edu.cn
 * updates: mirrors.tuna.tsinghua.edu.cn
23 packages excluded due to repository priority protections
Resolving Dependencies
--> Running transaction check
---> Package ambari-server.x86_64 0:2.6.0.0-267 will be installed
--> Processing Dependency: postgresql-server >= 8.1 for package: ambari-server-2.6.0.0-267.x86_64
--> Running transaction check
---> Package postgresql-server.x86_64 0:9.2.24-1.el7_5 will be installed
--> Processing Dependency: postgresql-libs(x86-64) = 9.2.24-1.el7_5 for package: postgresql-server-9.2.24-1.el7_5.x86_64
--> Processing Dependency: postgresql(x86-64) = 9.2.24-1.el7_5 for package: postgresql-server-9.2.24-1.el7_5.x86_64
--> Processing Dependency: libpq.so.5()(64bit) for package: postgresql-server-9.2.24-1.el7_5.x86_64
--> Running transaction check
---> Package postgresql.x86_64 0:9.2.24-1.el7_5 will be installed
---> Package postgresql-libs.x86_64 0:9.2.24-1.el7_5 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

======================================================================================================================================
 Package                             Arch                     Version                          Repository                        Size
======================================================================================================================================
Installing:
 ambari-server                       x86_64                   2.6.0.0-267                      ambari-2.6.0.0                   712 M
Installing for dependencies:
 postgresql                          x86_64                   9.2.24-1.el7_5                   base                             3.0 M
 postgresql-libs                     x86_64                   9.2.24-1.el7_5                   base                             234 k
 postgresql-server                   x86_64                   9.2.24-1.el7_5                   base                             3.8 M

Transaction Summary
======================================================================================================================================
Install  1 Package (+3 Dependent packages)

Total download size: 720 M
Installed size: 809 M
Downloading packages:
(1/4): postgresql-libs-9.2.24-1.el7_5.x86_64.rpm                                                               | 234 kB  00:00:00     
(2/4): postgresql-server-9.2.24-1.el7_5.x86_64.rpm                                                             | 3.8 MB  00:00:04     
warning: /var/cache/yum/x86_64/7/ambari-2.6.0.0/packages/ambari-server-2.6.0.0-267.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID 07513cad: NOKEY
Public key for ambari-server-2.6.0.0-267.x86_64.rpm is not installed
(3/4): ambari-server-2.6.0.0-267.x86_64.rpm                                                                    | 712 MB  00:00:09     
(4/4): postgresql-9.2.24-1.el7_5.x86_64.rpm                                                                    | 3.0 MB  00:00:31     
--------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                  22 MB/s | 720 MB  00:00:32     
Retrieving key from http://node101.yinzhengjie.org.cn/ambari/ambari/centos7/2.6.0.0-267/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
Importing GPG key 0x07513CAD:
 Userid     : "Jenkins (HDP Builds) <jenkin@hortonworks.com>"
 Fingerprint: df52 ed4f 7a3a 5882 c099 4c66 b973 3a7a 0751 3cad
 From       : http://node101.yinzhengjie.org.cn/ambari/ambari/centos7/2.6.0.0-267/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : postgresql-libs-9.2.24-1.el7_5.x86_64                                                                              1/4 
  Installing : postgresql-9.2.24-1.el7_5.x86_64                                                                                   2/4 
  Installing : postgresql-server-9.2.24-1.el7_5.x86_64                                                                            3/4 
  Installing : ambari-server-2.6.0.0-267.x86_64                                                                                   4/4 
  Verifying  : postgresql-server-9.2.24-1.el7_5.x86_64                                                                            1/4 
  Verifying  : postgresql-libs-9.2.24-1.el7_5.x86_64                                                                              2/4 
  Verifying  : ambari-server-2.6.0.0-267.x86_64                                                                                   3/4 
  Verifying  : postgresql-9.2.24-1.el7_5.x86_64                                                                                   4/4 

Installed:
  ambari-server.x86_64 0:2.6.0.0-267                                                                                                  

Dependency Installed:
  postgresql.x86_64 0:9.2.24-1.el7_5      postgresql-libs.x86_64 0:9.2.24-1.el7_5      postgresql-server.x86_64 0:9.2.24-1.el7_5     

Complete!
[root@node101 ~]# 

 

三.部署mysql数据库

  部署mysql倒是很简单,建议大家部署mysql 的主从同步,以保证数据库的高可用性。

1>.安装mysql数据库

[root@node101 ~]# yum -y install wget                                    #安装下载工具包
[root@node101 ~]# wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
--2018-12-07 12:43:29--  http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
Resolving dev.mysql.com (dev.mysql.com)... 137.254.60.11
Connecting to dev.mysql.com (dev.mysql.com)|137.254.60.11|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://101.96.8.156/dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm [following]
--2018-12-07 12:43:29--  http://101.96.8.156/dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
Connecting to 101.96.8.156:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm [following]
--2018-12-07 12:43:33--  https://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
Connecting to dev.mysql.com (dev.mysql.com)|137.254.60.11|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://repo.mysql.com//mysql-community-release-el7-5.noarch.rpm [following]
--2018-12-07 12:43:34--  https://repo.mysql.com//mysql-community-release-el7-5.noarch.rpm
Resolving repo.mysql.com (repo.mysql.com)... 23.51.209.162
Connecting to repo.mysql.com (repo.mysql.com)|23.51.209.162|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 6140 (6.0K) [application/x-redhat-package-manager]
Saving to: ‘mysql-community-release-el7-5.noarch.rpm’

100%[===========================================================================>] 6,140       --.-K/s   in 0s      

2018-12-07 12:43:34 (666 MB/s) - ‘mysql-community-release-el7-5.noarch.rpm’ saved [6140/6140]

[root@node101 ~]# 
[root@node101 ~]# ll
total 9621676
-rwxrwxrwx. 1 root root 1760430816 Dec  5 23:01 ambari-2.6.0.0-centos7.tar.gz
-rwxr-xr-x. 1 root root 7020369101 Dec  6 10:24 HDP-2.6.3.0-centos7-rpm.tar.gz
-rwxr-xr-x. 1 root root  880016614 Dec  6 10:24 HDP-UTILS-1.1.0.21-centos7.tar.gz
-rw-r--r--. 1 root root  191753373 Dec  5 15:32 jdk-8u191-linux-x64.tar.gz
-rw-r--r--  1 root root       6140 Nov 12  2015 mysql-community-release-el7-5.noarch.rpm
[root@node101 ~]# 
[root@node101 ~]# wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm      #下载mysql yum源

相关文章:

  • 2022-12-23
  • 2021-07-25
  • 2022-12-23
  • 2021-12-04
  • 2021-11-28
  • 2022-12-23
  • 2021-05-09
猜你喜欢
  • 2022-12-23
  • 2022-03-06
  • 2022-02-20
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-08
相关资源
相似解决方案