Hadoop集群之运行环境搭建

克隆虚拟机的准备工作

1,修改主机名为hadoop101

[root@hadoop100 ~]# hostnamectl set-hostname hadoop101
[root@hadoop100 ~]# bash
[root@hadoop101 ~]# 

2,使用root用户在/opt目录下创建 software(软件)和module(组件)文件

[root@hadoop101 ~]# su root
[root@hadoop101 ~]# cd /opt
[root@hadoop101 opt]# mkdir -p software module
[root@hadoop101 opt]# ll
总用量 0
drwxr-xr-x. 2 root root 6 3月  16 20:29 module
drwxr-xr-x. 2 root root 6 3月  16 20:29 software

3, 修改software和module文件夹的属主和属组。

[root@hadoop101 opt]# useradd luo          #创建用户
[root@hadoop101 opt]# chown luo:luo module
[root@hadoop101 opt]# chown luo:luo software

[root@hadoop101 opt]# passwd luo    #修改用户luo的密码
更改用户 luo 的密码 。
新的 密码:      #不会显示密码
重新输入新的 密码:
passwd:所有的身份验证令牌已经成功更新。

 4,安装软件包:epel-release

[root@hadoop101 opt]# yum install epel-release -y
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.cqu.edu.cn
 * epel: mirror.nyist.edu.cn
 * extras: mirrors.cqu.edu.cn
 * updates: mirrors.cqu.edu.cn
软件包 epel-release-7-14.noarch 已安装并且是最新版本
无须任何处理

5, 在root用户下,修改sudoers文件:让普通用户也有root权限

[root@hadoop101 opt]# vim /etc/sudoers

## service management apps and more.
# %sys ALL = NETWORKING, SOFTWARE, SERVICES, STORAGE, DELEGATING, PROCESSES, LOCATE, DRIVERS

## Allows people in group wheel to run all commands
%wheel  ALL=(ALL)       ALL

luo     ALL=(ALL)       NOPASSWD:ALL

:wq!

  

 6,关闭防火墙,关闭防火墙自启

[root@hadoop101 opt]# systemctl stop firewalld      #暂时关闭
[root@hadoop101 opt]# systemctl disable firewalld.service      #彻底关闭
Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.

7, 卸载虚拟机自带的JDK,如果你是最小化安装就不需要执行这一步

[root@hadoop101 opt]# rpm -qa | grep -i java | xargs -n1 rpm -e --nodeps 

8,安装时间同步

 [root@hadoop101 ~]# yum install rsync -y

9,做主机映射

[root@hadoop101 ~]# vim /etc/hosts

192.168.10.101 hadoop101
192.168.10.102 hadoop102
192.168.10.103 hadoop103
192.168.10.104 hadoop104
  

10,重启

[root@hadoop101 opt]#reboot

  • 28
    点赞
  • 23
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值