标签:
CenterOS下搭建Hadoop环境
service iptables status
service iptables stop
chkconfig iptables --list
chkconfig iptables off
查看目前系统jdk
rpm -qa | grep jdk
结果为:
java-1.7.0-openjdk-1.7.0.51-2.4.5.5.el7.x86_64
java-1.7.0-openjdk-headless-1.7.0.51-2.4.5.5.el7.x86_64
卸载:
rpm -e --nodeps java-1.7.0-openjdk-1.7.0.51-2.4.5.5.el7.x86_64
rpm -e --nodeps java-1.7.0-openjdk-headless-1.7.0.51-2.4.5.5.el7.x86_64
下载地址: http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html
vi /etc/profile
在文件最下边输入:
export JAVA_HOME=/usr/lib/jvm/jdk1.7.0_4579
export JRE_HOME=/usr/lib/jvm/jdk1.7.0_4579/jre
export CLASSPATH=.:$JRE_HOME/lib/tr.jar:$JAVA_HOME/lib:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/lib:$CLASSPATH
export PATH=$JAVA_HOME/bin:$PATH
使其立即生效:
source /etc/profile
验证:java -version
待续..........................
标签:
原文地址:http://www.cnblogs.com/tianboblog/p/5887607.html