标签:des style blog http color os io java ar
hadoop安装
1.将hadoop-1.1.2.tar.gz上传到/usr/local/,解压并改名为hadoop
2.配置hadoop环境变量,编辑/etc/profile文件,在该文件底部添加如下内容(包括java)
export JAVA_HOME=/usr/local/jdk export HADOOP_HOME=/usr/local/hadoop export PATH=.:$HADOOP_HOME/bin:$JAVA_HOME/bin:$PATH
让配置立即生效:source /ect/profile
3.修改hadoop配置文件
1. 在hadoop下的conf/hadoop-env.sh文件,增加:export JAVA_HOME=/usr/local/jdk
2.修改hadoop下的core-site.xml
<configuration> <property> <name>fs.default.name</name> <value>hdfs://localhost:9000</value> <description>change your own hostname</description> </property> <property> <name>hadoop.tmp.dir</name> <value>/usr/local/hadoop/tmp</value> </property> </configuration>
3.修改hadoop下的hdfs-site.xml
<configuration> <property> <name>dfs.replication</name> <value>1</value> </property> <property> <name>dfs.permissions</name> <value>false</value> </property> </configuration>
4.修改mapred-site.xml
<configuration> <property> <name>mapred.job.tracker</name> <value>localhost:9001</value> <description>change your own hostname</description> </property> </configuration>
4.验证hadoop是否安装成功
1.首先格式化工作空间:hadoop namenode -format
2.启动hadoop:start-all.sh
3.启动本地浏览器访问
http://localhost:50030/(MapReduce的页面)
http://localhost:50070/(HDFS的页面)
如果出现如下效果则证明安装成功!
标签:des style blog http color os io java ar
原文地址:http://www.cnblogs.com/lzxl/p/3916886.html