Installation Preparation:(1) Hadoop installation package: hadoop-1.2.1.tar.gz(2) JDK installation package: jdk-7u60-linux-i586.gz(3) The Eclipse installation package and the Eclipse and Hadoop related jar packages are also required if eclipse development is required.
Installation:(1) You can choose a new user to install or use the current account. (2) Specify the user group to be owned:
(3) to give users Hadoop privileges:sudo vim/etc/sudoers modified add: when it comes to vim Ubuntu itself is the vim tiny is not available to use is the VIM full version need to download the installation:sudo apt-get remove Vim-commonsudo apt-get install vim Some of the configuration of vim itself can be set according to your preferences. (4) Installing the JDK:depending on your needs, choose the installation path, sudo mkdir/usr/javatar-zxvf jdk-7u60-linux-i586.gz MV jdk-1.7.0 JDK (modified name can not be set (best)) to delete an installation package: (5) Configuring the JDK environment: sudo vim/etc/profile add
Update (required): Source/etc/profile Test it:
jdk complete. (6) SSH password-free:The general ssh-client is included in the Ubuntu system, but Ssh-server is not installed and can be tested by SSH IP; installing Ssh-server:sudo apt-get install SSH after installation, do the following:
Generate:
ssh can log in. (7) Installing HadoopYou can create a Hadoop to a folder first: sudo mkdir/usr/hadoop cd/usr/hadoop/sudo tar-zxvf hadoop-1.2.1.tar.gz sudo mv hadoop-1.2.1 Hadoop sudo chown-r hadoop:hadoop Hadoop gives Hadoop users access to folder Hadoop read sudo rm-rf hadoop-1.2.1.tar.gz configuration is required after installation:to configure/etc/profile add: sudo vim/etc/profile
to configure the hadoop-env.sh file: sudo vim/usr/hadoop/conf/hadoop-env.sh:
Create a folder: Used to configure the Hadoop.tmp.dir parameter:sudo mkdir/usr/hadoop/tmp
to configure the core file: Core-site.xml:
Hdfs-site.xml:
Mapred-site.xml:
start: Due to the preceding configuration input:To Format a node: Hadoop namenode-formatStart: start-all.sh JPS View
stop: stop-all.sh
(8) Installing Eclipsefirst create a folder unzip the installation ....
Getting in and starting eclipse has a small problem:Eclipse cannot find the JDK or JRESolution:cd/home/hadoop/eclipse (install eclipse) sudo ln-sf $JRE _home JRE That 's it:
for Eclipse configuration Hadoop copies the associated plug-in to eclipse into the Plugins folder:
start eclipse:window->perferences:
the installation directory for Hadoop. Settings:Right-click an empty area below:
appears: and configures
point to the left small elephant:
Eclipse Configuration is complete.
you can then write the job in Eclipse and then go to the terminal for execution.
configuration encountered problems:Namenode Datanode not up:resolved as follows:(1) Delete/usr/hadoop/tmp(2) in creation: sudo mkdir/usr/hadoop/tmp(3) Delete all files starting with Hadoop in the/tmp folder: sudo rm-rf/tmp/hadoop*(4) Reformatting: Hadoop namenode-format(5) Start start-all.sh
Install pseudo-distributed Hadoop under Ubuntu