CentOS 6.5
Hots
192.168.22.190 nn1
192.168.22.191 dn1
192.168.22.192 dn2
使用到的Hadoop为
Hadoop-2.7.1.tar.gz
系统配置 nn1,dn1,dn2都要配置
chkconfig iptables off
vim /etc/sysconfig/selinux
修改enforcing为disabled
可以手动修改也可以使用命令操作
Vim /etc/sysconfig/network-scripts/ifcfg-eth0
vim /etc/sysconfig/network
配置好网络后重启 network
service network restart
vim /etc/hosts
192.168.22.130 nn1
192.168.22.131 dn1
192.168.22.132 dn2
Useradd hadoop
Userpasswod 修改hadoop密码
Su hadoop 切换hadoop用户
在nn1,dn1,dn2都要执行(登录hadoop用户执行)
刚开始 hadoop 用户根目录下没有 .ssh 这个隐藏目录,我们可以自己创建mkdir ~/.ssh
chown hadoop.hadoop -R /home/hadoop/.ssh
chmod 755 /home/hadoop/.ssh
然后执行命令 生成 ssh 密匙
ssh-keygen -t rsa
然后一路回车,如图
则会在.ssh这个隐藏的目录下生成连个文件
id_rsa(私钥)和id_rsa.pub(公钥)
我们需要将id_rsa.pub(公钥)的信息加入到authorized_keys(需要自己创建)文件里面
Cd ~/.ssh
注:执行完以后将 dn1 和 dn2 的id_rsa.pub(公钥) copy到nn1中
如
[hadoop@dn1 .ssh] scp id_rsa.pub [email protected]:~/.ssh/dn1
[hadoop@dn2 .ssh] scp id_rsa.pub [email protected]:~/.ssh/dn2
注:直接在创建 /usr目录下会提示
hadoop is not in the sudoers file. This incident will be reported
所以切换成 su root
修改sudoers
vim /etc/sudoers
在 root ALL=(ALL) ALL下面添加一条
hadoop ALL=(ALL) ALL
Ok
退出 root用户
Exit
使用 hadoop 用户在 /usr目录下创建 jvm文件夹存放 jdk
Sudo /usr/jvm
解压jdk,我的jdk存放在Downloads目录下
sudo tar zxvf ~/Downloads/jdk-7u67-linux-i586.tar.gz -C /usr/jvm/
设置环境变量
Vim /etc/profile
添加以后使用source /etc/profile更新profile
使用命令java提示出以下信息说明成功了
新建hadoop工作目录以及读写权限
mkdir /home/hadoop/src (存放hadoop/Flume/hbase安装目录)
解压hadoop 2.7.1 到 hadoop/src 目录下
tar -zxvf ~/Downloads/hadoop-2.7.1.tar.gz -C /home/hadoop/src/
配置HADOOP_HOME环境变量
配置 hadoop-env.sh core-site.xml hdfs-site.xml yarn-site.xml mapred-site.xml(开始是不存在的需要将mapred-site.xml.template cp 一份为 mapred-site.xml)
fs.defaultFS
hdfs://nn1:9000
hadoop.tmp.dir
file:/home/hadoop/src/hadoop-2.7.1/
dfs.namenode.name.dir
file:/home/hadoop/src/hadoop-2.7./tmp/dfs/name
dfs.datanode.data.dir
file:/home/hadoop/src/hadoop-2.7.1/tmp/dfs/date
dfs.replication
3
dfs.replication
3
Cp mapred-site.xml.template mapred-site.xml
Vim mapred-site.xml
mapreduce.framwork.name
yarn
yarn.resourcemanager.hostname
nn1
添加dn1和dn2
配置完成,scp到节点(dn1 da2)上接下来在nn1上格式化HDFS
16/04/05 11:44:32 INFO namenode.NameNode: STARTUP_MSG:
/************************************************************
STARTUP_MSG: Starting NameNode
STARTUP_MSG: host = nn1/192.168.22.190
STARTUP_MSG: args = [-format]
STARTUP_MSG: version = 2.7.1
STARTUP_MSG: classpath = /home/hadoop/src/hadoop-2.7.1/etc/hadoop:/home/hadoop/src/hadoop-2.7.1/share/hadoop/common/lib/snappy-java-1.0.4.1.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/common/lib/commons-configuration-1.6.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/common/lib/jets3t-0.9.0.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/common/lib/apacheds-kerberos-codec-2.0.0-M15.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/common/lib/servlet-api-2.5.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/common/lib/jsp-api-2.1.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/common/lib/jetty-6.1.26.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/common/lib/jaxb-api-2.2.2.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/common/lib/httpcore-4.2.5.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/common/lib/jersey-server-1.9.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/common/lib/commons-beanutils-1.7.0.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/common/lib/guava-11.0.2.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/common/lib/jackson-core-asl-1.9.13.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/common/lib/commons-math3-3.1.1.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/common/lib/avro-1.7.4.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/common/lib/protobuf-java-2.5.0.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/common/lib/apacheds-i18n-2.0.0-M15.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/common/lib/jersey-json-1.9.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/common/lib/jsr305-3.0.0.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/common/lib/slf4j-log4j12-1.7.10.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/common/lib/gson-2.2.4.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/common/lib/api-util-1.0.0-M20.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/common/lib/java-xmlbuilder-0.4.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/common/lib/xmlenc-0.52.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/common/lib/slf4j-api-1.7.10.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/common/lib/commons-net-3.1.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/common/lib/httpclient-4.2.5.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/common/lib/commons-logging-1.1.3.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/common/lib/htrace-core-3.1.0-incubating.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/common/lib/curator-framework-2.7.1.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/common/lib/log4j-1.2.17.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/common/lib/jersey-core-1.9.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/common/lib/commons-beanutils-core-1.8.0.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/common/lib/netty-3.6.2.Final.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/common/lib/junit-4.11.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/common/lib/mockito-all-1.8.5.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/common/lib/jsch-0.1.42.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/common/lib/commons-httpclient-3.1.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/common/lib/commons-io-2.4.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/common/lib/api-asn1-api-1.0.0-M20.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/common/lib/commons-compress-1.4.1.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/common/lib/jetty-util-6.1.26.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/common/lib/commons-collections-3.2.1.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/common/lib/jaxb-impl-2.2.3-1.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/common/lib/jackson-mapper-asl-1.9.13.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/common/lib/commons-digester-1.8.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/common/lib/hamcrest-core-1.3.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/common/lib/curator-recipes-2.7.1.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/common/lib/jackson-jaxrs-1.9.13.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/common/lib/jackson-xc-1.9.13.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/common/lib/paranamer-2.3.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/common/lib/hadoop-annotations-2.7.1.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/common/lib/stax-api-1.0-2.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/common/lib/hadoop-auth-2.7.1.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/common/lib/commons-lang-2.6.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/common/lib/asm-3.2.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/common/lib/activation-1.1.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/common/lib/commons-codec-1.4.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/common/lib/commons-cli-1.2.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/common/lib/zookeeper-3.4.6.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/common/lib/curator-client-2.7.1.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/common/lib/xz-1.0.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/common/lib/jettison-1.1.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/common/hadoop-common-2.7.1-tests.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/common/hadoop-nfs-2.7.1.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/common/hadoop-common-2.7.1.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/hdfs:/home/hadoop/src/hadoop-2.7.1/share/hadoop/hdfs/lib/servlet-api-2.5.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/hdfs/lib/jetty-6.1.26.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/hdfs/lib/jersey-server-1.9.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/hdfs/lib/guava-11.0.2.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/hdfs/lib/jackson-core-asl-1.9.13.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/hdfs/lib/protobuf-java-2.5.0.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/hdfs/lib/xercesImpl-2.9.1.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/hdfs/lib/jsr305-3.0.0.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/hdfs/lib/xmlenc-0.52.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/hdfs/lib/commons-daemon-1.0.13.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/hdfs/lib/commons-logging-1.1.3.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/hdfs/lib/htrace-core-3.1.0-incubating.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/hdfs/lib/log4j-1.2.17.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/hdfs/lib/jersey-core-1.9.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/hdfs/lib/netty-3.6.2.Final.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/hdfs/lib/commons-io-2.4.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/hdfs/lib/jetty-util-6.1.26.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/hdfs/lib/jackson-mapper-asl-1.9.13.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/hdfs/lib/netty-all-4.0.23.Final.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/hdfs/lib/xml-apis-1.3.04.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/hdfs/lib/leveldbjni-all-1.8.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/hdfs/lib/commons-lang-2.6.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/hdfs/lib/asm-3.2.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/hdfs/lib/commons-codec-1.4.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/hdfs/lib/commons-cli-1.2.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/hdfs/hadoop-hdfs-nfs-2.7.1.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/hdfs/hadoop-hdfs-2.7.1.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/hdfs/hadoop-hdfs-2.7.1-tests.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/yarn/lib/servlet-api-2.5.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/yarn/lib/jetty-6.1.26.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/yarn/lib/jaxb-api-2.2.2.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/yarn/lib/guice-3.0.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/yarn/lib/jersey-server-1.9.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/yarn/lib/guava-11.0.2.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/yarn/lib/jackson-core-asl-1.9.13.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/yarn/lib/protobuf-java-2.5.0.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/yarn/lib/jersey-json-1.9.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/yarn/lib/jsr305-3.0.0.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/yarn/lib/zookeeper-3.4.6-tests.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/yarn/lib/jersey-guice-1.9.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/yarn/lib/commons-logging-1.1.3.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/yarn/lib/log4j-1.2.17.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/yarn/lib/jersey-core-1.9.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/yarn/lib/netty-3.6.2.Final.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/yarn/lib/jersey-client-1.9.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/yarn/lib/commons-io-2.4.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/yarn/lib/commons-compress-1.4.1.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/yarn/lib/jetty-util-6.1.26.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/yarn/lib/commons-collections-3.2.1.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/yarn/lib/jaxb-impl-2.2.3-1.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/yarn/lib/jackson-mapper-asl-1.9.13.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/yarn/lib/jackson-jaxrs-1.9.13.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/yarn/lib/jackson-xc-1.9.13.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/yarn/lib/javax.inject-1.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/yarn/lib/leveldbjni-all-1.8.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/yarn/lib/stax-api-1.0-2.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/yarn/lib/aopalliance-1.0.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/yarn/lib/commons-lang-2.6.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/yarn/lib/asm-3.2.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/yarn/lib/activation-1.1.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/yarn/lib/commons-codec-1.4.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/yarn/lib/commons-cli-1.2.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/yarn/lib/zookeeper-3.4.6.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/yarn/lib/xz-1.0.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/yarn/lib/guice-servlet-3.0.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/yarn/lib/jettison-1.1.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/yarn/hadoop-yarn-server-applicationhistoryservice-2.7.1.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/yarn/hadoop-yarn-server-tests-2.7.1.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/yarn/hadoop-yarn-api-2.7.1.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/yarn/hadoop-yarn-server-nodemanager-2.7.1.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/yarn/hadoop-yarn-server-web-proxy-2.7.1.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/yarn/hadoop-yarn-server-common-2.7.1.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/yarn/hadoop-yarn-applications-unmanaged-am-launcher-2.7.1.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/yarn/hadoop-yarn-client-2.7.1.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/yarn/hadoop-yarn-common-2.7.1.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/yarn/hadoop-yarn-registry-2.7.1.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/yarn/hadoop-yarn-server-resourcemanager-2.7.1.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/yarn/hadoop-yarn-server-sharedcachemanager-2.7.1.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/yarn/hadoop-yarn-applications-distributedshell-2.7.1.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/mapreduce/lib/snappy-java-1.0.4.1.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/mapreduce/lib/guice-3.0.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/mapreduce/lib/jersey-server-1.9.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/mapreduce/lib/jackson-core-asl-1.9.13.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/mapreduce/lib/avro-1.7.4.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/mapreduce/lib/protobuf-java-2.5.0.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/mapreduce/lib/jersey-guice-1.9.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/mapreduce/lib/log4j-1.2.17.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/mapreduce/lib/jersey-core-1.9.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/mapreduce/lib/netty-3.6.2.Final.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/mapreduce/lib/junit-4.11.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/mapreduce/lib/commons-io-2.4.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/mapreduce/lib/commons-compress-1.4.1.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/mapreduce/lib/jackson-mapper-asl-1.9.13.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/mapreduce/lib/hamcrest-core-1.3.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/mapreduce/lib/javax.inject-1.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/mapreduce/lib/paranamer-2.3.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/mapreduce/lib/hadoop-annotations-2.7.1.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/mapreduce/lib/leveldbjni-all-1.8.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/mapreduce/lib/aopalliance-1.0.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/mapreduce/lib/asm-3.2.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/mapreduce/lib/xz-1.0.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/mapreduce/lib/guice-servlet-3.0.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/mapreduce/hadoop-mapreduce-client-common-2.7.1.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/mapreduce/hadoop-mapreduce-client-hs-2.7.1.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/mapreduce/hadoop-mapreduce-client-core-2.7.1.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/mapreduce/hadoop-mapreduce-client-jobclient-2.7.1-tests.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/mapreduce/hadoop-mapreduce-client-app-2.7.1.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/mapreduce/hadoop-mapreduce-client-hs-plugins-2.7.1.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/mapreduce/hadoop-mapreduce-client-shuffle-2.7.1.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/mapreduce/hadoop-mapreduce-client-jobclient-2.7.1.jar:/home/hadoop/src/hadoop-2.7.1/share/hadoop/mapreduce/hadoop-mapreduce-examples-2.7.1.jar:/home/hadoop/src/hadoop-2.7.1/contrib/capacity-scheduler/*.jar
STARTUP_MSG: build = https://git-wip-us.apache.org/repos/asf/hadoop.git -r 15ecc87ccf4a0228f35af08fc56de536e6ce657a; compiled by 'jenkins' on 2015-06-29T06:04Z
STARTUP_MSG: java = 1.7.0_67
************************************************************/
16/04/05 11:44:32 INFO namenode.NameNode: registered UNIX signal handlers for [TERM, HUP, INT]
16/04/05 11:44:32 INFO namenode.NameNode: createNameNode [-format]
Java HotSpot(TM) Client VM warning: You have loaded library /home/hadoop/src/hadoop-2.7.1/lib/native/libhadoop.so which might have disabled stack guard. The VM will try to fix the stack guard now.
It's highly recommended that you fix the library with 'execstack -c ', or link it with '-z noexecstack'.
16/04/05 11:44:34 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
Formatting using clusterid: CID-71cdd3ca-4c73-4ab5-85df-03e6c0ec6756
16/04/05 11:44:35 INFO namenode.FSNamesystem: No KeyProvider found.
16/04/05 11:44:35 INFO namenode.FSNamesystem: fsLock is fair:true
16/04/05 11:44:35 INFO blockmanagement.DatanodeManager: dfs.block.invalidate.limit=1000
16/04/05 11:44:35 INFO blockmanagement.DatanodeManager: dfs.namenode.datanode.registration.ip-hostname-check=true
16/04/05 11:44:35 INFO blockmanagement.BlockManager: dfs.namenode.startup.delay.block.deletion.sec is set to 000:00:00:00.000
16/04/05 11:44:35 INFO blockmanagement.BlockManager: The block deletion will start around 2016 Apr 05 11:44:35
16/04/05 11:44:35 INFO util.GSet: Computing capacity for map BlocksMap
16/04/05 11:44:35 INFO util.GSet: VM type = 32-bit
16/04/05 11:44:35 INFO util.GSet: 2.0% max memory 966.7 MB = 19.3 MB
16/04/05 11:44:35 INFO util.GSet: capacity = 2^22 = 4194304 entries
16/04/05 11:44:36 INFO blockmanagement.BlockManager: dfs.block.access.token.enable=false
16/04/05 11:44:36 INFO blockmanagement.BlockManager: defaultReplication = 3
16/04/05 11:44:36 INFO blockmanagement.BlockManager: maxReplication = 512
16/04/05 11:44:36 INFO blockmanagement.BlockManager: minReplication = 1
16/04/05 11:44:36 INFO blockmanagement.BlockManager: maxReplicationStreams = 2
16/04/05 11:44:36 INFO blockmanagement.BlockManager: shouldCheckForEnoughRacks = false
16/04/05 11:44:36 INFO blockmanagement.BlockManager: replicationRecheckInterval = 3000
16/04/05 11:44:36 INFO blockmanagement.BlockManager: encryptDataTransfer = false
16/04/05 11:44:36 INFO blockmanagement.BlockManager: maxNumBlocksToLog = 1000
16/04/05 11:44:36 INFO namenode.FSNamesystem: fsOwner = hadoop (auth:SIMPLE)
16/04/05 11:44:36 INFO namenode.FSNamesystem: supergroup = supergroup
16/04/05 11:44:36 INFO namenode.FSNamesystem: isPermissionEnabled = true
16/04/05 11:44:36 INFO namenode.FSNamesystem: HA Enabled: false
16/04/05 11:44:36 INFO namenode.FSNamesystem: Append Enabled: true
16/04/05 11:44:39 INFO util.GSet: Computing capacity for map INodeMap
16/04/05 11:44:39 INFO util.GSet: VM type = 32-bit
16/04/05 11:44:39 INFO util.GSet: 1.0% max memory 966.7 MB = 9.7 MB
16/04/05 11:44:39 INFO util.GSet: capacity = 2^21 = 2097152 entries
16/04/05 11:44:39 INFO namenode.FSDirectory: ACLs enabled? false
16/04/05 11:44:39 INFO namenode.FSDirectory: XAttrs enabled? true
16/04/05 11:44:39 INFO namenode.FSDirectory: Maximum size of an xattr: 16384
16/04/05 11:44:39 INFO namenode.NameNode: Caching file names occuring more than 10 times
16/04/05 11:44:40 INFO util.GSet: Computing capacity for map cachedBlocks
16/04/05 11:44:40 INFO util.GSet: VM type = 32-bit
16/04/05 11:44:40 INFO util.GSet: 0.25% max memory 966.7 MB = 2.4 MB
16/04/05 11:44:40 INFO util.GSet: capacity = 2^19 = 524288 entries
16/04/05 11:44:40 INFO namenode.FSNamesystem: dfs.namenode.safemode.threshold-pct = 0.9990000128746033
16/04/05 11:44:40 INFO namenode.FSNamesystem: dfs.namenode.safemode.min.datanodes = 0
16/04/05 11:44:40 INFO namenode.FSNamesystem: dfs.namenode.safemode.extension = 30000
16/04/05 11:44:40 INFO metrics.TopMetrics: NNTop conf: dfs.namenode.top.window.num.buckets = 10
16/04/05 11:44:40 INFO metrics.TopMetrics: NNTop conf: dfs.namenode.top.num.users = 10
16/04/05 11:44:40 INFO metrics.TopMetrics: NNTop conf: dfs.namenode.top.windows.minutes = 1,5,25
16/04/05 11:44:40 INFO namenode.FSNamesystem: Retry cache on namenode is enabled
16/04/05 11:44:40 INFO namenode.FSNamesystem: Retry cache will use 0.03 of total heap and retry cache entry expiry time is 600000 millis
16/04/05 11:44:40 INFO util.GSet: Computing capacity for map NameNodeRetryCache
16/04/05 11:44:40 INFO util.GSet: VM type = 32-bit
16/04/05 11:44:40 INFO util.GSet: 0.029999999329447746% max memory 966.7 MB = 297.0 KB
16/04/05 11:44:40 INFO util.GSet: capacity = 2^16 = 65536 entries
16/04/05 11:44:42 INFO namenode.FSImage: Allocated new BlockPoolId: BP-1412460682-192.168.22.190-1459881882416
16/04/05 11:44:42 INFO common.Storage: Storage directory /home/hadoop/src/hadoop-2.7./tmp/dfs/name has been successfully formatted.
16/04/05 11:44:43 INFO namenode.NNStorageRetentionManager: Going to retain 1 images with txid >= 0
16/04/05 11:44:43 INFO util.ExitUtil: Exiting with status 0
16/04/05 11:44:43 INFO namenode.NameNode: SHUTDOWN_MSG:
/************************************************************
SHUTDOWN_MSG: Shutting down NameNode at nn1/192.168.22.190
************************************************************/
/home/hadoop/src/hadoop-2.7./tmp/dfs/name has been successfully formatted.表示格式化成功
启动Hadoop集群
Start-all.sh
This script is Deprecated. Instead use start-dfs.sh and start-yarn.sh
16/04/05 11:47:18 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
Starting namenodes on [Java HotSpot(TM) Client VM warning: You have loaded library /home/hadoop/src/hadoop-2.7.1/lib/native/libhadoop.so which might have disabled stack guard. The VM will try to fix the stack guard now.
It's highly recommended that you fix the library with 'execstack -c ', or link it with '-z noexecstack'.
nn1]
Client: ssh: Could not resolve hostname Client: Name or service not known
VM: ssh: Could not resolve hostname VM: Name or service not known
warning:: ssh: Could not resolve hostname warning:: Name or service not known
Java: ssh: Could not resolve hostname Java: Name or service not known
sed: -e expression #1, char 6: unknown option to `s'
HotSpot(TM): ssh: Could not resolve hostname HotSpot(TM): Name or service not known
loaded: ssh: Could not resolve hostname loaded: Name or service not known
have: ssh: Could not resolve hostname have: Name or service not known
which: ssh: Could not resolve hostname which: Name or service not known
might: ssh: Could not resolve hostname might: Name or service not known
library: ssh: Could not resolve hostname library: Name or service not known
You: ssh: Could not resolve hostname You: Name or service not known
have: ssh: Could not resolve hostname have: Name or service not known
disabled: ssh: Could not resolve hostname disabled: Name or service not known
stack: ssh: Could not resolve hostname stack: Name or service not known
The: ssh: Could not resolve hostname The: Name or service not known
VM: ssh: Could not resolve hostname VM: Name or service not known
try: ssh: Could not resolve hostname try: Name or service not known
will: ssh: Could not resolve hostname will: Name or service not known
to: ssh: Could not resolve hostname to: Name or service not known
fix: ssh: Could not resolve hostname fix: Name or service not known
the: ssh: Could not resolve hostname the: Name or service not known
guard.: ssh: Could not resolve hostname guard.: Name or service not known
stack: ssh: Could not resolve hostname stack: Name or service not known
guard: ssh: Could not resolve hostname guard: Name or service not known
now.: ssh: Could not resolve hostname now.: Name or service not known
highly: ssh: Could not resolve hostname highly: Name or service not known
recommended: ssh: Could not resolve hostname recommended: Name or service not known
It's: ssh: Could not resolve hostname It's: Name or service not known
that: ssh: Could not resolve hostname that: Name or service not known
you: ssh: Could not resolve hostname you: Name or service not known
library: ssh: Could not resolve hostname library: Name or service not known
-c: Unknown cipher type 'cd'
fix: ssh: Could not resolve hostname fix: Name or service not known
with: ssh: Could not resolve hostname with: Name or service not known
the: ssh: Could not resolve hostname the: Name or service not known
'execstack: ssh: Could not resolve hostname 'execstack: Name or service not known
',: ssh: Could not resolve hostname ',: Name or service not known
or: ssh: Could not resolve hostname or: Name or service not known
link: ssh: Could not resolve hostname link: Name or service not known
it: ssh: Could not resolve hostname it: Name or service not known
with: ssh: Could not resolve hostname with: Name or service not known
'-z: ssh: Could not resolve hostname '-z: Name or service not known
noexecstack'.: ssh: Could not resolve hostname noexecstack'.: Name or service not known
The authenticity of host 'nn1 (192.168.22.190)' can't be established.
RSA key fingerprint is 05:52:7f:08:58:ef:1d:c5:b5:63:8e:46:1a:6f:f2:ea.
Are you sure you want to continue connecting (yes/no)? yes
nn1: Warning: Permanently added 'nn1,192.168.22.190' (RSA) to the list of known hosts.
nn1: starting namenode, logging to /home/hadoop/src/hadoop-2.7.1/logs/hadoop-hadoop-namenode-nn1.out
dn1: starting datanode, logging to /home/hadoop/src/hadoop-2.7.1/logs/hadoop-hadoop-datanode-dn1.out
dn2: starting datanode, logging to /home/hadoop/src/hadoop-2.7.1/logs/hadoop-hadoop-datanode-dn2.out
Starting secondary namenodes [Java HotSpot(TM) Client VM warning: You have loaded library /home/hadoop/src/hadoop-2.7.1/lib/native/libhadoop.so which might have disabled stack guard. The VM will try to fix the stack guard now.
It's highly recommended that you fix the library with 'execstack -c ', or link it with '-z noexecstack'.
0.0.0.0]
Client: ssh: Could not resolve hostname Client: Name or service not known
HotSpot(TM): ssh: Could not resolve hostname HotSpot(TM): Name or service not known
Java: ssh: Could not resolve hostname Java: Name or service not known
VM: ssh: Could not resolve hostname VM: Name or service not known
You: ssh: Could not resolve hostname You: Name or service not known
warning:: ssh: Could not resolve hostname warning:: Name or service not known
loaded: ssh: Could not resolve hostname loaded: Name or service not known
have: ssh: Could not resolve hostname have: Name or service not known
library: ssh: Could not resolve hostname library: Name or service not known
sed: -e expression #1, char 6: unknown option to `s'
might: ssh: Could not resolve hostname might: Name or service not known
have: ssh: Could not resolve hostname have: Name or service not known
disabled: ssh: Could not resolve hostname disabled: Name or service not known
stack: ssh: Could not resolve hostname stack: Name or service not known
The: ssh: Could not resolve hostname The: Name or service not known
which: ssh: Could not resolve hostname which: Name or service not known
VM: ssh: Could not resolve hostname VM: Name or service not known
to: ssh: Could not resolve hostname to: Name or service not known
guard.: ssh: Could not resolve hostname guard.: Name or service not known
fix: ssh: Could not resolve hostname fix: Name or service not known
the: ssh: Could not resolve hostname the: Name or service not known
stack: ssh: Could not resolve hostname stack: Name or service not known
guard: ssh: Could not resolve hostname guard: Name or service not known
now.: ssh: Could not resolve hostname now.: Name or service not known
try: ssh: Could not resolve hostname try: Name or service not known
will: ssh: Could not resolve hostname will: Name or service not known
It's: ssh: Could not resolve hostname It's: Name or service not known
highly: ssh: Could not resolve hostname highly: Name or service not known
recommended: ssh: Could not resolve hostname recommended: Name or service not known
you: ssh: Could not resolve hostname you: Name or service not known
that: ssh: Could not resolve hostname that: Name or service not known
the: ssh: Could not resolve hostname the: Name or service not known
-c: Unknown cipher type 'cd'
fix: ssh: Could not resolve hostname fix: Name or service not known
library: ssh: Could not resolve hostname library: Name or service not known
'execstack: ssh: Could not resolve hostname 'execstack: Name or service not known
with: ssh: Could not resolve hostname with: Name or service not known
or: ssh: Could not resolve hostname or: Name or service not known
',: ssh: Could not resolve hostname ',: Name or service not known
link: ssh: Could not resolve hostname link: Name or service not known
it: ssh: Could not resolve hostname it: Name or service not known
noexecstack'.: ssh: Could not resolve hostname noexecstack'.: Name or service not known
with: ssh: Could not resolve hostname with: Name or service not known
'-z: ssh: Could not resolve hostname '-z: Name or service not known
The authenticity of host '0.0.0.0 (0.0.0.0)' can't be established.
RSA key fingerprint is 05:52:7f:08:58:ef:1d:c5:b5:63:8e:46:1a:6f:f2:ea.
Are you sure you want to continue connecting (yes/no)? tes
Please type 'yes' or 'no': yes
0.0.0.0: Warning: Permanently added '0.0.0.0' (RSA) to the list of known hosts.
0.0.0.0: starting secondarynamenode, logging to /home/hadoop/src/hadoop-2.7.1/logs/hadoop-hadoop-secondarynamenode-nn1.out
16/04/05 11:48:22 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
starting yarn daemons
starting resourcemanager, logging to /home/hadoop/src/hadoop-2.7.1/logs/yarn-hadoop-resourcemanager-nn1.out
dn2: starting nodemanager, logging to /home/hadoop/src/hadoop-2.7.1/logs/yarn-hadoop-nodemanager-dn2.out
dn1: starting nodemanager, logging to /home/hadoop/src/hadoop-2.7.1/logs/yarn-hadoop-nodemanager-dn1.out
然后就可以JPS查看进程
图片上传不上去....
word文档URL:链接:http://share.weiyun.com/f8339b6b6272e2988b0fb5e89f2b9f44 (密码:F8Pp)