This guide will show you how to install a new Fedora Repository using the installer, or from source code. If you are upgrading from a previous release, please see Upgrading from 2.x or Upgrading from 3.x. If you have never installed Fedora before, please start with some background considerations.
On this page:
Table of Contents |
---|
Prerequisites
Download Fedora 3.56.0
- Fedora 3.5 6 Installer (112M165M)
- Fedora 3.5 6 Source Code (7.1M2M) (if installing from source, see Installation From Source for instructions on building the installer)
- See also the Downloads page.
...
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.58.2.32. Fedora supports four external databases: MySQL, Oracle, PostgreSQL and Microsoft SQL Server. 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.
...
If set, tomcat and fedora command line utilities will use the specified java vm. Otherwise, all utilities will attempt to use the java version available by default within the user's PATH. 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/local/jdk1.6.0_1733
.
FEDORA_HOME
Required for running command line utilities. Optional for running installer. Ignored when running the Fedora server unless fedora home directory is not otherwise specified.
...
Fedora is designed to be RDBMS-independent. Fedora has been tested with Derby, McKoi, MySQL, Oracle, PostgreSQL and Microsoft SQL Server. The embedded version of Derby included with the installer is provided as a convenience; Derby is not recommended for use in production repositories. If you choose to use any database other than the embedded Derby provided by the Fedora Installer, you must install that database first.
...
The MySQL commands listed below can be run within the mysql program, which may be invoked as follows:
No Format |
---|
mysql -u root -p
|
Create the database. For example, to create a database named "fedora3", enter:
No Format |
---|
CREATE DATABASE fedora3;
|
Set username, password and permissions for the database. For example, to set the permissions for user fedoraAdmin with password fedoraAdmin on database "fedora3", enter:
No Format |
---|
GRANT ALL ON fedora3.* TO fedoraAdmin@localhost IDENTIFIED BY 'fedoraAdmin';
GRANT ALL ON fedora3.* TO fedoraAdmin@'%' IDENTIFIED BY 'fedoraAdmin';
|
MySQL 4.1.x users must also specify the default character set for the Fedora database as "utf8" and the default collation as "utf8_bin". For example, to set the default character set and collation on a database named "fedora3", enter:
No Format |
---|
ALTER DATABASE fedora3 DEFAULT CHARACTER SET utf8;
ALTER DATABASE fedora3 DEFAULT COLLATE utf8_bin;
|
...
To prepare Oracle for use with Fedora, the following steps should be taken by an administrative user. First, using the Database Configuration Assistant, ensure that the database you'll be using is created with the UTF8 charset. Next, you'll need to create a Fedora tablespace and user in the database. Assuming the administrative user is sys and the SID is fedora3, log in using SQL*Plus using the following command:
No Format |
---|
sqlplus sys/PASSWORD@fedora3 as sysdba
|
To create a tablespace named "fedora_tblspace" with data in /var/lib/oracle
, enter the following:
No Format |
---|
CREATE TABLESPACE fedora_tblspace
DATAFILE '/var/lib/oracle/fedora_tblspace.dat' SIZE 1024M REUSE
AUTOEXTEND ON NEXT 256M MAXSIZE UNLIMITED
SEGMENT SPACE MANAGEMENT AUTO;
|
To create a user "fedoraAdmin" with password "fedoraAdmin", using the "fedora_tblspace", enter the following:
No Format |
---|
CREATE USER fedoraAdmin IDENTIFIED BY fedoraAdmin
DEFAULT TABLESPACE fedora_tblspace;
|
Using the GRANT command, make sure the user has permission to connect, create, alter, and drop tables sequences, triggers, and indexes in this tablespaces. For example:
No Format |
---|
GRANT ALL PRIVILEGES TO fedoraAdmin;
|
...
Launch the PostgreSQL interactive terminal, psql
, (optionally appending the -U argument to connect as a different user).
No Format |
---|
psql -d postgres
|
To create a user "fedoraAdmin"" with password "fedoraAdmin" and database named "fedora3", enter the following:
No Format |
---|
CREATE ROLE "fedoraAdmin" LOGIN PASSWORD 'fedoraAdmin';
CREATE DATABASE "fedora3" WITH ENCODING='UTF8' OWNER="fedoraAdmin";
|
...
To start the installer, change to the directory where you downloaded the installer and at a command prompt, enter:
No Format |
---|
java -jar fcrepo-installer-3.4.26.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. *Take care if you are using an install.properties file from an earlier release as the file may not contain some properties defined in the later release, default settings will be used in this case, which may or may not be appropriate for your installation. |
...
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 {{ Wiki Markup 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|https://fedora-commons.org/confluence/display/FCR30/Alternative+Webapp+Context+Configuration].
SSL
Configuring SSL support for Fedora's API-M interface is an optional feature. It strongly recommended for production environments if Fedora is exposed to unsecured application and users. However, if your installation is within a managed data center with firewall services, you may choose to provide SSL using a software or hardware front-end instead. For example, a reverse proxy implemented using the Apache HTTP Server and hiding Fedora generally provides better SSL performance.
...
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:
No Format |
---|
-Djavax.net.ssl.trustStore=$FEDORA_HOME/server/truststore -Djavax.net.ssl.trustStorePassword=tomcat
|
...
If you selected the quick install option, you will find Tomcat installed in FEDORA_HOME/tomcat
. To run Fedora, start Tomcat by entering:
No Format |
---|
$FEDORA_HOME/tomcat/bin/startup.sh
|
(or for Windows)
No Format |
---|
%FEDORA_HOME%\tomcat\bin\startup.bat
|
...
To ingest the demonstration objects, at a command prompt, enter:
No Format |
---|
fedora-ingest-demos.sh [hostname] [port] [username] [password] [protocol]
|
(or for Windows)
No Format |
---|
fedora-ingest-demos.bat [hostname] [port] [username] [password] [protocol]
|
...
To change the level to DEBUG for all Fedora classes, change the logger name="org.fcrepo"
line to the following:
Code Block |
---|
<logger name="org.fcrepo" additivity="false" level="DEBUG">
|
To change the level to DEBUG for just one class, add the following lines:
Code Block |
---|
log4j.logger.fedora.server.utilities.SQLUtility = DEBUG, FEDORA
log4j.additivity.fedora.server.utilities.SQLUtility = false
|
To change the level to DEBUG for a whole package, add the following lines:
Code Block |
---|
<logger name="org.fcrepo.server.resourceIndex" additivity="false" level="DEBUG">
<appender-ref ref="FEDORA"/>
|