Ubuntu16.04 install Hadoop Pseudo-distributed

Source: Internet
Author: User
Tags ssh server

1. Install SSH server, configure SSH login without password
Ubuntu has SSH client installed by default and requires SSH server installation.
sudo apt-get install Openssh-server

Set SSH no password login native
SSH localhost

You will be prompted with the following (SSH first login hint), and enter Yes.
SSH First Login Tips
Then follow the prompts to enter the password Hadoop, so it landed on the machine. But such a login requires a password, need to be configured to login without a password.
Quit SSH just now and generate the SSH certificate:

Exit # quit SSH localhost
CD ~/.SSH # If you do not have the directory, first execute SSH localhost once
SSH-KEYGEN-T RSA # always press ENTER to
CP Id_rsa.pub Authorized_keys

At this point, with ssh localhost command, you can log in directly

Installation of 2.Hadoop
Download the Hadoop installation package binary
Unzip, move to the folder you want to place

TAR-ZVXF hadoop-2.7.3.tar.gz

mv./hadoop-2.7.3.tar.gz/opt/hadoop

Grant EXECUTE permission
sudo chmod-r 755/opt/hadoop
sudo chown-r xxx:hadoop/opt/hadoop//Otherwise SSH will deny access

Modify/etc/profile
#set Hadoop Environment
Export Hadoop_home=/opt/hadoop
Export Path=.:${java_home}/bin:${hadoop_home}/bin: $PATH

Test is configured successfully
Hadoop version

3. Pseudo-distributed configuration Cd/opt/hadoop
HDFs configuration:
Vim Etc/hadoop/core-site.xml
<configuration>
<property>
<name>hadoop.tmp.dir</name>
<value>file:/opt/hadoop/tmp</value>
<description>abase for other temporary directories.</description>
</property>
<property>
<name>fs.defaultFS</name>
<value>hdfs://localhost:9000</value>
</property>
</configuration>

Vim Etc/hadoop/hdfs-site.xml
<configuration>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
<property>
<name>dfs.namenode.name.dir</name>
<value>file:/opt/hadoop/tmp/dfs/name</value>
</property>
<property>
<name>dfs.datanode.data.dir</name>
<value>file:/opt/hadoop/tmp/dfs/data</value>
</property>
</configuration>

MapReduce configuration:
CP Etc/hadoop/mapred-site.xml.template Etc/hadoop/mapred-site.xml
Vim Etc/hadoop/mapred-site.xml
<configuration>
<property>
<name>mapreduce.framework.name</name>
<value>yarn</value>
</property>
</configuration>

Vim Etc/hadoop/yarn-site.xml
<configuration>
<property>
<name>yarn.nodemanager.aux-services</name>
<value>mapreduce_shuffle</value>
</property>
</configuration>

Open hdfs:./sbin/start-dfs.sh
Access http://localhost:50070 view node information.
Close HDFs:./sbin/stop-dfs.sh

Turn on the history server./sbin/mr-jobhistory-daemon.sh Start Historyserver

When YARN is not enabled, it is "mapred." Localjobrunner "After running the task, enabling YARN, is" mapred. Yarnrunner "in the running task. One of the benefits of starting YARN is that you can view the operation of a task through the Web interface: Http://localhost:8088/cluster.

Ubuntu16.04 install Hadoop Pseudo-distributed

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.