Book Image

Salt Cookbook

By : Anirban Saha
Book Image

Salt Cookbook

By: Anirban Saha

Overview of this book

Table of Contents (18 chapters)
Salt Cookbook
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
Index

Setting up Java for Apache Tomcat


Apache Tomcat is undoubtedly the most widely used open source application server for Java-based applications, and it depends on Java to run successfully. In this recipe, we will learn how to set up Java for Tomcat.

How to do it...

  1. Configure a new minion called salt-minion in the development environment.

  2. Download the Java archive file from the following link; it should be something like jdk-7u71-linux-x64.gz. The md5 hash for the file should also be available from the same location: http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html

  3. Next we hosted the Java archive file on a local node, called repo, via a web server: the link for this should be something like http://repo/jdk-7u71-linux-x64.gz.

  4. Create a new state directory called tomcat in the development environment.

  5. Create and edit /opt/salt-cookbook/development/tomcat/java.sls to have the following entries:

    java_package:
      archive:
        - extracted
        - name: /opt/
        - source...