JeromeDL/DevelGuide/Installation
From Corrib Clan Wiki
dronbasroli
Contents |
[edit]
Outdated - go to [[1]]
[edit]
Installation of JeromeDL for developers: [NEW EXTENDED VERSION]
[edit]
DOWNLOAD
- Download (e.g. from here) and install the JDK with Java Enterprise Edition ( JDK 1.5 recommended).
- Download Apache Tomcat 6 (must be 6 version ) and install it.
- Run server and check if Tomcat is working properly - http://localhost:8080/
- Download Sesame 1.x (do not install 2.0 version ) 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\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).
- Download and unpack Eclipse IDE. (the best way is to download the biggest version with many plugins )
- 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) .
- 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
[edit]
PREPARE LIBS AND CONFS
- 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.
- 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>
- 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>
- 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)
[edit]
ENVIRONMENT VARIABLES
- 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
[edit]
PROJECT PROPORTIES and BUILD
- Try building the project in Eclipse - right click on jeromedl_webapp\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
- 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
[edit]
STARTING JEROMEDL
- Launch Tomcat and check if JeromeDL is available at http://localhost:8080/jeromedl
[edit]
ADDING DATA into REPOSITORIES (optional)
- 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.
- 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%
- 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
- If the resources appears , all should works fine
[edit]
Installation of JeromeDL for developers: [OLD deprecated VERSION ]
- Download (e.g. from here) and install the newest JDK with Java Enterprise Edition.
- Download Apache Tomcat and install it.
- Check if Tomcat is working properly - http://localhost:8080/
- 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).
- Download and unpack Eclipse IDE.
- Install Subclipse plug-in (for SVN management in Eclipse) as described on this site:
- Uncheck "Mylar Integration" while selecting features to install.
- 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
- 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.
- Insert correct path to your Tomcat directory in jeromedl_webapp_2.0.1\WEB-INF\build.xml (line 52)
- 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
- 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
- Restart Tomcat server. After this, you should be able to see newly added content in JeromeDL.
- Enjoy!



