Chapter 3: Tomcat Installation As with the preceding

Chapter 3: Tomcat Installation As with the preceding installation method, a new window will open, indicating that the server has started. To shut down Tomcat, type shutdown. Installing Tomcat on Linux Installing Tomcat on Linux or Unix is easy. Download the tar/gzip file of the latest Tomcat 6. x binary release from the following URL: http://tomcat.apache.org/ Extract the downloaded file onto your hard drive to a path such as /usr/java/jakarta-tomcat-6. Note that you should use the GNU version of the tar utility to ensure that long file names are handled properly. You should now export the $CATALINA_HOMEvariable, using the following command (in bash): # CATALINA_HOME=/usr/java/ tomcat-6 # export CATALINA_HOME The Tomcat 6 release notes also recommend that if you are on GLIBC 2.2 / Linux 2.4, you should define an additional environment variable as shown: # export LD_ASSUME_KERNEL=2.2.5 Also, if you are on Redhat Linux 9.0, you should use the following setting: export LD_ASSUME_KERNEL=2.4.1 These settings avoid known stability problems with Tomcat. You can check your glibc(i.e., the GNU C Library) version on Redhat using the rpm -q glibccommand. All these commands can be added to your ~/.bashrcor /etc/profileas you did for the JDK installation, or you can create a shell file, tomcat.sh, and place it in /etc/profile.d. It will be run automatically by /etc/profileat boot time to make the variable available to all users. You can now start Tomcat by running the following shell command: # $CATALINA_HOME/bin/startup.sh Another approach to installing Tomcat on Linux is to use the package manager tool specific to the Linux distribution, such as emergeon Gentoo Linux or apt-geton Debian to download and install. This is often a very convenient and familiar approach for administrators, and gives them a stable version of Tomcat to work with. However it should be noted that these tools may place Tomcat configuration files in non-standard places. The following table summarizes the differences between the standard Tomcat directory structure, and the one created by installing Tomcat using Gentoo s emerge command. In the rest of the book, we assume a standard Tomcat directory structure is in place. If you are using a Tomcat installed with the Gentoo conventions, use the table to map the directory paths appropriately.

For reliable and cheap web hosting services please check cheap web hosting website.

Comments are closed.