一、更改主机名
hostnamectl
hostnamectl --static set-hostname hadoop-01
二、更改hosts
vi /etc/hosts
三、免验证ssh登录
rm -rf .ssh
ssh-keygen -t rsa
scp root@202.193.74.110:/root/.ssh/id_rsa.pub ./1.pub
scp root@202.193.74.178:/root/.ssh/id_rsa.pub ./2.pub
scp root@202.193.75.178:/root/.ssh/id_rsa.pub ./3.pub
cat id_rsa.pub >> authorized_keys
cat 1.pub >> authorized_keys
cat 2.pub >> authorized_keys
cat 3.pub >> authorized_keys
四、安装jdk
rpm -ivh jdk*
五、配置hadoop
http://hadoop.apache.org/docs/r1.2.1/single_node_setup.html
http://hadoop.apache.org/docs/r1.2.1/cluster_setup.html
六、配置环境变量
vi /etc/profile
export JAVA_HOME=/usr/java/jdk1.7.0_71/
export JRE_HOME=$JAVA_HOME/jre
export CLASSPATH=.:$CLASSPATH:$JAVA_HOME/lib:$JRE_HOME/lib
export HADOOP_HOME=/root/Desktop/hadoop-1.2.1/
export PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin:$HADOOP_HOME/bin:$HADOOP_HOME/sbin
source /etc/profile
七、关闭防火墙
systemctl stop firewalld.service #停止firewall
systemctl disable firewalld.service #禁止firewall开机启动
八、启动hadoop
hadoop namenode -format
start-all.sh
hadoop fs -mkdir test
hadoop dfsadmin -report
stop-all.sh
hostnamectl
hostnamectl --static set-hostname hadoop-01
二、更改hosts
vi /etc/hosts
三、免验证ssh登录
rm -rf .ssh
ssh-keygen -t rsa
scp root@202.193.74.110:/root/.ssh/id_rsa.pub ./1.pub
scp root@202.193.74.178:/root/.ssh/id_rsa.pub ./2.pub
scp root@202.193.75.178:/root/.ssh/id_rsa.pub ./3.pub
cat id_rsa.pub >> authorized_keys
cat 1.pub >> authorized_keys
cat 2.pub >> authorized_keys
cat 3.pub >> authorized_keys
四、安装jdk
rpm -ivh jdk*
五、配置hadoop
http://hadoop.apache.org/docs/r1.2.1/single_node_setup.html
http://hadoop.apache.org/docs/r1.2.1/cluster_setup.html
六、配置环境变量
vi /etc/profile
export JAVA_HOME=/usr/java/jdk1.7.0_71/
export JRE_HOME=$JAVA_HOME/jre
export CLASSPATH=.:$CLASSPATH:$JAVA_HOME/lib:$JRE_HOME/lib
export HADOOP_HOME=/root/Desktop/hadoop-1.2.1/
export PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin:$HADOOP_HOME/bin:$HADOOP_HOME/sbin
source /etc/profile
七、关闭防火墙
systemctl stop firewalld.service #停止firewall
systemctl disable firewalld.service #禁止firewall开机启动
八、启动hadoop
hadoop namenode -format
start-all.sh
hadoop fs -mkdir test
hadoop dfsadmin -report
stop-all.sh