Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

Install stand-alone mode Hadoop-2.6.3 (1)

Shulou Source: shulou.com Published: 2022-06-03 04:01:07 11月17日 Update

Jdk download address http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html add hadoop user [root@centos67 ~] # useradd hadoop [root@centos67 ~] # passwd hadoop [root@centos67 ~] # ssh-keygen # generate key [root@centos67 ~] # ssh-copy-id-I ~ / .ssh/id_rsa.pub hadoop@127.0.0.1 write the host name to the hosts file [root@centos67 ~] # echo " 127.0.0.1 `hostname` "> > / etc/hosts download jdk-8u71-linux-x64.tar.gz [root@centos67 ~] # tar xf jdk-8u71-linux-x64.tar.gz-C / usr/local/ [root@centos67 ~] # cd / usr/local/ [root@centos67 local] # mv jdk1.8.0_71 java [root@centos67 ~] # vim / ETC JAVA_HOME=/usr/local/java. Is your corresponding jdk directory export CLASSPATH=.:$CLASSPATH:$JAVA_HOME/lib:$JAVA_HOME/jre/libexport PATH=$PATH:$JAVA_HOME/bin:$JAVA_HOME/jre/ bin [root @ centos67 ~] # bash / etc/profile.d/java.sh to test whether jdk has been successfully installed [root@centos67 ~] # java-versionjava version "1.8.0mm 71" Java (TM) SE Runtime Environment (build 1.8.0_71-b15) Java HotSpot (TM) 64-Bit Server VM (build 25.71-b15) Mixed mode) hadoop download address http://www.apache.org/dyn/closer.cgi/hadoop/common/hadoop-2.6.3/hadoop-2.6.3.tar.gz download hadoop-2.6.3.tar.gz [root@centos67 ~] # tar xf hadoop-2.6.3.tar.gz-C / usr/local/ [root@centos67 ~] # cd / usr/local/ [root@centos67 local] # mv hadoop-2.6.3 hadoop [root@centos67 ~] # vim / hadoop hadoop. D cc865b490b9a6260e9611a5b8633cab885b3d247Compiled by jenkins on Hadoop.sheme hadoop binbinapacheexport HADOOP_HOME=/usr/local/hadoopexport PATH=$PATH:$HADOOP_HOME/ bin [root @ hadoop ~] # ETC / etc/profile.d/hadoop.sh test whether the hadoop is successfully installed [root@centos67 ~] # profile.d cc865b490b9a6260e9611a5b8633cab885b3d247Compiled by jenkins on 2015-12-18T01:19ZCompiled with protoc 2.5.0From source with Checksum 722f77f825e326e13a86ff62b34adaThis command was run using / usr/local/hadoop/share/hadoop/common/hadoop-common-2.6.3.jar the following files are involved in the formal configuration of hadoop: / usr/local/hadoop/etc/hadoop/hadoop-env.shyarn-env.shyarn-site.xmlcore-site.xmlhdfs-site.xmlmapred-site.xml modifies the hadoop-env.sh configuration file [root@centos67 ~] # cd / usr/local/hadoop/etc/hadoop [root@centos67 ~] # Vim hadoop-env.sh# adds the following export JAVA_HOME=/usr/local/javaexport HADOOP_PREFIX=/usr/local/hadoop modifies the yarn-env.sh configuration file Modify the core-site.xml configuration file by replacing [root@centos67 ~] # sed-I's @ ^ Java _ HOME=$JAVA_HOME@JAVA_HOME=/usr/local/java@' yarn-env.sh with the following Configure hdfs access address and port [root@centos67 ~] # vim core-site.xml fs.default.name hdfs://centos67:9000 hdfs access address hadoop.tmp.dir / home/hadoop/tmp/ hdfs temporary directory modifies hdfs-site.xml configuration file, backup mode defaults to 3, mine is in stand-alone mode So instead of 1, [root@centos67 ~] # mkdir-p / home/hadoop/hdfs/ {name,data} [root@centos67 ~] # chown-R hadoop:hadoop / home/hadoop/hdfs [root@centos67 ~] # vim hdfs-site.xml dfs.name.dir file:/home/hadoop/hdfs/name dfs.data.dir file:/home/hadoop/hdfs/data dfs.replication 1 modifies the configuration file mapred-site.xml of hadoop configuration file MapReduce [root@centos67 ~] # vim mapred-site.xml mapreduce.framework.name yarn modify the hadoop configuration file yarn-site.xml [root@centos67 ~] # vim yarn-site.xml yarn.nodemanager.aux-services mapreduce_shuffle yarn.resourcemanager.webapp.address ${yarn.resourcemanager.hostname}: 8099 at this point, hadoop can be formatted and started. [root@centos67 ~] # hadoop namenode-format [root@centos67 ~] # / usr/local/hadoop/sbin/start-dfs.sh [root@centos67 ~] # jps1472 DataNode1660 SecondaryNameNode2159 Jps1375 NameNode has several processes, indicating that [root@centos67 ~] # / usr/local/hadoop/sbin/start-yarn.sh1472 DataNode2294 NodeManager2392 Jps1660 SecondaryNameNode2205 ResourceManager1375 NameNode has been successfully launched to check whether port 9000 [root@centos67 ~] # netstat-lnpt | grep 9000 web page access http://localhost:50070

Tags: File configuration address success content directory port test stand-alone mode host backup key method format user web page so far process generate Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MySQL Docker Microsoft vpn Shulou Technology