Search DrupalHybrid.com

Step by Step Guide: Installing Fedora Commons Repository



This guide will show you how to install a new Fedora Repository using the installer.
Download Fedora 3.4.1 installer.

Required:  Install Java SE Development Kit (JDK) 6 and MySQL Serve. Create a database to use with Fedora.
                       
First, check that you have a JDK or SDK — Java JRE is not enough
To confirm that you have the right version, you can check the Java installation path. Unless you changed the path during installation, Java will be installed to a subdirectory under C:\Program Files\Java, for example C:\Program Files\Java\jdk1.5.0_17
 
Or if you need to install the JDK, follow these instructions:
  • Go to the Java Sun download page.
  • Download the version entitled 'JDK 5 Update XX', where 'XX' stands for some number.. (Sun will provide the latest version on that page, install the latest version, latest versions include everything of the previous ones.)
  • When the download has finished, run the Java installer. At one point, you will be asked to choose a directory to install to. Copy or write this directory down for use later.

Prepare Environment Variables

Set the JAVA_HOME Variable

Once you have identified the JDK installation path:
  1. Right-click the My Computer icon on your desktop and select 'Properties'
  2. Click the 'Advanced' tab.
  3. Click the 'Environment Variables' button
  4. Under 'System Variables', click 'New'
  5. Enter the variable name as JAVA_HOME
  6. Enter the variable value as the installation path for the Java Development Kit. (e.g. C:\Program Files\Java\jdk1.5.0_17)
  7. Click 'OK'
  8. Click 'Apply Changes'

Set the FEDORA_HOME Variable


 Repeat all steps and change steps 5 and 6

  1. Enter the variable name as FEDORA_HOME
  2. Enter the variable value as the installation path fedora.(e.g. C:\fedora)  Create empty fedora Folder where you want to extract fedora files and set its path in “variable value”

Set the CATALINA_HOME Variable

If Fedora is configured to use Tomcat, CATALINA_HOME must be set before starting Fedora (repeat above steps to set variable). If using the quick install option, CATALINA_HOME should be set to $FEDORA_HOME/tomcat (or %FEDORA_HOME%\tomcat in Windows)
  1. Enter the variable name as CATALINA_HOME
  2. Enter the variable value as the installation path for tomcat.(e.g. C:\fedora\tomcat) 

Set 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
Repeat all steps and change steps 5 and 6

  1. Enter the variable name as PATH
  2. Enter the variable value as %FEDORA_HOME%\server\bin;%FEDORA_HOME%\client\bin;%JAVA_HOME%\bin (separate different paths with semicolon)


MySQL: Create Database


First install MySQL Server and create a database to use with Fedora:
if you are using WAMP server (only you need is ) --> Go to --> your wamp icon in the tray and select phpMyAdmin
 and
  • Type fedora3 in “Create New Database” under “My SQL localhost”
  • Go to the Privileges tab and ensure all permissions are granted
  • Go to the SQL tab and fill in the open box with query:  
    GRANT ALL ON fedora3.* TO fedoraAdmin@localhost IDENTIFIED BY 'fedoraAdmin';
  GRANT ALL ON fedora3.* TO fedoraAdmin@'%' IDENTIFIED BY 'fedoraAdmin';
  • FLUSH PRIVILEGES;           )
if not wamp...
Please note that the MySQL JDBC driver provided by the installer requires MySQL v3.23.x or higher.

Example for Command prompt

C.> mysql -u root -p
mysql> CREATE DATABASE fedora3 default charset utf8;
mysql> GRANT ALL ON fedora3.* TO adminFedora@localhost IDENTIFIED BY 'adminFedora';
mysql> FLUSH PRIVILEGES;
Example 2
The MySQL commands listed below can be run within the mysql program, which may be invoked as follows:
mysql -u root –p
Create the database. For example, to create a database named "fedora3", enter:
CREATE DATABASE fedora3;
Set username, password (remember your password for future use for fedora installation) and permissions for the database. For example, to set the permissions for user fedoraAdmin with password fedoraAdmin on database "fedora3", enter:

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:
ALTER DATABASE fedora3 DEFAULT CHARACTER SET utf8;
ALTER DATABASE fedora3 DEFAULT COLLATE utf8_bin;

FLUSH PRIVILEGES;


