Files
DSpace/dspace/docs/directories.html
Mark Diggory ffe2255213 Updates to the documentation based on feedback from the test-a-thon.
Corrections to Maven based build and installation on Windows. 
Changed Copyright to be under The DSpace Foundation.

git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2687 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2008-02-19 04:48:26 +00:00

233 lines
16 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<HTML>
<HEAD>
<TITLE>DSpace System Documentation: Directories and Files</TITLE>
<LINK REL=StyleSheet HREF="style.css" TYPE="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" >
</HEAD>
<BODY>
<H1>DSpace System Documentation: Directories and Files</H1>
<P><A HREF="index.html">Back to contents</A></P>
<H2><A NAME="overview">Overview</A></H2>
<p>A complete DSpace installation consists of three separate directory trees:
<dl>
<dt>The source directory:</dt>
<dd><p>This is where (surprise!) the source code lives. Note that the config files here are used only during the initial install process. After the install, config files should be changed in the install directory. It is referred to in this document as <code><i>[dspace-source]</i></code>.</p></dd>
<dt>The install directory:<dt>
<dd><p>This directory is populated during the install process and also by DSpace as it runs. It contains config files, command-line tools (and the libraries necessary to run them), and usually--although not necessarily--the contents of the DSpace archive (depending on how DSpace is configured). After the initial build and install, changes to config files should be made in this directory. It is referred to in this document as <code><i>[dspace]</i></code>.<p> </dd>
<dt>The web deployment directory: </dt>
<dd><p>This directory is generated by the web server the first time it finds a dspace.war file in its webapps directory. It contains the unpacked contents of dspace.war, i.e. the JSPs and java classes and libraries necessary to run DSpace. Files in this directory should never be edited directly; if you wish to modify your DSpace installation, you should edit files in the source directory and then rebuild. The contents of this directory aren't listed here since its creation is completely automatic. It is usually referred to in this document as <code><i>[tomcat]</i>/webapps/dspace</code>.</p></dd>
</dl>
<H2><A NAME="sourcedir">Source Directory Layout</A></H2>
<ul>
<li><code><i>[dspace-source]</i></code>
<ul>
<li><code>dspace/</code> - Directory which contains all build and configuration information for DSpace
<ul>
<li><code>build.xml</code> - The Build file for Ant -- used to preform a fresh_install, upgrade, or deploy new changes.</li>
<li><code>CHANGES</code> - Detailed list of code changes between versions.</li>
<li><code>KNOWN_BUGS</code> - Known bugs in the current version.</li>
<li><code>LICENSE</code> - DSpace source code license.</li>
<li><code>README</code> - Obligatory basic information file.</li>
<li><code>bin/</code> - Some shell and Perl scripts for running DSpace command-line tasks.</li>
<li><code>config/</code> - Configuration files:
<ul>
<li><code>controlled-vocabularies/</code> - Fixed, limited vocabularies used in metadata entry</li>
<li><code>crosswalks/</code> - Metadata crosswalks - property files or XSL stylesheets</li>
<li><code>dspace.cfg</code> - The Main DSpace configuration file (You will need to edit this).</li>
<li><code>dc2mods.cfg</code> - Mappings from Dublin Core metadata to <A HREF="http://www.loc.gov/standards/mods/">MODS</A> for the METS export.</li>
<li><code>default.license</code> - The default license that users must grant when submitting items.</li>
<li><code>dstat.cfg</code>, <code>dstat.map</code> - Configuration for statistical reports.</li>
<li><code>input-forms.xml</code> - Submission UI metadata field configuration.</li>
<li><code>news-side.html</code> - Text of the front-page news in the sidebar, only used in JSPUI.</li>
<li><code>news-top.html</code> - Text of the front-page news in the top box, only used in teh JSPUI.</li>
<li><code>emails/</code> - Text and layout templates for emails sent out by the system.</li>
<li><code>language-packs/</code> - Contains "dictionary files" -- Java properties files that contain user interface text in different languages</li>
<li><code>registries/</code> - <strong>Initial</strong> contents of the bitstream format registry and Dublin Core element/qualifier registry. These are only used on initial system setup, after which they are maintained in the database.</li>
<li><code>templates/</code> - Configuration files for libraries and external applications (e.g. Apache, Tomcat) are kept and edited here. They can refer to properties in the main DSpace configuration - have a look at a couple. When they're updated, a command line tool fills out these files with appropriate values from dspace.cfg, and copies them to their appropriate location (hence "templates".)</li>
</ul>
</li>
<li><code>docs/</code> - DSpace system documentation. The technical documentation for functionality, installation, configuration, etc.</li>
<li><code>etc/</code> - Miscelleanous configuration need to install DSpace that isn't really to do with system configuration - e.g. the PostgreSQL database schema, and a couple of configuration files that are used during the build process but not by the live system. Also contains the deployment descriptors (<code>web.xml</code> files) for the Web UI and OAI-PMH support <code>.war</code> files.
<ul>
<li><code>oracle/</code> - Versions of the database schema and updater SQL scripts for Oracle.</li>
</ul>
</li>
<li><code>modules/</code> - The Web UI modules "overlay" directory. DSpace uses Maven to automatically look here for any customizations you wish to make to DSpace Web interfaces.
<ul>
<li><code>dspace-jspui</code> - Contains all customizations for the JSP User Interface.
<ul>
<li><code>src/main/resources/</code> - The overlay for JSPUI Resources. This is the location to place any custom Messages.properties files.</li>
<li><code>src/main/webapp/</code> - The overlay for JSPUI Web Application. This is the location to place any custom JSPs to be used by DSpace.</li>
</ul>
</li>
<li><code>dspace-lni</code> - Contains all customizations for the Lightweight Network Interface.</li>
<li><code>dspace-oai</code> - Contains all customizations for the OAI-PMH Interface.</li>
<li><code>dspace-xmlui</code> - Contains all customizations for the XML User Interface (aka Manakin).
<ul>
<li><code>src/main/webapp/</code> - The overlay for XMLUI Web Application. This is the location to place custom Themes or Configurations.
<ul>
<li><code>i18n/</code> - The location to place a custom version of the XMLUI's messages.xml</li>
<li><code>themes/</code> - The location to place custom Themes for the XMLUI</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li><code>src/</code> - Maven configurations for DSpace System. This directory contains the Maven and Ant build files for DSpace.</li>
<li><code>target/</code> - (Only exists after building DSpace) This is the location Maven uses to build your DSpace installation package.
<ul>
<li><code>dspace-[version].dir</code> - The location of the DSpace Installation Package (which can then be installed by running <code>ant update</code>)</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<H2><A NAME="installdir">Installed Directory Layout</A></H2>
<P>Below is the basic layout of a DSpace installation using the default configuration. These paths can be configured if necessary.</P>
<UL>
<li><code><i>[dspace]</i></code>
<UL>
<li><code>assetstore/</code> - asset store files</li>
<li><code>bin/</code> - shell and Perl scripts</li>
<li><code>config/</code> - configuration, with sub-directories as above</li>
<li><code>handle-server/</code> - Handles server files</li>
<li><code>history/</code> - stored history files (generally RDF/XML)</li>
<li><code>lib/</code> - JARs, including dspace.jar, containing the DSpace classes</li>
<li><code>log/</code> - Log files</li>
<li><code>reports/</code> - Reports generated by statistical report generator</li>
<li><code>search/</code> - Lucene search index files</li>
<li><code>upload/</code> - temporary directory used during file uploads etc.</li>
<li><code>webapps/</code> - location where DSpace installs all Web Applications</li>
</ul>
</ul>
<H2><A NAME="webapp">Contents of JSPUI Web Application</A></H2>
<P>DSpace's Ant build file creates a <code>dspace-jspui-webapp/</code> directory with the following structure:</P>
<UL>
<LI>(top level dir)
<UL>
<LI>The JSPs</LI>
<LI><code>WEB-INF/</code>
<UL>
<LI><code>web.xml</code> - DSpace JSPUI Web Application configuration and Servlet mappings</li>
<LI><code>dspace-tags.tld</code> - DSpace custom tag descriptor</LI>
<LI><code>fmt.tld</code> - JSTL message format tag descriptor, for internationalization</LI>
<LI><code>lib/</code> - All the third-party JARs and pre-compiled DSpace API JARs needed to run JSPUI</lI>
<li><code>classes/</code> - Any additional necessary class files</LI>
</UL>
</LI>
</UL>
</LI>
</UL>
<H2><A NAME="webapp">Contents of XMLUI Web Application (aka Manakin)</A></H2>
<P>DSpace's Ant build file creates a <code>dspace-xmlui-webapp/</code> directory with the following structure:</P>
<UL>
<LI>(top level dir)
<UL>
<LI><code>aspects/</code> - Contains overarching Aspect Generator config and Prototype DRI (Digital Repository Interface) document for Manakin.</LI>
<LI><code>i18n/</code> - Internationalization / Multilingual support. Contains the <code>messages.xml</code> English language pack by default.</LI>
<LI><code>themes/</code> - Contains all out-of-the-box Manakin themes
<UL>
<LI><code>Classic/</code> - The classic theme, which makes the XMLUI look like classic DSpace</LI>
<LI><code>dri2xhtml/</code> - The base theme, which converts XMLUI DRI (Digital Repository Interface) format into XHTML for display</LI>
<LI><code>Reference/</code> - The default reference theme for XMLUI</LI>
<LI><code>template/</code> - A theme template...useful as a starting point for your own custom theme(s)</LI>
<LI><code>dri2xhtml.xsl</code> - The DRI-to-XHTML XSL Stylesheet. Uses the above 'dri2xhtml' theme to generate XHTML</LI>
<LI><code>themes.xmap</code> - The Theme configuration file. It determines which theme(s) are used by XMLUI</LI>
</UL>
</LI>
<LI><code>WEB-INF/</code>
<UL>
<LI><code>lib/</code> - All the third-party JARs and pre-compiled DSpace JARs needed to run XMLUI</lI>
<li><code>classes/</code> - Any additional necessary class files</LI>
<LI><code>cocoon.xconf</code> - XMLUI's Apache Cocoon configuration</li>
<LI><code>logkit.xconf</code> - XMLUI's Apache Cocoon Logging configuration</li>
<LI><code>web.xml</code> - XMLUI Web Application configuration and Servlet mappings</li>
</UL>
</LI>
</UL>
</LI>
</UL>
<H2><A NAME="logfiles">Log Files</A></H2>
<P>The first source of potential confusion is the log files. Since DSpace uses a number of third-party tools, problems can occur in a variety of places. Below is a table listing the main log files used in a typical DSpace setup. The locations given are defaults, and might be different for your system depending on where you installed DSpace and the third-party tools. The ordering of the list is roughly the recommended order for searching them for the details about a particular problem or error.</P>
<TABLE>
<CAPTION>DSpace Log File Locations</CAPTION>
<TR>
<TH>Log File</TH>
<TH>What's In It</TH>
</TR>
<TR>
<TD><code><i>[dspace]</i>/log/dspace.log</code></TD>
<TD>Main DSpace log file. This is where the DSpace code writes a simple log of events and errors that occur within the DSpace code. You can control the verbosity of this by editing the <code><i>[dspace]</i>/config/templates/log4j.properties</code> file and then running <code><i>[dspace]</i>/bin/install-configs</code>.</TD>
</TR>
<TR>
<TD><code><i>[tomcat]</i>/logs/catalina.out</code></TD>
<TD>This is where Tomcat's standard output is written. Many errors that occur within the Tomcat code are logged here. For example, if Tomcat can't find the DSpace code (<code>dspace.jar</code>), it would be logged in <code>catalina.out</code>.</TD>
</TR>
<TR>
<TD><code><i>[tomcat]</i>/logs/hostname_log.yyyy-mm-dd.txt</code></TD>
<TD>If you're running Tomcat stand-alone (without Apache), it logs some information and errors for specific Web applications to this log file. <code>hostname</code> will be your host name (e.g. <code>dspace.myu.edu</code>) and <code>yyyy-mm-dd</code> will be the date.</TD>
</TR>
<TR>
<TD><code><i>[tomcat]</i>/logs/apache_log.yyyy-mm-dd.txt</code></TD>
<TD>If you're using Apache, Tomcat logs information about Web applications running through Apache (<code>mod_webapp</code>) in this log file (<code>yyyy-mm-dd</code> being the date.)</TD>
</TR>
<TR>
<TD><code><i>[apache]</i>/error_log</code></TD>
<TD>Apache logs to this file. If there is a problem with getting <code>mod_webapp</code> working, this is a good place to look for clues. Apache also writes to several other log files, though <code>error_log</code> tends to contain the most useful information for tracking down problems.</TD>
</TR>
<TR>
<TD><code><i>[dspace]</i>/log/handle-plug.log</code></TD>
<TD>The Handle server runs as a separate process from the DSpace Web UI (which runs under Tomcat's JVM). Due to a limitation of log4j's 'rolling file appenders', the DSpace code running in the Handle server's JVM must use a separate log file. The DSpace code that is run as part of a Handle resolution request writes log information to this file. You can control the verbosity of this by editing <code><i>[dspace]</i>/config/templates/log4j-handle-plugin.properties</code>.</TD>
</TR>
<TR>
<TD><code><i>[dspace]</i>/log/handle-server.log</code></TD>
<TD>This is the log file for CNRI's Handle server code. If a problem occurs within the Handle server code, before DSpace's plug-in is invoked, this is where it may be logged.</TD>
</TR>
<TR>
<TD><code><i>[dspace]</i>/handle-server/error.log</code></TD>
<TD>On the other hand, a problem with CNRI's Handle server code might be logged here.</TD>
</TR>
<TR>
<TD>PostgreSQL log</TD>
<TD>PostgreSQL also writes a log file. This one doesn't seem to have a default location, you probably had to specify it yourself at some point during installation. In general, this log file rarely contains pertinent information--PostgreSQL is pretty stable, you're more likely to encounter problems with connecting via JDBC, and these problems will be logged in <code>dspace.log</code>.</TD>
</TR>
</TABLE>
<HR>
<ADDRESS>
Copyright &copy; 2002-2008 The DSpace Foundation
</ADDRESS>
</BODY>
</HTML>