最近在安装,百度找了些资料,发现都各种无效。自己调试用的服务器yum安装比较方便。
1、 cd /etc/yum.repos.d
2、rm -rf cloudera-cdh5.repo
3、 wget http://archive.cloudera.com/cdh5/redhat/7/x86_64/cdh/cloudera-cdh5.repo (如果是CensOS6的话, wget http://archive.cloudera.com/cdh5/redhat/6/x86_64/cdh/cloudera-cdh5.repo) ,下载失败可以多重试几次。
4、yum list|grep zookeeper
可能抛出如下错误,多执行几次即可
https://archive.cloudera.com/cdh5/redhat/7/x86_64/cdh/5/repodata/primary.xml.gz: [Errno 14] curl#6 - "Could not resolve host: archive.cloudera.com; Unknown error"
Trying other mirror.
https://archive.cloudera.com/cdh5/redhat/7/x86_64/cdh/5/repodata/primary.xml.gz: [Errno 14] curl#6 - "Could not resolve host: archive.cloudera.com; Unknown error"
Trying other mirror.
One of the configured repositories failed (Cloudera's Distribution for Hadoop, Version 5),
and yum doesn't have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work "fix" this:
1. Contact the upstream for the repository and get them to fix the problem.
2. Reconfigure the baseurl/etc. for the repository, to point to a working
upstream. This is most often useful if you are using a newer
distribution release than is supported by the repository (and the
packages for the previous distribution release still work).
3. Run the command with the repository temporarily disabled
yum --disablerepo=cloudera-cdh5 ...
4. Disable the repository permanently, so yum won't use it by default. Yum
will then just ignore the repository until you permanently enable it
again or use --enablerepo for temporary usage:
yum-config-manager --disable cloudera-cdh5
or
subscription-manager repos --disable=cloudera-cdh5
5. Configure the failing repository to be skipped, if it is unavailable.
Note that yum will try to contact the repo. when it runs most commands,
so will have to try and fail each time (and thus. yum will be be much
slower). If it is a very temporary problem though, this is often a nice
compromise:
yum-config-manager --save --setopt=cloudera-cdh5.skip_if_unavailable=true
failure: repodata/primary.xml.gz from cloudera-cdh5: [Errno 256] No more mirrors to try.
https://archive.cloudera.com/cdh5/redhat/7/x86_64/cdh/5/repodata/primary.xml.gz: [Errno 14] curl#6 - "Could not resolve host: archive.cloudera.com; Unknown error"
https://archive.cloudera.com/cdh5/redhat/7/x86_64/cdh/5/repodata/primary.xml.gz: [Errno 14] curl#6 - "Could not resolve host: archive.cloudera.com; Unknown error"
Trying other mirror.
collectd-zookeeper.x86_64 5.8.1-1.el7 epel
hue-zookeeper.x86_64 3.9.0+cdh5.16.2+8463-1.cdh5.16.2.p0.26.el7
zookeeper.x86_64 3.4.5+cdh5.16.2+159-1.cdh5.16.2.p0.23.el7
zookeeper-debuginfo.x86_64 3.4.5+cdh5.16.2+159-1.cdh5.16.2.p0.23.el7
zookeeper-native.x86_64 3.4.5+cdh5.16.2+159-1.cdh5.16.2.p0.23.el7
zookeeper-server.x86_64 3.4.5+cdh5.16.2+159-1.cdh5.16.2.p0.23.el7
5、 yum -y install zookeeper.x86_64
可能会抛出如下错误,多执行几次
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package zookeeper.x86_64 0:3.4.5+cdh5.16.2+159-1.cdh5.16.2.p0.23.el7 will be installed
--> Processing Dependency: bigtop-utils >= 0.7 for package: zookeeper-3.4.5+cdh5.16.2+159-1.cdh5.16.2.p0.23.el7.x86_64
--> Running transaction check
---> Package bigtop-utils.noarch 0:0.7.0+cdh5.16.2+0-1.cdh5.16.2.p0.22.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================================================================================================================================================================================================
Package Arch Version Repository Size
================================================================================================================================================================================================================================================================
Installing:
zookeeper x86_64 3.4.5+cdh5.16.2+159-1.cdh5.16.2.p0.23.el7 cloudera-cdh5 4.2 M
Installing for dependencies:
bigtop-utils noarch 0.7.0+cdh5.16.2+0-1.cdh5.16.2.p0.22.el7 cloudera-cdh5 11 k
Transaction Summary
================================================================================================================================================================================================================================================================
Install 1 Package (+1 Dependent package)
Total download size: 4.2 M
Installed size: 7.7 M
Downloading packages:
bigtop-utils-0.7.0+cdh5.16.2+0 FAILED 35% [==================================== ] 108 kB/s | 1.5 MB 00:00:25 ETA
https://archive.cloudera.com/cdh5/redhat/7/x86_64/cdh/5/RPMS/noarch/bigtop-utils-0.7.0%2Bcdh5.16.2%2B0-1.cdh5.16.2.p0.22.el7.noarch.rpm: [Errno 14] curl#6 - "Could not resolve host: archive.cloudera.com; Unknown error" ] 108 kB/s | 1.5 MB 00:00:25 ETA
Trying other mirror.
warning: /var/cache/yum/x86_64/7/cloudera-cdh5/packages/zookeeper-3.4.5+cdh5.16.2+159-1.cdh5.16.2.p0.23.el7.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID e8f86acd: NOKEY=================================================-] 92 kB/s | 4.2 MB 00:00:00 ETA
Public key for zookeeper-3.4.5+cdh5.16.2+159-1.cdh5.16.2.p0.23.el7.x86_64.rpm is not installed
(1/2): zookeeper-3.4.5+cdh5.16.2+159-1.cdh5.16.2.p0.23.el7.x86_64.rpm | 4.2 MB 00:00:44
Error downloading packages:
bigtop-utils-0.7.0+cdh5.16.2+0-1.cdh5.16.2.p0.22.el7.noarch: [Errno 256] No more mirrors to try.
最终安装成功
[root@iZwz93vp0go86kpwwzl5lhZ yum.repos.d]# yum -y install zookeeper.x86_64
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package zookeeper.x86_64 0:3.4.5+cdh5.16.2+159-1.cdh5.16.2.p0.23.el7 will be installed
--> Processing Dependency: bigtop-utils >= 0.7 for package: zookeeper-3.4.5+cdh5.16.2+159-1.cdh5.16.2.p0.23.el7.x86_64
--> Running transaction check
---> Package bigtop-utils.noarch 0:0.7.0+cdh5.16.2+0-1.cdh5.16.2.p0.22.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================================================================================================================================================================================================
Package Arch Version Repository Size
================================================================================================================================================================================================================================================================
Installing:
zookeeper x86_64 3.4.5+cdh5.16.2+159-1.cdh5.16.2.p0.23.el7 cloudera-cdh5 4.2 M
Installing for dependencies:
bigtop-utils noarch 0.7.0+cdh5.16.2+0-1.cdh5.16.2.p0.22.el7 cloudera-cdh5 11 k
Transaction Summary
================================================================================================================================================================================================================================================================
Install 1 Package (+1 Dependent package)
Total size: 4.2 M
Total download size: 11 k
Installed size: 7.7 M
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
warning: /var/cache/yum/x86_64/7/cloudera-cdh5/packages/bigtop-utils-0.7.0+cdh5.16.2+0-1.cdh5.16.2.p0.22.el7.noarch.rpm: Header V4 DSA/SHA1 Signature, key ID e8f86acd: NOKEY ] 0.0 B/s | 0 B --:--:-- ETA
Public key for bigtop-utils-0.7.0+cdh5.16.2+0-1.cdh5.16.2.p0.22.el7.noarch.rpm is not installed
bigtop-utils-0.7.0+cdh5.16.2+0-1.cdh5.16.2.p0.22.el7.noarch.rpm | 11 kB 00:00:02
Retrieving key from https://archive.cloudera.com/cdh5/redhat/7/x86_64/cdh/RPM-GPG-KEY-cloudera
Importing GPG key 0xE8F86ACD:
Userid : "Yum Maintainer <webmaster@cloudera.com>"
Fingerprint: 5f14 d39e f068 1aca 6f04 4a43 f90c 0d8f e8f8 6acd
From : https://archive.cloudera.com/cdh5/redhat/7/x86_64/cdh/RPM-GPG-KEY-cloudera
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : bigtop-utils-0.7.0+cdh5.16.2+0-1.cdh5.16.2.p0.22.el7.noarch 1/2
Installing : zookeeper-3.4.5+cdh5.16.2+159-1.cdh5.16.2.p0.23.el7.x86_64 2/2
Verifying : bigtop-utils-0.7.0+cdh5.16.2+0-1.cdh5.16.2.p0.22.el7.noarch 1/2
Verifying : zookeeper-3.4.5+cdh5.16.2+159-1.cdh5.16.2.p0.23.el7.x86_64 2/2
Installed:
zookeeper.x86_64 0:3.4.5+cdh5.16.2+159-1.cdh5.16.2.p0.23.el7
Dependency Installed:
bigtop-utils.noarch 0:0.7.0+cdh5.16.2+0-1.cdh5.16.2.p0.22.el7
Complete!
来源:oschina
链接:https://my.oschina.net/hooker/blog/3211462