Hi, I have a problem with environment setting on my Red Hat System. I
used to set my environment config in
/etc/profile but I ended up with the following problem:
1) problem using my JDBC jsp enabled page. It will say the server
had encounter an internal error
2) loading of shell script using /etc/rc.d/rc5.d, it will prompt
me the error stating that JAVA_HOME environment is not set.
To counter this problem, I've move all the config into /etc/rc.d/rc5.d
instead and now problem 1 & 2 are solved.
However, my system environment is not longer set to the what I have
defined, for example, I am unable to run javac
>From any location. When I did a $:echo $PATH, it simply show me the
default system path w/o java environment. This problem never occurs when
I set my config in /etc/profile.
Here's a copy of my config:
JAVA_HOME=/usr/local/java
CATALINA_HOME=/usr/local/tomcat
ANT_HOME=/usr/local/ant
APACHE_HOME=/usr/local/apache
MYSQL_HOME=/usr/local/mysql
CLASSPATH=${CATALINA_HOME}/common/lib/servlet-api.jar:$MYSQL_HOME/connec
tor/mysql_connector/mysql_connector-java-3.08-stable-bin.jar:${JAVA_HOME
}/lib/tools.jar:${JAVA_HOME}/jre/lib/rt.jar:./
PATH=${PATH}:${JAVA_HOME}/bin:${ANT_HOME}/bin:
MANPATH=${JAVA_HOME}/man:${MANPATH}
export JAVA_HOME ANT_HOME APACHE_HOME MYSQL_HOME CATALINA_HOME CLASSPATH
PATH MANPATH
My question is:
1) There should be the proper place to put this environment
Setting?. In /etc/profile or /etc/rc.d/rc.local ?
2) Why is there a different when the system boot up?.
Confused,
Joe