Header Ads Widget

Ab initio Calculations Using Exciting Code

Last Posts

10/recent/ticker-posts

How to install the graphical interface exciting@web (Lithium version)

 web.png

1. Preinstallation

Before intalling the  exciting@web interface you need to install the following packages:

- jar  ( opensuse:  sudo zypper install jar    ubuntu: sudo apt-get install jar)

- ant (opensuse: sudo zypper install ant    ubuntu:  sudo apt-get install ant )

- wget (opensuse: sudo zypper install wget      ubuntu:  sudo apt-get install wget   )

 

You need also to download the following files:

- jdk1.8.0_281 (java environment: you can download it from here

- eXist-setup-1.4.2-rev16251.jar  (exist data base installer: you can download it from here )

- excitingatweb scripts ( you can download them from  here )

 - torque package ( you can download it from here  and install it from here   

2. Installation

 exciting@web is an application that runs on the eXistdb version 1.4.2. eXistdb is open source database management system built using XML technology.

 2.1 Install and configure eXist

 We have to create a directory called exist as follows:

algerien1970@linux-wipm:~/abinitio> mkdir exist

Once the download has completed, launch the eXist installer by doing this where the installer is:

 algerien1970@linux-wipm:~/Archive> ls
eXist-setup-1.4.2-rev16251.jar

 algerien1970@linux-wipm:~/Archive> java -jar eXist-setup-1.4.2-rev16251.jar

After the installer is launched, follow the prompts to complete the installation. 

First you have to select the java environment directory  jdk1.8.0_281

 home/algerien1970/Archive/jdk1.8.0_281/

Change the directory where you want to install exist. You have to select the created repertory exist

home/algerien1970/abinitio/exist/

During installation, you are asked to supply a password for the eXist administrator account (the "admin" password).

Test the installation of the exist data base

You should now be ready to launch eXist. Go to the directory where you installed eXist (e.g. "/home/algerien1970/abinitio/exist/"), enter the following in a console ( it's just a test that the exist data base is well installed) :

/home/algerien1970/abinitio/exist> bin/startup.sh

While eXist starts up, log output appears in the console. If eXist launched properly, you will find output similar to the following:

28 Aug 2012 17:30:47,799 [main] INFO  (Container.java [start]:74) - Started WebApplicationContext[/,eXist XML Database] 
28 Aug 2012 17:30:47,802 [main] INFO  (SocketListener.java [start]:205) - Started SocketListener on 0.0.0.0:8080 
28 Aug 2012 17:30:47,802 [main] INFO  (Container.java [start]:74) - Started org.mortbay.jetty.Server@40e99ce5 
28 Aug 2012 17:30:47,803 [main] INFO  (JettyStart.java [run]:174) - ---------------------------------------------------------------- 
28 Aug 2012 17:30:47,803 [main] INFO  (JettyStart.java [run]:175) - eXist-db has started on port 8080. Configured contexts: 
28 Aug 2012 17:30:47,803 [main] INFO  (JettyStart.java [run]:177) - http://localhost:8080/exist
28 Aug 2012 17:30:47,803 [main] INFO  (JettyStart.java [run]:179) - ----------------------------------------------------------------

You can check status of eXist from the url http://localhost:8080/exist with a browser, but don't consider anything serious because it is not ready yet. So stop the service by pressing Ctr+C, and continue to configure the eXist-db.

 Change port number and url prefix

By default the exist db starts on port 8080 and uses the prefix directory /exist/ for all access. In order to have the service running on other port without the exist prefix, open /tools/jetty/etc/jetty.xml in your eXist installation directory. Go to line 51 (line number might differ from eXist version) and change the default port number “8080” there if you want. To use a specific port number please consult your network administrator.

    <SystemProperty name="jetty.port" default="8080"/>

Go to line 134 (line number might differ from eXist version) and remove the prefix “exist”, the corresponding section looks like this:

    <Call name="addWebApplication">
        <Arg>/</Arg>
        <Arg>

 

Customize the url

Next is to define the url of the eXist-db to use the path where exciting interface/script is deployed. So open eXist directory /webapp/WEB-INF/controller-config.xml and make it contain only these two “root” patterns like this (line 57-58, remove or comment out line 34, 41. Note line number might differ from eXist version):

        <root pattern="/fs" path="

/home/algerien1970/abinitio/exciting/excitingatweb/

"/> <root pattern="/*" path="xmldb:exist:///db/xresult"/>

 algerien1970@linux-wipm:~/abinitio/exciting/excitingatweb>  is the path of the excitingatweb repertory.

 

Increase the limits

The default values for connection timeout and java heap size (limits the file size that you want to import to the database) of eXist are too small, we need to use more reasonable values. Open eXist directory /tools/jetty/etc/webdefault.xml and change in line 285 (line number might differ from eXist version) .

<session-config>
 <session-timeout>300</session-timeout>
</session-config>

Open eXist directory /tools/wrapper/conf/wrapper.conf and change in line 39 (line number might differ from eXist version)

# Maximum Java Heap Size (in MB)
wrapper.java.maxmemory=1024

 

Start the service

Before the next step, you have to start the “eXist Database Startup” from system applications, or run startup.sh from eXist/bin directory.

algerien1970@linux-wipm:~/abinitio/exist/bin> ./startup.sh

2.2 import exciting@web scripts

The exciting@web application consists of a number of XQuery scripts that are stored in the database along with the data. To import the downloaded scripts into the eXist database there is an ant file named build.xml which is in the  excitingatweb directory to automize this job. Ant is a built tool similar to make but for java applications. Ant can use the eXist db APIs to store or retrieve files from the database. For this to work the eXist path must be set to the location where the exist libraries can be found. For example /home/algerien1970/abinitio/exist/. The admin password which you entered while installing eXist must be provided here in the build.xml indicated by “*”.

    <property name="xmldb.host" value="localhost"/>
    <property name="xmldb.port" value="8080"/>
    <property name="xmldb.user" value="admin"/>
    <property name="xmldb.passwd" value="******"/>
    <property name="xmldb.url" value="xmldb:exist://${xmldb.host}:${xmldb.port}/xmlrpc/db"/>
    <property name="eXistpath" value="/users/sol/chm/eXist/"/>
    <path id="classpath.core">

NB: If the password stars don't appear in the build.xml file as follows you can add the password to the file.

 Before: <property name="xmldb.passwd" value=""/>

After:  <property name="xmldb.passwd" value="azerty"/>

Next is to copy or deploy the files into the database. Use this command

algerien1970@linux-wipm:~/abinitio/exciting/excitingatweb> ant install

When the installation is finished, you can open a browser and go to url localhost:8080. The page should look like this.


01.png



Post a Comment

0 Comments