Hadoop pseudo-distribution Installation

Source: Internet
Author: User

1.1 设置ip地址

  执行命令  service network restart

  验证  ifconfig

1.2 关闭防火墙

  执行命令  service iptables stop

  验证  service iptables status

1.3 关闭防火墙的自动运行(永久关闭)

  执行命令  chkconfig iptables off

  验证  chkconfig --list | grep iptables

1.4 设置主机名

  执行命令  (1)hostname HadoopMaster

        (2)vi /etc/sysconfig/network

1.5 ip与hostname绑定

  执行命令  vi /etc/hosts

  验证   ping HadoopMaster

1.6 设置ssh免密码登陆

  执行命令  (1)ssh-keygen -t rsa

        (2)cp ~/.ssh/id_rsa.pub ~/.ssh/authorized_keys

  验证  ssh HadoopMaster

1.7 安装jdk(下载jdk-6u24-linux-i586.bin到/usr/local)

  执行命令  (1)cd /usr/local

        (2)chmod u+x jdk-6u24-linux-i586.bin

        (3)./jdk-6u24-linux-i586.bin

        (4)mv jdk-1.6.0_24  jdk

        (5)vi /etc/profile 增加内容如下:

          export JAVA_HOME=/usr/local/jdk
          export PATH=.:$JAVA_HOME/bin:$PATH

        (6)source /etc/profile

  验证  java -version

1.8 安装hadoop(下载hadoop-1.1.2.tar.gz到usr/local)

  执行命令  (1)tar -xzvf hadoop-1.1.2.tar.gz

        (2)mv hadoop-1.1.2 hadoop

        (3)vi /etc/profile 增加内容如下:

          export JAVA_HOME=/usr/local/jdk
          export HADOOP_HOME=/usr/local/hadoop
          export PATH=.:$HADOOP_HOME/bin:$JAVA_HOME/bin:$PATH

        (4)source /etc/profile

        (5)修改conf目录下的配置文件hadoop-env.sh、core-site.xml、hdfs-site.xml、mapred-site.xml

        (6)hadoop namenode -format

        (7)./start-all.sh

  验证  (1)执行命令jps, 如看到5个新的java进程,分别是 NameNode、SecondaryNameNode、DataNode、JobTracker、TaskTracker  

      (2)在浏览器中查看, http://HadoopMaster:50070 http://HadoopMaster:50030

1.9 启动时没有NameNode的可能原因
  (1)没有格式化
  (2)环境变量设置错误
  (3)ip与hostname绑定失败

 

Hadoop伪分布安装

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.