1. centos7 ip设置
修改vi /etc/sysconfig/network-scripts/ifcfg-eth33 BOOTPROTO="static" #dhcp改为static ONBOOT="yes" #开机启用本配置 IPADDR=192.168.153.146 #静态IP GATEWAY=192.168.153.1 #默认网关 NETMASK=255.255.255.0 #子网掩码 DNS1=192.168.153.1 #DNS 配置 重启网络服务 service network restart 查看IP:ip addr
2. 关闭防火墙
//临时关闭 systemctl stop firewalld //禁止开机启动 systemctl disable firewalld
3. 安装jdk
在opt目录下面 解压tar -zxvf jdk-7u80-linux-x64.tar.gz mv jdk-7u80-linux-x64 jdk 添加环境变量vi /etc/profile export JAVA_HOME="/opt/jdk" export PATH=$JAVA_HOME/bin:$PATH 使用命令source /etc/profile 使环境变量生效 查看java -version是否安装成功
4. 安装hadoop
在opt目录下面 解压tar -zxvf hadoop-2.8.0.tar.gz mv hadoop-2.8.0 hadoop 查看是否安装成功 [root@localhost bin]# ./hadoop version Hadoop 2.8.0 Subversion https://git-wip-us.apache.org/repos/asf/hadoop.git -r 91f2b7a13d1e97be65db92ddabc627cc29ac0009 Compiled by jdu on 2017-03-17T04:12Z Compiled with protoc 2.5.0 From source with checksum 60125541c2b3e266cbf3becc5bda666 This command was run using /opt/hadoop/share/hadoop/common/hadoop-common-2.8.0.jar