linux下安装hadoop以及myeclipse连接的配置

1.首先在linux上安装ssh服务,请查看我的安装ssh文章

2.接着安装hadoop

1>从网上下载hadooptar包  下载地址

2>用命令

tar -zxvf /下载路径/tar包

3>配置conf文件夹下的配置文件

hadoop-env.sh

增加jdk的安装路径

export JAVA_HOME=/usr/java/jdk-7

如果路径有空格,就用单引号把路径


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://xxx.xxx.xx.xxx:9000</value>
	</property>

     <property>  
          <name>hadoop.tmp.dir</name>
      <value>/tmp/hadoop/hadoop-${user.name}</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>
	<property>
		<name>dfs.permissions</name>
		<value>false</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>xxx.xxx.xxx.xxx:9001</value>
    </property>

</configuration>


masters   slaves    把这个文件中的localhost改成电脑的ip


4>格式化namenode


进入到hadoop目录
bin/hadoop namenode -format

bin/hadoop start-all.sh


jps查看是否启动成功

13815 Jps
13762 TaskTracker
7409 SecondaryNameNode
7493 JobTracker
13236 NameNode
13454 DataNode





5>下载myeclipse连接hadoop的插件

下载


放到dropins目录下重启myeclipse


6>创建DFS Location



OK!!!


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

火柴有猿

您的鼓励,将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值