Last modified 4 years ago Last modified on 08/26/13 14:04:27

Installing COMETE

Ubuntu cheat sheet

Install packages

sudo apt-get install default-jdk tomcat6 tomcat6-admin maven2 solr-tomcat 

Setup Tomcat

Edit file /etc/tomcat6/tomcat-users.xml: In <tomcat-users>, add

  <role rolename="manager"/>
  <user username="manager" password="******" roles="manager"/>

Change the heap size

Required by orbeon. At least 300m

sudo nano /etc/default/tomcat6

Add line:

JAVA_OPTS="-Xmx1024m -XX:PermSize=64m -XX:MaxPermSize=128m  -Dfile.encoding=UTF-8 -Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true $JAVA_OPTS"

Also, in the shell, you may need

export MAVEN_OPTS="-Xmx768m"

Also (for mac),

LC_ALL with value C

Make sure the following environment variables are set

FEDORA_HOME (set it to where you want to store fedora files)

It mush match ${comete.dataFolder}/fedora For example

export FEDORA_HOME=~/COMETE_DATA/fedora

Configure maven2

Connection to Tomcat

You must have a settings.xml, normally in ~.m2/settings.xml

Obviously, the username and password may change, but you need a server with id tomcat.

<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
                      http://maven.apache.org/xsd/settings-1.0.0.xsd">
  <localRepository/>
  <interactiveMode/>
  <usePluginRegistry/>
  <offline/>
  <pluginGroups/>
  <servers>
    <server>
      <id>tomcat</id>
        <username>tomcat-manager</username>
        <password>tomcat-manager</password>
    </server>
  </servers>
  <mirrors/>
  <proxies/>
  <profiles/>
  <activeProfiles/>
</settings>

Artifactory Repository Manager (optional)

To improve efficiency when downloading Maven dependencies and to prevent work interruption in the case where a Maven repository is down and that some dependencies are impossible to download, a Artifactory Repository Manager instance is available here:

http://hades.licef.ca:8080/artifactory

The Artifactory Repository acts as a proxy to external Maven repositories. It also caches all the accessed jar files.

To make Maven uses the Artifactory Repository, edit the ~.m2/settings.xml file and add the following mirror declaration:

<mirror>
    <id>artifactory</id>
    <mirrorOf>*</mirrorOf>
    <url>http://hades.licef.ca:8080/artifactory/repo</url>
</mirror>

Download, compile and install COMETE

sudo service tomcat6 restart
#The following command is for annonymous download
git clone --recursive git://coeus.ca/brer.git
#The following command is for download as a developper
git clone --recursive gitolite@coeus.ca:brer.git

cd brer/fedora/fcrepo
mvn clean install -P fedora-installer -Dmaven.test.skip=true 
cd ../../
ant sample-config
mvn install -Dmaven.test.skip=true tomcat:deploy

Note that after the "ant sample-config" step, you need to edit config/src/main/resources/build.properties

Uninstall:

cd brer
mvn tomcat:undeploy

If the install fails, you may have to uninstall before re-installing, if only to prevent out-of-memory in Tomcat.

0.9.8 © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.75779 sec.)