<java>hadoop installation Configuration (standalone)

Source: Internet
Author: User
Tags ssh server

Reference documents:

http://blog.csdn.net/inkfish/article/details/5168676

http://493663402-qq-com.iteye.com/blog/1515275

Http://www.cnblogs.com/syveen/archive/2013/05/08/3068044.html

Http://www.cnblogs.com/kinglau/p/3794433.html


Environment: Vmware11 Ubuntu14.04 LTS, Hadoop2.7.1


One: Create an account

1. Create Hadoop groups and groups under Hadoop users

[Email protected]:~$ sudo adduser--ingroup hadoop Hadoop

2. Add to Sudoers inside

[Email protected]:~$ sudo gedit/etc/sudoers


3. Switch to a Hadoop user

[Email protected]:~$ su Hadoop

Two: Installation configuration ssh

1. Choose the right source from the store, such as Ali


2. Installing Openssh-server

[Email protected]:/home/dogless$ sudo apt-get install Openssh-server

3. Start the SSH server

Sudo/etc/init.d/ssh start
Ps-e | grep ssh
4. Change to password-free login

[Email protected]:/home/dogless$ cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys

5. Try logging in and logging out, two times



Three: Install Java

sudo apt-get install OPENJDK-7-JDK


Four: Installation configuration Hadoop (standalone)

1. Unzip the Hadoop 2.7.1 installation package on the desktop


2. Move to the/hadoop directory and give permissions

[Email protected]:/home/dogless/desktop$ sudo mv hadoop-2.7.1/hadoop[email protected]:/home/dogless/desktop$ sudo chmod 777/hadoop

V: Configure environment variables

[Email protected]:/home/dogless/desktop$ sudo gedit/etc/profile
Append at end (pay special attention to java_home and hadoop_install paths)

#HADOOP
Export JAVA_HOME=/USR/LIB/JVM/JAVA-7-OPENJDK-AMD64
Export Jre_home= $JAVA _home/jre
Export classpath=.: $JAVA _home/lib: $JRE _home/lib: $CLASSPATH
Export path= $JAVA _home/bin: $PATH: $JRE _home/lib
Export Hadoop_install=/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

Update environment

[Email protected]:/home/dogless/desktop$ source/etc/profile

VI: Test

1. Navigate to the program directory, create the test directory input, use the Readme to do the data

[Email protected]:/home/dogless/desktop$ cd/hadoop[email protected]:/hadoop$ cp README.txt input

2. Test WordCount This example, output to the Outputs folder

[Email protected]:/hadoop$ bin/hadoop jar Share/hadoop/mapreduce/hadoop-mapreduce-examples-2.7.1.jar wordcount input Output

Test success




Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

<java>hadoop installation Configuration (standalone)

Related Article

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.