Project

General

Profile

« Previous | Next » 

Revision 3593

Added by Jing Tao over 16 years ago

Seperate the instructions of install and update.

View differences:

metacatinstall.html
54 54
</table>
55 55

  
56 56
<table class="tabledefault" width="100%">
57
<td class="tablehead" colspan="2"><p class="emphasis">The Table of Contents</p></td>
57
<td class="tablehead" colspan="2"><p><a name="The Table of Contents">The Table of Contents</p></td>
58 58
<tr>
59 59
<td>
60 60
  <ul>
......
73 73
      <li>
74 74
         <a HREF="metacatinstall.html#Compilation and Installation">Compilation and Installation</a>
75 75
      </li>
76
        <li>
77
         <a HREF="metacatinstall.html#Upgrade">Compilation and Upgrading Existing Metacat</a>
78
      </li>
76 79
      
77 80
  </ul>
78 81
</td>
79 82

  
80 83
<table class="tabledefault" width="100%">
81
<td class="tablehead" colspan="2"><p class="emphasis"><a name="Operating System Specific Instructions">Operating System Specific Instructions</p></td>
84
<td class="tablehead" colspan="2"><p><a name="Operating System Specific Instructions">Operating System Specific Instructions</p></td>
82 85
<tr>
83 86
<td>
84 87
  <p class="emphasis">
......
737 740
<tr>
738 741
<td>
739 742
  <a name="protocol"></a>
743
  <p>This section is only for a fresh installation. If you are upgrading an existing Metacat, please skip
744
  this section and go to the next one -  <a HREF="metacatinstall.html#Upgrade">Compilation and Upgrading Existing Metacat</a>
745
  <p>    
746
  <h2>Run Ant Build</h2></p>
740 747
  <p>
741 748
   Ant allows compilation and installation to be done in one step.
742 749
   Change into the metacat directory and type: 
743 750
   <pre><b>ant install</b></pre>
744
   or, if you are upgrading an existing installation, type:
745
   <pre><b>ant clean upgrade</b></pre>
746 751
   <p>
747 752
   You should see a bunch of messages telling you the progress of compilation
748 753
   and installation.  When it is done you should see the message 
......
757 762
  </p>
758 763
  <p>
759 764
  Note: The 'data' directories that are indicated in the 'datafilepath' and
760
  'inlinedatafilepath' build properties must be writeable
765
  'inlinedatafilepath' build properties must be writable
761 766
  by user account under which Tomcat runs or you will not be able to upload 
762 767
  data files to the system.
763 768
  </p>
......
765 770
  <p class="header">To install metacat LSID support, adjust the LSID-related
766 771
    properties in the build.properties files and type:
767 772
  <p class="header"><b>ant deploy-lsid</b>
768
  <p class="header">    
773
  <p>    
769 774
  <h2>SQL Scripts</h2></p>
770 775
  <p>
771
   You now need to set up the table structure in your database.  You can do
772
   either do this using the ant build system, or by manually running the
776
   You now need to set up the table structure in your database.  You can 
777
   do this either using the ant build system, or by manually running the
773 778
   scripts using a sql utility.
774 779
  </p>
775 780
  <p><b>WARNING: Do NOT run this on an existing metacat installation as it
776 781
  will delete all of your data.  If you have an existing metacat installation,
777
  see the instructions for "Upgrading" below.</b></p>
782
  see the instructions for <a HREF="metacatinstall.html#Upgrade">"Compilation and Upgrading Existing Metacat"</a> below.</b></p>
778 783

  
779
  <p>To run the scripts using ant, type <code>ant installdb</code>.  This does 
780
  not work for postgres, so you'll need to run the xmltables-postgres.sql script 
781
  manually (see next paragraph).
784
  <p>To run the scripts using ant, type
785
   <pre><b>ant installdb</b></pre> 
782 786
  </p>
783 787
  <p>To run the scripts manually, change to the
784 788
   metacat/build/src directory.  Then run you RDBMS's SQL utility.  In Oracle it is
......
818 822
     UPDATED                      NUMBER(1)
819 823
   </pre>
820 824
  </p>
821
  <p class="header"><h2>Registering schemas and DTDs</h2></p>
825
  <p><h2>Register schemas and DTDs</h2></p>
822 826
  <p>Once the tables have been created, you should also register the Ecological
823 827
  Metadata Language (EML) DTDs and schemas. <b>However, note that you should 
824 828
  NOT do this if you are upgrading an existing installation -- the upgrade
......
832 836
  from your sql utility (but be sure to use the version in the 'build' directory
833 837
  that has been customized for your installation).
834 838
  </p>
835
  <p class="header"><h2>Upgrading SQL Scripts</h2></p>
839
  <h2>Restart Tomcat</h2>
836 840
  <p>
841
   Once you have successfully installed Metacat, there is one more step.  Tomcat
842
   (and Apache if you have Tomcat integrated with it) must be restarted.  To do
843
   this, login as the user that runs your tomcat server (often "tomcat"),
