according to the "Hadoop Authoritative Guide (2nd edition)", Hadoop's standalone mode is also called standalone mode (standalone or local mode), It is not necessary to run any daemons (daemon), all programs are executed on a single JVM, and because it is convenient to test and debug a mapreduce program in native mode, this mode is suitable for use in the development phase
Environment and Software
JDK1.7
Hadoop-2.6.0
Ubuntu Server 14.04
Create Hadoop user groups and Hadoop users
* the "/home/hadoop" appears in the figure already exists. No files copied from/etc/skel "It's because I've built a Hadoop account before, so it doesn't automatically generate Hadoop's home directory.
Add Permissions for Hadoop users
Edit/etc/sudoers File
sudo vi/etc/sudoers
Under "Root all= (All:all) All", add
Hadoop all= (all:all) all
Then save, you may be prompted to save the unsuccessful, need to add! Enforcement, enforcement, and execution
Switch to Hadoop Account Login
Install SSH and start
sudo apt-get install openssh-/etc/init.d/ssh start
Set up password-free login
Generate private and public keys
Ssh-keygen-t rsa-p ""
When you finish executing the command, you will be prompted "enter file which to save the key" and enter directly
At this time there will be an. ssh file in the/home/hadoop/.ssh directory to generate the Id_rsa and id_rsa.pub two key files
The public key is then appended to the Authorized_keys
Cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
Test SSH login without password
SSH localhost
Appears as shown as success
Exit SSH Login
Install JDK, configure environment variables
Reference: Java notes finishing (ii), downloading and installing the JDK
Install Hadoop to extract Hadoop to/opt/hadoop-2.6.0
sudo tar-zxvf hadoop-2.6.0.tar.gz
Rename a folder to hadoop2.6
sudo mv hadoop-2.6.0//opt/hadoop2.6
Add permissions to a Hadoop user for this directory
sudo chmod 777/opt/hadoop2.6
Configuring Environment variables
sudo vi ~/.BASHRC
Add the following code to the end of the file and save
Export hadoop_install=/opt/hadoop2.6export PATH= $PATH: $HADOOP _install/binexport path= $PATH: $HADOOP _ Install/sbinexport hadoop_mapred_home=$HADOOP _installexport hadoop_common_home=$HADOOP _ Installexport hadoop_hdfs_home=$HADOOP _installexport yarn_home=$HADOOP _installexport hadoop_ Common_lib_native_dir= $HADOOP _install/lib/nativeexport hadoop_opts= "-djava.library.path= $HADOOP _ Install/lib "
Make environment variables effective
SOURCE ~/.BASHRC
Use WordCount from Hadoop to verify that the installation is successful
1. Create the test folder under/home/hadoop
2. Create a text file under test, write some content, preferably more words (you can copy the README.TXT in the Hadoop directory past)
3 Enter the/opt/hadoop directory, execute the command
Bin/hadoop Jar Share/hadoop/mapreduce/sources/hadoop-mapreduce-examples-2.6.0-sources.jar Org.apache.hadoop.examples.wordcount/home/hadoop/test/home/hadoop/output
Perform
and the output folder is generated under/home/hadoop/.
At this point, Hadoop Standalone mode has been installed successfully!
Reference from:
Http://www.cnblogs.com/kinglau/p/3794433.html
Http://www.cnblogs.com/luwikes/archive/2011/11/03/2234739.html
http://www.powerxing.com/install-hadoop/
Second edition of the authoritative guide to Hadoop
Hadoop Standalone mode installation