Saturday, June 25, 2011

eXistdb Installation and Configuration


eXistdb Installation with XSL-FO Module for Linux:

Step1: Download eXistdb from this Link Download eXistdb

Step2:

  1. Install JDK Because eXistdb Developed by Java
  2. Now Install eXist with following command in terminal of Linux machine  "[root@localhost root]# java -jar eXist-setup-1.4.0-rev10440.jar"
  3. If you want to change port Number Just edit Jetty.xml
    1. Go to the following path: /eXist-home/tools/jetty/etc/jetty.xml
    2. Change Port Number in Line 51, as your wish(ex:port=8081)
  4. Enabling XSL-FO Module or PDF Generation
    1. Edit /eXist-home/Conf.xml 
    2. Copy this from optional modules and paste into enabled modules          <module class="org.exist.xquery.modules.xslfo.XSLFOModule"
                          uri="http://exist-db.org/xquery/xslfo" />
    3. In /eXist-home/extensions/build.properties
      1.  Line-21 set as true -> " include.module.xslfo = true "
      2. Change Lines 25 to 27 with the following lines                              ## URLs to use to get Apache FOP and Avalon jar dependencies

        include.module.xslfo.url = http://apache.cs.uu.nl/dist/xmlgraphics/fop/binaries/fop-1.0-bin.zip
        include.module.xslfo.avalon.api.url = http://archive.apache.org/dist/excalibur/excalibur-framework /binaries/avalon-framework-api-4.3.zip
        include.module.xslfo.avalon.impl.url = http://archive.apache.org/dist/excalibur/excalibur-framework/binaries/avalon-framework-impl-4.3.zip
    4. Edit /eXist-home/extensions/modules/build.xml following lines
      1. Change Line-62 with these following Line                         <available file="${top.dir}/${lib.user}/xmlgraphics-commons-1.4.jar"/>
      2. For downloading xsl-fo jar files change fop-0.95-bin.zip into fop-1.0-bin.zip and also change fop-1.0/lib/xmlgraphics-commons-1.3.1.jar into fop-1.0/lib/xmlgraphics-commons-1.4.jar copy the following lines and replace in your build.xml                                              
        <target name="prepare-libs-xslfo" unless="libs.available.xslfo" if="include.module.xslfo.config">

        <echo message="Load: ${include.module.xslfo}"/>
        <echo message="------------------------------------------------------"/>
        <echo message="Downloading libraries required by the xsl-fo module"/>
        <echo message="------------------------------------------------------"/>

        <!-- Download the Apache FOP Processor from the Apache Web Site-->
        <get src="${include.module.xslfo.url}" dest="fop-1.0-bin.zip" verbose="true" usetimestamp="true" />
        <unzip src="fop-1.0-bin.zip" dest="${top.dir}/${lib.user}">
        <patternset>
        <include name="fop-1.0/build/fop.jar"/>
        <include name="fop-1.0/lib/batik-all-1.3.jar"/>
        <include name="fop-1.0/lib/xmlgraphics-commons-1.4.jar"/>
        </patternset>
        <mapper type="flatten"/>
        </unzip>
        <delete file="fop-1.0-bin.zip"/>
        </target>
        5.Now build the eXistdb
        1. In Terminal /eXist-home/ start build.sh
        2. You see the Build Successful message other wise check the error
        3. At the end of this process you should see the following three jar files in your $EXIST_HOME/lib/extensions folder:
          batik-all-1.7.jar, fop.jar and xmlgraphics-commons-1.4.jar
          
          
                      




1 comment: