RE: changing the JVM
"Preston Wade" <[email protected]> Tue, 10 Feb 2004 10:37:35 -0600
| Newsgroups | gmane.linux.redhat.rhaps.beta |
|---|---|
| Message-ID | <8846F3BD65D85249976E7A1E6B9C5E97062F07CA@cmxsmbx1.hq.ad.hilton.com> |
Thanks for the response. I should have checked the release notes. I would like to use a rpm to do the install but I need to be able to use a different JVM. Plus I like where your RPM puts the various files. What are my options? Thanks, Preston -----Original Message----- From: [email protected] [mailto:[email protected]]On Behalf Of Frank Ch. Eigler Sent: Monday, February 09, 2004 2:46 PM To: [email protected] Subject: Re: changing the JVM Hi - Preston_Wade wrote: > I was working on setting up the tomcat server from the rhaps beta CD. > I would like to configure it to use another JVM. I tried most of the > usually ways you might do this but it didn't seem to work. Is their > something different about the way tomcat was build for rhaps? There is some confusion. The tomcat RPM included on the CD was compiled with gcj to object code, so no traditional JVM is used. The jonas RPM includes a bundled matching version of tomcat, run under some JVM of your choice. I attach below a copy of the release notes on the CD, which describes this in some detail. ============ Red Hat Application Server - notes for the beta release This beta release includes several software packages intended for installation on top of a Red Hat Enterprise Linux 3 U1 system. These packages include Tomcat, for running Servlet/JSP web applications, and JoNAS, for running J2EE-based web applications. These are discussed separately below. * Tomcat This version of Tomcat and its dependencies have been compiled to native code using the GNU gcj compiler, specifically the gcj-ssa technology preview package included in RHEL3. This means that no JVM is required to run the programs. Tomcat can be started, stopped, and configured to start automatically, either from the command line (using the commands 'service tomcat [start|stop|restart]' and 'chkconfig tomcat [on|off]') or from within the Red Hat Service Configuration Tool (from the main menu, select System Settings -> Server Settings -> Services). It is possible to run multiple Tomcat servers on the same machine, as detailed in /usr/share/doc/tomcat-4.1.27/README.multiple. Tomcat is configured to use the AJP 1.3 connector module mod_jk2 by default. After installing and starting the Tomcat server, you may need to restart httpd in order for it to load mod_jk2. Once this is done, you should be able to browse the example web application by pointing your browser at the http://localhost/examples/ page. Tomcat uses the following files and directories: /etc/tomcat/server.xml -- Main configuration file. Edit this if you need to add or modify connectors and realms. /etc/tomcat/tomcat-users.xml -- User database file. Edit this to add or modify users and roles if you are using the UserDatabase realm (the default). /etc/sysconfig/tomcat -- Red Hat specific configuration settings. /var/lib/tomcat/ -- Directory from which web applications are loaded. /etc/logrotate.d/tomcat -- Log rotation configuration settings. You will not normally need to edit this. /var/log/tomcat/ -- Directory in which logfiles are written. /usr/share/tomcat/common/ /usr/share/tomcat/server/ /usr/share/tomcat/shared/ -- Directories into which classfiles and jars can be placed to make them available either to all webapps (shared), to the server only (server), or to both the server and all webapps (common). mod_jk2 uses the following file: /etc/httpd/conf/workers2.properties -- Main configuration file. Edit this to add or modify mappings from the webserver to the servlet container. Most server configuration and webapp management tasks can be performed with the admin and manager web applications respectively. To enable them, you must do the following: 1) Add either or both of the following mappings to mod_jk2's configuration file /etc/httpd/conf/workers2.properties and restart httpd. [uri:/admin/*] info=Map the Administration web application [uri:/manager/*] info=Map the Manager web application 2) Add a user with the admin and/or manager roles (as required) to Tomcat's user database file /etc/tomcat/tomcat-users.xml and restart tomcat. <user name="whatever" password="PaSsW0Rd" roles="admin,manager"/> 3) Point your browser at either http://localhost/admin/ (for the admin webapp) or http://localhost/manager/html (for the manager webapp). Note that the Tomcat server runs under the tomcat user, which by default cannot write to either the configuration or the webapps directories (this limits the damage that a compromised web application could do). If you wish to use the manager web application fully or the admin web application at all, you must either set the ownership and permissions of the relevant directories yourself or set the relevant options in /etc/sysconfig/tomcat and restart tomcat. * Jonas This version of ObjectWeb JOnAS relies on an installed JVM, such as those by Sun, IBM, or BEA. (Unlike tomcat which is gcj-compiled, jonas runs in JVM-interpreted mode.) Being a typical J2EE application server, jonas relies on a relational database backend. This package requires that the rh-postgresql server be installed, but creates a separate database instance to serve only jonas. This new database instance is configured to start and stop automatically with jonas, puts its data files under /var/lib/jonas/pgsql, and listens to localhost on TCP port 5433. This way it does not interfere with any existing postgresql databases on the server. In jonas, it is already configured as the "jdbc_1" datasource in JNDI. The entire jonas suite runs under a new "jonas" system user. You can activate the server using "/sbin/service jonas start" as is typical of a network service. It is configured with its internal servlet engine to listen for HTTP traffic on port 8080. Visit http://localhost:8080/ after installation and jonas startup to administer and interact with jonas. The jonas-examples package includes some sample web applications. A few of these are compiled and ready for deployment (to make them accessible to remote web users). You can use the jonas administrative web interface (http://.../jonasAdmin/, "Deployments" frames). After deployment, you can interact with these samples using the appropriate web URL prefix. Other examples require you to download some source code from the internet. See /var/lib/jonas/examples. To build or manage jonas applications using the command line, you need to set a variety of environment variables: JAVA_HOME=`cat /etc/sysconfig/java` JONAS_ROOT=/var/lib/jonas PATH=${PATH}:${JAVA_HOME}/bin:${JONAS_ROOT}/bin/unix If necessary, use "classic-ant" as the compilation driver instead of "ant", because the latter is gcj-compiled on RHEL3 and is not suitable for jonas. It may be necessary to use the "su jonas" system command to deposit .ear/.war/.jar files under jonas installation tree, due to file system permissions. More general documentation on use of, and programming with, jonas is available under /usr/share/doc/jonas-3.3, including a printable PDF. -- rhaps-beta-list mailing list [email protected] http://www.redhat.com/mailman/listinfo/rhaps-beta-list -- rhaps-beta-list mailing list [email protected] http://www.redhat.com/mailman/listinfo/rhaps-beta-list