1834176 Members
2121 Online
110064 Solutions
New Discussion

Re: Tomcat Apache

 
Marcelo_41
Occasional Contributor

Tomcat Apache

Aid when I want to initiate tomcat apache leaves east message:

"# ./startup.sh
Warning: running Tomcat as root can cause security vulnerabilities
(for more information see tomcat.user.guide)
The JAVA_HOME environment variable is not defined
This environment variable is needed to run this program"
1 REPLY 1
Mel Burslan
Honored Contributor

Re: Tomcat Apache

create a user with lesser privileges than root. Let's say we call this user as tcatuser

edit .profile under the home directory of tcatuser and add a line like this:

JAVA_HOME=/opt/java1.4; export JAVA_HOME

or modify according to where your java is located.

then from root account:

su - tcatuser -c "/opt/tomcat/bin/startup.sh"

or wherever this startup.sh is located, put the proper path before it.

Hope it helps
________________________________
UNIX because I majored in cryptology...