BHL
Archive
This is a read-only archive of the BHL Staff Wiki as it appeared on Sept 21, 2018. This archive is searchable using the search box on the left, but the search may be limited in the results it can provide.

Fedora_Installation

Developer Information > Fedora Installation Notes


Create Postgres Database



Installation of Fedora Commons

§ Download of the version of Fedora is made from : http://www.fedora-commons.org/software
Download of package installer for version 3.2.1 : http://downloads.sourceforge.net/fedora-commons/fedora-installer-3.2.1.jar

Prerequisites

Java SE Development Kit (JDK) 5 or 6. Whether installing a binary or source distribution, JDK 5 or 6 is required. The JDK should be installed on the machine you intend to use as the Fedora server. It is available from http://java.sun.com/. Look here for more information on installing Java.
Database Fedora uses a relational database to support some of its functions. To simplify installation, the Fedora installer includes and can configure an embedded instance of the Derby SQL Database 10.4.2. Fedora supports three external databases: MySQL, Oracle and PostgreSQL. The embedded Derby database should only be used for evaluation and development purposes; Derby should not be used for any production repository. It is recommended that you use one of the supported external databases which must be installed, configured and running before proceeding with the installation. To configure Fedora to use an external database, please see the Database section below for further instructions. Application Server The Fedora Repository installer includes Tomcat 5.5.26. Optionally, Fedora may be installed into any existing application server that implements Servlet 2.4/JSP 2.0 or higher. At this time, Fedora has chiefly been tested with Tomcat 5.x but users have reported running Fedora successfully with Jetty and JBoss.
Ant 1.7+ Fedora uses Ant for its build environment. Ant is available from http://ant.apache.org/.
sudo apt-get install ant

Preparing Environment Variables

JAVA_HOME This should point to the base directory of your Java installation. On Windows systems, this might be C:\java. For UNIX derivatives, this might be something like /usr/lib/jvm/java-6-openjdk/
§ Edit the file ~/.bashrc to add this line :
export JAVA_HOME="/usr/lib/jvm/java-6-openjdk/"

FEDORA_HOME
This is the directory where Fedora will be installed, for example, C:\fedora (Windows) or /usr/local/fedora (UNIX derivatives). Note: This is only required when running the Fedora client commandline utilities. The server also requires this information at runtime, but can accept it from the following sources (listed in order of preference):
§ The fedora.home init-param in the Fedora webapp's web.xml file (Fedora 3.2+ only). The installer will automatically include the correct path in your web.xml at installation time, so if you move your Fedora Home directory later, you will need to also modify this file and restart the webapp container.
§ The fedora.home system property, configured as appropriate for your web application server of choice.
§ The FEDORA_HOME environment variable, as available when the web application server starts.
PATH
This must include the Java and Fedora bin directories. For UNIX derivatives, this will be $FEDORA_HOME/server/bin, $FEDORA_HOME/client/bin and usually $JAVA_HOME/bin. For Windows, this will be %FEDORA_HOME%\server\bin, %FEDORA_HOME%\client\bin and usually %JAVA_HOME%\bin.
§ Edit the file ~/.bashrc to add this line :
export PATH=$PATH:$JAVA_HOME
If you will be building from source, Ant should also also be on your path.
JAVA_OPTS
If Fedora is configured to use SSL, JAVA_OPTS must include the javax.net.ssl.trustStore and javax.net.ssl.trustStorePassword properties. See the SSL section below for more information.
CATALINA_HOME
If Fedora is configured to use Tomcat, CATALINA_HOME must be set before starting Fedora. If using the quick install option, CATALINA_HOME should be set to $FEDORA_HOME/tomcat (or %FEDORA_HOME%\tomcat in Windows).
§ Edit the file ~/.bashrc to add this line :
export CATALINA_HOME="/opt/tomcat/"

Installation



