![]() ![]() You can also use the command alternatives -config java to change the default Java environment. Use the command /usr/sbin/alternatives -install /usr/bin/java java /usr/java/latest/jre/bin/java 200000 to specify that Oracle's Java binary (/usr/java/latest/jre/bin/java) should be with the highest priority (200000) compared to OpenJDK (by default it has priority 170009). ![]() If you had OpenJDK installed before you installed Oracle's version you should make sure that Oracle's JDK is the default Java environment. #Java se development kit 7u17 install#Once you download the installation package, use the command rpm -ivh to install it. For CentOS look for the package jdk-7u17-linux-圆4.rpm (64-bit architecture) or jdk-7u17-linux-i586.rpm (32-bit architecture). To do so, download the latest JDK from Oracle's site. However, for better compatibility and trouble-free Java support you can use Oracle's JDK. ![]() #Java se development kit 7u17 code#OpenJDK is fine in most cases since it shares most of the code base with Oracle's commercial JDK. To check if this is the case on your system run java -version and look for output like:java version "1.7.0_09-icedtea"OpenJDK Runtime Environment (rhel-2.3.8.0.el6_4-x86_64)OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode) By default on most Linux distributions, OpenJDK (the open source Java Development Kit) is installed and supported through the official packet manager. Obviously the pros outnumber the cons, and that's why Tomcat is usually integrated with Apache or another web server.Proper Java setupīefore you start working with Tomcat and Apache, you should be sure Java is set up properly. Second, you have to support an additional service (Apache), thus increasing the complexity of the setup and the maintenance burden. First, dynamic content is delivered a little bit more slowly because data has to pass through Apache instead of flowing directly between the client and Tomcat. Still, there are a few drawbacks for using Tomcat with Apache. With Apache you can use these modules to extend Tomcat's functionality. ![]() Extensibility – Apache provides an abundance of modules for just about anything from URL rewriting (ModRewrite) to GeoIP services.Better security – Apache protects Tomcat through its built-in security features and through advanced third-party modules such as ModSecurity.High availability – Apache allows load balancing and clustering of multiple Tomcat servers behind it, thus providing high availability.Faster static content delivery – Apache serves static content better than Tomcat and supports better caching mechanisms.Tomcat can serve clients perfectly fine by itself, but by integrating it with Apache you get: I'm assuming you already have a basic setup of Apache on Linux if not, on CentOS run the command yum install httpd.Pros and cons for integrating Tomcat with Apache Here's a tutorial that shows you three ways to use Tomcat and Apache together.įor this article I installed Tomcat and Apache on CentOS 6, but the information here should apply to other Linux distributions too. Tomcat, the most popular open source implementation of the Java Servlet and JavaServer Pages specifications, is frequently integrated with Apache, the most popular open source web server. Posted by Anatoliy Dimitrov on Mon, Mar 25, 2013 ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |