我正在通过RUNNING.txt文件来安装Tomcat。
它说:
(3.1) Set CATALINA_HOME (required) and CATALINA_BASE (optional) The CATALINA_HOME environment variable should be set to the location of the root directory of the "binary" distribution of Tomcat.
所以我知道我可以做
export CATALINA_HOME=/usr/local/tomcat
但是下次重新启动机器时就不会这样了。
我应该把这些在根帐户.bashrc或.bash_profile或其他地方?
我正在使用setenv.sh bash脚本,它位于$ TOMCAT_HOME / bin目录中。 catalina.sh脚本默认是指它。
忘了提及,这个脚本不是默认的。 你需要创build它,并给予tomcat用户(或任何你用来运行tomcat的用户)来执行它。