CentOS6.4安装Zookeeper-3.4.12图解教程

news/2024/7/4 3:51:13

注:图片如果损坏,点击文章链接:https://www.toutiao.com/i6595380916590215683/

安装工具

VMware_workstation_full_12.5.2

CentOS6-Base-163

CentOS-6.4-x86_64-bin-DVD1.iso

VM运行配置

双击运行VM

CentOS6.4安装Zookeeper-3.4.12

 

运行界面

CentOS6.4安装Zookeeper-3.4.12

 

点击下一步

CentOS6.4安装Zookeeper-3.4.12

 

如图操作,选择“稍后安装操作系统”,点击下一步

CentOS6.4安装Zookeeper-3.4.12

 

如图操作,选择Linux、CentOS64

CentOS6.4安装Zookeeper-3.4.12

 

如图操作,设置“虚拟机名称”、“位置”,建议不要用中文名称,安装路径不要有中文、不要安装在C盘系统盘。

CentOS6.4安装Zookeeper-3.4.12

 

设置磁盘容量,磁盘容量先按照给定参数设置,具体大小可以大一点。

CentOS6.4安装Zookeeper-3.4.12

 

如图操作点击完成

CentOS6.4安装Zookeeper-3.4.12

 

虚拟机界面

CentOS6.4安装Zookeeper-3.4.12

 

VM设置虚拟机参数

点击“编辑虚拟机设置”

CentOS6.4安装Zookeeper-3.4.12

 

进入“虚拟机设置”对话框

CentOS6.4安装Zookeeper-3.4.12

 

设置内存为2G

CentOS6.4安装Zookeeper-3.4.12

 

选择处理器设置

CentOS6.4安装Zookeeper-3.4.12

 

选择CentOS镜像文件

CentOS6.4安装Zookeeper-3.4.12

 

点击确定

CentOS6.4安装Zookeeper-3.4.12

 

进入虚拟机界面,开启虚拟机

CentOS6.4安装Zookeeper-3.4.12

 

进入进程

CentOS6.4安装Zookeeper-3.4.12

 

进入下一步

CentOS6.4安装Zookeeper-3.4.12

 

选择语言,点击下一步

CentOS6.4安装Zookeeper-3.4.12

 

一直下一步

CentOS6.4安装Zookeeper-3.4.12

 

CentOS6.4安装Zookeeper-3.4.12

 

CentOS6.4安装Zookeeper-3.4.12

 

CentOS6.4安装Zookeeper-3.4.12

 

CentOS6.4安装Zookeeper-3.4.12

 

CentOS6.4安装Zookeeper-3.4.12

 

CentOS6.4安装Zookeeper-3.4.12

 

CentOS6.4安装Zookeeper-3.4.12

 

重启系统

CentOS6.4安装Zookeeper-3.4.12

 

进入系统

CentOS6.4安装Zookeeper-3.4.12

 

为了方便我们后面的操作我们需要做一些配置

首先我们设置网络,选择编辑

CentOS6.4安装Zookeeper-3.4.12

 

更改权限

CentOS6.4安装Zookeeper-3.4.12

 

CentOS6.4安装Zookeeper-3.4.12

 

点完确定后,然后再进去查看下网关

CentOS6.4安装Zookeeper-3.4.12

 

点击“DHCP设置”进入修改IP地址包含100的地址。

CentOS6.4安装Zookeeper-3.4.12

 

点取消,记住这个网关

使用root和密码登录到系统中,

我先换下主机名:需要修改两处:一处是/etc/sysconfig/network,另一处是/etc/hosts,只修改任一处会导致系统启动异常。首先切换到root用户,将名字改为wangstorm1

  1. vi /etc/sysconfig/networkHOSTNAME=localhost.localdomain #修改localhost.localdomain为wangstrom1
  2. vi /etc/hosts127.0.0.1 localhost.localdomain #修改localhost.localdomain为wangstrom1
  3. reboot

CentOS6.4安装Zookeeper-3.4.12

 

设置网卡

CentOS6.4安装Zookeeper-3.4.12

 

CentOS6.4安装Zookeeper-3.4.12

 

修改参数

CentOS6.4安装Zookeeper-3.4.12

 

重启网络

CentOS6.4安装Zookeeper-3.4.12

 

CentOS6.4安装Zookeeper-3.4.12

 

现在我们用远程工具登录一下

CentOS6.4安装Zookeeper-3.4.12

 

新建一个Session

CentOS6.4安装Zookeeper-3.4.12

 

CentOS6.4安装Zookeeper-3.4.12

 

CentOS6.4安装Zookeeper-3.4.12

 

连接上了,接下来我们CRT就可以了,不需要再用VM了,VM操作不是太方便

