source: other-projects/trunk/gs3-webservices-democlient/docs/HowToFiles/3InstallingFedora.html@ 15338

Last change on this file since 15338 was 15338, checked in by ak19, 16 years ago

Documentation on how to run the demo-client, how to write and deploy web services and how to write web service clients

  • Property svn:executable set to *
File size: 10.2 KB
Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
3<html>
4<head>
5<title>Installing Fedora</title>
6</head>
7<body>
8<a href="index.html">Back to index page</a>
9
10<h1>Installing Fedora 2.2.1 and Fedora-related information</h1>
11
12<p>Here, we're following <a href="http://www.fedora.info/download/2.2.1/userdocs/distribution/installation.html">the official Fedora instructions for installing Fedora 2.2.1</a></p>
13
14<p>(Installation instructions for other versions of Fedora:
15<ul>
16<li><a href="http://www.fedora-commons.org/documentation/2.2.2/userdocs/distribution/installation.html">Fedora 2.2.2</a></li>
17<li><a href="http://www.fedora-commons.org/documentation/3.0b1/userdocs/distribution/installation.html">Fedora 3.0</a></li>
18</ul>
19We've not tried using these later versions with the GS3 web services demo-client application yet.)</p>
20
21<p>I've not installed Fedora on Windows, and I've only tried working with 2.2.1 so far. But Fedora's own installation instructions refer to how to get it working on Windows. The procedure seems to be pretty much similar.</p>
22
23
24<h2>Sections</h2>
25<ul>
26<li><a href="#A">A Preliminary Steps</a></li>
27<li><a href="#B">B Installing Fedora 2.2.1</a></li>
28<li><a href="#C">C How to run Fedora (and how to stop it)</a></li>
29<li><a href="#D">D Creating the custom Greenstone 3 pid prefix</a></li>
30<li><a href="#E">E Exporting Greenstone documents into Fedora's repository</a></li>
31<li><a href="#F">F Further Information</a></li>
32</ul>
33
34
35<h2><a name="A">A Preliminary Steps</a></h2>
36<ol>
37<li>You need Greenstone 3.<br />
38Since 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.<br />
39(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.)</li>
40<li>Fedora 2.2.1 requires Java 5 (I used jdk1.5.0_10).<br />
41If you wish to compile it yourself, you will need Apache Ant 1.6.5 and put it on your PATH.</li>
42<li>Defining environment variables. See <a href="http://www.fedora.info/download/2.2.1/userdocs/distribution/installation.html#intro.env">the official instructions</a> for further details on this.
43
44<p>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:
45<ul>
46<li>JAVA_HOME - set this to the path of your JDK folder</li>
47<li>FEDORA_HOME - set this to the full path to that "fedora" folder just mentioned</li>
48<li>CATALINA_HOME should be set to the /full/path/to/fedora/tomcat folder.</li>
49<li>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</li>
50<li>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.</li>
51</ul>
52
53<p>If you're on <b>Linux</b>, 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.<br />
54For example:
55<pre>
56export JAVA_HOME=/opt/jdk1.5.0_10/
57export FEDORA_HOME=/my/path/to/fedora
58export CATALINA_HOME=$FEDORA_HOME/tomcat
59
60PATH=/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
61</pre>
62</p>
63
64<p>On <b>Windows</b>, adjustments to your PATH variable, and creation of new variables (like FEDORA_HOME, CATALINA_HOME, JAVA_HOME) are made by going to: <blockquote>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 Path variable.</blockquote>
65Note that on Windows, you use the <b>;</b> sign to append new items to your path, and when referring to previously declared environment variables you have to surround them with <b>%</b> signs:
66E.g.
67<pre>PATH=&lt;whatever-was-on-your-path-before&gt;;%FEDORA_HOME%/server/bin</pre>
68</p>
69</li>
70</ol>
71
72<h2><a name="B">B Installing Fedora 2.2.1</a></h2>
73<ol>
74<li>Download Fedora 2.2.1 from <a href="http://www.fedora.info/download/">http://www.fedora.info/download/</a>.<br />
75(Although I've not tried it, you could also try Fedora 2.2.2 or even Fedora 3 which are available from <a href="http://www.fedora-commons.org/developers/index.php">the Fedora Commons main page</a>)
76</li>
77<li>Extract it.
78</li>
79<li>Make sure you have the environment variables set as described in Preliminary Steps above.
80In an Linux x-term, move into extracted directory (e.g. fedora-2.2.1-src/) and type in xterm:
81<pre>ant installer</pre>
82Then go into the dist folder of the extraction directory (e.g. fedora-2.2.1-src/dist/) and type:
83<pre>java -jar fedora-2.2.1-installer.jar</pre>
84</li>
85<li>This will run the command-line installer. Choose "quick" installation.
86</li>
87<li>Accept everything as given and set a password for your Fedora Administrator account whose default username is "fedoraAdmin".
88By accepting the defaults, it will the server is set to run on localhost, port 8080 (with shutdown port 8005).
89</li>
90</ol>
91
92<b>You will need to remember the following details of your installation:</b>
93<ul>
94<li>the username for your Fedora account (default would be: fedoraAdmin)</li>
95<li>the password for it (?)</li>
96<li>the host (default would be: localhost)</li>
97<li>the port number (default would be: 8080)</li>
98</ul>
99
100
101<h2><a name="C">C How to run Fedora (and how to stop it)</a></h2>
102<ol>
103<li>First <b>start</b> up fedora server by typing the following in xterm:
104<pre>$FEDORA_HOME/tomcat/bin/startup.sh</pre>
105
106<li>Point your browser to
107<pre>http://localhost:8080/fedora/</pre>
108(or
109<pre>http://HOST:PORT/fedora</pre>
110with whatever host and port you chose to install it on).</li>
111
112<li>An authorization dialogue will pop up, asking you to enter the username and password you chose upon installation.</li>
113</ol>
114
115If you ever want to <b>stop</b> the Fedora server, you will need to type in the X-term
116<pre>$FEDORA_HOME/tomcat/bin/shutdown.sh</pre>
117
118
119<h2><a name="D">D Creating the custom Greenstone 3 pid prefix</a></h2>
120In 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".<br />
121To do this, you will need to:
122
123<ol>
124<li>Shutdown the fedora server
125<pre>$FEDORA_HOME/tomcat/bin/shutdown.sh</pre>
126</li>
127<li>Open up fedora's configuration file in a text editor
128<pre>$FEDORA_HOME/server/config/fedora.fcfg</pre>
129</li>
130<li>Go down to where it says:
131<pre>&lt;param name="retainPIDs" value="demo test changeme fedora-bdef fedora-bmech tutorial"&gt;</pre>
132And append greenstone to the list of values, so you get something like:
133<pre>&lt;param name="retainPIDs" value="demo test changeme fedora-bdef fedora-bmech tutorial greenstone"&gt;</pre>
134</li>
135<li>Restart the fedora server
136<pre>$FEDORA_HOME/tomcat/bin/startup.sh</pre>
137</li>
138</ol>
139
140<p>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".<br />
141For more information, you may want to look at the <a href="http://www.fedora.info/release/1.1/userdocs/distribution/release-notes.html">Fedora Release Notes</a>:
142<blockquote>"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."</blockquote></p>
143
144
145<h2><a name="E">E Exporting Greenstone documents into Fedora's repository</a></h2>
146<p>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.</p>
147
148<div style="color:red"><b>!!!!fli.sh launches modified gli.sh. But fli.bat launches gli.bat which has yet to be edited to work for both gs3 and gs2.</b></div>
149<ul>
150<li>Go into your greenstone 3 installation's gli folder, and run FLI:<br />
151If you're on Windows, double-click on fli.bat.<br />
152On Linux, you would run FLI by typing in an x-term:
153<pre>cd $GSDLHOME/gli
154./fli.sh
155</pre>
156
157</li>
158<li>Enter the host and port on which you set the Fedora server to listen ("localhost" and "8080" by default) and the username and password you chose. </li>
159<li>Build a collection from within FLI in the same manner you would build it in GLI.</li>
160</ul>
161
162<div style="display:none">
163<p>http://trac.greenstone.org/browser/gsdl/trunk/bin/script/g2f-buildcol.pl<br />
164http://trac.greenstone.org/browser/gsdl/trunk/bin/script/g2f-import.pl<br />
165Greenstone to Fedora scripts. Similar to import.pl and buildcol.pl, g2f-import.pl first converts documents into FedoraMETS and then g2f-buildcol.pl ingests them into a Fedora repository. Needs to have FEDORA_HOME set.</p>
166</div>
167
168
169<h2><a name="F">F Further Information</a></h2>
170<ul>
171<li>To run the Fedora-client application, you would type
172<pre>cd $FEDORA_HOME/client
173fedora-admin.sh
174</pre>
175</li>
176<li>The location of the <b>Fedora Basic Search Interface</b> ("REST interface" as it uses Fedora's URL-based web services) is
177<pre>http://HOST:PORT/fedora/search</pre>
178where HOST and PORT depend on what you chose when you installed it. E.g. http://localhost:8080/fedora/search<br />
179Note that the default search functionality that Fedora's own access web services (API-A) provide do not include full-text indexing and searching.
180</li>
181<li>To install <b>Fedora Generic Search</b>&mdash;which provides full-text indexing and search capabilities for content stored in a Fedora repository&mdash;see the document <a href="4InstallingFedoraGSearch.html">Installing Fedora Generic Search</a>.
182</li>
183</ul>
184
185</body>
186</html>
Note: See TracBrowser for help on using the repository browser.