I have downloaded apache-tomcat-7.0.65.tar.gz
from here.
I extracted, and started using startup.sh
as follows
arul@arul-pc:~$ chmod +x /usr/local/apache-tomcat-7.0.65/bin/startup.sh
arul@arul-pc:~$ cd /usr/local/apache-tomcat-7.0.65/bin/
arul@arul-pc:/usr/local/apache-tomcat-7.0.65/bin$ ./startup.sh
Using CATALINA_BASE: /usr/local/apache-tomcat-7.0.65
Using CATALINA_HOME: /usr/local/apache-tomcat-7.0.65
Using CATALINA_TMPDIR: /usr/local/apache-tomcat-7.0.65/temp
Using JRE_HOME: /usr/bin
Using CLASSPATH: /usr/local/apache-tomcat- 7.0.65/bin/bootstrap.jar:/usr/local/apache-tomcat-7.0.65/bin/tomcat-juli.jar
Tomcat started.
arul@arul-pc:/usr/local/apache-tomcat-7.0.65/bin$
But, when I tried to open in browser using http://localhost:8080/
am getting an error connection refused.
How to solve this?
EDIT 1:
Result, for ps -ef | grep java
arul@arul-pc:~$ ps -ef | grep java
arul 4404 4373 0 11:04 pts/2 00:00:00 grep --color=auto java
EDIT 2:
Results,
arul@arul-pc:~$ which java
/usr/bin/java
arul@arul-pc:~$ java -version
java version "1.8.0_66"
Java(TM) SE Runtime Environment (build 1.8.0_66-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode)
arul@arul-pc:~$ cd /usr/local/apache-tomcat-7.0.65/logs/
arul@arul-pc:/usr/local/apache-tomcat-7.0.65/logs$ ls
catalina.out
arul@arul-pc:/usr/local/apache-tomcat-7.0.65/logs$
And when I open catalina.out,
Tomcat runs
java
by creating a_RUNJAVA
variable insetclasspath.sh
. This is made up by appending/bin/java
to theJRE_HOME
environment variable. YourJRE_HOME
is currently set to/usr/bin
. So you need to modify theJRE_HOME
to be/usr
instead.You can override it for the
startup.sh
script by prepending it like so:If you want to modify the
JRE_HOME
permanently across the system add it to, or edit/etc/environment
.