HOWTO: install Fedora-commons repository software on Debian

newlogo2So I’ve been using Fedora-commons for almost a year, first off, no it is NOT the Linux distribution, it is a digital repository used by libraries, museums, etc, worldwide to keep track of their digital collections.  For this Fedora-commons is very good at its job, but there was a steep learning curve when I first jumped in with, a complaint I’ve heard repeated by many who aren’t Java jockeys (just made that up).  Today I had to reinstall Fedora-commons on a new development server, and to be honest I had a couple of missteps along the way as I tried to remember my super cool moves to install this app.  Once something like this happens it’s a prime candidate for a HOWTO, so here is my super, simple HOWTO get Feodora-commons up and running in a development environment in Debian GNU/Linux (I’m running Lenny – 5.0) or Ubuntu Linux.  Notice that for simplicity’s sake, this uses Fedora-commons built in Tomcat implementation, for developing this is fine, for production I highly recommend installing a Tomcat via dpkg/apt-get, or whatever package manager you use, so that any security patches will be available for apt-get to automatically update.  I’ve also set it to use a local MySQL store, change to a different database if you need to.

  1. download the latest version of Fedora-commons (my example uses wget, since that’s how I roll, and is with the latest currently available version, modify as needed)
  2. wget http://downloads.sourceforge.net/fedora-commons/fcrepo-installer-3.3.jar
  3. create a filed called ‘install30.properties’ so you don’t have to answer all the questions the installer asks.  Read through this example and modify as needed.
  4. # example install.properties
    ri.enabled=true
    messaging.enabled=true
    apia.auth.required=false
    database.jdbcDriverClass=com.mysql.jdbc.Driver
    ssl.available=false
    database.jdbcURL=jdbc\:mysql\://localhost/fedora33?useUnicode\=true&characterEncoding\=UTF-8&autoReconnect\=true
    messaging.uri=vm\:(broker\:(tcp\://localhost\:61616))
    database.password=secret
    database.mysql.driver=included
    database.username=root
    tomcat.shutdown.port=8001
    deploy.local.services=true
    xacml.enabled=false
    database.mysql.jdbcDriverClass=com.mysql.jdbc.Driver
    tomcat.http.port=8080
    fedora.serverHost=localhost
    database=mysql
    database.driver=included
    tomcat.home=/opt/fedora/tomcat
    fedora.home=/opt/fedora
    rest.enabled=true
    install.type=custom
    servlet.engine=included
    fedora.admin.pass=fedoraAdmin
  5. create a database as defined above (NOTE: this could be different for you, if you’re not using a DB, enter database.jdbcDriverClass=com.mcoi.jdbc.Driver and remove the MySQL specfic lines)
  6. mysqladmin -h localhost -u root -p  create fedora33
  7. then run the Fedora-commons installer, using the -jar switch with Java and calling out your properties file at the end
  8. /usr/lib/jvm/java-6-sun/jre/bin/java -jar fcrepo-installer-3.3.jar install.33.properties
  1. to start Fedora-commons, define your FEDORA_HOME, JAVA_HOME, etc in your profile, or a simple BASH start script – here’s an example, again modify as needed.
  2. # example start_fedora.sh
    export JAVA_HOME="/usr/lib/jvm/java-6-sun"
    export FEDORA_HOME="/opt/fedora"
    export CATALINA_HOME="$FEDORA_HOME/tomcat"
    /opt/fedora/tomcat/bin/startup.sh
  3. run the BASH script, watch for any errors
  4. ./start-fedora.sh
  5. view the Fedora Admin within a web browser (change the URL to suit)
  6. http://localhost.domain.com:8080/fedora/search
  7. later, learn how to import stuff
  8. ???
  9. Profit!

Thanks goes out to all at Fedora-commons, specifically those on the mailing list that walked me through the early steps and made that learning curve just a bit flatter. I’m still planning on working on a Debian ‘deb’ installer to simplify the above process.  If you hit any questions or have issues with the above, leave a message below.

Thanks




  • James Chartrand

    First, thank you for this very helpful post.

    Any advice on dealing with the security settings enforced by the tomcat that is installed by apt-get on debian? The same question actually applies to another post of yours in which you’ve put up (again a very helpful) script for installing djatoka on debian (in that case using the debian installed tomcat.)

    I’m trying to get djatoka, solr, and fedora up, and so far have only gotten solr to work.

    I know this is a general question, without specific errors, but I’m guessing this is a fairly common issue on debian, and I’m really just looking for a pointer in the right direction.

    • http://fak3r.com/ fak3r

      @James Chartrand – hey, I’m glad you found my tips helpful, hopefully I can answer this one for you as well.

      Any advice on dealing with the security settings enforced by the tomcat that is installed by apt-get on debian?

      What do you mean exactly? I use the Debian installed Tomcat (5.5) with our Production version of Fedora-commons (3.1), I remember that in documentation I read online it told me to copy over some xml from Fedora’s install into Tomcat; when I did this things would fail, when I ignored that step and just let Tomcat use its own xml file, it ‘just worked’. I’m happy to post the files for review, just let me know which one (or if you don’t know, I’ll post all of them).

  • James Chartrand

    First, thank you for this very helpful post.

    Any advice on dealing with the security settings enforced by the tomcat that is installed by apt-get on debian? The same question actually applies to another post of yours in which you’ve put up (again a very helpful) script for installing djatoka on debian (in that case using the debian installed tomcat.)

    I’m trying to get djatoka, solr, and fedora up, and so far have only gotten solr to work.

    I know this is a general question, without specific errors, but I’m guessing this is a fairly common issue on debian, and I’m really just looking for a pointer in the right direction.

    • http://fak3r.com fak3r

      @James Chartrand – hey, I’m glad you found my tips helpful, hopefully I can answer this one for you as well.

      Any advice on dealing with the security settings enforced by the tomcat that is installed by apt-get on debian?

      What do you mean exactly? I use the Debian installed Tomcat (5.5) with our Production version of Fedora-commons (3.1), I remember that in documentation I read online it told me to copy over some xml from Fedora’s install into Tomcat; when I did this things would fail, when I ignored that step and just let Tomcat use its own xml file, it ‘just worked’. I’m happy to post the files for review, just let me know which one (or if you don’t know, I’ll post all of them).

  • Filipe

    Hi, thank you for putting this how-to up.
    can I ask you what front-end are you using to work with fedora commons?

    • http://fak3r.com/ fak3r

      @Filipe I looked at Fez for a time, but since we’re using Fedora3, I looked elsewhere. Currently working with Drupal, along with the Islandora Fedora-Drupal module (http://vre.upei.ca/dev/islandora), they have a version set to work with Fedora3 and Drupal6 almost ready for release. We still need to understand how we can create content types tied to the Biblio module, and have them added/updated at the same time in Fedora. We’re hoping Islandora will be that ‘glue’. Here’s developer Paul Pound’s documentation for the new, upcoming version: https://fedora-commons.org/confluence/display/ISLANDORA/Islandora+Guide This statement gives me hope that this will be the way to go:

      Future versions of the module may store metadata and/or links to datastreams regarding the Fedora object in the Drupal database. This would enable a Fedora node to be used in the standard Drupal ways but also leads to duplication of data and the problem of keeping Drupal and Fedora in sync.

  • Filipe

    Hi, thank you for putting this how-to up.
    can I ask you what front-end are you using to work with fedora commons?

    • http://fak3r.com fak3r

      @Filipe I looked at Fez for a time, but since we’re using Fedora3, I looked elsewhere. Currently working with Drupal, along with the Islandora Fedora-Drupal module (http://vre.upei.ca/dev/islandora), they have a version set to work with Fedora3 and Drupal6 almost ready for release. We still need to understand how we can create content types tied to the Biblio module, and have them added/updated at the same time in Fedora. We’re hoping Islandora will be that ‘glue’. Here’s developer Paul Pound’s documentation for the new, upcoming version: https://fedora-commons.org/confluence/display/ISLANDORA/Islandora+Guide This statement gives me hope that this will be the way to go:

      Future versions of the module may store metadata and/or links to datastreams regarding the Fedora object in the Drupal database. This would enable a Fedora node to be used in the standard Drupal ways but also leads to duplication of data and the problem of keeping Drupal and Fedora in sync.

  • Filipe

    Hi,
    I have looked into that option too, but I couldn’t get it to work, with the actually suported versions. I installed both fedora and drupal, then installed the islandora modules, but when I activated those modules drupal stopped working.
    Also the upload file system of drupal seemed too basic, since I need to get some metadata from the user when uploading the files.
    I have been trying to use muradora but haven’t been able to get it to work yet…

  • Filipe

    Hi,
    I have looked into that option too, but I couldn’t get it to work, with the actually suported versions. I installed both fedora and drupal, then installed the islandora modules, but when I activated those modules drupal stopped working.
    Also the upload file system of drupal seemed too basic, since I need to get some metadata from the user when uploading the files.
    I have been trying to use muradora but haven’t been able to get it to work yet…

  • http://fak3r.com/ fak3r

    @Filipe
    I was able to get the last version of Islandora to work with Drupal-Fedora, but suspect the newer version will be better. Have you tried the latest, or just the previous release?

    As for more metadata needed to specify during upload, we use the Biblio module http://drupal.org/project/biblio – it can import using many different content types; what type of digital object are you trying to import/represent?

  • http://fak3r.com fak3r

    @Filipe
    I was able to get the last version of Islandora to work with Drupal-Fedora, but suspect the newer version will be better. Have you tried the latest, or just the previous release?

    As for more metadata needed to specify during upload, we use the Biblio module http://drupal.org/project/biblio – it can import using many different content types; what type of digital object are you trying to import/represent?

  • Pingback: DuraSpace Blog » Blog Archive » DuraSpace Open Technologies in the News

  • Duncan Calder

    I am trying to modify this script for a postgres database, but I get the error:ERROR: Bad value for 'database': Not a valid value: fedora32Here's the script:# example install.propertiesri.enabled=truemessaging.enabled=trueapia.auth.required=falsedatabase.jdbcDriverClass=com.postgresql.jdbc.Driverssl.available=falsedatabase.jdbcURL=jdbc:postgresql://localhost/fedora?useUnicode=true&char$messaging.uri=vm:(broker:(tcp://localhost:61616))database.password=********database.postgresql.driver=includeddatabase.username=fedoraAdmintomcat.shutdown.port=8001deploy.local.services=truexacml.enabled=falsedatabase.postgresql.jdbcDriverClass=com.postgresql.jdbc.Drivertomcat.http.port=8080fedora.serverHost=localhostdatabase=fedoradatabase.driver=includedtomcat.home=/usr/local/fedora/tomcatfedora.home=/usr/local/fedorarest.enabled=trueinstall.type=customservlet.engine=includedfedora.admin.pass=******

  • Duncan Calder

    One more thing…the database name is fedora now not fedora32, I posted an older error message. Error is the same using fedora or fedora32.

  • http://fak3r.com fak3r

    Everything you have looks fine, one thing, did you create the database before running the script? (it won't create it for you, only access it via the parameters you gave) Basically you'd bring up psql:psql -d postgresthen create an empty database 'fedora' with user/passwd being the default 'fedoraAdmin' with:CREATE ROLE “fedoraAdmin” LOGIN PASSWORD 'fedoraAdmin';CREATE DATABASE “fedora” WITH ENCODING='UTF8' OWNER=”fedoraAdmin”;If that's not it, I think there was a way to run the installer in debug that might give further clues – let me know if that doesn't get you any further.

  • Duncan Calder

    I am trying to modify this script for a postgres database, but I get the error:
    ERROR: Bad value for ‘database’: Not a valid value: fedora32

    Here’s the script:
    # example install.properties
    ri.enabled=true
    messaging.enabled=true
    apia.auth.required=false
    database.jdbcDriverClass=com.postgresql.jdbc.Driver
    ssl.available=false
    database.jdbcURL=jdbc:postgresql://localhost/fedora?useUnicode=true&char$
    messaging.uri=vm:(broker:(tcp://localhost:61616))
    database.password=********
    database.postgresql.driver=included
    database.username=fedoraAdmin
    tomcat.shutdown.port=8001
    deploy.local.services=true
    xacml.enabled=false
    database.postgresql.jdbcDriverClass=com.postgresql.jdbc.Driver
    tomcat.http.port=8080
    fedora.serverHost=localhost
    database=fedora
    database.driver=included
    tomcat.home=/usr/local/fedora/tomcat
    fedora.home=/usr/local/fedora
    rest.enabled=true
    install.type=custom
    servlet.engine=included
    fedora.admin.pass=******

    • http://fak3r.com fak3r

      Everything you have looks fine, one thing, did you create the database before running the script? (it won’t create it for you, only access it via the parameters you gave) Basically you’d bring up psql:psql -d postgresthen create an empty database ‘fedora’ with user/passwd being the default ‘fedoraAdmin’ with:CREATE ROLE “fedoraAdmin” LOGIN PASSWORD ‘fedoraAdmin’;CREATE DATABASE “fedora” WITH ENCODING=’UTF8′ OWNER=”fedoraAdmin”;If that’s not it, I think there was a way to run the installer in debug that might give further clues – let me know if that doesn’t get you any further.

  • Duncan Calder

    One more thing…the database name is fedora now not fedora32, I posted an older error message. Error is the same using fedora or fedora32.

  • richard

    Hi, I have a question… Can I install fedora commons on my web server through cpanel, or am I missing something?

  • richard

    Hi, I have a question…

    Can I install fedora commons on my web server through cpanel, or am I missing something?

    • http://fak3r.com fak3r

      As long as you can install Tomcat, there shouldn’t be an issue. Get tomcat running, then follow the directions, but use ‘Existing Tomcat’ when the installer asks

  • http://fak3r.com fak3r

    As long as you can install Tomcat, there shouldn't be an issue. Get tomcat running, then follow the directions, but use 'Existing Tomcat' when the installer asks

  • MrLoftcraft

    You make it sound very easy, but the truth is that unless you have some basic knowledge about programming, this action can be a very difficult task.

  • http://fak3r.com fak3r

    I won't disagree with you there, the lack of a point and click installer is not helping their adoption rate. Even a simple web or tomcat based installer would help.

  • http://fak3r.com fak3r

    I won’t disagree with you there, the lack of a point and click installer is not helping their adoption rate. Even a simple web or tomcat based installer would help.

  • MrLoftcraft

    You make it sound very easy, but the truth is that unless you have some basic knowledge about programming, this action can be a very difficult task. _________________________________________________________________________Web content management system consultants

  • http://fak3r.com fak3r

    I won't disagree with you there, the lack of a point and click installer is not helping their adoption rate. Even a simple web or tomcat based installer would help.

  • http://professional-suggestion.com/ Uninstall Program

    I really appreciate your step by step guide.

  • http://professional-suggestion.com/ Uninstall Program

    I really appreciate your step by step guide.

    • http://fak3r.com fak3r

      Since this is clearly a spam post let me reply with: “That’s what she said!”

  • Dhillon_guggu
Read previous post:
Record Store Day – April 18, 2009

UPDATE: read Euclid Records excellent post from last year by the owner Joe, "Record Store Day: What It Means To [...]

Close