User Tools

Site Tools


en:extra:fedora

Fedora

  • FLI: Fedora Librarian Interface

Here, we're following the official Fedora instructions for installing Fedora 2.2.1

Installation instructions for other versions of Fedora are similar and can be found at:

We've now tested Fedora 2.2.1 and Fedora 3.0 with the GS3 web services demo-client application, where Fedora 2.2.1 was installed on Linux and Fedora 3.0 on Windows.

A Preliminary Steps

  • You need Greenstone 3.

Since we will be working with Greenstone 3 documents stored in Fedora's repository as "Fedora Digital Objects", Greenstone 3 is needed for its functionality to convert GS3 documents into FedoraMETS format and put them into the Fedora repository.

(If you only want a walkthrough on installing Fedora, then you don't need Greenstone 3 of course and can skip the parts of this document relating to that.)

  • Fedora 2.2.1 requires Java 5 (I used jdk1.5.0_10).

If you wish to compile it yourself, you will need Apache Ant 1.6.5 and put it on your PATH.

Let's assume that when you have downloaded Fedora 2.2.1 and extracted it (as you will in Section B below), the Fedora executable stuff will go into a folder called "fedora" whose location is /full/path/to/fedora. With that in mind, we need to set the following environment variables:

  • JAVA_HOME - set this to the path of your JDK folder
  • FEDORA_HOME - set this to the full path to that "fedora" folder just mentioned
  • CATALINA_HOME should be set to the /full/path/to/fedora/tomcat folder.
  • The PATH variable must contain your JDK 1.5's bin folder, and the 2 bin folders of Fedora: /full/path/to/fedora/server/bin and /full/path/to/fedora/client/bin
  • If you plan on compiling it all yourself, have the full paths to Apache Ant 1.6.5 and of your JDK's bin/javac on your PATH.

If you're on Linux, you can set the environment variables by editing your ~/.profile file and then, after saving the edits, logging out or doing a "source ~/.profile" in the x-term.

For example:

export JAVA_HOME=/opt/jdk1.5.0_10/
export FEDORA_HOME=/my/path/to/fedora
export CATALINA_HOME=$FEDORA_HOME/tomcat
PATH=/opt/jdk1.5.0_10/bin:/opt/jdk1.5.0_10/bin/javac:/my/path/to/apache-ant-1.6.5:$FEDORA_HOME/server/bin:$FEDORA_HOME/client/bin:$PATH

On Windows, adjustments to your PATH variable, and creation of new variables (like FEDORA_HOME, CATALINA_HOME, JAVA_HOME) are made by going to: Start > Control Panel > (Performance and Maintenance icon OR click on Switch to Classic View on the left >) System > Advanced tab. Press the Environment Variables button. Add new System Variables and edit the existing Path variable. Note that on Windows, you use the ; sign to append new items to your path, and when referring to previously declared environment variables you have to surround them with % signs: E.g.

PATH=<whatever-was-on-your-path-before>;%FEDORA_HOME%/server/bin

B Installing Fedora 2.2.1

(You could also try Fedora 2.2.2 and Fedora 3 which are available from the Fedora Commons main page.)

  • Extract it.
  • Make sure you have the environment variables set as described in Preliminary Steps above.

If using Linux, then do the following from an x-term. If you're on Windows, do the same from a DOS prompt:

  • Move into the extracted directory (e.g. fedora-2.2.1-src/) and type:
ant installer

Then go into the dist folder of the extraction directory (e.g. fedora-2.2.1-src/dist/) and type:

java -jar fedora-2.2.1-installer.jar
  • This will run the command-line installer. Choose "quick" installation.
  • Accept everything as given and set a password for your Fedora Administrator account whose default username is "fedoraAdmin".

By accepting the defaults, the server will be set to run on localhost, port 8080 (with shutdown port 8005).

Note: if you have Greenstone 3 installed at port 8080 as well, then you should not be running both at the same time (they will conflict and probably neither will work). You will need to stop Greenstone 3 in order to run Fedora on the same port, and stop Fedora to run Greenstone 3 again on the same port. Alternatively, you can choose to change the port Greenstone 3 is running on, see the Walkthrough: installing Greenstone 3 from SVN source.

You will need to remember the following details of your installation:

  • the username for your Fedora account (default would be: fedoraAdmin)
  • the password for it (?)
  • the host (default would be: localhost)
  • the port number (default would be: 8080)

C How to run Fedora (and how to stop it)

  • First start up fedora server by typing the following in xterm:
$FEDORA_HOME/tomcat/bin/startup.sh

or if you're on Windows:

%FEDORA_HOME%\tomcat\bin\startup.bat
  • Point your browser to
http://localhost:8080/fedora/

(or

http://HOST:PORT/fedora

with whatever host and port you chose to install it on).

  • An authorization dialogue will pop up, asking you to enter the username and password you chose upon installation.

If you ever want to stop the Fedora server, you will need to type in the X-term

$FEDORA_HOME/tomcat/bin/shutdown.sh

or if you're on Windows:

%FEDORA_HOME%\tomcat\bin\shutdown.bat

D Creating the custom Greenstone 3 pid prefix

In order to work with the Greenstone3 client application, you will need to create a custom pid prefix for Greenstone 3 in fedora, and call it "greenstone".

To do this, you will need to:

  • Shutdown the fedora server
$FEDORA_HOME/tomcat/bin/shutdown.sh
  • Open up fedora's configuration file in a text editor
$FEDORA_HOME/server/config/fedora.fcfg
  • Go down to where it says:
<param name="retainPIDs" value="demo test changeme fedora-bdef fedora-bmech tutorial">

And append greenstone to the list of values, so you get something like:

<param name="retainPIDs" value="demo test changeme fedora-bdef fedora-bmech tutorial greenstone">
  • Restart the fedora server
$FEDORA_HOME/tomcat/bin/startup.sh

Having made the change in the fedora config file, it will now recognise "greenstone" as a valid PID and allow you to create/ingest digital data objects with a pid where the prefix is "greenstone".

For more information, you may want to look at the Fedora Release Notes:

"PID generation has been activated. Upon ingestion, Fedora objects that pass validation are automatically assigned a unique persistent identifer or PID. The namespace prefix on the PID is determined by the namespace parameter in the fedora.cfg configuration file."

E Exporting Greenstone documents into Fedora's repository

There is nothing in our Fedora repository yet. We want to have Greenstone 3 documents exported into Fedora format stored here. This is what we need Greenstone 3 for. We will be using its functionality for converting Greenstone 3 docs into FedoraMETS and exporting them into Fedora.

Use the FLI—Fedora Librarian Interface—application to do this. Refer to the document fli for information on how to do this.

F Further Information

  • To run the Fedora-client application, you would type
cd $FEDORA_HOME/client

fedora-admin.sh
  • The location of the Fedora Basic Search Interface ("REST interface" as it uses Fedora's URL-based web services) is
http://HOST:PORT/fedora/search

where HOST and PORT depend on what you chose when you installed it. E.g. http://localhost:8080/fedora/search

Note that the default search functionality that Fedora's own access web services (API-A) provide do not include full-text indexing and searching.

  • To install Fedora Generic Search—which provides full-text indexing and search capabilities for content stored in a Fedora repository&amp;mdash;see the document install_fedora_gsearch.
  • To run the Fedora Librarian Interface (FLI) which uses Greenstone to build and export documents into a Fedora repository, see fli.

G Old Fedora Installation Notes

These were written 2005, much earlier than the above. I have included them here just in case they are useful to someone.

  • Install Prerequisite Software:
    • Java software development kit, v1.4
    • Database: MySQL v3.23.x, MySQL 4.x or Oracle 9i, or McKoi v0.94
  • Download:

There are multiple distribution packages in release. The server binaries, the client binaries, and the entire source code which can be downloaded from the website: http://www.fedora.info/release/

  • Set up Database:

Before running Fedora, the database should be set. It appears that Fedora will access the MYSQL in the /tmp/mysql.sock (I haven't found the place to change the setting yet). Therefore, Fedora in toetoe is running its databases as the same as GS3.

 $ mysql-config /research/chi/gsdl3/packages/mysql root "" fedoraAdmin fedoraAdmin fedora008
  • Modify Fedora's Configuration

Before starting for the first time, you will want to make some changes in Fedora's main configuration file, server/config/fedora.fcfg. See installation document. http://www.fedora.info/release/1.2.1/userdocs/distribution/installation.html

  • Fedora in toeote
    • The fedora is installed in /home/chi/local/fedora-1.2.1
    • The fedora source is installed /home/chi/local/fedora-1.2.1-src
  • Start Fedora
    • Step 1: Start Database Server
 *$ cd /research/chi/gsdl3
 *$ source gs3-setup.sh
 *$ gs3-launch.sh
  • Step 2: Start Fedora Server
  *$ fedora-start
  • Step 3: To Access the Admin GUI use the command:
  *$ fedora-admin localhost 8100 fedoraAdmin fedoraAdmin
    (fedora-admin [[hostname]] [port] [[username]] [password])
  • To ingest the demos from the command line (recommended), use the command:
  *$ fedora-ingest-demos [[hostname]] [port] [[username]] [password]
  • Step 4:Stop Fedora
  *$fedora-stop
  • Step 5: Stop MYSQL=⇒GS3
  *$ gs3-launch.sh shutdown
  • Installation of Fedora 2.0

The installation is similar to Fedora -1.2.0

  *$ /home/chi/local/fedora-2.0
 *$ /home/chi/local/fedora-2.0-src
 *$ host name: toetoe
 *$ port :8200
 *$ user =fedoraAdmin
 *$ password = fedoraAdmin
 *$ http://toetoe:8200/fedora/search
  • Technical issues
  *$ copy /home/chi/local/fedora-2.0/client/client.jar /research/chi/gsdl3/lib/java/.
 *$ some of fedora_server classes were not included in client.jar , therefore, I have
  to create fedora_server.jar (can be found in /research/chi/gsdl3/lib/java/.
 *$ different between fedora-1.2.0 fedora-2.0 which would affect FedoraGS
 * AutoFinder in the different path fedora-2.0: /fedora/client/utility/AutoFinder
 * axis version seems different, so need to copy fedora-2.0-src/lib/axis.jar to
 * /research/chi/gsdl3/lib/java/. also lib/commons-discovery.jar need to copy to
 * /research/chi/gsdl3/lib/java/
  • Fedora in GSIII
    • fedoraImport.sh: By using this script, you can download metadata for all the required Fedora data objects. All the downloaded data will be stored in /research/chi/gsdl3/src/java/org/greenstone/gsdl3/Fedora directory. Using this data you can then build a new collection in GSIII, thus in GSII, you can search this data through GSIII interface.
    • fedoraSearch.sh: This script helps to search Fedora objects in the Fedora repository based on the critiera given.
    • /research/chi/gsdl3/src/java/org/greenstone/gsdl3/service/FedoraSearch.java: this program helps to search Fedora Objects in the Fedora repository by using Fedora search classes. This is to be added in the Service Rack in GSIII.
  • Setting

The following two files needs to be properly set.

  • The setting of the collectionConfig.xml please see
  • /research/chi/gsdl3/web/sites/localsite/collect/FedoraGS/etc
  • The setting of buildConfig.xml
  *<buildConfig>
 *  <metadataList />
 *  <serviceRackList>
 *     <serviceRack name="GS3MGSearch">
 *        <indexList>
 *           <index name="sectext" />
 *           <index name="doctext" />
 *           <index name="sectitle" />
 *        </indexList>
 *        <defaultIndex name="sectext" />
 *        <baseIndexPrefix name="mgsearch" />
 *        <indexStem name="index" />
 *     </serviceRack>
 *     <serviceRack name="FedoraSearch">
 *        <fedoraServer url ="http://toetoe:8200"/></serviceRack>
 *     <serviceRack name="GS3MGRetrieve">
 *        <defaultIndex name="sectext" />
 *        <baseIndexPrefix name="mgsearch" />
 *           <indexStem name="index" />
 *     </serviceRack>
 *     <serviceRack name="GS3Browse">
 *        <classifierList>
 *           <classifier name="CLTit" />
 *           <classifier name="" />
 *           <classifier name="" />
 *           <classifier name="" />
 *           </classifierList>
 *     </serviceRack>
 *  </serviceRackList>
 *</buildConfig>

Be careful, whenever recreate the collection, the buildConfig.xml will be overwritten. All these tasks are talking to the Fedora Repository in the local machine.

en/extra/fedora.txt · Last modified: 2023/03/13 01:46 by 127.0.0.1