One, install Java environment Add Java environment variable
Vi/etc/profile # Add by tank
Export java_home=/data/soft/jdk/jdk1.7.0_71
Export Jre_home= $JAVA _home/jre
Export classpath=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jar
Export path= $PATH: $JAVA _home/bin: $JRE _home/bin Two, modifying the number of file handles Vi/etc/security/limits.conf # Add by tank* soft nofile 65536
* Hard Nofile 655,363, set SSH no password login reference: http://www.cnblogs.com/tankaixiong/p/4172942.html Four, install the Hadoop environment here is the hadoop2.20 version Record structure: Modify the configuration file: [[email protected] hadoop]$ VI core-site.xml
<?xml version= "1.0" encoding= "UTF-8"?>
<?xml-stylesheet type= "text/xsl" href= "configuration.xsl"?>
<!--
Licensed under the Apache License, Version 2.0 (the "License");
You are not a use of this file except in compliance with the License.
Obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to writing, software
Distributed under the License is distributed on a "as is" BASIS,
Without warranties or CONDITIONS of any KIND, either express or implied.
See the License for the specific language governing permissions and
Limitations under the License. See accompanying LICENSE file.
-
<!--Put Site-specific property overrides in the this file. -
<configuration>
<property>
<name>fs.default.name</name>
<value>hdfs://192.168.149.128:9000</value>
</property>
</configuration> [[email protected] hadoop]$ VI hdfs-site.xml
<?xml version= "1.0" encoding= "UTF-8"?>
<?xml-stylesheet type= "text/xsl" href= "configuration.xsl"?>
<!--
Licensed under the Apache License, Version 2.0 (the "License");
You are not a use of this file except in compliance with the License.
Obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to writing, software
Distributed under the License is distributed on a "as is" BASIS,
Without warranties or CONDITIONS of any KIND, either express or implied.
See the License for the specific language governing permissions and
Limitations under the License. See accompanying LICENSE file.
-
<!--Put Site-specific property overrides in the this file. -
<configuration>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
<property>
<name>dfs.namenode.name.dir</name>
<value>file:/data/soft/hadoop/hadoop-2.2.0/hdfs/name</value>
<final>true</final>
</property>
<property>
<name>dfs.datanode.data.dir</name>
<value>file:/data/soft/hadoop/hadoop-2.2.0/hdfs/data</value>
</property>
</configuration>file must already exist[Email protected] hadoop]$ VI mapred-site.xml
<?xml version= "1.0"?>
<?xml-stylesheet type= "text/xsl" href= "configuration.xsl"?>
<!--
Licensed under the Apache License, Version 2.0 (the "License");
You are not a use of this file except in compliance with the License.
Obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to writing, software
Distributed under the License is distributed on a "as is" BASIS,
Without warranties or CONDITIONS of any KIND, either express or implied.
See the License for the specific language governing permissions and
Limitations under the License. See accompanying LICENSE file.
-
<!--Put Site-specific property overrides in the this file. -
<configuration>
<property>
<name>mapred.job.tracker</name>
<value>192.168.149.128:9001</value>
</property>
</configuration>
~
~Note that the above must be filled with IP, do not fill localhost, or eclipse will not connect! Start: sbin/start-all.sh View status: [[email protected] hadoop-2.2.0]$ JPS
5402 NodeManager
24718 Jps
4885 NameNode
5155 Secondarynamenode
5295 ResourceManager A total of 5 Hadoop thread access addresses view: http://192.168.149.128:50070/dfshealth.jsp
Hadoop Development Environment Building