Now Proceed with your Fedora installation: 



Run the command from the directory where you have downloaded                            “fcrepo-installer-3.4.1.jar “
C:\> java -jar fcrepo-installer-3.4.1.jar
or give path where your fcrepo-installer-3.4.1.jar is



***********************
Fedora Installation
***********************
To install Fedora, please answer the following questions.
Enter CANCEL at any time to abort the installation.
Detailed installation instructions are available online:
http://www.fedora-commons.org/confluence/display/FCR30/


Installation type
-----------
The 'quick' install is designed to get you up and running with Fedora
as quickly and easily as possible. It will install Tomcat and an
embedded version of the Derby database. SSL support and XACML policy
enforcement will be disabled.
For more options, including the choice of hostname, ports, security,
and databases, select 'custom'.
To install only the Fedora client software, enter 'client'.
Options : quick, custom, client
Enter a value ==> custom


Fedora home directory
--------------
This is the base directory for Fedora scripts, configuration files, etc.
Enter the full path where you want to install these files.
Enter a value [default is C:\fedora] ==> (enter the path of fedora directory if different)


Fedora administrator password
-------------------
Enter the password to use for the Fedora administrator (fedoraAdmin) account.
Enter a value ==> fedoraAdmin


Fedora server host
------------
The host Fedora will be running on.
If a hostname (e.g. www.example.com) is supplied, a lookup will be
performed and the IP address of the host (not the host name) will be used
in the default Fedora XACML policies.
Enter a value [default is localhost] ==> (hit Enter)


Fedora application server context
----------------------
The application server context Fedora will be running in.
If 'fedora' (default) is supplied, the resulting context path
will be http://www.example.com/fedora
It must be ensured that the configured application server context
matches this path if explicitly configured.
Enter a value [default is fedora] ==> (hit Enter)


Authentication requirement for API-A
------------------------
Fedora's management (API-M) interface always requires user authentication.
Require user authentication for Fedora's access (API-A) interface?
Options : true, false
Enter a value [default is false] ==> true


SSL availability
-----------
Should Fedora be available via SSL? Note: this does not preclude
regular HTTP access; it just indicates that it should be possible for
Fedora to be accessed over SSL.
Options : true, false
Enter a value [default is true] ==> false


SSL required for API-A
---------------
Should API-A be accessible exclusively via SSL? If true, requests
to access API-A URLs will be automatically redirected to the secure port.
Options : true, false
Enter a value [default is false] ==> (hit Enter)


Servlet engine
---------
Which servlet engine will Fedora be running in?
Enter 'included' to use the bundled Tomcat 6.0.20 server.
To use your own, existing installation of Tomcat, enter 'existingTomcat'.
Enter 'other' to use a different servlet container.
Options : included, existingTomcat, other
Enter a value [default is included] ==> (type existingTomcat if tomcat already installed.)
                                                            Or (hit Enter)   (for default tomcat)


Tomcat home directory
--------------
Please provide the full path to your existing Tomcat installation, or
the path where you plan to install the bundled Tomcat.
Enter a value [default is C:\fedora\Tomcat] ==> (Enter path if changed)


Tomcat HTTP port
-----------
Which HTTP port (non-SSL) should Tomcat listen on? This can be changed
later in Tomcat's server.xml file.
Enter a value [default is 8080] ==> (hit Enter)  


Tomcat shutdown port
-------------
Which port should Tomcat use for shutting down? Make sure this doesn't
conflict with an existing service. This can be changed later in Tomcat's
server.xml file.
Enter a value [default is 8005] ==> (hit Enter)  


Tomcat Secure HTTP port
---------------
Which port (SSL) should Tomcat listen on? This can be changed
later in Tomcat's server.xml file.
Enter a value [default is 8443] ==> (hit Enter)  


Database
-----
Please select the database you will be using with
Fedora. The supported databases are Derby, McKoi, MySQL, Oracle and Postgres.
If you do not have a database ready for use by Fedora or would prefer to
use the embedded version of Derby bundled with Fedora, enter 'included'.
Options : derby, mckoi, mysql, oracle, postgresql, included
Enter a value ==> mysql


