<?xml version="1.0" encoding="UTF-8"?>
<!-- $Id: readying-centos-for-exist.xml 17299 2012-10-10 23:47:33Z joewiz $ --><book><bookinfo><productname>eXist-db – Open Source Native XML Database</productname><title>Readying CentOS for eXist-db Development/Deployment</title><date>September 2009</date><author><firstname>Loren</firstname><surname>Cahlander</surname><affiliation><address format="linespecific"><email>loren at syntactica.com</email></address></affiliation></author><author><firstname>Dan</firstname><surname>McCreary</surname><affiliation><address format="linespecific"><email>dan at syntactica.com</email></address></affiliation></author></bookinfo><chapter><title>How to Setup a CentOS System for Development or Deployment of eXist</title><subtitle>Overview of steps</subtitle><para>This document describes the steps to setup a server using a CentOS verion of UNIX for
            the development or deployment of eXist. This example uses a Tomcat based installation
            although eXist can also be run on the builtin Jetty server.</para><para>Before you begin, you should decide if you really need a 64bit bit system. 64bit
            systems are ideal of you have very large data sets with gigabyte queries. </para><para>Note that you should be aware that by default, eXist allows search engine robots
            access the eXist instance. You will be charged each time a robots file access the files
            unless you change the robots file access.</para><procedure><step><para>Download the Java jvm</para></step><step><para>Download Tomcat Web Server</para></step><step><para>Start Tomcat</para></step><step><para>Download eXist binary</para></step></procedure><para> We first will use the UNIX <emphasis role="bold">yum</emphasis> shell command to get
            all the most recient changes to the yum database. We will use the yum "list" option and
            see all the libraries in the update libary that have the string "java" in them by piping
            the output through the grep command.</para><synopsis format="linespecific">yum update</synopsis><synopsis format="linespecific">yum list | grep java</synopsis><para> We first will use the yum command to get a list of the Java updates. </para><synopsis format="linespecific">yum install java-1.6.0-openjdk.x86_64</synopsis><para> We can use the UNIX "web get" or <emphasis role="bold">wget</emphasis> command to get
            the appropriate rpm file from the Centos web site and place it into the /tmp directory.
            We found the correct file to use from doing a search on the Centos web site.</para><synopsis format="linespecific">cd /tmp</synopsis><synopsis format="linespecific">wget http://dev.centos.org/centos/5/testing/i386/RPMS/jpackage-utils-1.7.5-1jpp.1.el5.centos.noarch.rpm</synopsis><para> We can use the UNIX <emphasis role="bold">rpm</emphasis> command to unpackage this
            file. </para><synopsis format="linespecific">rpm -Uvh jpackage-utils-1.7.5-1jpp.1.el5.centos.noarch.rpm</synopsis><para> Next we will need to add the Java runtime library libgcj. The libgcj package includes
                the Java runtime library, which is needed to run Java programs compiled using the gcc
                Java compiler (gcj). </para><synopsis format="linespecific">yum list | grep libgcj</synopsis><synopsis format="linespecific">yum install libgcj.x86_64</synopsis><synopsis format="linespecific">yum install rpm-build gcc-java jpackage-utils libXp</synopsis><para> Our next step is install Apache Tomcat on CentOS. A useful link that describes these
                setps is here: <ulink url="http://lejnieks.com/2008/11/installing-tomcat-on-centos">http://lejnieks.com/2008/11/installing-tomcat-on-centos</ulink>. To see what Tomcat
                files are available to install, we can run yum through a grep command to filter out only
                the lines that have the word tomcat in them. </para><synopsis format="linespecific">yum list | grep tomcat</synopsis><synopsis format="linespecific">yum install tomcat5.x86_64 tomcat5-webapps.x86_64 tomcat5-admin-webapps.x86_64</synopsis><para>We are now ready to use the "service" UNIX command to restart the Tomcat web
                server.</para><synopsis format="linespecific">service tomcat5 restart</synopsis><synopsis format="linespecific">chkconfig tomcat5 on</synopsis></chapter></book>