Last active
August 29, 2015 14:05
-
-
Save danhantao/0ebb9bc86e9879393a13 to your computer and use it in GitHub Desktop.
ubuntu环境变量
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# create dir | |
mkdir -p dev/tools/bin | |
mkdir -p dev/workspaces | |
# install jdk1.8 | |
cd ~/dev/tools/bin | |
wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u11-b12/jdk-8u11-linux-x64.tar.gz | |
tar -zxvf jdk-8u11-linux-x64.tar.gz | |
ln -s jdk1.8.0_11 jdk | |
# config jdk path | |
echo "# setting jdk home" >> ~/.profile | |
echo "export JAVA_HOME=~/dev/tools/bin/jdk" >> ~/.profile | |
echo "export CLASSPATH=.:\$JAVA_HOME/jre/lib/rt.jar:\$JAVA_HOME/lib/dt.jar:\$JAVA_HOME/lib/tools.jar" >> ~/.profile | |
echo "export PATH=\$PATH:\$JAVA_HOME/bin" >> ~/.profile | |
source ~/.profile | |
# install maven | |
cd ~/dev/tools/bin | |
wget http://mirror.nus.edu.sg/apache/maven/maven-3/3.2.2/binaries/apache-maven-3.2.2-bin.tar.gz | |
tar -zxvf apache-maven-3.2.2-bin.tar.gz | |
ln -s apache-maven-3.2.2 maven | |
# config maven path | |
echo "# setting maven home" >> ~/.profile | |
echo "export MAVEN_HOME=/usr/local/bin/maven/maven" >> ~/.profile | |
echo "export PATH=\$PATH:\$MAVEN_HOME/bin" >> ~/.profile | |
source ~/.profile | |
# install git | |
apt-get install -y git |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment