service iptables statusphp
service iptables stopcss
chkconfig iptables --listhtml
chkconfig iptables offjava
查看目前系統jdknode
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
卸載:linux
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.htmlnginx
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
使其當即生效:web
source /etc/profile
驗證:ajax
java -version
http://mirror.bit.edu.cn/apache/hadoop/common/apache
# set hadoop path
export HADOOP_HOME=/usr/local/hadoop
export PATH=$PATH:$HADOOP_HOME/bin:$HADOOP_HOME/sbin
export JAVA_HOME=/usr/lib/jvm/jdk1.7.0_79
etc / hadoop / core-site.xml:
<configuration>
<property>
<name>fs.defaultFS</name>
<value>hdfs://localhost:9000</value>
</property>
</configuration>
etc / hadoop / hdfs-site.xml:
<configuration>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
</configuration>
進入hadoop的bin目錄
cd /usr/local/hadoop/bin
格式化Hadoop的文件系統HDFS
hdfs namenode -format
進入hadoop的sbin目錄
cd /usr/local/hadoop/sbin
啓動全部進程
start-all.sh
Jps ResourceManager NameNode DataNode SecondaryNameNode NodeManager