Metacat UNIX Installation Instructions
|
|||||||
KNB Home | Data | People | Informatics | Biocomplexity | Education | Software |
***Disclaimer*** |
These installation instructions are meant for a systems administrator/DBA or someone who is an advanced computer user. They are NOT meant for the average computer user. Please realize that by executing these instructions, you may have to trouble shoot many advanced issues yourself. |
Pre-Installation |
Minimum Requirements Installing Metacat requires a server running an SQL92 compliant database (Oracle 8i recommended) with at least 128MB RAM, and a Pentium III class processor or higher. The amount of disk space required depends on the size of your RDBMS tablespace (which should be at least 10 MB, however Metacat itself requires only about 1 MB of free space after installation. These instructions assume a Linux environment but may work on other UNIX type environments, however this has not been tested. Additional Required Software The server on which you wish to install Metacat must have the following software installed and running correctly before attempting to install Metacat.
|
Aditional Software Setup |
Oracle 8i The Oracle RDBMS must be installed and running as a daemon on the system. In addition the JDBC listener must be enabled. You can enable it by logging in as your Oracle user and typing the following: lsnrctl startYour instance should have a table space of at least 5 MB (10 MB or higher recommended). You should also have a username specific to Metacat created and enabled. This user must have most normal permissions including CREATE SESSION, CREATE TABLE, CREATE INDEX, CREATE TRIGGER, EXECUTE PROCEDURE, EXECUTE TYPE, etc. If an action is unexplainably rejected by Metacat it is probably because the user permissions are not correctly set. Ant Ant is a Java based build application similar to Make on UNIX systems. It takes in installation parameters from a file in the root installation directory named "build.xml". The Metacat CVS module contains a default build.xml file that may require some modification upon installation. Ant should be installed on the system and the "ant" executable shell script should be available in the users path. Tomcat Install tomcat into the directory of your choice. The directory in which you install Tomcat itself will be referred to as the "$TOMCAT_HOME". This install assumes Tomcat version 3.1. The Tomcat configuration will be slightly different depending on what version of Tomcat you are running. You must now set up your servlet context. Change to the $TOMCAT_HOME/conf. Edit the tomcat.conf file. Find a line that looks like: ApJServMount /examples /rootAdd the following line below the aforementioned text: ApJServMount /metadata /rootSave tomcat.conf. Edit the server.xml file. Go to the bottom of the file. Find the line that says: <Context path="/examples" docbase="/webapps/examples" debug="0" reloadable="true" > </Context>Directly below these lines enter the following: <Context path="/metadata" docbase="/opt/tomcat/webapps/metadata" debug="0" reloadable="true" > </Context>Save server.xml. Note that capital "C" on "Context". This MUST be a
capital "C". Also note that "metadata" is an arbitrary servlet name. You
may pick whatever servlet name you wish. Also note that the path to the
servlet context will depend on where you install the tomcat webapps
directory.
|
Configuring the Server for Metacat |
Once all of the prerequisite software is installed as described above, the installation of Metacat can begin. First you must have a current version of the source distribution of Metacat. You can get it two ways. Authorized users can check it out of the NCEAS CVS system under the module name xmltodb. The command is as follows: cvs checkout -P xmltodbOr you can download a gzipped tar file from this site. Once you have either checked out or unzipped and untarred the source distribution, you can begin the installation process. Change into the xmltodb directory and edit the file called "build.xml". You will need to change a number of configuration properties to match the setup on your system. If you are using oracle, you'll need to customize the properties in the "oracle" target. If you are using Postgres, you'll need to customize the properties in the "postgres" target. All users will need to customize the properties in the "config" target. The properties that you need to change will include jdbc-connect, dbDriver, dbAdapter, oracle_home, jdbc, tomcat, webapps, context, user, server, systemidserver, web-base-url, and default-style. Each is described in detail below. You should also verify that the jar file properties mentioned in the remainder of the config target are accessible at the paths listed -- the defaults will usually work. Note that the build file is preconfigured to install Metacat either using Oracle or PostgreSQL as a backend database. To change the database system, simply change the 'depends' attribute of the 'config' target to be the name of the database target that you wish to use (either 'oracle' or 'postgresql'). If you wish to use a different database system, add a new target for your database with the needed parameters and actions then add it to the 'depends' attribute. Properties you will likely need to change:
Note: DO NOT add a slash [/] to the end of these paths. Metacat will not function correctly if you do so. Stylesheet Scripts You now need to set up the table structure in your database. Change to the xmltodb/src directory. Then run you RDBMS's SQL utility. In Oracle it is SQLPlus. This tutorial assumes an Oracle database so this example is for SQLPlus. Login as the oracle user that was set up for use with Metacat. At the SQLPlus prompt type the following: @src/xmltables.sql;You should see a bunch of output showing the creation of the Metacat table space. The first time you run this script you will get several errors at the beginning saying that you cannot drop a table/index/trigger because it does not exist. This is normal. Any other errors besides this need to be resolved before continuing. If the script has run correctly you should be able to type describe xml_documentsand it should tell you Name Null? Type -------------- ------------ ---------------- DOCID NOT NULL VARCHAR2(250) ROOTNODEID NUMBER(20) DOCNAME VARCHAR2(100) DOCTYPE VARCHAR2(100) DOCTITLE VARCHAR2(1000) USER_OWNER VARCHAR2(100) USER_UPDATED VARCHAR2(100) SERVER_LOCATION NUMBER(20) REV NUMBER(10) DATE_CREATED DATE DATE_UPDATED DATE PUBLIC_ACCESS NUMBER(1) UPDATED NUMBER(1) |