Hadoop environment Setup (Linux standalone edition)

Source: Internet
Author: User

I. Create Hadoop user portfolio under Ubuntu Hadoop user

1. Create a Hadoop user group      addgroup HADOOP2, create a Hadoop user      adduser-ingroup Hadoop hadoop3, Add permissions for Hadoop users      vim/etc/sudoers     4, switch to Hadoop users      su-hadoop Ii. SSH installation and setup 1, installing ssh      sudo apt-get install Openssh-server2, start service      SUDO/ETC/INIT.D /ssh Start3, view startup      PS-E | grep ssh4, set password-free login, generate private key with public key      SSH-KEYGEN-T rsa-p ""       This will generate two files under/home/hadoop/.ssh: ID _rsa and Id_rsa.pub, the former is the private key, the latter is the public key.       Appends the public key to Authorized_keys, which saves all public key content that allows the user to log on to the SSH client as the current user.      cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys5, ssh login      SSH Localhost6, Sign out      exit install Java Environment 1, install java     sudo apt-get install OPENJDK-7-JDK2, view Java version   & nbsp  java-version3, view Java installation path      update-alternative--config Javaiv. installation of hadoop2.7.11. Download hadoop2.7.1.tar.gz2, Decompression:sudo tar xzf hadoop-2.7.1.tar.gz 3, copy to: sudo mv Hadoop-2.7.1/usr/local/hadoop 4, permission settings: sudo chmod 774/usr/local/had OOP 5, configuring the. bashrc file
#HADOOP VARIABLES START export Java_home=/usr/lib/jvm/java-7-openjdk-AMD64 Export Hadoop_install=/usr/local/Hadoop Export PATH= $PATH: $HADOOP _install/Bin Export PATH= $PATH: $HADOOP _install/sbin Export Hadoop_mapred_home=$HADOOP _install Export Hadoop_common_home=$HADOOP _install Export Hadoop_hdfs_home=$HADOOP _install Export Yarn_home=$HADOOP _install Export Hadoop_common_lib_native_dir= $HADOOP _install/lib/Native Export hadoop_opts="-djava.library.path= $HADOOP _install/lib"#HADOOP VARIABLES END

6, the environment variable takes effect source ~/.BASHRC 7, edit/usr/local/hadoop/etc/hadoop/hadoop-env.sh Five, Verification test 1,/usr/local/hadoop path Create input folder 2, copy README.txt to input 3, execute wordcount bin/hadoop jar Share/hadoop/mapreduce/sources/hadoop-mapreduc E-examples-2.4.0-sources.jar org.apache.hadoop.examples.WordCount Input Output VI, results demo

Hadoop environment Setup (Linux standalone edition)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.