look out honey 'cause I'm using technology

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 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 jockeys (just made that up).  Today I had to reinstall 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 (I’m running Lenny – 5.0) or Ubuntu Linux.  Notice that for simplicity’s sake, this uses 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 (my example uses wget, since that’s how I role, and is with the latest currently available version, modify as needed)
  2. wget http://downloads.sourceforge.net//fedora-installer-3.1.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/fedora30?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 fedora30

  7. then run the installer, using the -jar switch with and calling out your properties file at the end
  8. /usr/lib/jvm/-6-sun/jre/bin/ -jar fedora-installer-3.1.jar install.30.properties

  9. to start , define your FEDORA_HOME, JAVA_HOME, etc in your profile, or a simple BASH start script – here’s an example, again modify as needed.
  10. # example start_fedora.sh
    export JAVA_HOME=”/usr/lib/jvm/-6-sun”
    export FEDORA_HOME=”/opt/fedora”
    export CATALINA_HOME=”$FEDORA_HOME/tomcat”
    /opt/fedora/tomcat/bin/startup.sh

  11. run the BASH script, watch for any errors
  12. ./start-fedora.sh

  13. view the Fedora Admin within a web browser (change the URL to suit)
  14. http://localhost.domain.com:8080/fedora/search

  15. later, learn how to import stuff
  16. ???
  17. Profit!

Thanks goes out to all at , 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



Related posts

  • 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.
  • @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?
  • @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/I... 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
    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?
  • 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=******
  • 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 postgres

    then 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?
  • 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.
    _________________________________________________________________________
    Web content management system consultants
  • 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.
blog comments powered by Disqus

We like





We support


EFF - Electronic Frontier Foundation       TOR - The Onion Router       HRC - Human Rights Campaign