The Fedora Installer provides three installation options: quick, custom, and client.
To start the installer, change to the directory where you downloaded the installer and at a command prompt, enter:
java -jar fedora-installer-3.2.1.jar
§ Tip
Fedora can also be installed in non-interactive mode by specifying an install.properties file as an argument to the installer. After installing interactively, you will find an install.properties file in your $FEDORA_HOME/install/ directory. You can use this file as a template for future, non-interactive installations.
Please ensure that the user account that is running the installer has sufficient permissions to write to the directories where Fedora will be installed (if deploying to an existing Tomcat installation, this includes permissions to the Tomcat directory). Installer created files will usually be owned by the user running the installer. Consequently, for example, after installation users of the Fedora Admin client will need write permissions to the log files defined by FEDORA_HOME/client/log4j.xml. Quick Install
The quick option is designed to get Fedora up and running as quickly as possible, with a minimum of advanced options. The quick install will automatically install Tomcat pre-loaded with the Fedora Repository and the Derby database. Neither SSL support nor XACML policy enforcement is enabled by the quick install. Custom Install
The custom option provides the most flexibility in configuring an installation. Options include the choice of servlet container, database, the host, ports and application server context Fedora will be running on, enabling optional services, as well as security options including SSL and XACML policy enforcement.
Servlet Container
The installer will automatically configure and deploy to Tomcat 5.0.x, 5.5.x, and 6.0.x servlet containers. However, if an existing Tomcat installation (as opposed to the Tomcat bundled with the installer) was selected, the installer will not overwrite your existing server.xml, but rather, place a modified copy at FEDORA_HOME/install so that you may review it before before installing it yourself.
Other servlet containers will require manual deployment of the .war files located at FEDORA_HOME/install.
Application Server Context
The installer provides the option to enter an application server context name under which Fedora will be deployed. The context name defaults to fedora (resulting in http[s]://host:port/fedora), however any other valid context name can be supplied. The installer will name the resulting war file according to the supplied context name (defaults to fedora.war). Please ensure that the servlet container configuration reflects the name of the Fedora context name in case it needs to be configured explicitly. For further details see Alternative Webapp Context Configuration.
SSL
Configuring SSL support for Fedora's API-M interface is strongly recommended for production environments.
If the Tomcat servlet container is selected, the installer will configure server.xml for you. However, as noted above, if an existing Tomcat installation was selected, the installer will not overwrite your existing server.xml.
Please consult your servlet container's documentation for certificate generation and installation. (In particular, the example certificate provided by the installer for Tomcat should not be used in a production environment).
If Fedora is configured to use SSL, the JAVA_OPTS environment variable must include the javax.net.ssl.trustStore and javax.net.ssl.trustStorePassword properties. The value of javax.net.ssl.trustStore should be the location of the truststore file and the value of javax.net.ssl.trustStorePassword is the password for the keystore. The following values may be used with the sample keystore included with the installer:
export JAVA_OPTS="-Djavax.net.ssl.trustStore=/opt/fedora/server/truststore  -Djavax.net.ssl.trustStorePassword=tomcat"
Resource Index
If the Resource Index is enabled, Fedora will use Mulgara as its underlying triplestore, with full-text indexing disabled.
Messaging
If Messaging is enabled, Fedora will create and send a message via JMS whenever an API-M method is called. Client Install
Both the quick and custom options will install the Fedora client software in addition to the Fedora server. The client option, however, will install only the Fedora client software.

Installation result

Preparing FEDORA_HOME...
         Configuring fedora.fcfg
         Installing beSecurity
  Will not overwrite existing /opt/tomcat/conf/server.xml.
  Wrote example server.xml to:
          /opt/fedora/install/server.xml
 Preparing fedora.war...
 Processing web.xml
 Deploying fedora.war...
 Deploying fop.war...
 Deploying imagemanip.war...
 Deploying saxon.war...
 Deploying fedora-demo.war...
 Installation complete.
 ----------------------------------------------------------------------
 Before starting Fedora, please ensure that any required environment
 variables are correctly defined
         (e.g. FEDORA_HOME, JAVA_HOME, JAVA_OPTS, CATALINA_HOME).
 For more information, please consult the Installation & Configuration
 Guide in the online documentation.
 ----------------------------------------------------------------------
More informations on Installation and configuration of Fedora : http://fedora-commons.org/confluence/display/FCR30/Installation+and+Configuration+Guide




Install sword plugin for fedora

<user name="sword" password="sword">
   <attribute name="fedoraRole">
        <value>administrator</value>
   </attribute>
</user>

(http://scrum.ait.co.at/svn/extern/bhl/trunk/Development/ArchivalStorage/sword-fedora-1.3/conf)

== Install Sword client (to ingest files via sword client interface) ==(http://sourceforge.net/projects/sword-app/files/SWORD%20Client/sword-client-1.1.tar.gz/download)


(Optional) Sword java web client (to ingest files via sword web interface)

mvn package
mvn -Pdistribution install:install-file -DgroupId=sword -Dfile=target/sword-common-1.1.jar -Dpackaging=jar -DartifactId=sword-common -Dversion=1.1

Notes