[...]... and extracted Tomcat, you need to move the files to the folder you are installing to; again you can do this from the Finder, but because we’ll need to use the Terminal for the remainder of these instructions, you may as well use it here for this step too Once you have changed into the folder containing the files you extracted from the tar.gz file, you need to run the following (replacing the filename... First Edition and was the editor of this Second Edition in the early months of the project Brett made innumerable minor suggestions to improve the book and several times talked us into reorganizing scattered material into the (hopefully) comprehensible form you see before you Thanks Brett! Paula Ferguson saw the First Edition of the book through the early stages, and then passed the torch to Brett McLaughlin... Getting Started with Tomcat If you use catalina with the start option or invoke the startup script instead of using the run argument, you see only the first few Using lines on your console; all the rest of the output is redirected into the catalina.out logfile The shutdown script invokes catalina with the argument stop, which causes Tomcat to connect to the default port specified in your Server element... example, the default limit was only 32 MB However, there are options supplied to the java command that let you control the limits The exact form depends upon the Java runtime, but if you are using the Sun runtime, you can enter: java -Xmx=256M MyProg This will run a class file called MyProg with a maximum memory size of 256 MB for the entire Java runtime process These options become important when using Tomcat,. .. specifies the Java Virtual Machine to be used by Tomcat, and CATALINA_HOME specifies the root directory of the unpacked Tomcat binary (runtime) distribution They should be set by adding the following lines to the end of /etc/profile with your favorite text editor (e.g., sudo vi /etc/profile): export JAVA_HOME=/Library/Java/Home export CATALINA_HOME=/usr/local/tomcat The above assumes that you are using the. .. it “builds” the FreeBSD ports package files by extracting the official Apache binary release archives, and adds FreeBSD-specific packaging files, and then installs them all where they should be installed on FreeBSD When that is done, edit your /etc/rc.conf file and add these lines to the end: tomcat60_enable="YES" tomcat60_java_opts="-Djava.net.preferIPv4Stack=true" The first line enables the RCng init... pkg_get.pkg And hit enter or answer y at the prompts Now, add the path setting to the system’s /etc/default/login file First, make it writable by root: # chmod u+w /etc/default/login Then, edit /etc/default/login and add this: PATH=/opt/csw/bin:/usr/sfw/bin:/usr/sfw/sbin:$PATH export PATH Then, save the file and put the permissions back: # chmod u-w /etc/default/login Do the same with /etc/profile, except... Installing Tomcat | 9 There is no CSW package for Tomcat 5.0, so the Tomcat 5.5 package is called CSWtomcat5 If it tells you that some of the scripts must run as the superuser and asks you if you are sure you want to install the packages, just type y and hit enter Installing the CSWtomcat5 package also starts it When the installation is complete, you’re already running Tomcat! Test it at the URL http://localhost:8080... Manager webapp The installer then allows you to choose a Java runtime for Tomcat from the runtimes you have installed at that time We suggest Java 1.6.x or higher for this Once you have configured it with a Java runtime, the Install button becomes clickable Click it and the installer will begin installing Tomcat Once the installation completes normally, you should see the message “Completing the Apache... Wizard” at the end, as shown in Figure 1-4 From the installer, you can select to start Tomcat and click Finish Then, in your web browser, type in the URL to your Tomcat, such as http://localhost:8080, and you should see the Tomcat start page as shown in Figure 1-5 Congratulations! Your new Tomcat is installed and ready to use You now need to start the server for initial testing, as described in the upcoming . Handbook, the Nutshell Handbook logo, and the O’Reilly logo are registered trademarks of O’Reilly Media, Inc. Tomcat: The Definitive Guide, the image of. Darwin Beijing • Cambridge • Farnham • Köln • Paris • Sebastopol • Taipei • Tokyo Tomcat: The Definitive Guide, Second Edition by Jason Brittain with Ian F. Darwin Copyright © 2008 O’Reilly Media, Inc. All rights reserved. Printed in the