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="tomcat-manager" password="tomcat-manager" roles="manager"/>
Change the heap size
Required by orbeon. At least 300m
sudo nano /etc/default/tomcat6
Add line:
JAVA_OPTS="-Xmx1024m -XX:MaxPermSize=128m $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>
Nexus 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 Nexus Repository Manager instance is available here:
http://helios.licef.ca:8080/nexus
The Nexus Repository Manager acts as a proxy to external Maven repositories. It also caches all the accessed jar files.
To make Maven uses Nexus, edit the ~.m2/settings.xml file and add the following mirror and profile declarations:
<mirror>
<id>nexus</id>
<mirrorOf>*</mirrorOf>
<url>http://helios.licef.ca:8080/nexus/content/groups/public</url>
</mirror>
and
<profile>
<repositories>
<repository>
<id>central</id>
<url>http://central</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>central</id>
<url>http://central</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
Download, compile and install COMETE
sudo service tomcat6 restart
#The following command is for annonymous download git clone --recursive git://coeus.ca/git/gitolite-repositories/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.
QUESTIONS Quelle est la différence entre git://coeus.ca/git/gitolite-repositories/brer.git et gitolite@coeus.ca:brer.git. Faut-il ici avoir l'option --recursive sur le clone ?
- DONE, les instructions dataient d'avant l'utilisation des sous-modules