Digital Archiving and Retrieval Tool System Administrator Manual
Contents |
Tomcat Setup
Tomcat5.5+ setup
Prerequisites: JDK (if you are only using the JRE Tomcat will not work)
The "bin" directory of the JDK must be in the PATH. Source: http://www.coreservlets.com/Apache-Tomcat-Tutorial/ Edit install\_dir/conf/server.xml and change the port attribute of the Connector element from 8080 to 80. Turn on servlet reloading. Edit install\_dir/conf/context.xml and change <Context> to <Context reloadable=true>. Note: Tomcat 5.0 does not have a context.xml.Enable the invoker servlet. Go to install\_dir/conf/web.xml and uncomment the servlet and servlet-mapping elements that map the invoker servlet to /servlet/*.
Copy the DATA server files into \$CATALINA\_HOME/webapps/ROOT/, leaving the existing files
Tomcat5.0 setup
cp ServletA.war /opt/tomcat5/webapps
The servlet is now available via http://yourserver.foo:8080/ServletA/
PostgreSQL Setup
PostgreSQL setup
Install PostgreSQL with the JDBC Driver (enabled by default) and start the server -If you're installing it on Windows, be sure to install it as a service with a different user name (this is the default option when you are installing PostgreSQL on Windows) -Give the super user a password --fj4bh4mfck4nr Look in the jdbc directory of your PostgreSQL installation and copy postgresql-8.1-405.jdbc3.jar or a file with a similar name to "shared/lib" (recommended, since this is for a developer's specific applications) or "common/lib" of your Tomcat installation Restart the Tomcat server OR if you didn't install the JDBC drivers, download the correct one from http://jdbc.postgresql.org/download.html
Add the bin directory of PostgreSQL to the PATH.
If the superuser name is postgres: > createuser -SDPU postgres (sometimes it may be necessary to su - postgres) -S, --no-superuser role will not be superuser -D, --no-createdb role cannot create databases -P, --pwprompt assign a password to new role -U, --username=USERNAME user name to connect as (not the one to create) Enter name of role to add: DART Enter password for new role:ajf33mnq1 Enter it again:ajf33mnq1 Shall the new role be allowed to create more new roles? (y/n) n {enter in postgres password} CREATE ROLE
If that does not work, execute: sudo -u postgres createuser -SDP
> createdb -E utf-8 -O DART -U postgres DART Database for DART {enter in postgres password} {enter in postgres password again}
If that does not work, execute: sudo -u postgres createdb -E utf-8 -O DART DART "Database for DART"
What to do after Tomcat and PostgreSQL installation
Aquire the DART tarball containing all the server release files. Extract these files to Tomcat's ROOT directory.
In your browser, navigate to the servlet page. You will be presented with the installation page. Provide the required information: database connection variables and password for the super admin user.
Log in as the super admin user with the username "admin" and password specified in the installation.
As a super admin, here are a few basic tasks you can perform: 1. Create users 2. Create projects 3. View logs 4. Install/Uninstall application
It is recommended you begin to create other users and projects within the system. Remember not to give administrator access to all users, just users who you trust to correctly create projects and manage other users.
Adding Storage Resources
Virtually any storage medium can be implemented using it's Java API. In order to use a custom storage resource follow the following steps:
1 Create a class which implements the StorageResource interface. This class is what will input/output to the storage resource.
1.1 Compile it into a .class file. You will need the StorageResource.java file to compile. 1.2 Put the .java file in {DART_HOME]\Server\Web Application\Servlet Files\org\GICL\Dart\io\. 1.3 Put the .class file in {TOMCAT_HOME}\webapps\ROOT\WEB-INF\classes\org\GICL\Dart\io\.
2 Open Config.xml located in the DART "Server" directory. Under the <storageResources> element add your storage resource in the following format: <resource name="The Name" class="YourResourceStroageResource" />
Upon saving Config.xml, the storage resource is now available for use without the need to recompile.