启动tomcat报错,没有/bin下的*.sh的权限
# tomcat-8.0.26/bin/startup.sh
Cannot find tomcat-8.0.26/bin/catalina.sh
The file is absent or does not have execute permission
This file is needed to run this program
# chmod +x tomcat-8.0.26/bin/*.sh
启动tomcat
# tomcat-8.0.26/bin/startup.sh
Using CATALINA_BASE: /software/tomcat-8.0.26
Using CATALINA_HOME: /software/tomcat-8.0.26
Using CATALINA_TMPDIR: /software/tomcat-8.0.26/temp
Using JRE_HOME: /usr
Using CLASSPATH: /software/tomcat-8.0.26/bin/bootstrap.jar:/software/tomcat-8.0.26/bin/tomcat-juli.jar
touch: cannot touch ‘/software/tomcat-8.0.26/logs/catalina.out’: No such file or directory
/software/tomcat-8.0.26/bin/catalina.sh: line 401: /software/tomcat-8.0.26/logs/catalina.out: No such file or directory
[root@localhost software]# tomcat-8.0.26/bin/startup.sh
Using CATALINA_BASE: /software/tomcat-8.0.26
Using CATALINA_HOME: /software/tomcat-8.0.26
Using CATALINA_TMPDIR: /software/tomcat-8.0.26/temp
Using JRE_HOME: /usr
Using CLASSPATH: /software/tomcat-8.0.26/bin/bootstrap.jar:/software/tomcat-8.0.26/bin/tomcat-juli.jar
touch: cannot touch ‘/software/tomcat-8.0.26/logs/catalina.out’: No such file or directory
/software/tomcat-8.0.26/bin/catalina.sh: line 401: /software/tomcat-8.0.26/logs/catalina.out: No such file or directory
报错
报错原因:在建立catalina.out文件是没有logs这个目录所以报错了,我们需要手工建立logs目录
# mkdir /software/tomcat-8.0.26/logs
- 包不完整,整个无法进行的过程
从官方网站下载最新版本
# wget http://mirrors.cnnic.cn/apache/tomcat/tomcat-8/v8.0.26/src/apache-tomcat-8.0.26-src.tar.gz
解压tomcat
# tar zxvf apache-tomcat-8.0.26-src.tar.gz
将目录改名
# mv apache-tomcat-8.0.26-src tomcat-8.0.26
赋予bin下所有*.sh文件执行权限(否则会报错)
# chmod +x tomcat-8.0.26/bin/*.sh
启动tomcat
# tomcat-8.0.26/bin/startup.sh
Using CATALINA_BASE: /software/tomcat-8.0.26
Using CATALINA_HOME: /software/tomcat-8.0.26
Using CATALINA_TMPDIR: /software/tomcat-8.0.26/temp
Using JRE_HOME: /usr
Using CLASSPATH: /software/tomcat-8.0.26/bin/bootstrap.jar:/software/tomcat-8.0.26/bin/tomcat-juli.jar
touch: cannot touch ‘/software/tomcat-8.0.26/logs/catalina.out’: No such file or directory
/software/tomcat-8.0.26/bin/catalina.sh: line 401: /software/tomcat-8.0.26/logs/catalina.out: No such file or directory
[root@localhost software]# tomcat-8.0.26/bin/startup.sh
Using CATALINA_BASE: /software/tomcat-8.0.26
Using CATALINA_HOME: /software/tomcat-8.0.26
Using CATALINA_TMPDIR: /software/tomcat-8.0.26/temp
Using JRE_HOME: /usr
Using CLASSPATH: /software/tomcat-8.0.26/bin/bootstrap.jar:/software/tomcat-8.0.26/bin/tomcat-juli.jar
touch: cannot touch ‘/software/tomcat-8.0.26/logs/catalina.out’: No such file or directory
/software/tomcat-8.0.26/bin/catalina.sh: line 401: /software/tomcat-8.0.26/logs/catalina.out: No such file or directory
报错
解决上面报错问题
# mkdir /software/tomcat-8.0.26/logs
重新启动
# tomcat-8.0.26/bin/startup.sh
Using CATALINA_BASE: /software/tomcat-8.0.26
Using CATALINA_HOME: /software/tomcat-8.0.26
Using CATALINA_TMPDIR: /software/tomcat-8.0.26/temp
Using JRE_HOME: /usr
Using CLASSPATH: /software/tomcat-8.0.26/bin/bootstrap.jar:/software/tomcat-8.0.26/bin/tomcat-juli.jar
Tomcat started.
# tomcat-8.0.26/bin/catalina.sh stop
Using CATALINA_BASE: /software/tomcat-8.0.26
Using CATALINA_HOME: /software/tomcat-8.0.26
Using CATALINA_TMPDIR: /software/tomcat-8.0.26/temp
Using JRE_HOME: /usr/lib/jvm/jre-1.8.0/
Using CLASSPATH: /software/tomcat-8.0.26/bin/bootstrap.jar:/software/tomcat-8.0.26/bin/tomcat-juli.jar
Error: Could not find or load main class org.apache.catalina.startup.Bootstrap
# cp -p bootstrap.jar /software/tomcat-8.0.26/bin/
- 注意:这是安装包不完整问题无法解决,建议重新下载
Tomcat-8.0.26报错,这是个坑大家不要在踩了
最新推荐文章于 2024-06-04 18:49:42 发布