ubuntu安装tomcat7

系统版本: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 []
尚未解决

转载于:https://blog.51cto.com/xiaoxiaozhou/2105741

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值