hadoop安装

2009-05-13 12:06:04来源:未知 阅读 ()

新老客户大回馈,云服务器低至5折

1.解压
1
tar -zvxf hadoop-0.16.1.tar.gz
同时设置环境变量
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# vi /etc/profile

JAVA_HOME=/usr/local/jrockit
export JAVA_HOME
PATH=$PATH:$JAVA_HOME/bin
export PATH
CLASSPATH=.:$JAVA_HOME/lib:$JAVA_HOME/jre/lib
export CLASSPATH
HADOOP_HOME=/usr/local/hadoop
export HADOOP_HOME
HADOOP_LOG_DIR=/var/log/hadoop
export HADOOP_LOG_DIR
HADOOP_SSH_OPTS="-p 2222"//ssh端口
export HADOOP_SSH_OPTS
2.ssh公钥认证
1
ssh-keygen -t rsa
在passparse时输入密码空,会在.ssh目录下生成 id_rsa.pub
1
cp id_rsa.pub authorized_keys
3.hadoop-site.xml加入
1
2
3
4
5
6
7
8
9
10
11

fs.default.name
develop:9000
The name of thedefaultfile system. Either the literal string"local"
or a host:portforDFS.

mapred.job.tracker
develop:9001
The host and port that the MapReduce job tracker runs at. If"local",
then jobs are run in-process as a single map and reduce task.
4.格式化 namenode
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
hadoop@develop:/usr/local/hadoop/bin> ./hadoop namenode -format
[JRockit] Local management server started.
08/03/16 18:47:29 INFO dfs.NameNode: STARTUP_MSG:
/************************************************************
STARTUP_MSG: Starting NameNode
STARTUP_MSG:   host = develop/219.232.239.88
STARTUP_MSG:   args = [-format]
STARTUP_MSG:   version = 0.16.1
STARTUP_MSG:   build = http://svn.apache.org/repos/asf/hadoop/core/branches/branch-0.16
-r 635123; compiled by 'hadoopqa' on Sun Mar  9 05:44:19 UTC 2008
************************************************************/

Re-format filesystem in /tmp/hadoop-hadoop/dfs/name ? (Y or N) Y
08/03/16 18:47:46 INFO fs.FSNamesystem: fsOwner=hadoop,users,dialout,video
08/03/16 18:47:46 INFO fs.FSNamesystem: supergroup=supergroup
08/03/16 18:47:46 INFO fs.FSNamesystem: isPermissionEnabled=true
08/03/16 18:47:46 INFO dfs.Storage: Storage directory /tmp/hadoop-hadoop/dfs/name

标签:

版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有

上一篇:Hadoop学习笔记

下一篇:使用Varnish代替Squid做网站缓存加速器的详细解决方案