1. FTP login ftp.freebsdchina.org/pub/freebsd/ports/ I #/packages-6.3-release/www download apache-tomcat-6.0.14.tbz
2. install Tomcat... pkg_add apache-tomcat-6.0.14.tbz
3. in the basic system of the FreeBSD environment, two shells can be used: SH and CSH. Sh is "$" and CSH is "%". If the root user is used, the logon prompt will be "#". when logging on to the system, SH will first execute the/etc/profile file to set the most basic environment for each user, and CSH will use/etc/CSH. cshrc, CSH. login and CSH. logout is used as the system CSH resource file.
Shell default is sh, so VI/etc/profile, add the following statement setenv java_home/usr/local/diablo-jdk1.5.0 setenv classpath = .; $ java_home/JRE/lib/RT. jar; $ java_home/lib/DT. jar; $ java_home/lib/tools. jar 4. next, if Tomcat cannot be started, the can't load CONF/server will be displayed. XML, because all files in the conf directory contain one more sample, you need Cp *. sample ..., it is okay to copy all files without sample. The default port is 8180 instead of the original 8080.