安装java
-
cd /etc/local/src/
-
wget -c http://download.oracle.com/otn-pub/java/jdk/7/jdk-7-linux-i586.tar.gz
-
wget -c http://download.oracle.com/otn-pub/java/jdk/7/jdk-7-linux-x64.tar.gz
-
tar -zxvf jdk-7-linux-x64.tar.gz
-
mv jdk1.7.0 ..
-
echo "export JAVA_HOME=/usr/local/jdk1.7.0" >>/etc/profile
-
echo "export JRE_HOME=${JAVA_HOME}/jre" >>/etc/profile
-
echo "export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib" >>/etc/profile
-
echo "export PATH=${JAVA_HOME}/bin:$PATH" >>/etc/profile
-
source /etc/profile
-
java -version
安装ant
yum提供的版本是1.7.1,2008年的,太老了,直接用最新的源码包安装
官方下载页面:
-
cd /usr/local/src
-
wget
-
tar -zxvf apache-ant-1.9.6-bin.tar.gz
-
mv apache-ant-1.9.6 ../
-
vi /etc/profile #加入以下两行:
-
echo "export ANT_HOME=/usr/local/apache-ant-1.9.6" >> /etc/profile
-
echo "export PATH=$PATH:$ANT_HOME/bin" >> /etc/profile
-
source /etc/profile
-
ant -version
参考资料:
1、
在Linux上安装ant环境
2、
Linux下配置jdk1.7
阅读(801) | 评论(0) | 转发(0) |