844
   go to $CATALINA_HOME/bin and type:
845
   <pre>
846
   <b>
847
   ./shutdown.sh 
848
   ./startup.sh
849
   </b> 
850
   </pre>
851
   In the Tomcat startup messages you should see something in the log file like:
852
   <pre>
853
	Metacat: [WARN]: Metacat (1.7.1) initialized. [edu.ucsb.nceas.metacat.MetaCatServlet]
854
   </pre>
855
   If you see that message Tomcat is successfully loading the Metacat servlet.
856
   Next, try to run your new servlet.  Go to a web browser and type:
857
   <pre>http://yourserver.yourdomain.com/yourcontext/</pre>
858
   You should substitute your context name for "yourcontext" in the url above.
859
   If everything is working correctly, you should see a query page followed
860
   by an empty result set.  Note that if you do not have Tomcat integrated with
861
   Apache you will probably have to type
862
   <pre>http://yourserver.yourdomain.com:8080/yourcontext/</pre>
863
  </p>
864
  <p><b>Troubleshooting</b>: If you see something like java.lang.InternalError: 
865
  Can't connect to X11 window server using 'yourservanme:0.0' as the value of the DISPLAY variable.
866
  <p>You should add this line: 
867
  <b>JAVA_OPTS="-Djava.awt.headless=true $JAVA_OPTS"</b> at the first line of
868
  catalina.sh file in tomcat bin directory. The reason is that GeoServer uses X11 windows to draw graphics.
869
  </p>
870
  
871
  <h2>Deploy wsdl file (Only for EarthGrid-enabled Metacat installation) </h2>
872
  <p>
873
   Once Tomcat is running successfully, there is another step for EarthGrid-enabled Metacat installation. 
874
   In metacat directory, type:
875
   <pre><b>ant deploy-ecogrid</b></pre> 
876
   It will generate wsdl files for EarthGrid services.
877
   </p>
878

  
879
</td>
880
</tr>
881
</table>
882

  
883
<table class="tabledefault" width="100%">
884
<td class="tablehead" colspan="2"><p><a name="Upgrade"><h2>Compilation and Upgrading Existing Metacat</h2></p></td>
885
<tr>
886
<td>
887
  <a name="protocol"></a>
888
  <p>The following instructions are for upgrading an existing Metacat.
889
  <p><h2>Stop the running Metacat</h2>
890
   <P>To do this, login as the user that runs your tomcat server (often "tomcat"),
891
   go to $CATALINA_HOME/bin and type:
892
   <pre><b>./shutdown.sh</b> </pre>
893
  <p>    
894
  <h2>Run Ant Build</h2></p>
895
  <p>
896
   Ant allows compilation and upgrading to be done in one step.
897
   Change into the metacat directory and type: 
898
   <pre><b>ant clean upgrade</b></pre>
899
   <p>
900
   You should see a bunch of messages telling you the progress of compilation
901
   and installation.  When it is done you should see the message 
902
   BUILD SUCCESSFUL
903
   and you should be returned to a UNIX command prompt.  If you do not see
904
   the message BUILD SUCCESSFUL then there was an error that you need to 
905
   resolve.
906
   This may come up if you are logged in as a user that does not have write
907
   access to one or more of the directories that are listed in the build.xml
908
   file, or if any of the paths to files are not configured correctly in the
909
   "config" target.
910
  </p>
911
  <p>
912
  Note: The 'data' directories that are indicated in the 'datafilepath' and
913
  'inlinedatafilepath' build properties must be writable
914
  by user account under which Tomcat runs or you will not be able to upload 
915
  data files to the system.
916
  </p>
917

  
918
  <p class="header">To install metacat LSID support, adjust the LSID-related
919
    properties in the build.properties files and type:
920
  <p class="header"><b>ant deploy-lsid</b>
921
 
922
  <p><h2>Upgrade SQL Scripts</h2></p>
923
  <p>
837 924
    If you have an existing metacat installation, you should not run the install
838 925
    script because it will replace all of the older tables with new, empty 
839 926
    copies of the tables.  Thus you would lose your data!  Instead, you can 
......
867 954
   this, login as the user that runs your tomcat server (often "tomcat"),
868 955
   go to $CATALINA_HOME/bin and type:
869 956
   <pre>
870
   ./shutdown.sh 
871
   ./startup.sh 
957
   <b>
958
   ./startup.sh
959
   </b> 
872 960
   </pre>
873 961
   In the Tomcat startup messages you should see something in the log file like:
874 962
   <pre>
875
	Metacat: [WARN]: Metacat (1.7.0) initialized. [edu.ucsb.nceas.metacat.MetaCatServlet]
963
	Metacat: [WARN]: Metacat (1.7.1) initialized. [edu.ucsb.nceas.metacat.MetaCatServlet]
876 964
   </pre>
877 965
   If you see that message Tomcat is successfully loading the Metacat servlet.
878 966
   Next, try to run your new servlet.  Go to a web browser and type:

Also available in: Unified diff