hadoop1.1.2配置及啓動

1.安裝jdk,配置環境變量node

下載地址:http://yunpan.cn/csUMbjpYd6LIU    提取碼 8e1dssh


修改/etc/profileide

export JAVA_HOME=/opt/jdk1.6.0_12oop

export PATH=$PATH:$JAVA_HOME/binthis


重啓spa


2.下載hadoop1.1.2orm

下載地址:http://yunpan.cn/csUMinfxTYFZr 提取碼 7bf8xml


修改配置文件hadoop

hadoop-env.shci

export JAVA_HOME=/opt/jdk1.6.0_12


core-site.xml

<?xml version="1.0"?>

<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>

<!-- Put site-specific property overrides in this file. -->

<configuration>

 <property>

  <name>fs.default.name</name>

  <value>hdfs://localhost:9000</value>

 </property>

 <property>

  <name>hadoop.tmp.dir</name>

  <value>/opt/hadoop-1.1.2/tmp</value>

 </property>

</configuration>


hdfs-site.xml

<?xml version="1.0"?>

<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>

<!-- Put site-specific property overrides in this file. -->

<configuration>

<!-- 設置備份的份數 --> 

 <property>

  <name>dfs.replication</name>

  <value>1</value>

 </property>

</configuration>


mapred-site.xml

<?xml version="1.0"?>

<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>

<!-- Put site-specific property overrides in this file. -->

<configuration>

 <property>

  <name>mapred.job.tracker</name>

  <value>localhost:9001</value>

 </property>

</configuration>


免密碼登錄

$ ssh-keygen -t rsa

$ cd $HOME/.ssh

$ cp id_rsa.pub authorized_keys

$ ssh localhost


格式化HDFS:hadoop namenode -format

啓動hadoop羣集:start-all.sh


卸載hadoop,因爲沒配環境變量,直接刪除文件就行

相關文章
相關標籤/搜索