标签:
[root@hadoop01 hadoop]# chmod u+w /etc/sudoers [root@hadoop01 hadoop]# vi /etc/sudoers
[root@hadoop03 hadoop]# vi /etc/hosts 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 192.168.153.101 hadoop01 192.168.153.102 hadoop02 192.168.153.103 hadoop03
[root@hadoop01 hadoop]# sudo chkconfig iptables off [root@hadoop01 hadoop]# sudo /etc/init.d/iptables stop iptables: Flushing firewall rules: [ OK ] iptables: Setting chains to policy ACCEPT: filter [ OK ] iptables: Unloading modules: [ OK ]
[root@hadoop02 install]# sudo vi /etc/selinux/config # This file controls the state of SELinux on the system. # SELINUX= can take one of these three values: # enforcing - SELinux security policy is enforced. # permissive - SELinux prints warnings instead of enforcing. # disabled - No SELinux policy is loaded. SELINUX=disabled # SELINUXTYPE= can take one of these two values: # targeted - Targeted processes are protected, # mls - Multi Level Security protection. SELINUXTYPE=targeted
[hadoop@hadoop01 ~]$ mkdir ~/.ssh [hadoop@hadoop01 ~]$ chmod 700 ~/.ssh [hadoop@hadoop01 ~]$ ssh-keygen -t dsa -P ‘‘ -f ~/.ssh/id_dsa [hadoop@hadoop02 ~]$ mkdir ~/.ssh [hadoop@hadoop02 ~]$ chmod 700 ~/.ssh [hadoop@hadoop02~]$ ssh-keygen -t dsa -P ‘‘ -f ~/.ssh/id_dsa [hadoop@hadoop03 ~]$ mkdir ~/.ssh [hadoop@hadoop03 ~]$ chmod 700 ~/.ssh [hadoop@hadoop03 ~]$ ssh-keygen -t dsa -P ‘‘ -f ~/.ssh/id_dsa
[hadoop@hadoop02 .ssh]$ scp id_dsa.pub hadoop@hadoop01:/home/hadoop/.ssh/id_dsa.pub.hadoop02 [hadoop@hadoop03 .ssh]$ scp id_dsa.pub hadoop@hadoop01:/home/hadoop/.ssh/id_dsa.pub.hadoop03
[hadoop@hadoop01 .ssh]$ cat id_dsa.pub >> authorized_keys [hadoop@hadoop01 .ssh]$ cat id_dsa.pub.hadoop02 >> authorized_keys [hadoop@hadoop01 .ssh]$ cat id_dsa.pub.hadoop03 >> authorized_keys
[hadoop@hadoop01 .ssh]$ scp authorized_keys hadoop@hadoop02:/home/hadoop/.ssh/authorized_keys [hadoop@hadoop01 .ssh]$ scp authorized_keys hadoop@hadoop03:/home/hadoop/.ssh/authorized_keys
sudo tar -xvf jdk-7u55-linux-x64.gz
sudo chown -R root:root jdk1.7.0_55
vi /etc/profile export JAVA_HOME=/usr/lib/java/jdk1.7.0_55 export PATH=$JAVA_HOME/bin:$PATH
[hadoop@hadoop01 java]$ source /etc/profile [hadoop@hadoop01 java]$ java -version java version "1.7.0_55" Java(TM) SE Runtime Environment (build 1.7.0_55-b13) Java HotSpot(TM) 64-Bit Server VM (build 24.55-b03, mixed mode)
标签:
原文地址:http://www.cnblogs.com/gongice/p/4338546.html