1:安装JDK
一:配置环境
sudo gedit /etc/profile
在文本编辑器最后添加如下的语句
方式一:
# set java environmentexport
JAVA_HOME=/usr/lib/jvm/jdk1.8.0_25
JRE_HOME=${JAVA_HOME}/jre
CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/lib
PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin
#设置默认JDK
sudo update-alternatives --install /usr/bin/java java /opt/jdk1.8.0_91 /bin/java 300
3:Tomcat 安装
一:配置环境
CATALINA_BASE=/opt/apache-tomcat
CATALINA_HOME=/opt/apache-tomcat
CATALINA_TMPDIR=/opt/apache-tomcat
一:配置环境
sudo gedit /etc/profile
在文本编辑器最后添加如下的语句
方式一:
# set java environmentexport
JAVA_HOME=/usr/lib/jvm/jdk1.8.0_25
JRE_HOME=${JAVA_HOME}/jre
CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/lib
PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin
#设置默认JDK
sudo update-alternatives --install /usr/bin/java java /opt/jdk1.8.0_91 /bin/java 300
sudo update-alternatives --install /usr/bin/javac javac /opt/jdk1.8.0_91 /bin/javac 300
sudo update-alternatives --config java
3:Tomcat 安装
一:配置环境
CATALINA_BASE=/opt/apache-tomcat
CATALINA_HOME=/opt/apache-tomcat
CATALINA_TMPDIR=/opt/apache-tomcat