美文网首页
Hadoop学习集群安装之本地模式

Hadoop学习集群安装之本地模式

作者: 薛落花随泪绽放 | 来源:发表于2017-12-15 23:38 被阅读7次

    关闭防火墙

    #systemctl stop firewalld
    #systemctl disable firewalld
    

    设置免密码登录设置解析地址

    #vi /etc/hosts
    192.168.56.100 xue
    #ssh-keygen -t rsa
    # ssh-copy-id -i .ssh/id_rsa.pub root@xue
    
    
    #mkdir training   //存放软件
    # rpm -ivh jdk-8u91-linux-x64.rpm 
    # rm -rf jdk-8u91-linux-x64.rpm 
    //这里如果用的java包是gz格式的就需要设置环境变量。
    #vi ~/.bash_profile
    export JAVA_HOME=/root/training/jdk1.8.0_144
    
    export PATH=$JAVA_HOME/bin:$PATH
    #source ~/.bash_profile
    #which java
    

    安装hadoop

    # tar -zxvf hadoop-2.7.3.tar.gz
    # rm -rf hadoop-2.7.3.tar.gz
    # mv hadoop-2.7.3/ hadoop
    #cd hadoop
    #vi /etc/profile
    export HADOOP_HOME=/root/training/hadoop
    
    export PATH=$PATH:$HADOOP_HOME/bin:$HADOOP_HOME/sbin
    #source /etc/profile
    # cd etc/hadoop/
    #vi hadoop-env.sh
    export JAVA_HOME=/usr/java/default
    #cd ../../..
    #mkdir data
    #cd data
    #mkdir input
    #cd input
    #vi data.txt
    #cd ~/training/hadoop-2.4.1/share/hadoop/mapreduce/
    # hadoop jar hadoop-mapreduce-examples-2.4.1.jar wordcount ~/training/data/input/data.txt ~/training/data/output
    # cd ~/training/data/output/
    # more part-r-00000 
    
    

    相关文章

      网友评论

          本文标题:Hadoop学习集群安装之本地模式

          本文链接:https://www.haomeiwen.com/subject/fjdjwxtx.html