Ubuntu 环境变量和分区

@bingoogolapple 2016-12-25 15:27:59发表于 bingoogolapple/bingoogolapple.github.io 开发环境

Java 环境变量

也可以创建软连接「ln -s jdk1.8.0_131 jdk」,在 java.sh 里就配置成功 /opt/jdk

/etc/profile.d/java.sh

export JAVA_HOME=/opt/jdk1.8.0_112
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$CLASSPATH
export PATH=$JAVA_HOME/bin:$PATH

/etc/profile.d/android.sh

export ANDROID_HOME=/opt/AndroidSDK
export PATH=$ANDROID_HOME/tools:$ANDROID_HOME/tools/proguard/bin:$ANDROID_HOME/platform-tools:$PATH

/etc/profile.d/maven.sh

export M2_HOME=/opt/apache-maven-3.3.9
export M2=$M2_HOME/bin
export MAVEN_OPTS="-Xms256m -Xmx512m"
export PATH=$M2:$PATH

/etc/profile.d/tomcat.sh

export CATALINA_BASE=/opt/apache-tomcat-8.5.14
export CATALINA_HOME=$CATALINA_BASE
export CATALINA_TMPDIR=$CATALINA_BASE/temp

export CLASSPATH=.:$CATALINA_HOME/bin/bootstrap.jar:$CATALINA_HOME/bin/tomcat-juli.jar:$CLASSPATH

export PATH=$CATALINA_HOME/bin:$PATH

/etc/profile.d/gradle.sh

export GRADLE_HOME=/opt/gradle-4.0
export PATH=$GRADLE_HOME/bin:$PATH