System version: 16.04.4
sudo apt-get install TOMCAT7
Direct Tomcat boot prompt java_home environment not configured
sudo apt-get install Oracle-java8-installer
From this command you can see the Java installation path:
sudo update-alternatives--config java
Setting/etc/enviroment directly has no effect
sudo vi/etc/default/tomcat7
Open Java_home= ..... and correctly configure the Java_home
Java_home=/usr/lib/jvm/java-8-oracle
Start behind prompt fail remember to check the log to see if the port conflicts
The following warning message is in the log
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]
Solve:
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 gkfx
The last warning message appears:
Warning:a context path must either is an empty string or start with a '/' and does not end with a '/'. The path [/] does not meet these criteria and have been changed to []
Not yet resolved
Ubuntu Installation TOMCAT7