jdk安装:
jdk的下载地址可在google中直接搜索jdk,搜到的第一个链接地址应该就是oracle公司提供的jdk页面,点击进入官网页面,选中接受协议后选择要下载的软件包即可。如下图:
点击链接,进入下面界面。
tar xf jdk-8u77-linux-x64.tar.gz mkdir /usr/local/app mv jdk1.8.0_77/ /usr/local/app cd /usr/local/app/ ln -s /usr/local/app/jdk1.8.0_77/ /usr/local/app/jdk vim /etc/profile.d/java.sh [[email protected] tomcat]# cat /etc/profile.d/java.sh export JAVA_HOME=/usr/local/app/jdk export PATH=$JAVA_HOME/bin:$PATH [[email protected] tomcat]# . /etc/profile.d/java.sh [[email protected] tomcat]# java -version java version "1.8.0_77" Java(TM) SE Runtime Environment (build 1.8.0_77-b03) Java HotSpot(TM) 64-Bit Server VM (build 25.77-b03, mixed mode)
安装tomcat:
tomcat的下载地址为http://tomcat.apache.org/在官网找到要下载的安装包下载即可。
wget http://mirror.bit.edu.cn/apache/tomcat/tomcat-8/v8.5.20/bin/apache-tomcat-8.5.20.tar.gz tar xf apache-tomcat-8.5.20.tar.gz -C /usr/local/app/ ln -s /usr/local/app/apache-tomcat-8.5.20/ /usr/local/app/tomcat vim /etc/profile.d/tomcat.sh [[email protected] tomcat]# cat /etc/profile.d/tomcat.sh export CATALINA_HOME=/usr/local/app/tomcat export PATH=$CATALINA_HOME/bin:$PATH [[email protected] tomcat]# . /etc/profile.d/tomcat.sh echo $CATALINA_HOME cd $CATALINA_HOME ls bin/ [[email protected] tomcat]# bin/version.sh Using CATALINA_BASE: /usr/local/app/tomcat Using CATALINA_HOME: /usr/local/app/tomcat Using CATALINA_TMPDIR: /usr/local/app/tomcat/temp Using JRE_HOME: /usr/local/app/jdk Using CLASSPATH: /usr/local/app/tomcat/bin/bootstrap.jar:/usr/local/app/tomcat/bin/tomcat-juli.jar Server version: Apache Tomcat/8.5.20 Server built: Aug 2 2017 21:35:49 UTC Server number: 8.5.20.0 OS Name: Linux OS Version: 2.6.32-642.el6.x86_64 Architecture: amd64 JVM Version: 1.8.0_77-b03 JVM Vendor: Oracle Corporation
时间: 2024-10-08 20:11:28