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 are the installation instructions for a system that has Ubuntu 8.04 installed and has never had Metacat installed on it:
Browse to the KNB Software Download Page. In the Metacat section, select the link that looks like:
where X.X.X is the latest version of Metacat. Choose to save the file locally.
Extract the Metacat package files by typing:
You should see a war file and several supporting files. The location where these files were extracted will be refered to as the the <metacat_package_dir> for the remainder of this documentation.
Create the metacat utility base directory by typing:
where <tomcat_user> is the user that will start Tomcat. If you are starting Tomcat as the root user, you do not need to run the chown command.
Install Java by typing:
hit "ok" then "yes" for license agreement
Install Apache and and Mod JK packages by typing:
Set up Mod JK apache configuration by typing:
Enable Apache Mod JK by typing:
Set up and enable knb (Metacat) site configurations by typing:
If you want to run an LSID server along with the Metacat server, set up and enable the authority service site configurations by typing:
Restart apache to bring in changes by typing:
Install Tomcat 5.5 by typing:
Install Metacat friendly Tomcat startup script by typing:
Install PostgreSQL by typing:
Change to postgres user:
Setup empty Metacat database instance editing the postgreSQL configuration file:
and adding the following line:
Save the file, then create the metacat instance:
Log into postgreSQL by typing:
and create the metacat user by typing at the psql prompt:
where your_password is whatever password you would like for the metacat user.
Exit PostgreSQL by typing
Restart the PostgreSQL database to bring in changes:
Log out of the postgres user account by typing:
Test the installation and metacat account by typing:
Log back out of postgreSQL:
Copy the war file to Tomcat:
Restart Tomcat:
If you want to run an LSID server along with the Metacat server, copy the authority.war file to Tomcat:
Restart Tomcat:
Refer to the documentation on Metacat Confguration to complete your installation of Metacat.
These are the instructions for a system that already has Metacat installed on it, but needs a Metacat upgrade:
Browse to the KNB Software Download Page. In the Metacat section, select the link that looks like:
where X.X.X is the latest version of Metacat. Choose to save the file locally.
Extract the Metacat package files by typing:
You should see a war file and several supporting files. The location where these files were extracted will be refered to as the the <metacat_package_dir> for the remainder of this documentation.
To be safe, it is best to backup the existing Metacat installation. Do so by typing:
Of course, you can use any backup strategy you like (or none at all).
Copy the war file to Tomcat:
Restart Tomcat:
If you want to run an LSID server along with the Metacat server, copy the authority.war file to Tomcat:
Restart Tomcat:
Refer to the documentation on Metacat Confguration to complete your installation of Metacat.
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.
See the Windows XP installation instructions.
See the Ubuntu 8.04 installation instructions.
See the Mac OS X installation instructions.
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.
The server on which you wish to install Metacat must have the following software installed and running correctly before attempting to install Metacat.
Note: For a more robust web serving environment, Apache web server should be installed along with Tomcat and the two should be integrated as described on the Apache web site.
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.
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:
Your 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.
PostgreSQL can be easily installed on most linux distributions and on Windows (using cygwin) and Mac OS X. Using Fedora Core or RedHat Linux, you can install the rpms for postgres and then run
in order to start the database.
On Ubuntu and other Debian-based Linux distributions, you can use the apt-get command
to install postgres: sudo apt-get install postgresql-8.0
and
then run /etc/init.d/postgresql-8.0 start
to start.
This initializes the data files. You need to do a bit of configuration
to create a database and set up a user account and allow internet access
via jdbc. See the postgres documentation for this, but here is a quick
start:
host metacat metacat 127.0.0.1 255.255.255.255 password
host metacat metacat ::1 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff password
tcpip_socket = true
createdb metacat
to create a new databasepsql metacat
to log in using the postgres account and create a new "metacat" user account
CREATE USER metacat WITH UNENCRYPTED PASSWORD 'apasswordyoulike';
/etc/init.d/postgresql restart
psql -U metacat -W -h localhost metacat
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.
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.
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 - Upgrading Existing Metacat
Browse to the KNB Software Download Page. In the Metacat section, select the link that looks like:
where X.X.X is the latest version of Metacat. Choose to save the file locally.
Extract the Metacat package files by typing:
You should see a war file and several supporting files. The location where these files were extracted will be refered to as the the <metacat_package_dir> for the remainder of this documentation.
Copy the war file to Tomcat:
Restart Tomcat:
Once 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:
In the Tomcat startup messages you should see something in the log file like:
If you see that message Tomcat has successfully loaded the Metacat servlet. Next, try to run your new servlet. Go to a web browser and type:
You should substitute your context name for "yourcontext" in the url above. If everything is working correctly, you should see a Metacat configuration screen. Note that if you do not have Tomcat integrated with Apache you will probably have to type:
If you see something like:
You should add this line:
at the first line of the catalina.sh file in tomcat bin directory. The reason is that GeoServer uses X11 windows to draw graphics.
Once you see the Metacat configuration screen, you can follow the instructions in the Configuring Metacat Section to complete the internal configuration of Metacat.
The following instructions are for upgrading an existing Metacat.
To do this, login as the user that runs your tomcat server (often "tomcat"), go to $CATALINA_HOME/bin and type:
Browse to the KNB Software Download Page. In the Metacat section, select the link that looks like:
where X.X.X is the latest version of Metacat. Choose to save the file locally.
Extract the Metacat package files by typing:
You should see a war file and several supporting files. The location where these files were extracted will be refered to as the the <metacat_package_dir> for the remainder of this documentation.
Copy the war file to Tomcat:
Remove (or rename) the existing application directory:
or
Restart Tomcat:
Once 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:
In the Tomcat startup messages you should see something in the log file like:
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
If you see something like:
You should add this line:
at the first line of the catalina.sh file in the tomcat bin directory. The reason is that GeoServer uses X11 windows to draw graphics.
Once you see the Metacat configuration screen, you can follow the instructions in the Configuring Metacat Section to complete the internal configuration of Metacat.
The registry allows users to upload simple metadata documents directly from the web. See the separate Registry Installation Guide.