hadoop_安装_机器环境

1. 机器准备

安装三个centos7的虚拟机,ip地址如下:

192.168.75.105

192.168.75.106

192.168.75.107



密码:root123

注:使用最小安装后,无法使用ifconfig命令,需安装一下相应包:

yum install net-tools

2. 修改hosts

 编辑/etc/hosts映射文件,设置IP地址与机器名的映射,设置信息如下:

vi /etc/hosts

192.168.75.105 centos5

192.168.75.106 centos6

192.168.75.107 centos7

 

3. 关闭防火墙

#查看firewall

systemctl status firewalld.service

 

#启动firewall

systemctl start firewalld.service

#停止firewall

systemctl stop firewalld.service

#禁止firewall开机启动

systemctl disable firewalld.service

 

4. 无密码访问

ssh-keygen

一路回车生成密钥。

然后将密钥复制到其他机器:

ssh-copy-id root@centos6

ssh-copy-id root@centos7

其他机器同样的操作。

 

5. 修改主机名

hostnamectl set-hostname centos5

hostnamectl set-hostname centos6

hostnamectl set-hostname centos7

 

6. 同步时间

方案一,使用命令同步三台机器时间,见linux相关章节

方案二,利用xshell的功能,同时修改三台机器的当前时间:

xshell打开三台机器,点查看-》撰写栏:


输入命令修改机器时间,回车时就会同时修改三台机器的时间。


6.  安装jdk
rpm -ivh jdk-8u11-linux-x64.rpm
环境变量如下:
vi /etc/profile
export JAVA_HOME=/usr/java/jdk1.8.0_11
export PATH=$PATH:$JAVA_HOME/bin
source /etc/profile

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值