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-******
一路回车生成**。
然后将**复制到其他机器:
ssh-copy-id [email protected]
ssh-copy-id [email protected]
其他机器同样的操作。
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