tomcat
# tomcat
# 安装配置
复制到指定位置:
sudo cp apache-tomcat-8.5.57.tar.gz /usr/local/lib/
进入目录/usr/local/lib/
sudo tar -zxvf apache-tomcat-8.5.57.tar.gz
赋予权限
sudo chmod 755 -R apache-tomcat-8.5.57
配置环境变量
sudo vi startup.sh
#set java environment
export JAVA_HOME=/usr/local/lib/jdk1.8.0_261
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
export PATH=.:${JAVA_HOME}/bin:$PATH
#tomcat
export TOMCAT_HOME=/usr/local/lib/apache-tomcat-8.5.57
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
sudo vi setclasspath.sh 环境变量配置到上面
export JAVA_HOME=/usr/local/lib/jdk1.8.0_261
export JRE_HOME=/usr/local/lib/jdk1.8.0_261/jre
1
2
2
- 启动服务
sudo ./startup.sh
# 问题
- 1.Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
环境变量需要配置到上面/java环境变量不对
更新时间: 12/21/2021, 3:54:38 PM