CentOS6.4安装Zookeeper-3.4.12

 

我们设置下YUM源,先点击这个按钮

CentOS6.4安装Zookeeper-3.4.12

 

找这个文件,把文件拖拽到右面

CentOS6.4安装Zookeeper-3.4.12

 

我们查看文件已经进来了

CentOS6.4安装Zookeeper-3.4.12

 

我们备份原来的文件

CentOS6.4安装Zookeeper-3.4.12

 

清除原来的yum

CentOS6.4安装Zookeeper-3.4.12

 

更新yum库

CentOS6.4安装Zookeeper-3.4.12

 

我们安装VIM测试一下

CentOS6.4安装Zookeeper-3.4.12

 

关闭selinux

CentOS6.4安装Zookeeper-3.4.12

 

CentOS6.4安装Zookeeper-3.4.12

 

CentOS6.4安装Zookeeper-3.4.12

 

停止防火墙功能

CentOS6.4安装Zookeeper-3.4.12

 

安装Java,将Java安装包上传到Linux中

CentOS6.4安装Zookeeper-3.4.12

 

解压缩jdk

CentOS6.4安装Zookeeper-3.4.12

 

查看文件

CentOS6.4安装Zookeeper-3.4.12

 

修改/etc/profile文件,配置java环境

CentOS6.4安装Zookeeper-3.4.12

 

配置内容

CentOS6.4安装Zookeeper-3.4.12

 

配置语句生效

CentOS6.4安装Zookeeper-3.4.12

 

查看是否成功

CentOS6.4安装Zookeeper-3.4.12

 

克隆一台虚拟机storm2

将storm1关机,然后开始克隆

CentOS6.4安装Zookeeper-3.4.12

 

CentOS6.4安装Zookeeper-3.4.12

 

CentOS6.4安装Zookeeper-3.4.12

 

CentOS6.4安装Zookeeper-3.4.12

 

CentOS6.4安装Zookeeper-3.4.12

 

CentOS6.4安装Zookeeper-3.4.12

 

CentOS6.4安装Zookeeper-3.4.12

 

复制过后的虚拟机不能直接使用,需要进行如下操作

CentOS6.4安装Zookeeper-3.4.12

 

CentOS6.4安装Zookeeper-3.4.12

 

CentOS6.4安装Zookeeper-3.4.12

 

将新生成的MAC更改,然后更改IP

CentOS6.4安装Zookeeper-3.4.12

 

如果出现这个问题,不出现可以忽略

CentOS6.4安装Zookeeper-3.4.12

 

错误原因:

克隆的Linux系统在新的机器上运行,新服务器网卡物理地址已经改变。而/etc/udev/rules.d/70-persistent-net.rules这个文件确定了网卡和MAC地址的信息之间的绑定,克隆后的网卡的MAC已经发生了变化,所以导致系统认为网络设备不存在,网络不能正常启动。另外一个就是/etc/sysconfig/network-scripts/ifcfg-eth0里面MAC地址也是以前的旧信息。

关于/etc/udev/rules.d/70-persistent-net.rules这个文件,系统在启动时会自动监测变化,然后由/lib/udev/write_net_rules写入到/etc/udev/rules.d/70-persistent-net.rules中一个新的配置节,网卡的的序号依次递增(如原来为eth0,则修改第一后生成一个eth1,再次修改后生成一个eth2...),且其ATTR{address}的值为当前网卡对应的mac地址。

解决方法:

1:编辑/etc/sysconfig/network-scripts/ifcfg-eth0配置文件,将ifcfg-eth0的配置文件里里面以前的关于MAC地址这一行删除掉或修改。另外克隆的服务器的IP设置的是静态IP,要么修改为一个其它的IP地址或设置为动态IP,重启网卡服务

2:找到/etc/udev/rules.d/70-persistent-net.rules 删除后重启机器,系统会自动生成一个70-persistent-net.rules文件。

因为这个文件绑定了网卡和MAC地址,换了网卡以后MAC地址变了,所以不能正常启动,也可以直接编辑这个配置文件把里面的网卡和MAC地址修改成对应的,不过这样多麻烦,直接删除重启,它会自动生成个一个新的文件。

CentOS6.4安装Zookeeper-3.4.12

 

重启

CentOS6.4安装Zookeeper-3.4.12

 

查询IP

CentOS6.4安装Zookeeper-3.4.12

 

然后我们用CRT连接一下

CentOS6.4安装Zookeeper-3.4.12

 

修改一下主机名

CentOS6.4安装Zookeeper-3.4.12

 

我们看两台机器是否相通,先安装SSH

CentOS6.4安装Zookeeper-3.4.12

 

CentOS6.4安装Zookeeper-3.4.12

 

登录一下

