Open liangguohun opened 7 years ago
sudo tar -zxvf hadoop-2.6.0.tar.gz sudo mv hadoop-2.6.0 /usr/local/hadoop 配置环境变量 sudo gedit ~/.bashrc
后面追加 export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64 export HADOOP_HOME=/usr/local/hadoop export PATH=$PATH:$HADOOP_HOME/bin export PATH=$PATH:$HADOOP_HOME/sbin export HADOOP_MAPRED_HOME=$HADOOP_HOME export HADOOP_COMMON_HOME=$HADOOP_HOME export HADOOP_HDFS_HOME=$HADOOP_HOME export YARN_HOME=$HADOOP_HOME export HADOOP_COMMON_LIB_NATIVE_DIR=$HADOOP_HOME/lib/native export HADOOP_OPTS="-Djava.library.path=$HADOOP_HOME/lib" export JAVA_LIBRARY_PATH=$HADOOP_HOME/lib/native:$JAVA_LIBRARY_PATH 修改hadoop配置文件 sudo gedit /usr/local/hadoop/etc/hadoop/hadoop-env.sh JAVA_HOME 改为 export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64
修改core-site.xml sudo gedit /usr/local/hadoop/etc/hadoop/core-site.xml 追加属性
修改yarn-site.xml sudo gedit /usr/local/hadoop/etc/hadoop/yarn-site.xml 添加属性
设置mapred-site.xml sudo cp /usr/local/hadoop/etc/hadoop/mapred-site.xml.template /usr/local/hadoop/etc/hadoop/mapred-site.xml 追加(设置mapreduce框架为yarn)
设置hdfs-sit.xml sudo gedit /usr/local/hadoop/etc/hadoop/hdfs-site.xml 追加
创建目录修改所有者及格式化 hduser@hadoop:~$ sudo mkdir -p /usr/local/hadoop/hadoop_data/hdfs/namenode hduser@hadoop:~$ sudo mkdir -p /usr/local/hadoop/hadoop_data/hdfs/datanode hduser@hadoop:~$ sudo chown hduser:hduser -R /usr/local/hadoop
hadoop namenode -format 启动关闭 start-all.sh /stop-all.sh
http://localhost:8088/cluster/ http://localhost:50070/ jps 查看到相关进程
sudo tar -zxvf hadoop-2.6.0.tar.gz sudo mv hadoop-2.6.0 /usr/local/hadoop 配置环境变量 sudo gedit ~/.bashrc
后面追加 export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64 export HADOOP_HOME=/usr/local/hadoop export PATH=$PATH:$HADOOP_HOME/bin export PATH=$PATH:$HADOOP_HOME/sbin export HADOOP_MAPRED_HOME=$HADOOP_HOME export HADOOP_COMMON_HOME=$HADOOP_HOME export HADOOP_HDFS_HOME=$HADOOP_HOME export YARN_HOME=$HADOOP_HOME export HADOOP_COMMON_LIB_NATIVE_DIR=$HADOOP_HOME/lib/native export HADOOP_OPTS="-Djava.library.path=$HADOOP_HOME/lib" export JAVA_LIBRARY_PATH=$HADOOP_HOME/lib/native:$JAVA_LIBRARY_PATH 修改hadoop配置文件 sudo gedit /usr/local/hadoop/etc/hadoop/hadoop-env.sh JAVA_HOME 改为 export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64
修改core-site.xml sudo gedit /usr/local/hadoop/etc/hadoop/core-site.xml 追加属性
修改yarn-site.xml sudo gedit /usr/local/hadoop/etc/hadoop/yarn-site.xml 添加属性
设置mapred-site.xml sudo cp /usr/local/hadoop/etc/hadoop/mapred-site.xml.template /usr/local/hadoop/etc/hadoop/mapred-site.xml 追加(设置mapreduce框架为yarn)
设置hdfs-sit.xml sudo gedit /usr/local/hadoop/etc/hadoop/hdfs-site.xml 追加
创建目录修改所有者及格式化 hduser@hadoop:~$ sudo mkdir -p /usr/local/hadoop/hadoop_data/hdfs/namenode hduser@hadoop:~$ sudo mkdir -p /usr/local/hadoop/hadoop_data/hdfs/datanode hduser@hadoop:~$ sudo chown hduser:hduser -R /usr/local/hadoop
hadoop namenode -format 启动关闭 start-all.sh /stop-all.sh