MySQL JDBC driver
-----------------
You may either use the included JDBC driver or your own copy.
Enter 'included' to use the included JDBC driver, or, enter the location
(full path) of the driver.
Enter a value [default is included] ==> (hit Enter)  


Database username
-----------------
Enter the database username Fedora will use to connect to the Fedora database.
Enter a value ==> root


Database password
-----------------
Enter the database password Fedora will use to connect to the Fedora database.
Enter a value ==> (Enter password of MySql database you have entered while creating database, this helps fedora to connect to your mysql database)


JDBC URL
--------
Please enter the JDBC URL.
Enter a value [default is jdbc:mysql://localhost/fedora3?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true] ==> (hit Enter)  


JDBC DriverClass
----------------
Please enter the JDBC driver class.
Enter a value [default is com.mysql.jdbc.Driver] ==> (hit Enter)  
Validating database connection...Successfully connected to MySQL
OK


Enable FeSL AuthN
-----------------
Enable FeSL Authentication? To continue to use Fedora's legacy
authentication, enter "false" below. Please note that Fedora's legacy
authentication is expected to be phased out in a subsequent release.
For more information, see: http://fedora-commons.org/confluence/x/h4Ov
Enter a value [default is true] ==> false


Enable FeSL AuthZ (Experimental Feature)
----------------------------------------
Enable FeSL Authorization? This is an experimental replacement for Fedora's
legacy authorization module, and is still under development.
Production repositories should NOT enable this, but we invite you to try it
out and give us feedback.
For more information, see: http://fedora-commons.org/confluence/x/h4Ov
Enter a value [default is false] ==> (hit Enter)  


Policy enforcement enabled
--------------------------
Should XACML policy enforcement be enabled? Note: This will put a set of
default security policies in play for your Fedora server.
Options : true, false
Enter a value [default is true] ==> (hit Enter)  


Low Level Storage
-----------------
Which low-level (file) storage plugin do you want to use?
We recommend akubra-fs for new installs. If you are upgrading Fedora from
version 3.3 or below, you should use legacy-fs for compatibility with your
existing storage. Other plugins are also available, but they must be
configured after installation. For more information, please see
https://wiki.duraspace.org/x/Voqv
Options : akubra-fs, legacy-fs
Enter a value [default is akubra-fs] ==> (hit Enter)  


Enable Resource Index
---------------------
Enable the Resource Index?
Options : true, false
Enter a value [default is false] ==> true


Enable Messaging
----------------
Enable Messaging? Messaging sends notifications of API-M events via JMS.
Options : true, false
Enter a value [default is false] ==> (hit Enter)  


Deploy local services and demos
-------------------------------
Several sample back-end services are included with this distribution.
These are required if you want to use the demonstration objects.
If you'd like these to be automatically deployed, enter 'true'.
Otherwise, the installer will put the files in your FEDORA_HOME/install
directory in case you want to deploy them later.
Options : true, false
Enter a value [default is true] ==> true
Preparing FEDORA_HOME...
Configuring fedora.fcfg
Installing beSecurity
Will not overwrite existing /Users/birage/fedora/tomcat/conf/server.xml.
Wrote example server.xml to:
/Users/birage/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.
----------------------------------------------------------------------

Congratulations...

  • If all went well, then congratulations. You have just installed Fedora Commons Repository.
  • For more information, please consult the Installation & Configuration Guide in the online documentation.

Staring FEDORA

Start the MySQL Database

If the database isn't already started, start it now.

Start the Tomcat

Example: go to fedora/Tomcat/bin double click startup.bat

Or run command in command prompt

C:\fedora\Tomcat\bin\startup.bat

…wait until tomcat starts…

Start The Server!

Fedora is normally started with the command:
C:\fedora\client\bin\ fedora-admin.bat
Or go to
fedora/client/bin double click  fedora-admin.bat

Login

-         Fedora Server : localhost:8080
-         Protocol : http
-         Context: fedora
-         Username : fedoraAdmin
-         Password : fedoraAdmin (your fedora password)
After EXIT
(Use C:\fedora\Tomcat\bin\shutdown.bat to shutdown tomcat.)


============================================

Access is denied Unable to open the service 'Tomcat6'

Remove: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run\ApacheTomcatMonitor 

                 by: Gurpreet Dhillon

1 comment:

Anonymous said...
This comment has been removed by a blog administrator.