Hadoop Environment Build 1_jdk+ssh

Source: Internet
Author: User

1 Preface:

Hadoop was originally developed for use on Linux platforms, but Hadoop is in Unix, Windows, and
Also works well on Mac OS X systems. However, running Hadoop on Windows is slightly more complex and must first be installed
Cygwin to simulate a Linux environment before you can install Hadoop.

Under Windows: can have 1: virtual machine vmware+linux system, or alternatively: an integrated automatic installer for Hadoop4win (seemingly I have not successfully installed)

Because I use the environment is: Ubuntu.

2 JDK Installation:

Of course, in Linux under the installation of the program seems very simple, the download of the corresponding program to unzip the directory you want to:

1 Ubuntu thanks to a software center, you can download it automatically at the terminal: sudo apt-get install SUN-JAVA6-JDK

If you do not know how to version, you can enter in the terminal command: Java, or Javac, General prompts will be prompted, follow the prompts to install automatically

Such installed directories are generally specified automatically, such as:/usr/lib/jvm/、、、、 java-6-openjdk-amd64

Find your own installation directory: dpkg-l openjdk-6-jdk

2 Download it yourself first:

Link: Download transfer ---------------------。 Then unzip yourself into your own directory.

3 As with our installation under Windows, we also need to configure environment variables:

My Java directory:/USR/LIB/JVM/JAVA-6-OPENJDK-AMD64

In the terminal:
sudo gedit/etc/profile (this is a user environment variable configuration file)
Export JAVA_HOME=/USR/LIB/JVM/JAVA-6-OPENJDK-AMD64
Export path= $JAVA _home/bin: $PATH
Export classpath=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jar
(3) Verify that Java is installed successfully
Input java-version, Javac,java have relevant information output can indicate success

If you are unfamiliar with environment variables, simple operations under Linux, please eat first, environment variables , file operations.

1 here to explain the two commands sudo and apt, sudo this command allows a normal user to perform some or all of the required root command, it provides a detailed log, you can record what each user does with this command, and Sudo also provides a flexible management method, You can restrict the use of commands by users. The configuration file for sudo is/etc/sudoers. 2 Apt is all called the Advanced packaging Tool, which is part of the Debian program and is a software package manager for Ubuntu that installs software without regard to software dependencies through APT, and can install the required software directly. Apt will automatically download a dependency package and install it sequentially in Ubuntu with an apt graphical interface program synaptic (the Chinese translation is "new"), and if you are interested you can also use this program to install the required software. 

3 Installing the configuration SSH

(1) Download and install SSH: also enter the following command at the command line to install SSH
sudo apt-get install SSH
(2) Configure password-free login native: Enter the following two commands at the command line
$ ssh-keygen-t Rsa-p "-F ~/.ssh/id_rsa
Direct carriage return, when completed will generate two files in ~/.ssh/: Id_rsa and id_rsa.pub; These two pairs appear, similar to keys and locks.

Append the id_rsa.pub to the authorization key (there is no Authorized_keys file at this moment)
$ cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys

Once started, you can see if the service started correctly with the following command:

Ps-e | grep ssh

(3) Verify that SSH is installed successfully
Enter SSH localhost. If the display of a native login succeeds, the installation is successful.

ssh localhost will appear as follows: The authenticity of host' LocalHost (:: 1) ' can ' t be established. RSA Key fingerprint is 8b:c3:51:a5:2a:31:b7:74:06:9d:62:04:4f:84:f8:77. is you sure-want toContinueConnecting (yes/no)?Yeswarning:permanently added' localhost '(RSA) to the list of known hosts. Linux Master2.6.31-14-generic #48-ubuntu SMP Fri Oct 14:04:26 UTC 2009i686to Access Official Ubuntu documentation, please visit:http://help.ubuntu.com/Last Login:mon Oct 18 17:12:40 2010From Master[email protected]:~$ This means that the installation is successful and the first time you log in will ask if you want to continue the link and enter Yes. In fact, during the installation of Hadoop, it doesn't matter if no password is logged in, but if you do not configure no password login, each time you start Hadoop, you need to enter a password to log on to the datanode of each machine, considering that a typical Hadoop cluster is hundreds of or thousands of machines. Therefore, SSH password-free logins are generally configured. 

4. Turn off the firewall
$sudo UFW Disable
Note: This step is very important, if you do not close, there will be no problem finding Datanode

Hadoop Environment Build 1_jdk+ssh

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.