Windows: For example Tomcat installed in E:\tomcat
Required in environment variable configuration: Catalina_home=e:\tomcat
Catalina_base= E:\tomcat
Linux: For example Tomcat installed on:/usr/local/tomcat8.5
[[email protected] ~]# Vi/etc/profile Enter the configuration file, add the following environment variables, after editing ESC, Wq save exit
Export java_home=/cdr/jdk1.7.0_51
Export path= $JAVA _home/bin: $PATH
Export classpath=.: $JAVA _home/lib/tools.jar: $JAVA _home/lib/dt.jar: $CLASSPATH first three lines are JAVA environment configuration
export catalina_home=/usr/local/tomcat8.5
The two lines behind the export catalina_base=/usr/local/tomcat8.5 are the Tomcat environment configuration
After saving, exit
[email protected] ~]# Source/etc/profile Keep in mind that this must be done!!!!!
Closes the session that is currently connected and becomes effective.
Tomcat if embedded in the development environment, such as eclipse directly in the development environment directly run, no need to configure the environment;
If you start Tomcat from the command line separately, you must configure the above environment! (It is recommended to configure the environment to prevent running errors)
Tomcat environment configures Linux with Windows