CentOS6.4安装Zookeeper-3.4.12

 

安装rzsz

CentOS6.4安装Zookeeper-3.4.12

 

上传zookeeper安装包

CentOS6.4安装Zookeeper-3.4.12

 

解压压缩包

CentOS6.4安装Zookeeper-3.4.12

 

CentOS6.4安装Zookeeper-3.4.12

 

在根目录下创建一个data目录

CentOS6.4安装Zookeeper-3.4.12

 

进入到配置目录

CentOS6.4安装Zookeeper-3.4.12

 

修改配置文件,我们先修改下名称,然后开始编辑

CentOS6.4安装Zookeeper-3.4.12

 

查看我们刚新建的data的目录路径

CentOS6.4安装Zookeeper-3.4.12

 

将路径记录到配置文件中

CentOS6.4安装Zookeeper-3.4.12

 

我们进入到data目录

CentOS6.4安装Zookeeper-3.4.12

 

新建myid

CentOS6.4安装Zookeeper-3.4.12

 

CentOS6.4安装Zookeeper-3.4.12

 

CentOS6.4安装Zookeeper-3.4.12

 

CentOS6.4安装Zookeeper-3.4.12

 

然后我们拷贝zookeeper到另外一台机器

进入zookeeper目录

CentOS6.4安装Zookeeper-3.4.12

 

配置域名wangstorm1和wangstorm2后,拷贝文件

CentOS6.4安装Zookeeper-3.4.12

 

如果出现这个问题

CentOS6.4安装Zookeeper-3.4.12

 

执行(两台机器都要执行)

CentOS6.4安装Zookeeper-3.4.12

 

已经拷贝进来了

CentOS6.4安装Zookeeper-3.4.12

 

将wangstorm2中的myid改为2

CentOS6.4安装Zookeeper-3.4.12

 

CentOS6.4安装Zookeeper-3.4.12

 

然后我们进入到bin下面启动命令 两台机器同时启动

CentOS6.4安装Zookeeper-3.4.12

 

查看状态

CentOS6.4安装Zookeeper-3.4.12

 

CentOS6.4安装Zookeeper-3.4.12


http://www.niftyadmin.cn/n/643927.html

相关文章

多对多记录的数据设计方式

A表中的一条记录对应B表的多条记录,例如:Posts表中,一条Post记录,可能属于多个Category,即对应多个PostCategories表中的数据B表中的一条记录对应A标的多条记录,例如:PostCategories表中&#x…

串口异步通信——时序宽度测试

一般情况下串口“bit 1 ”与“bit 0”宽度能基本维持对等,脉宽接近,把串口:“0x55”理解为一个占空比为50% 的方波,在占空比接近50%的情况下,通信一般不会出现错误。 但是,在一些脉宽有损失的场景中&#x…

北京好玩的博物馆

作者:鼎革链接:http://www.zhihu.com/question/20405263/answer/16385266来源:知乎著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。五星级推荐,去了还要再去的: 故宫博物院&#xff…

Virtual PC在PAE模式下无法运行解决办法

首先找到boot.ini文件 [boot loader]timeout30defaultmulti(0)disk(0)rdisk(0)partition(1)\WINDOWS[operating systems]multi(0)disk(0)rdisk(0)partition(1)\WINDOWS"Microsoft Windows XP Professional" /fastdetect /NoExecuteOptIn 将最后一行的/NoExecute参数修…

安装Apache-storm-0.9.1-incubating图解教程

注:图片如果损坏,点击文章链接:https://www.toutiao.com/i6596214331988247054/ 安装步骤 (1) 安装Zookeeper集群,可以参考前一篇文章,本文已安装完毕。 (2) 安装及配置…

STC仿真失败

原因就是购买的下载工具不适合在烧写STC8H3K64S仿真固件后再将该下载工具作为USB转串口工具连接PC与目标板,推测是接入仿真时会重启目标板,不打算细究,换一个普通串口就好了。

启动Hadoop出现问题:datanode的clusterID 和 namenode的clusterID 不匹配

注:图片如果损坏,点击文章链接:https://www.toutiao.com/i6632047118376780295/ 启动Hadoop出现问题:datanode的clusterID 和 namenode的clusterID 不匹配 从日志中可以看出,原因是因为datanode的clusterID 和 nameno…

BlackBerry 应用程序开发者指南 第二卷:高级--第4章 增加设备选项

作者:Confach 发表于2006-04-28 22:18 pm版权信息:可以任意转载, 转载时请务必以超链接形式标明文章原始出处 和作者信息.http://www.cnblogs.com/confach/articles/387946.html 4第4章 增加设备选项 选项API 增加选项 选项APInet.rim.blackberry.api.options 中的BlackBerry选…