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. |
These documents are meant to outline the metacat installation process on specific platforms. They are not a substitute for the below instructions and only meant as a supplemental guideline. |
Minimum Requirements Installing Metacat requires a server running an SQL92 compliant database (Oracle 8i or Postgresql 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.
|
Java You'll need a recent Java SDK; J2SE 1.4.2 or later is required. The latest metacat release has been tested most extensively with J2SE 5.0 and this is the recommended version. Make sure that JAVA_HOME environment variable is properly set and that both java and javac are on your PATH. Oracle 8i or Postgres Oracle: 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. Postgres:
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. The latest metacat release was tested with Ant 1.6.5. Tomcat Install Tomcat into the directory of your choice. The directory in which you install Tomcat itself will be referred to as the "$CATALINA_HOME". We recommend that you install Tomcat version 5.5. More details about Tomcat installation are available here. |
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. You'll need both the "metacat" module and the "utilities" module to be checked out in sibling directories. The command is as follows: mkdir knb-software cd knb-software cvs checkout -P metacat cvs checkout -P utilitiesOr 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
metacat directory and edit the file called "
Other properties in
Metacat has a number of additional settable properties in file
Note: When setting properties, DO NOT add a trailing slash [/] to the end of any paths that are specified. Metacat will not function correctly if you do so. |
This section is only for a fresh installation. If you are upgrading an existing Metacat, please skip this section and go to the next one - Compilation and Upgrading Existing Metacat
Run Ant BuildAnt allows compilation and installation to be done in one step. Change into the metacat directory and type: ant install You should see a bunch of messages telling you the progress of compilation and installation. When it is done you should see the message BUILD SUCCESSFUL and you should be returned to a UNIX command prompt. If you do not see the message BUILD SUCCESSFUL then there was an error that you need to resolve. This may come up if you are logged in as a user that does not have write access to one or more of the directories that are listed in the build.xml file, or if any of the paths to files are not configured correctly in the "config" target. Note: The 'data' directories that are indicated in the 'datafilepath' and 'inlinedatafilepath' build properties must be writable by user account under which Tomcat runs or you will not be able to upload data files to the system. To install metacat LSID support, adjust the LSID-related properties in the build.properties files and type: ant deploy-lsid
SQL ScriptsYou now need to set up the table structure in your database. You can do this either using the ant build system, or by manually running the scripts using a sql utility. WARNING: Do NOT run this on an existing metacat installation as it will delete all of your data. If you have an existing metacat installation, see the instructions for "Compilation and Upgrading Existing Metacat" below. To run the scripts using ant, type ant installdb To run the scripts manually, change to the metacat/build/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: @xmltables.sql;For postgres, use a command like: psql -U metacat -W -h localhost -f build/src/xmltables-postgres.sql metacat
Either way, 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. The script file name for PostgreSQL is xmltables-postgres.sql and for Microsoft SQL server is xmltables-sqlserver.sql. If the script has run correctly you should be able to type describe xml_documentsand it should show: 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) Register schemas and DTDsOnce the tables have been created, you should also register the Ecological Metadata Language (EML) DTDs and schemas. However, note that you should NOT do this if you are upgrading an existing installation -- the upgrade scripts take care of it for you (see the next section). If you are installing new, you can register the schema documents by running: ant register-schemas This command registers the EML DTDs' and schemas' location in the metacat server. Your database username and password have to be set correctly for this to work. Also, if for some reason running this script from ant does not work, you could instead try running "build/src/loaddtdschema.sql" from your sql utility (but be sure to use the version in the 'build' directory that has been customized for your installation). Restart TomcatOnce you have successfully installed Metacat, there is one more step. Tomcat (and Apache if you have Tomcat integrated with it) must be restarted. To do this, login as the user that runs your tomcat server (often "tomcat"), go to $CATALINA_HOME/bin and type: ./shutdown.sh ./startup.shIn the Tomcat startup messages you should see something in the log file like: Metacat: [WARN]: Metacat (1.8.1) initialized. [edu.ucsb.nceas.metacat.MetaCatServlet]If you see that message Tomcat is successfully loading the Metacat servlet. Next, try to run your new servlet. Go to a web browser and type: http://yourserver.yourdomain.com/yourcontext/You should substitute your context name for "yourcontext" in the url above. If everything is working correctly, you should see a query page followed by an empty result set. Note that if you do not have Tomcat integrated with Apache you will probably have to type http://yourserver.yourdomain.com:8080/yourcontext/ Troubleshooting: If you see something like java.lang.InternalError: Can't connect to X11 window server using 'yourservanme:0.0' as the value of the DISPLAY variable. You should add this line: JAVA_OPTS="-Djava.awt.headless=true $JAVA_OPTS" at the first line of catalina.sh file in tomcat bin directory. The reason is that GeoServer uses X11 windows to draw graphics. Deploy wsdl file (Only for EarthGrid-enabled Metacat installation)Once Tomcat is running successfully, there is another step for EarthGrid-enabled Metacat installation. In metacat directory, type: ant deploy-ecogridIt will generate wsdl files for EarthGrid services. |
Web-based Registry for Metacat |
The registry allows users to upload simple metadata documents directly from the web. See the separate Registry Installation Guide. |