CentOS6.x环境通过yum命令在线安装或重装zookeeper-server




一、环境描述:

在CentOS6.x系统环境下,使用yum命令的形式安装zookeeper-server,由于我这里是重新安装zookeeper-server,所以在正式开始之前我需要将原本的zookeeper服务进行卸载。这里使用的是yum在线方式,所以我就不搭建本地的yum源库,也正因为如此要求实验的CentOS6.x系统能够连接到外网。

二、卸载zookeeper-server

1、首先使用yum list installed命令查看本地安装的服务列表,并找到需要卸载的部件名称,如下图:

[email protected]:/home/yang]#yum list installed

2、使用yum remove 命令对zookeeper.x86_64进行卸载。注意,在使用yum remove命令时,命令后面所带的字段名称即为需要卸载的东西。

[email protected]:/home/yang]#yum remove zookeeper.x86_64

当提示内容如下时,可直接yes即可。当出现Complete!时表示已经卸载成功了,不过还是建议使用yum list installed命令进行查看。

   

三、使用yum安装zookeeper-server

使用yum安装zookeeper-server的命令真的很简单。

[email protected]:/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是我们要更新的,至于其它的先不用管。

[email protected]:/home/yang]#cd /etc/yum.repos.d

不过要说明的是,我这里由于是重新安装,所以我打算连cloudera-cdh5.repo文件也更新一下,也就是先删除再重新下载。如果是初次安装zookeeper-server的话,cloudera-cdh5.repo文件应该是没有的。

[email protected]:/etc/yum.repos.d]#rm -rf cloudera-cdh5.repo
[email protected]:/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为后缀的备份文件,以免我们更新的新文件用不了。

[email protected]:/etc/yum.repos.d]#mv CentOS-Base.repo CentOS-Base.repo.backup
[email protected]:/etc/yum.repos.d]#wget http://mirrors.163.com/.help/CentOS6-Base-163.repo
[email protected]:/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文件的配置内容。可直接编辑该文件

[email protected]:/etc/yum.repos.d]#vi /etc/yum.conf

在文件中,添加如下内容:

sslverify=false

最后,需要将一些部件进行更新一下:

[email protected]:/etc/yum.repos.d]#yum check-update

最后的最后,我们可以正式对zookeeper-server进行下载安装了:

[email protected]:/etc/yum.repos.d]#yum install zookeeper-server

当提示Is this ok [y/N]: 时,直接输入y即可。

此时,如果你的网速不是很好的话,建议你先去小卖部逛两圈,顺便路过奶茶店记得帮小编带一杯不加糖的绿茶,虽然我也喝不到,不过随便了。

好了,经过漫长的等待之后,当提示以下内容时,恭喜你已经通过yum命令完成了zookeeper-server的安装。

最后,小编还想再啰嗦一点的就是,通过这种方式部署集群的话,效率显然并不是很高!现在,你或许以为自己已经真正的部署了zookeeper-server而沾沾自喜,其实并不然。我们只是将zookeeper-server安装到了我们的机器上,还没有对其进行初始化和集群分配,也就是说并没有对它进行部署和使用。

值得啰嗦的是,zookeeper集群的搭建必须是奇数个机器哦,还有的就是最低要求也要3台服务器~

原文地址:https://www.cnblogs.com/Raodi/p/10884468.html

时间: 2024-10-02 23:48:13

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 版权声明:本文为博主原创文章,未经博主允许不得转载. 现在Centos7的yum源中 没有mysql,可以直接安装.用了MariaDB 代替了. 那我们如果要装MySQL数据库,可以用以下方法 # wget http://dev.mysql.com/get/mysql-community-rele

Linux系统 Centos7 yum命令在线安装 MySQL5.6

现在Centos7的yum源中 没有mysql,可以直接安装.用了MariaDB 代替了.那我们如果要装MySQL数据库,可以用以下方法 # wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm # rpm -ivh mysql-community-release-el7-5.noarch.rpm # yum install mysql-community-server 成功安装之后重启mysql服务 #sy

yum命令showduplicates安装指定版本包

默认情况下,我们用yum list 或者 yum install 的时候,yum会默认选择最新的版本. 如果我们需要安装指定版本的某个软件包,以使之能够和我们现有环境的软件包版本匹配,那么就需要用到showduplicates 使用--showduplicates参数列出所有版本 查看docker-ce: yum list docker-ce 可安装的软件包 docker-ce.x86_64 查看docker-ce各个版本: yum list docker-ce --showduplicate

centos 6.5下rpm yum仓库在线安装mysql5.7 非编译

1.查看当前本地仓库mysql(存在不一定是本机已安装的意思,可以理解成一个资源文件) rpm -qa | grep mysql 2.移除 yum -y remove mysql-libs* 3.打开mysql的官网      http://dev.mysql.com/downloads/repo/yum/ 4.根据需要选择mysql版本,这里我选择第二个 5.无需注册,地址就在这个页面上 6.拷贝这个地址 ,在终端下输入 wget http://dev.mysql.com/get/mysql5

CentOS6.8下查看yum及rpm安装后的软件位置

参考资料:http://blog.csdn.net/ngvjai/article/details/7997743   http://blog.sina.com.cn/s/blog_976e49570100yn9b.html 以httpd为例 [[email protected] ~]# yum -y install httpd [[email protected] ~]# rpm -qa | grep httpd httpd-tools-2.2.15-60.el6.centos.4.x86_64

CentOS7用阿里云Docker Yum源在线安装Docker

一.参考文档 官方Docker安装文档:https://docs.docker.com/install/linux/docker-ce/centos 阿里云Docker安装文档:https://yq.aliyun.com/articles/110806 二.安装步骤1.删除已安装的Docker # Uninstall installed docker sudo yum remove docker docker-client docker-client-latest docker-common d

YUM仓库在线简易安装单节点K8S(纯实战)

使用YUM仓库在线简易安装单节点K8S 实验环境: 使用系统:centos7.4 名称 角色 IP地址 centos7-min2 master 192.168.142.220 centos7-4 node 192.168.142.136 实验实施步骤: 一.配置步骤目录 master端配置 node端配置 实验结果检查 二.master端配置 使用yum仓库安装atcd数据库.kubernetes组件.flannel网络组件 [[email protected] ~]# yum install

yum命令及配置yun源

一.yum命令 二.yum源配置文件 三.将光驱配置为yum源 四.其他 一.yum命令 1.安装 yum install package_name    #用yum安装程序,可一次安装多个,彼此间用空格隔开 yum reinstall package_name    #重新安装程序,类似的有rpm -ivh packages_name --replacepkgs yum groupinstall group_name    #用yum安装包组,可一次安装多个,彼此间用空格隔开 CentOS 6

Linux的程序包管理器(中)——yum命令从未如此详细过

与rpm包管理器相比,yum包管理器恐怕更受用户的青睐,其很大的原因在于这款包管理器能自动解决rpm包之间的相互依赖关系.本文就CentOS 6.6为例,尽可能详细的给读者朋友们讲解yum包管理器的用法. yum(Yellowdog Updater Modified的缩写)是一个在Fedora和RedHat以及SUSE中的Shell前端软件包管理器.基于RPM包管理,能够从指定的服务器自动下载RPM包并且安装,可以自动处理依赖性关系,并且一次安装所有依赖的软体包,用户无须繁琐地一次次下载.安装.