CentOS6.x环境通过yum命令在线安装或重装zookeeper-server
一、环境描述:
在CentOS6.x系统环境下,使用yum命令的形式安装zookeeper-server,由于我这里是重新安装zookeeper-server,所以在正式开始之前我需要将原本的zookeeper服务进行卸载。这里使用的是yum在线方式,所以我就不搭建本地的yum源库,也正因为如此要求实验的CentOS6.x系统能够连接到外网。
二、卸载zookeeper-server
1、首先使用yum list installed命令查看本地安装的服务列表,并找到需要卸载的部件名称,如下图:
root@localhost:/home/yang]#yum list installed
2、使用yum remove 命令对zookeeper.x86_64进行卸载。注意,在使用yum remove命令时,命令后面所带的字段名称即为需要卸载的东西。
root@localhost:/home/yang]#yum remove zookeeper.x86_64
当提示内容如下时,可直接yes即可。当出现Complete!时表示已经卸载成功了,不过还是建议使用yum list installed命令进行查看。
三、使用yum安装zookeeper-server
使用yum安装zookeeper-server的命令真的很简单。
root@localhost:/home/yang]#yum install zookeeper-server
于是乎,直接运行了这个命令,结果却让我大吃一惊。下面的错误对于你来说是不是很熟悉呢?
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
* base: ftp.sjtu.edu.cn
* extras: ftp.ksu.edu.tw
* updates: ftp.ksu.edu.tw
http://ftp.sjtu.edu.cn/centos/6.10/os/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'ftp.sjtu.edu.cn'"
Trying other mirror.
http://ftp.stu.edu.tw/Linux/CentOS/6.10/os/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'ftp.stu.edu.tw'"
Trying other mirror.
http://ftp.yzu.edu.tw/Linux/CentOS/6.10/os/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'ftp.yzu.edu.tw'"
Trying other mirror.
http://mirrors.aliyun.com/centos/6.10/os/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirrors.aliyun.com'"
Trying other mirror.
http://mirrors.huaweicloud.com/repository/centos/6.10/os/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirrors.huaweicloud.com'"
Trying other mirror.
http://mirrors.neusoft.edu.cn/centos/6.10/os/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirrors.neusoft.edu.cn'"
Trying other mirror.
http://mirrors.njupt.edu.cn/centos/6.10/os/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirrors.njupt.edu.cn'"
Trying other mirror.
http://mirrors.shu.edu.cn/centos/6.10/os/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirrors.shu.edu.cn'"
Trying other mirror.
http://mirrors.sohu.com/centos/6.10/os/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirrors.sohu.com'"
Trying other mirror.
http://mirrors.tuna.tsinghua.edu.cn/centos/6.10/os/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirrors.tuna.tsinghua.edu.cn'"
Trying other mirror.
https://archive.cloudera.com/cdh5/redhat/5/x86_64/cdh/5/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'archive.cloudera.com'"
Trying other mirror.
http://ftp.ksu.edu.tw/pub/CentOS/6.10/extras/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'ftp.ksu.edu.tw'"
Trying other mirror.
http://ftp.sjtu.edu.cn/centos/6.10/extras/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'ftp.sjtu.edu.cn'"
Trying other mirror.
http://mirror.lzu.edu.cn/centos/6.10/extras/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirror.lzu.edu.cn'"
Trying other mirror.
http://mirrors.aliyun.com/centos/6.10/extras/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirrors.aliyun.com'"
Trying other mirror.
http://mirrors.huaweicloud.com/repository/centos/6.10/extras/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirrors.huaweicloud.com'"
Trying other mirror.
http://mirrors.neusoft.edu.cn/centos/6.10/extras/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirrors.neusoft.edu.cn'"
Trying other mirror.
http://mirrors.njupt.edu.cn/centos/6.10/extras/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirrors.njupt.edu.cn'"
Trying other mirror.
http://mirrors.shu.edu.cn/centos/6.10/extras/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirrors.shu.edu.cn'"
Trying other mirror.
http://mirrors.sohu.com/centos/6.10/extras/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirrors.sohu.com'"
Trying other mirror.
http://mirrors.tuna.tsinghua.edu.cn/centos/6.10/extras/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirrors.tuna.tsinghua.edu.cn'"
Trying other mirror.
http://ftp.ksu.edu.tw/pub/CentOS/6.10/updates/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'ftp.ksu.edu.tw'"
Trying other mirror.
http://ftp.sjtu.edu.cn/centos/6.10/updates/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'ftp.sjtu.edu.cn'"
Trying other mirror.
http://ftp.stu.edu.tw/Linux/CentOS/6.10/updates/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'ftp.stu.edu.tw'"
Trying other mirror.
http://mirrors.aliyun.com/centos/6.10/updates/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirrors.aliyun.com'"
Trying other mirror.
http://mirrors.huaweicloud.com/repository/centos/6.10/updates/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirrors.huaweicloud.com'"
Trying other mirror.
http://mirrors.neusoft.edu.cn/centos/6.10/updates/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirrors.neusoft.edu.cn'"
Trying other mirror.
http://mirrors.njupt.edu.cn/centos/6.10/updates/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirrors.njupt.edu.cn'"
Trying other mirror.
http://mirrors.shu.edu.cn/centos/6.10/updates/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirrors.shu.edu.cn'"
Trying other mirror.
http://mirrors.sohu.com/centos/6.10/updates/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirrors.sohu.com'"
Trying other mirror.
http://mirrors.tuna.tsinghua.edu.cn/centos/6.10/updates/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirrors.tuna.tsinghua.edu.cn'"
Trying other mirror.
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package zookeeper-server.x86_64 0:3.4.5+cdh5.15.0+144-1.cdh5.15.0.p0.52.el5 will be installed
http://ftp.sjtu.edu.cn/centos/6.10/os/x86_64/repodata/5f7694d9c6c4a41dee56f51a965c3426ae2f685d6a9fb99d2e5a255c7bec0864-filelists.sqlite.bz2: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'ftp.sjtu.edu.cn'"
Trying other mirror.
http://ftp.stu.edu.tw/Linux/CentOS/6.10/os/x86_64/repodata/5f7694d9c6c4a41dee56f51a965c3426ae2f685d6a9fb99d2e5a255c7bec0864-filelists.sqlite.bz2: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'ftp.stu.edu.tw'"
Trying other mirror.
http://ftp.yzu.edu.tw/Linux/CentOS/6.10/os/x86_64/repodata/5f7694d9c6c4a41dee56f51a965c3426ae2f685d6a9fb99d2e5a255c7bec0864-filelists.sqlite.bz2: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'ftp.yzu.edu.tw'"
Trying other mirror.
http://mirrors.aliyun.com/centos/6.10/os/x86_64/repodata/5f7694d9c6c4a41dee56f51a965c3426ae2f685d6a9fb99d2e5a255c7bec0864-filelists.sqlite.bz2: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirrors.aliyun.com'"
Trying other mirror.
http://mirrors.huaweicloud.com/repository/centos/6.10/os/x86_64/repodata/5f7694d9c6c4a41dee56f51a965c3426ae2f685d6a9fb99d2e5a255c7bec0864-filelists.sqlite.bz2: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirrors.huaweicloud.com'"
Trying other mirror.
http://mirrors.neusoft.edu.cn/centos/6.10/os/x86_64/repodata/5f7694d9c6c4a41dee56f51a965c3426ae2f685d6a9fb99d2e5a255c7bec0864-filelists.sqlite.bz2: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirrors.neusoft.edu.cn'"
Trying other mirror.
http://mirrors.njupt.edu.cn/centos/6.10/os/x86_64/repodata/5f7694d9c6c4a41dee56f51a965c3426ae2f685d6a9fb99d2e5a255c7bec0864-filelists.sqlite.bz2: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirrors.njupt.edu.cn'"
Trying other mirror.
http://mirrors.shu.edu.cn/centos/6.10/os/x86_64/repodata/5f7694d9c6c4a41dee56f51a965c3426ae2f685d6a9fb99d2e5a255c7bec0864-filelists.sqlite.bz2: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirrors.shu.edu.cn'"
Trying other mirror.
http://mirrors.sohu.com/centos/6.10/os/x86_64/repodata/5f7694d9c6c4a41dee56f51a965c3426ae2f685d6a9fb99d2e5a255c7bec0864-filelists.sqlite.bz2: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirrors.sohu.com'"
Trying other mirror.
http://mirrors.tuna.tsinghua.edu.cn/centos/6.10/os/x86_64/repodata/5f7694d9c6c4a41dee56f51a965c3426ae2f685d6a9fb99d2e5a255c7bec0864-filelists.sqlite.bz2: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirrors.tuna.tsinghua.edu.cn'"
Trying other mirror.
Error: failure: repodata/5f7694d9c6c4a41dee56f51a965c3426ae2f685d6a9fb99d2e5a255c7bec0864-filelists.sqlite.bz2 from base: [Errno 256] No more mirrors to try.
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles –nodigest
这里就不兜圈子了,直接上解决的方法!我这里为了尽可能少的打shell字符,我直接进入/etc/yum.repos.d目录中。可以看到,我这里/etc/yum.repos.d目录下面,有几个文件。CentOS-Base.repo是我们要更新的,至于其它的先不用管。
root@localhost:/home/yang]#cd /etc/yum.repos.d
不过要说明的是,我这里由于是重新安装,所以我打算连cloudera-cdh5.repo文件也更新一下,也就是先删除再重新下载。如果是初次安装zookeeper-server的话,cloudera-cdh5.repo文件应该是没有的。
root@localhost:/etc/yum.repos.d]#rm -rf cloudera-cdh5.repo
root@localhost:/etc/yum.repos.d]#wget http://archive.cloudera.com/cdh5/redhat/6/x86_64/cdh/cloudera-cdh5.repo
为了在使用yum命令时网速能更快些,我们需要将在线的yum源指定到国内的mirrors.163.com服务器上。在进行CentOS-Base.repo文件更新时,需要将CentOS-Base.repo文件,备份成以.backup为后缀的备份文件,以免我们更新的新文件用不了。
root@localhost:/etc/yum.repos.d]#mv CentOS-Base.repo CentOS-Base.repo.backup
root@localhost:/etc/yum.repos.d]#wget http://mirrors.163.com/.help/CentOS6-Base-163.repo
root@localhost:/etc/yum.repos.d]#mv CentOS6-Base-163.repo CentOS-Base.repo
到此为止,我想再次尝试使用yum命令,对zookeeper-server进行安装。可不幸运的是,还是报出了如下的错误,但相对于前者而言,似乎错误明显改观了许多。
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
https://archive.cloudera.com/cdh5/redhat/6/x86_64/cdh/5/repodata/repomd.xml: [Errno 14] Peer cert cannot be verified or peer cert invalid
Trying other mirror.
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package zookeeper-server.x86_64 0:3.4.5+cdh5.15.0+144-1.cdh5.15.0.p0.52.el5 will be installed
base/filelists_db | 6.4 MB 00:04
https://archive.cloudera.com/cdh5/redhat/6/x86_64/cdh/5/repodata/filelists.xml.gz: [Errno 14] Peer cert cannot be verified or peer cert invalid
Trying other mirror.
Error: failure: repodata/filelists.xml.gz from cloudera-cdh5: [Errno 256] No more mirrors to try.
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles –nodigest
由于它是Peer cert cannot be verified or peer cert invalid类型的错误,所以我们要修改一下/etc/yum.conf文件的配置内容。可直接编辑该文件
root@localhost:/etc/yum.repos.d]#vi /etc/yum.conf
在文件中,添加如下内容:
sslverify=false
最后,需要将一些部件进行更新一下:
root@localhost:/etc/yum.repos.d]#yum check-update
最后的最后,我们可以正式对zookeeper-server进行下载安装了:
root@localhost:/etc/yum.repos.d]#yum install zookeeper-server
当提示Is this ok [y/N]: 时,直接输入y即可。
此时,如果你的网速不是很好的话,建议你先去小卖部逛两圈,顺便路过奶茶店记得帮小编带一杯不加糖的绿茶,虽然我也喝不到,不过随便了。
好了,经过漫长的等待之后,当提示以下内容时,恭喜你已经通过yum命令完成了zookeeper-server的安装。
最后,小编还想再啰嗦一点的就是,通过这种方式部署集群的话,效率显然并不是很高!现在,你或许以为自己已经真正的部署了zookeeper-server而沾沾自喜,其实并不然。我们只是将zookeeper-server安装到了我们的机器上,还没有对其进行初始化和集群分配,也就是说并没有对它进行部署和使用。
值得啰嗦的是,zookeeper集群的搭建必须是奇数个机器哦,还有的就是最低要求也要3台服务器~
CentOS6.x环境通过yum命令在线安装或重装zookeeper-server的更多相关文章
- Linux系统 Centos7/Centos6.8 yum命令在线安装 MySQL5.6
Linux系统 Centos7 yum命令在线安装 MySQL5.6 标签: centosmysqlyum 2015-11-18 17:21 707人阅读 评论(0) 收藏 举报 分类: Linux ...
- centos6.5环境Redis下载及编译安装
centos6.5环境Redis下载及编译安装 1:官方站点: http://redis.io/download 下载最新版或者最新stable版 2:解压源码并进入目录 tar -zxvf redi ...
- 15个Linux Yum命令实例--安装/卸载/更新
在linux环境中, 安装, 卸载更新包是一个极为常见的操作.大部分的linux环境都提供了包的管理工具, 例如:apt-get, dpkg, rpm, yum等等. 一些Linux环境中,yum是默 ...
- yum命令showduplicates安装指定版本包
默认情况下,我们用yum list 或者 yum install 的时候,yum会默认选择最新的版本. 如果我们需要安装指定版本的某个软件包,以使之能够和我们现有环境的软件包版本匹配,那么就需要用到s ...
- linux环境中iostat命令的安装,解决-bash: iostat: command not found问题
需求说明: 今天在测试环境的主机上,准备通过iostat来查看系统的io情况,发现没有该命令 [root@testvm Packages]# iostat -bash: iostat: command ...
- CentOS7用阿里云Docker Yum源在线安装Docker 17.03.2
参考文档 安装步骤 删除已安装的Docker 配置阿里云Docker Yum源 安装指定版本 启动Docker服务 参考文档 官方Docker安装文档:https://docs.docker. ...
- Centos yum 命令行 安装KDE Desktop
1:修改yum源为本地源 (见相关随笔:centos 配置本地yum源) 2:# yum groupinstall "X Window System" ← 安装基本的X系统组件# ...
- CentOS7用阿里云Docker Yum源在线安装Docker
一.参考文档 官方Docker安装文档:https://docs.docker.com/install/linux/docker-ce/centos 阿里云Docker安装文档:https://yq. ...
- CentOS6.8下查看yum及rpm安装后的软件位置
参考资料:http://blog.csdn.net/ngvjai/article/details/7997743 http://blog.sina.com.cn/s/blog_976e495701 ...
随机推荐
- 2019年 iPad无法充电
2019年 iPad无法充电 到售后网点检测没毛病,可能是apple产品做了低温保护逻辑机制低温无法充电,或者说是冬天温度跟iPad电池充电温度要求不符.各位有遇到情况的可以看看是不是这种问题,这问 ...
- 11_for语句的使用
for是一种循环结构 go语言中,for语句结构: for 初始语句; 条件语句; 迭代后语句 { 代码体 } 例子: package main import "fmt" impo ...
- Python Web Flask源码解读(三)——模板渲染过程
关于我 一个有思想的程序猿,终身学习实践者,目前在一个创业团队任team lead,技术栈涉及Android.Python.Java和Go,这个也是我们团队的主要技术栈. Github:https:/ ...
- Delphi - Indy TIdHTTP方式创建程序外壳 - 实现可执行程序的自动升级
Delphi 实现可执行程序的自动升级 准备工作: 1:Delphi调用TIdHTTP方式开发程序,生成程序打包外壳 说明:程序工程命名为ERP_Update 界面布局如下: 代码实现如下: unit ...
- Delphi - cxGrid设定合并单元格
在cxGrid中选中需要合并的字段,单击F11调出属性控制面板,展开Options,设置CellMerging的Value为True.
- Linux下手动安装MySQL5.7
1.下载tar包,这里使用wget从官网下载 https://dev.mysql.com/downloads/mysql/ 2.将mysql安装到/usr/local/mysql下 # 解压 tar ...
- Python编程习惯
- 2019 Multi-University Training Contest 4
A. AND Minimum Spanning Tree solved by rdc 21min -1 数组开小了,解体了一次. 题意 给一棵树,两点之间边权为 x & y,求最小生成树. 做 ...
- UVA1486 Transportation 费用流 拆边。
#include <iostream> #include <cstdio> #include <cmath> #include <queue> #inc ...
- 树状数组求区间和模板 区间可修改 参考题目:牛客小白月赛 I 区间
从前有个东西叫树状数组,它可以轻易实现一些简单的序列操作,比如单点修改,区间求和;区间修改,单点求值等. 但是我们经常需要更高级的操作,比如区间修改区间查询.这时候树状数组就不起作用了,只能选择写一个 ...