1. jdk1.8安装配置
下载 jdk
cd /opt
mkdir java
chmod 777 java
cp jdkxx.tar.gz /opt/java
dir-> cp -Rf xx /opt/java
cd /opt/java
vi /etc/profile
JAVA_HOME=/opt/java/jdk1.8.0_191
CLASSPATH=$JAVA_HOME/lib
PATH=$PATH:$JAVA_HOME/bin
export PATH_JAVA_HOME_CLASSPATH
source /etc/profile
java -version
2. tomcat安装配置
cp apache-tomcat-8.5.35.tar.gz /opt/java
vi tomcat/bin/startup.sh&shutdown.sh
JAVA_HOME=/opt/java/jdk1.8.0_191
JRE_HOME=${JAVA_HOME}/jre
PATH=$JAVA_HOME/bin:$PATH
CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
TOMCAT_HOME=/opt/java/apache-tomcat-8.5.35
把上面的内容添加到文件的末尾
网友评论