centos下安装hadoop
2015-07-21 14:39
316 查看
yum install -y wget
下载 wget http://mirror.bit.edu.cn/apache/hadoop/common/hadoop-1.2.1/hadoop-1.2.1.tar.gz 解压
tar -zxvf hadoop-1.2.1.tar.gz
配置文件
hadoop-1.2.1/conf 目录下
hadoop.env.sh
export JAVA_HOME=/usr/java/jdk1.8.0_45
core-site.xml
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<!-- Put site-specific property overrides in this file. -->
<configuration>
<!—- hadoop工作目录 -—>
<property>
<name>hadoop.tmp.dir</name>
<value>/hadoop</value>
</property>
<!—- 源数据目录 -—>
<property>
<name>dfs.name.dir</name>
<value>/hadoop/name</value>
</property>
<!—- 访问路径 -—>
<property>
<name>fs.default.name</name>
<value>hdfs://cas:9000</value>
</property>
</configuration>
hdfs-sit.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.name.dir</name>
<value>/hadoop/data</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>cas:9001</value>
</property>
</configuration>
格式化操作 hadoop namenode -format
jps
查看文件
hadoop fs -ls /
相关文章推荐
- Linux入门
- centos搭建本地yum源和局域网yum源
- centos下rpm包的管理
- linux常用命令--文件与目录
- 关于服务程序(service)的命令(windows\linux)
- linux 2>&1
- Linux_安装部署MySQL5.6
- Linux DNS服务器搭建
- linux用vim删除文本中的空行
- Linux基础命令详解和命令大全
- linux sort,uniq,cut,wc命令详解
- linux 下同步异步,阻塞非阻塞的一些想法
- Linux下添加php的zip模块
- Linux查看磁盘使用情况
- Linux启动时,检测磁盘失败问题解决
- linux文件是怎么存储的
- PXE 安装linux服务器
- linux之return和exit引发的大问题(vfork和fork)
- Linux下动态链接实现原理
- linux中fork()函数详解