码迷,mamicode.com
首页 > 系统相关 > 详细

ubuntu安装tomcat7

时间:2018-04-20 16:18:40      阅读:289      评论:0      收藏:0      [点我收藏+]

标签:tomcat

系统版本:16.04.4
 
sudo apt-get install tomcat7
 
直接tomcat启动提示JAVA_HOME环境没有配置
 
sudo apt-get install oracle-java8-installer
 
通过这个命令可以看到java安装路径:
sudo update-alternatives --config java
 
直接设置/etc/enviroment没有作用
 
sudo vi /etc/default/tomcat7
打开JAVA_HOME=.....的注释,并正确配置JAVA_HOME
JAVA_HOME=/usr/lib/jvm/java-8-oracle
 
启动后边提示fail记得查看日志,看看端口是否冲突
 
日志中有下面的警告信息
WARNING: Problem with directory [/usr/share/tomcat7/common/classes], exists: [false], isDirectory: [false], canRead: [false]
WARNING: Problem with directory [/usr/share/tomcat7/common], exists: [false], isDirectory: [false], canRead: [false]
WARNING: Problem with directory [/usr/share/tomcat7/server/classes], exists: [false], isDirectory: [false], canRead: [false]
WARNING: Problem with directory [/usr/share/tomcat7/server], exists: [false], isDirectory: [false], canRead: [false]
WARNING: Problem with directory [/usr/share/tomcat7/shared/classes], exists: [false], isDirectory: [false], canRead: [false]
WARNING: Problem with directory [/usr/share/tomcat7/shared], exists: [false], isDirectory: [false], canRead: [false]
 
解决:
cd /usr/share/tomcat7
sudo ln -s /var/lib/tomcat7/common common
sudo ln -s /var/lib/tomcat7/server server
sudo ln -s /var/lib/tomcat7/shared shared
 
最后出现的警告信息:
WARNING: A context path must either be an empty string or start with a ‘/‘ and do not end with a ‘/‘. The path [/] does not meet these criteria and has been changed to []
尚未解决

ubuntu安装tomcat7

标签:tomcat

原文地址:http://blog.51cto.com/xiaoxiaozhou/2105741

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!