1.1 Setting the IP address
Execute Command Service network restart
Verification: Ifconfig
1.2 Shutting down the firewall
Execute Command Service iptables stop
Validation: Service iptables Status
1.3 Turn off automatic operation of the firewall
Execute command chkconfig iptables off
Verification: Chkconfig--list | grep iptables
1.4 Setting the host name
Execution commands (1) hostname Chaoren
(2) Vi/etc/sysconfig/network
1.5 IP and hostname bindings
Execute Command vi/etc/hosts
Verify: Ping Chaoren
1.6 Setting up SSH password-free login
Execute command (1) ssh-keygen-t RSA
(2) CP ~/.ssh/id_rsa.pub ~/.ssh/authorized_keys
Authentication: SSH Chaoren
1.7 Installing the JDK
Execution commands (1) cd/usr/local
(2) chmod u+x Jdk-6u24-linux-i586.bin
(3)./jdk-6u24-linux-i586.bin
(4) MV Jdk-1.6.0_24 JDK
(5) The contents of Vi/etc/profile additions are as follows:
Export JAVA_HOME=/USR/LOCAL/JDK
Export path=.: $JAVA _home/bin: $PATH
(6) Source/etc/profile
Verification: Java-version
1.8 Installing Hadoop
Execution commands (1) TAR-ZXVF hadoop-1.1.2.tar.gz
(2) MV hadoop-1.1.2 Hadoop
(3) The contents of Vi/etc/profile additions are as follows:
Export JAVA_HOME=/USR/LOCAL/JDK
Export Hadoop_home=/usr/local/hadoop
Export path=.: $HADOOP _home/bin: $JAVA _home/bin: $PATH
(4) Source/etc/profile
(5) Modify the configuration files under the Conf directory hadoop-env.sh, Core-site.xml, Hdfs-site.xml, Mapred-site.xml
(6) Hadoop Namenode-format
(7) start-all.sh
Verification: (1) Execute command JPS if you see 5 new Java processes, namely Namenode, Secondarynamenode, DataNode, Jobtracker, Tasktracker
(2) View in browser, http://chaoren:50070 http://chaoren:50030
1.9 Possible causes of no namenode at startup:
(1) No formatting
(2) environment variable set error
(3) IP and hostname bind failed
Chao Wu Teacher course---a pseudo-distributed installation of Hadoop