In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
Under CentOS
1. Install linux
2. Install jdk
[root@Cent0S1 ~] # javac / / display information
[root@Cent0S1 ~] # rpm-qa | grep jdk / / check whether there is an installation package
[root@Cent0S1 ~] # which java / / View Java command location
/ usr/bin/java
[root@Cent0S1 ~] # javac-version / / View Java version
Javac 1.8.0_191
[root@Cent0S1 ~] # ls-l / usr/bin/java / / View soft connection
Lrwxrwxrwx. 1 root root 22 December 27 15:09 / usr/bin/java-> / etc/alternatives/java
[root@Cent0S1 ~] # ls-l / etc/alternatives/java / / View the jdk directory
Lrwxrwxrwx. 1 root root 73 December 27 15:09 / etc/alternatives/java-> / usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-1.el7_6.x86_64/jre/bin/java
[root@Cent0S1 ~] # find-name libjvm.so 2 > / dev/null / / View jdk directory method 2
/ usr/lib/jvm/java-1.7.0-openjdk-1.7.0.171-2.6.13.2.el7.x86_64/jre/lib/amd64/server/libjvm.so
/ usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-1.el7_6.x86_64/jre/lib/amd64/server/libjvm.so
3. Add java environment variables.
[root@Cent0S1 ~] # vi / etc/profile
Export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-1.el7_6.x86_64/
Export JRE_HOME=$JAVA_HOME/jre
Export CLASSPARH=$JACA_HOME/lib:$JRE_HOME/lib:$CLASSPATH
Export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH
[root@Cent0S1 ~] # source / etc/profile / / the environment takes effect
[root@Cent0S1 Desktop] # mv hadoop-2.7.6 / opt
4. Add hadoop environment variables.
[root@Cent0S1 hadoop] # pwd
/ opt/hadoop-2.7.6/etc/hadoop
[root@Cent0S1 hadoop] vim hadoop-env.sh / / modify JAVA_HOME
JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-1.el7_6.x86_64/
[root@Cent0S1 hadoop] # vim core-site.xml
Hadoop.tmp.dir
/ hadoop
Dfs.name.dir
/ hadoop/name # configure home path
Fs.default.name
Hdfs://Cent0S1:9000 # Cent0S1 is the host name
[root@Cent0S1 hadoop] # vim hdfs-site.xml
Dfs.name.dir
/ hadoop/name # configure home path
[root@Cent0S1 hadoop] # vim mapred-site.xml.template
Mapred.job.tracker
Cent0S1:9000
[root@Cent0S1 ~] # vi / etc/profile
Export HADOOP_HOME=/opt/hadoop-2.7.6
Export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH:$HADOOP_HOME/bin
5. Format hadoop namenode
[root@Cent0S1 bin] # hadoop namenode-format
[root@Cent0S1 sbin] #. / start-all.sh / / enable hadoop
[root@Cent0S1 sbin] # jps / / check whether hadoop is running properly
22945 NameNode
23089 DataNode
23845 Jps
23430 ResourceManager
23722 NodeManager
Under 23278 SecondaryNameNodeCentOS
1. Install linux
2. Install jdk
[root@Cent0S1 ~] # javac / / display information
[root@Cent0S1 ~] # rpm-qa | grep jdk / / check whether there is an installation package
[root@Cent0S1 ~] # which java / / View Java command location
/ usr/bin/java
[root@Cent0S1 ~] # javac-version / / View Java version
Javac 1.8.0_191
[root@Cent0S1 ~] # ls-l / usr/bin/java / / View soft connection
Lrwxrwxrwx. 1 root root 22 December 27 15:09 / usr/bin/java-> / etc/alternatives/java
[root@Cent0S1 ~] # ls-l / etc/alternatives/java / / View the jdk directory
Lrwxrwxrwx. 1 root root 73 December 27 15:09 / etc/alternatives/java-> / usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-1.el7_6.x86_64/jre/bin/java
[root@Cent0S1 ~] # find-name libjvm.so 2 > / dev/null / / View jdk directory method 2
/ usr/lib/jvm/java-1.7.0-openjdk-1.7.0.171-2.6.13.2.el7.x86_64/jre/lib/amd64/server/libjvm.so
/ usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-1.el7_6.x86_64/jre/lib/amd64/server/libjvm.so
3. Add java environment variables.
[root@Cent0S1 ~] # vi / etc/profile
Export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-1.el7_6.x86_64/
Export JRE_HOME=$JAVA_HOME/jre
Export CLASSPARH=$JACA_HOME/lib:$JRE_HOME/lib:$CLASSPATH
Export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH
[root@Cent0S1 ~] # source / etc/profile / / the environment takes effect
[root@Cent0S1 Desktop] # mv hadoop-2.7.6 / opt
4. Add hadoop environment variables.
[root@Cent0S1 hadoop] # pwd
/ opt/hadoop-2.7.6/etc/hadoop
[root@Cent0S1 hadoop] vim hadoop-env.sh / / modify JAVA_HOME
JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-1.el7_6.x86_64/
[root@Cent0S1 hadoop] # vim core-site.xml
Hadoop.tmp.dir
/ hadoop
Dfs.name.dir
/ hadoop/name # configure home path
Fs.default.name
Hdfs://Cent0S1:9000 # Cent0S1 is the host name
[root@Cent0S1 hadoop] # vim hdfs-site.xml
Dfs.name.dir
/ hadoop/name # configure home path
[root@Cent0S1 hadoop] # vim mapred-site.xml.template
Mapred.job.tracker
Cent0S1:9000
[root@Cent0S1 ~] # vi / etc/profile
Export HADOOP_HOME=/opt/hadoop-2.7.6
Export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH:$HADOOP_HOME/bin
5. Format hadoop namenode
[root@Cent0S1 bin] # hadoop namenode-format
[root@Cent0S1 sbin] #. / start-all.sh / / enable hadoop
[root@Cent0S1 sbin] # jps / / check whether hadoop is running properly
22945 NameNode
23089 DataNode
23845 Jps
23430 ResourceManager
23722 NodeManager
23278 SecondaryNameNode
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.