JeromeDL/DevelGuide/Installation

From Corrib Clan Wiki

Jump to: navigation, search

dronbasroli

Contents

Outdated - go to [[1]]

Installation of JeromeDL for developers: [NEW EXTENDED VERSION]

DOWNLOAD

  1. Download (e.g. from here) and install the JDK with Java Enterprise Edition ( JDK 1.5 recommended).
  2. Download Apache Tomcat 6 (must be 6 version ) and install it.
  3. Run server and check if Tomcat is working properly - http://localhost:8080/
  4. Download Sesame 1.x (do not install 2.0 version ) and unpack it:
  5. Copy sesame.war from lib directory to TOMCAT_HOME\webapps
  6. Launch Tomcat, then shut it down (it's for sesame.war to be unpacked by Tomcat).
  7. Delete sesame.war and whole directory unpacked in pt. 4.
    • Move all the files from TOMCAT_HOME\webapps\sesame\WEB-INF\lib catalogue to TOMCAT_HOME\lib. It is very important to make the first location empty. If you have an older version of commons-fileupload.jar in the first directory - delete it.
  8. Launch Tomcat and check if Sesame is working properly (http://localhost:8080/sesame).



precoocked tomcat with sesame



  1. Download and unpack Eclipse IDE. (the best way is to download the biggest version with many plugins )
  2. Install Subclipse plug-in (for SVN management in Eclipse) as described on this site:
    • Uncheck "Mylar Integration" while selecting features to install (its causes some error) .
  3. Download project sources using Subclipse:
    • In Eclipse go to Window->Open Perspective->Other... and choose SVN Repository Exploring.
    • Click on an icon in the upper-right corner of newly opened tab (Add SVN Repository).
    • Write SVN address - https://jeromedl.svn.sourceforge.net/svnroot/jeromedl
    • Go to trunk/
    • For each of the 11 modules, right click on it, choose Checkout..., and follow the windows that open.
    • Make sure that each module has a name like: jeromedl_modulename

PREPARE LIBS AND CONFS

  1. Copy following libraries to Tomcat:
    • From WORKSPACE\jeromedl_tomcat\lib to TOMCAT_HOME\lib (or link all of them with ln -s in Linux like systems)
    • If there are any override problems choose larger libraries from the two given.
  2. Context information:
    • Copy WORKSPACE\jeromedl_tomcat\conf\Catalina\localhost\jeromedl.xml to TOMCAT_HOME\conf\Catalina\localhost. docBase attribute in this file should be pointing to the jeromedl_webapp module path.
    • OR
    • Add the end of TOMCAT_HOME\conf\server.xml , before </host> closing tag put new context like this with appropriate paths:
 <Context docBase="C:/apache-tomcat/jeromedl_webapp" path="/jeromedl" reloadable="true">
   <Realm className="org.foafrealm.realm.FOAFRealm"/>
   <Valve className="org.foafrealm.realm.FOAFValve"/>
</Context>
  1. Definition of repositories
    • Move WORKSPACE\jeromedl_webapp\WEB-INF\sesame.conf to TOMCAT_HOME\webapps\sesame\WEB-INF\
    • Rename TOMCAT_HOME\webapps\sesame\WEB-INF\sesame.conf to system.conf
    • Make sure if you have the right repository list inside sth like this:
<repositorylist>
	 	 <repository id="jeromedl-repository">
		 	 <acl worldReadable="true" worldWriteable="true" />
			 <title>JeromeDL</title>
			 <sailstack>
				 <sail class="org.openrdf.sesame.sailimpl.sync.SyncRdfRepository" />
				 <sail class="org.jeromedl.db.rdf.NativeRdfRepositoryWrapper">
					 <param name="dir" value="WEB-INF/storage/sesame/jeromedl" />
				 </sail>
			 </sailstack>
		 </repository>
		 <repository id="foafrealm-repository">
			 <acl worldReadable="true" worldWriteable="true" />
			 <title>FOAFRealm</title>
			 <sailstack>
				 <sail class="org.openrdf.sesame.sailimpl.sync.SyncRdfRepository" />
				 <sail class="org.jeromedl.db.rdf.NativeRdfRepositoryWrapper">
					 <param name="dir" value="WEB-INF/storage/sesame/foafrealm" />
				 </sail>
			 </sailstack>
		 </repository>
		 <repository id="joined-repository">
			 <acl worldReadable="true" worldWriteable="true" />
			 <title>joined</title>
			 <sailstack>
				 <sail class="org.openrdf.sesame.sailimpl.sync.SyncRdfRepository" />
				 <sail class="org.jeromedl.db.rdf.NativeRdfRepositoryWrapper">
					 <param name="dir" value="WEB-INF/storage/sesame/joined" />
				 </sail>
			 </sailstack>
		 </repository>
		 <repository id="tagging">
			 <acl worldReadable="true" worldWriteable="true" />
			 <title>tagging</title>
			 <sailstack>
				 <sail class="org.openrdf.sesame.sailimpl.sync.SyncRdfRepository"/>
				 <sail class="org.jeromedl.db.rdf.NativeRdfRepositoryWrapper">
					 
					 <param name="dir" value="WEB-INF/storage/sesame/tagging/"/>
				 </sail>
			 </sailstack>
		 </repository>		
 </repositorylist>
  1. jeromedl_webapp\WEB-INF\build.xml should not be changed. If you want to build project in eclipse (see next points) you need to set up some variables for ant.
    • In eclipse, go to Window -> Preferences
    • Navigate to Ant -> Runtime and Properties tab
    • Add:
      • env.CATALINA_HOME - pointing to your tomcat directory (e.g. c:/install/tomcat6)
      • env.JAVA_HOME - pointing to your java home. (e.g. c:/install/Java/jdk1.5.0_06)

ENVIRONMENT VARIABLES

  1. Make sure if you have all the Environment variables defined correctly like for example. The most important variable is JAVA_HOME, others can be sometimes optional:
CATALINA_HOME  	C:\apache-tomcat
JAVA_HOME 		C:\Program Files\Java\jdk1.5.0_12
JRE_HOME 		C:\Program Files\Java\jre1.5.0_12\jre
  • To add environment variables in Windows : Right Click on My Computer -> Properties -> Environment Variables-> System Variables -> New

PROJECT PROPORTIES and BUILD

  1. Try building the project in Eclipse - right click on jeromedl_webapp\WEB-INF\build.xml and choose Run as...->Ant Builds
  2. Don't worry if there are problems with compiling JSP.
  3. Make sure to change each module compliance level to Java 5.0 (left click on module->Properties->Java Compiler->check Enable project specific settings->change Compiler compliance level)
  4. It may be necessary to change some library paths for some modules. Watch error logs closely. If there is a need, go to Properties->Java Build Path->Libraries
  5. Usually you have to add Apache Tomcat 6.0 library to all of the projects
    • Right Click on each project in the Package Explorer View ->Proporties->Java Build Path-> Add Library -> Server Runtime -> Apache Tomcat 6.0
    • Sometimes it's needed to add JRE library to all of the projects
    • Right Click on each project in the Package Explorer View ->Proporties->Java Build Path-> Add Library -> JRE System Library

STARTING JEROMEDL

  1. Launch Tomcat and check if JeromeDL is available at http://localhost:8080/jeromedl

ADDING DATA into REPOSITORIES (optional)

  1. Using Sesame web interface, add content to the repositories:
    • Run Sesame interface by typing http://localhost:8080/sesame in the browser
    • Login using default login and password or login & password typed in system.conf at TOMCAT_HOME\webapps\sesame\WEB-INF ( userlist tag)
    • Choose the name of repository and click "Go
    • Choose Add(file) in the upper toolbar and insert the path of the file with content. Don't change any other options, just click "Add data".
    • If you are using dumps of DERI repositories on your local machine, make sure to change each occurance of http://library.deri.ie to http://localhost:8080/jeromedl
    • Restart Tomcat server. After this, you should be able to see newly added content in JeromeDL.
  2. Login as a Admin to JeromeDL
    • Login: admin@foafrealm.org
    • Pass: D0ndek
    • Choose Approve publication than choose the resources you have added before in sesame interface
    • Click on Reindex resources than click reindex and wait until 100%
  3. Now refresh website, the number of resources should appears near each resource category on the left and when click on each of them the resources should appear
  4. If the resources appears , all should works fine



Installation of JeromeDL for developers: [OLD deprecated VERSION ]

  1. Download (e.g. from here) and install the newest JDK with Java Enterprise Edition.
  2. Download Apache Tomcat and install it.
  3. Check if Tomcat is working properly - http://localhost:8080/
  4. Download Sesame 1.x and unpack it:
    • Copy sesame.war from lib directory to TOMCAT_HOME\webapps
    • Launch Tomcat, then shut it down (it's for sesame.war to be unpacked by Tomcat).
    • Delete sesame.war and whole directory unpacked in pt. 4.
    • Move all the files from TOMCAT_HOME\webapps\sesame\WEB-INF\lib catalogue to TOMCAT_HOME\common\lib. It is very important to make the first location empty. If you have an older version of commons-fileupload.jar in the first directory - delete it.
    • Launch Tomcat and check if Sesame is working properly (http://localhost:8080/sesame).
  5. Download and unpack Eclipse IDE.
  6. Install Subclipse plug-in (for SVN management in Eclipse) as described on this site:
    • Uncheck "Mylar Integration" while selecting features to install.
  7. Download project sources using Subclipse:
    • In Eclipse go to Window->Open Perspective->Other... and choose SVN Repository Exploring.
    • Click on an icon in the upper-right corner of newly opened tab (Add SVN Repository).
    • Write SVN address - https://jeromedl.svn.sourceforge.net/svnroot/jeromedl
    • For each of the eight modules, right click on it, choose Checkout..., and follow the windows that open.
    • Make sure that each module has a name like: jeromedl_modulename_2.0.1
  8. Copy following libraries to Tomcat:
    • From WORKSPACE\jeromedl_webapp_2.0.1\WEB-INF\lib\tomcat\server\lib to TOMCAT_HOME\server\lib (or TOMCAT_HOME\lib if you are using Tomcat 6.x).
    • From WORKSPACE\jeromedl_webapp_2.0.1\WEB-INF\lib\tomcat\common to TOMCAT_HOME\common (or TOMCAT_HOME\lib if you are using Tomcat 6.x).
    • If there are any override problems choose larger libraries from the two given.
    • Also copy WORKSPACE\jeromedl_webapp_2.0.1\WEB-INF\lib\tomcat\conf\Catalina\localhost\jeromedl.xml to TOMCAT_HOME\conf\Catalina\localhost. docBase attribute in this file should be pointing to the jeromedl_webapp_2.0.1 module path.
  9. Insert correct path to your Tomcat directory in jeromedl_webapp_2.0.1\WEB-INF\build.xml (line 52)
  10. Try building the project in Eclipse - right click on jeromedl_webapp_2.0.1\WEB-INF\build.xml and choose Run as...->Ant Builds
    • Don't worry if there are problems with compiling JSP.
    • Make sure to change each module compliance level to Java 5.0 (left click on module->Properties->Java Compiler->check Enable project specific settings->change Compiler compliance level)
    • It may be necessary to change some library paths for some modules. Watch error logs closely. If there is a need, go to Properties->Java Build Path->Libraries
    • Launch Tomcat and check if JeromeDL is available at http://localhost:8080/jeromedl
  11. Using Sesame web interface, add content to the repositories:
    • Choose the name of repository and click "Go"
    • Choose Add(file) in the upper toolbar and insert the path of the file with content. Don't change any other options, just click "Add data".
    • If you are using dumps of DERI repositories on your local machine, make sure to change each occurance of http://library.deri.ie to http://localhost:8080/jeromedl
  12. Restart Tomcat server. After this, you should be able to see newly added content in JeromeDL.
  13. Enjoy!
Facts about JeromeDL/DevelGuide/Installation — Click + to find similar pages.RDF feed
Personal tools

Corrib cluster project is supported by Enterprise Ireland under Grant No. ILP/05/203, Science Foundation Ireland under Grant No. SFI/02/CE1/I131.
Hosted at DERI, NUI Galway.