1
|
Configuring Metacat
|
2
|
===================
|
3
|
|
4
|
.. contents::
|
5
|
|
6
|
When Metacat (Tomcat) is started, the Metacat servlet checks to see if it is
|
7
|
configured. If not, Metacat will automatically send you to the configuration
|
8
|
pages.
|
9
|
|
10
|
If the installation is new, or the previous version is before 1.9.0, pay close
|
11
|
attention to the configuration values. If you have upgraded Metacat, and the
|
12
|
previous version is 1.9.0 or later, Metacat will pull existing configuration
|
13
|
settings from a backup location. You should still verify that the values are
|
14
|
correct.
|
15
|
|
16
|
To access your Metacat, open a Web browser and type::
|
17
|
|
18
|
http://<your_context_url>
|
19
|
|
20
|
Where <your_context_url> is the URL of the server hosting the Metacat followed
|
21
|
by the name of the WAR file (i.e., the application context) that you installed.
|
22
|
For instance, the context URL for the KNB Metacat is: http://knb.ecoinformatics.org/knb
|
23
|
|
24
|
You can always open the configuration screen from within Metacat by typing::
|
25
|
|
26
|
http://<your_context_url>/admin
|
27
|
|
28
|
Initial Configuration
|
29
|
---------------------
|
30
|
Before you can log in to the Metacat and configure it, you are required to
|
31
|
confirm Metacat's back-up location and authentication configuration (if not
|
32
|
already configured). Metacat will automatically attempt to locate an existing
|
33
|
back-up directory, but you may need to correct the value or specify a directory
|
34
|
(if the installation is new, or if Metacat was unable to determine the location
|
35
|
of an existing back-up directory). The authentication configuration is required
|
36
|
for logging in to the Metacat and for defining administrative accounts.
|
37
|
Instructions for changing the authentication configuration without
|
38
|
authentication are included at the end of this section.
|
39
|
|
40
|
Back-up Configuration
|
41
|
~~~~~~~~~~~~~~~~~~~~~
|
42
|
To preserve its configuration settings, Metacat backs up all configurations to
|
43
|
a directory outside the application directories. Because a new installation/upgrade
|
44
|
does not know where this external directory is, Metacat uses a discovery
|
45
|
algorithm to locate it. If Metacat cannot identify a backup directory, you will
|
46
|
see the Backup Directory Configuration screen.
|
47
|
|
48
|
.. figure:: images/screenshots/image011.png
|
49
|
:align: center
|
50
|
|
51
|
Configuring the Backup Directory.
|
52
|
|
53
|
Authentication Configuration
|
54
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
55
|
Whether you are installing or upgrading the Metacat servlet, you will
|
56
|
automatically be sent to the Authentication Configuration page. You can also
|
57
|
reach the Authentication Configuration page from a running Metacat by typing::
|
58
|
|
59
|
http://<your_context_url>/admin
|
60
|
|
61
|
Metacat uses LDAP as its primary authentication mechanism, but you can define
|
62
|
your own authentication mechanism by creating a Java class that implements
|
63
|
``AuthInterface``. Required configuration values are: Authentication Class,
|
64
|
Authentication URL, Authentication Secure URL, and Metacat Administrators.
|
65
|
Make sure that your user account information is entered into the Metacat
|
66
|
Administrators field (e.g., uid=daigle,o=nceas,dc=ecoinformatics,dc=org). You
|
67
|
will not be allowed to continue with configuration if this is missing.
|
68
|
|
69
|
NOTE: To create an LDAP account on the KNB LDAP server (specified as the
|
70
|
default LDAP server), go to http://knb.ecoinformatics.org and select the
|
71
|
"create a new user account" link.
|
72
|
|
73
|
If you make changes to the authentication settings, you must restart Tomcat to
|
74
|
put them into effect.
|
75
|
|
76
|
.. figure:: images/screenshots/image009.png
|
77
|
:align: center
|
78
|
|
79
|
Configuring Authentication Values.
|
80
|
|
81
|
Changing Authentication Configuration without Authentication
|
82
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
83
|
If you need to change or add authentication information and cannot authenticate
|
84
|
using the existing authentication settings (e.g., the existing Metacat
|
85
|
administrator is no longer available or you forgot the administrator password),
|
86
|
you must edit the Metacat configuration file by hand. This ensures that only a
|
87
|
person who has access to the Metacat server and the configuration files on that
|
88
|
server will be able to change the administrator accounts.
|
89
|
|
90
|
To edit the authentication configuration file:
|
91
|
|
92
|
1. Stop Tomcat and edit the Metacat properties (``metacat.properties``) file in the
|
93
|
Metacat context directory inside the Tomcat application directory. The
|
94
|
Metacat context directory is the name of the application (usually knb):
|
95
|
|
96
|
::
|
97
|
|
98
|
<tomcat_app_dir>/<context_dir>/WEB-INF/metacat.properties
|
99
|
|
100
|
2. Change the following properties appropriately:
|
101
|
|
102
|
::
|
103
|
|
104
|
auth.administrators - a colon separated list of administrators
|
105
|
auth.url - the authentication server URL
|
106
|
auth.surl - the authentication secure server URL
|
107
|
|
108
|
3. Save the ``metacat.properties`` file and start Tomcat.
|
109
|
|
110
|
|
111
|
Logging in to Metacat
|
112
|
---------------------
|
113
|
In order to configure Metacat, you must log in with an administrative account
|
114
|
that has been configured in the Authentication Configuration settings. If you
|
115
|
did not set up the correct administrative user there, you must change the
|
116
|
authentication configuration by hand before you can log in.
|
117
|
|
118
|
In the log-in screen enter your user name and password and click
|
119
|
the "Login" button.
|
120
|
|
121
|
.. figure:: images/screenshots/image015.png
|
122
|
:align: center
|
123
|
|
124
|
Logging into Metacat.
|
125
|
|
126
|
Required Configuration
|
127
|
----------------------
|
128
|
All required Metacat settings can be accessed from the Metacat Configuration
|
129
|
utility, which becomes available after the initial configurations
|
130
|
have been specified and an authorized administrator logs in.
|
131
|
|
132
|
.. figure:: images/screenshots/image017.png
|
133
|
:align: center
|
134
|
|
135
|
Metacat configuration menu, showing each configuration section. Once all
|
136
|
sections are marked as green ``configured``, metacat can be accessed.
|
137
|
|
138
|
The configuration settings are grouped into five sections (Metacat Global
|
139
|
Properties, Authentication Configuraion, Skins Specific Properties, Database
|
140
|
Installation/Upgrade, Geoserver Configuration), each of which is listed with its
|
141
|
current status (see table).
|
142
|
|
143
|
============== =============================================================
|
144
|
Status Description
|
145
|
============== =============================================================
|
146
|
[unconfigured] The section has yet to be configured
|
147
|
[configured] The section has been configured.
|
148
|
[bypassed] Used only for the Geoserver configurations. The administrator
|
149
|
can choose not to configure the Geoserver user/password.
|
150
|
============== =============================================================
|
151
|
|
152
|
To the right of each configuration section is one of the following options:
|
153
|
Configure Now, Reconfigure Now, Configure Global Properties First, or
|
154
|
Version:X.X.X. If the option is linked (e.g., Configure Now or Reconfigure Now),
|
155
|
you can select the link to open the associated configuration settings and add
|
156
|
or edit them, respectively. If the option is not linked (e.g., Configure Global
|
157
|
Properties First), the settings cannot be specified until the global properties
|
158
|
are set. Once the global properties are configured, the option to configure this
|
159
|
section becomes available. The Version:X.X.X option is used only for the
|
160
|
Database Installation/Upgrade section. If the database schema version detected
|
161
|
by Metacat matches the application version (eg, 1.9.0), then no further database
|
162
|
configuration is required.
|
163
|
|
164
|
All settings must be in a configured or bypassed state in order to run Metacat.
|
165
|
For new installations or upgrades, click the "go to metacat" link that appears
|
166
|
after configuration is complete to go directly to Metacat. Note that Metacat
|
167
|
indexes at start-up time, so the initial start-up may take some time depending
|
168
|
on the amount of data in your database. If you are reconfiguring a running
|
169
|
version of Metacat, you must restart the Tomcat server for the changes to
|
170
|
take effect.
|
171
|
|
172
|
.. Note::
|
173
|
|
174
|
Need to update this next figure!
|
175
|
|
176
|
.. figure:: images/screenshots/image019.png
|
177
|
:align: center
|
178
|
|
179
|
The Metacat settings as they appear after having been configured.
|
180
|
|
181
|
Global Properties (server, ports, etc)
|
182
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
183
|
The Metacat configurations included under Global Properties represent the bulk
|
184
|
of the settings required to run Metacat. Click a blue question-mark
|
185
|
icon beside any setting for detailed instructions. More information about each
|
186
|
property is also included in the :doc:`metacat-properties`.
|
187
|
|
188
|
.. figure:: images/screenshots/image021.png
|
189
|
:align: center
|
190
|
|
191
|
The Metacat Global Properties editing screen.
|
192
|
|
193
|
When you save global properties, Metacat also saves a back-up file that is
|
194
|
located in ``/var/metacat/.metacat`` (on Linux) or
|
195
|
``C:\Program Files\metacat\.metacat`` (on Windows). When you update Metacat,
|
196
|
the system automatically locates the back-up file so you do not have to re-enter
|
197
|
the configuration settings.
|
198
|
|
199
|
The first time you install Metacat, the system attempts to automatically detect
|
200
|
the values for a number of settings (see table). It is important to ensure that
|
201
|
these values are correct.
|
202
|
|
203
|
================ ============================================================
|
204
|
Property Description
|
205
|
================ ============================================================
|
206
|
Metacat Context The name of the deployed Metacat WAR file (minus the .war
|
207
|
extension). E.g., "knb"
|
208
|
Server Name The DNS name of the server hosting Metacat, not including
|
209
|
port numbers or the "http://" header.
|
210
|
HTTP Port The non-secure port where Metacat will be available.
|
211
|
HTTP SSL Port The secure port where Metacat will be available.
|
212
|
Deploy Location The directory where the application is deployed.
|
213
|
================ ============================================================
|
214
|
|
215
|
Authentication Configuration
|
216
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
217
|
Because you must specify the Authentication settings before you can access the
|
218
|
main configuration page, the settings will always be configured when you view
|
219
|
them in the admin interface. If you wish to change the authentication settings,
|
220
|
you must restart Metacat to put the changes into effect. For more information
|
221
|
about the Authentication configurations, please see Initial Configurations.
|
222
|
|
223
|
Skins Configuration
|
224
|
~~~~~~~~~~~~~~~~~~~
|
225
|
Customizing the look and feel of Metacat's Web interface is done via skins,
|
226
|
which are applied in the Skins Configuration section. If you have installed
|
227
|
the optional Registry, which provides a Web interface for creating, editing,
|
228
|
and submitting content to the Metacat, you can also choose which form fields
|
229
|
appear in that interface and which are required. Note that if you do not have
|
230
|
a custom skin AND you are not using the Registry, you can simply save the
|
231
|
default configuration.
|
232
|
|
233
|
If your Metacat has a customized skin, it will appear as a choice in the
|
234
|
Skins Configuration settings (Figure 3.7). You can creat your own skins as
|
235
|
well. For more information about creating skins, please see the section called
|
236
|
Creating a Custom Skin.
|
237
|
|
238
|
.. figure:: images/screenshots/image023.png
|
239
|
:align: center
|
240
|
|
241
|
Configuring Metacat skins.
|
242
|
|
243
|
Select the checkbox next to your customized skin and click the
|
244
|
``Make <skin_name> default`` radio button. If you do not have a custom skin,
|
245
|
select the ``default`` skin. Once you have selected a skin, Metacat will open
|
246
|
a list of options that apply to the Registry interface.
|
247
|
|
248
|
.. figure:: images/screenshots/image025.png
|
249
|
:align: center
|
250
|
|
251
|
Configuring Metacat skins.
|
252
|
|
253
|
Select the lists and modules that you would like to appear in the Registry
|
254
|
form-interface by checking the box beside each. When you save the configuration,
|
255
|
the customized interface will appear to site visitors.
|
256
|
|
257
|
Database Configuration
|
258
|
~~~~~~~~~~~~~~~~~~~~~~
|
259
|
Because the Database Configuration is dependent on values specified in the
|
260
|
Global Configuration section, the link to these settings does not become active
|
261
|
until after the global settings have been saved. Once the global settings have
|
262
|
been saved, Metacat automatically detects the database schema version and
|
263
|
upgrades it if necessary (and with your permission).
|
264
|
|
265
|
* New Installation
|
266
|
* Upgrade
|
267
|
|
268
|
New Installation
|
269
|
................
|
270
|
If Metacat determines that your database is new, the Database Install/Upgrade
|
271
|
utility lists the SQL scripts that will run in order to create a database
|
272
|
schema for the new version of Metacat.
|
273
|
|
274
|
.. figure:: images/screenshots/image027.png
|
275
|
:align: center
|
276
|
|
277
|
Database installation creates tables needed for Metacat.
|
278
|
|
279
|
If the database is not new, or if you have any questions about whether it is
|
280
|
new or not, choose Cancel and contact support at knb-help@nceas.ucsb.edu.
|
281
|
|
282
|
When you choose Continue, Metacat runs the listed scripts and creates the
|
283
|
database schema.
|
284
|
|
285
|
Upgrade
|
286
|
.......
|
287
|
If Metacat identifies a previous database schema, the Database Install/Upgrade
|
288
|
utility notes the existing version and lists the SQL scripts that will run in
|
289
|
order to update the schema for the new version of Metacat.
|
290
|
|
291
|
If the detected schema version is incorrect, or if you have any questions about
|
292
|
whether it is correct or not, click the Cancel button and contact support at
|
293
|
knb-help@nceas.ucsb.edu.When you choose to continue, Metacat runs the listed
|
294
|
scripts and updates the database schema.
|
295
|
|
296
|
.. figure:: images/screenshots/image029.png
|
297
|
:align: center
|
298
|
|
299
|
Upgrading an existing database.
|
300
|
|
301
|
Geoserver Configuration (Highly Recommended)
|
302
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
303
|
.. sidebar:: Manual Geoserver Update
|
304
|
|
305
|
Alternatively, you can change the Geoserver username and password manually by
|
306
|
directly logging in to the Geoserver. To configure the credentials manually:
|
307
|
|
308
|
1. Go to the Geoserver admin page: http://<your_context_url>/geoserver/
|
309
|
2. Log in using the default username and password ( admin / geoserver )
|
310
|
3. Navigate to the Password Change Page. Enter a new user and password and click Submit.
|
311
|
4. Click Apply then Save to save your new password.
|
312
|
|
313
|
Metacat comes bundled with a Web Mapping Service called Geoserver, which
|
314
|
converts spatial data into Web-deliverable map images. Geoserver installs with
|
315
|
a default administrative username and password. *We highly recommend that you
|
316
|
change the default credentials so that only local administrators can make
|
317
|
changes to your Geoserver.* For more information about Geoserver,
|
318
|
see :doc:`geoserver`.
|
319
|
|
320
|
When you choose the Geoserver Configuration link from the main configuration
|
321
|
screen, Metacat will prompt you for a few important details about your Geoserver
|
322
|
installation. The data directory and context settings allow Geoserver and
|
323
|
Metacat to share the same spatial data store and render maps within Metacat skins.
|
324
|
The security configuration prompts for a new admin password. After you enter
|
325
|
the new settings, Metacat writes the information to the Geoserver deployment.
|
326
|
|
327
|
The default settings are typically appropriate for most Metacat deployments,
|
328
|
but if you wish to skip the Geoserver configuration, click the Bypass button.
|
329
|
Geoserver (if deployed) will remain with a default configuration and the main
|
330
|
Metacat configuration screen will display the "bypassed" status beside the
|
331
|
Geoserver settings. You will be able to run Metacat, but maps will not be
|
332
|
rendered.
|
333
|
|
334
|
.. figure:: images/screenshots/image031.png
|
335
|
:align: center
|
336
|
|
337
|
Configuring Geoserver.
|
338
|
|
339
|
DataONE Configuration
|
340
|
~~~~~~~~~~~~~~~~~~~~~
|
341
|
Metacat can be configured to operate as a Member Node within the DataONE
|
342
|
federation of data repositories. See :doc:`dataone` for background and details
|
343
|
on DataONE and details about configuring Metacat to act as a DataONE Member Node.
|
344
|
|
345
|
Replication Configuration
|
346
|
~~~~~~~~~~~~~~~~~~~~~~~~~
|
347
|
Metacat can be configured to replicate its metadata and/or data content to another
|
348
|
Metacat instance for backup and redundancy purposes, as well as to share data across
|
349
|
sites. This feature has been used to create the Knowledge Network for Biocomplexity
|
350
|
(KNB), as well as other networks. See :doc:`replication` for details on
|
351
|
the replication system and how to configure Metacat to replicate with another node.
|
352
|
|
353
|
.. Note::
|
354
|
|
355
|
Note that much of the functionality provided by the replication subsystem in Metacat
|
356
|
has now been generalized and standardized by DataONE, so consider utilizing the
|
357
|
DataONE services for replication as it is a more general and standardized approach
|
358
|
than this Metacat-specific replication system. The Metacat replication system
|
359
|
will be supported for a while longer, but will likely be deprecated in a future
|
360
|
release in favor of using the DataONE replication approach.
|
361
|
|
362
|
Additional Configuration
|
363
|
------------------------
|
364
|
The most dynamic Metacat properties are managed and modified with the
|
365
|
form-based Metacat Configuration utility. These configuration properties can
|
366
|
also be accessed directly (along with additional static properties) via
|
367
|
Metacat's property files: ``metacat.properties`` (which contains global
|
368
|
properties, e.g., authorization and database values) and
|
369
|
``<SKIN_NAME>.properties`` (which contains skin-specific properties). Each of
|
370
|
these property files is discussed in more depth in this section.
|
371
|
|
372
|
The ``metacat.properties`` file
|
373
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
374
|
Metacat's ``metacat.properties`` file contains all of Metacat's global
|
375
|
properties, both the dynamic properties, which are managed with the
|
376
|
Configuration utility, as well as the more static properties, which can only
|
377
|
be modified manually in this file. The ``metacat.properties`` file also contains
|
378
|
optional properties that are only relevant when optional Metacat features
|
379
|
(such as the harvester or replication) are enabled. The `
|
380
|
`metacat.properties file`` is found here::
|
381
|
|
382
|
<CONTEXT_DIR>/WEB_INF/metacat.properties
|
383
|
|
384
|
Where ``<CONTEXT_DIR>`` is the directory in which the Metacat application code
|
385
|
lives (e.g., ``/var/lib/tomcat6/webapps/knb``). The path is a combination
|
386
|
of the Web application directory (e.g., ``/var/lib/tomcat6/webapps/``) and
|
387
|
the Metacat context directory (e.g., ``knb``). Both values depend upon how your
|
388
|
system was set up during installation.
|
389
|
|
390
|
For information about each property and default or example settings, please
|
391
|
see the :doc:`metacat-properties`. Properties that can only be edited manually
|
392
|
in the metacat.properties file are highlighted in the appendix.
|
393
|
|
394
|
<SKIN_NAME>.properties
|
395
|
~~~~~~~~~~~~~~~~~~~~~~
|
396
|
The ``<SKIN_NAME>.properties`` file contains skin-specific properties
|
397
|
(e.g., template information). For each skin, the skin-specific properties are
|
398
|
found here::
|
399
|
|
400
|
<CONTEXT_DIR>/style/skins/<SKIN_NAME>/<SKIN_NAME>.properties
|
401
|
|
402
|
Where ``<CONTEXT_DIR>`` is the directory in which the Metacat application code
|
403
|
lives (described above) and ``<SKIN_NAME>`` is the name of the skin
|
404
|
(e.g., ``default`` or ``nceas``).
|
405
|
|
406
|
Creating a custom skin
|
407
|
~~~~~~~~~~~~~~~~~~~~~~
|
408
|
Skins are used in Metacat to customize the appearance of the search and display
|
409
|
web interface that is presented by Metacat. Skins can be used to make a Metacat
|
410
|
instance exactly integrate into an existing web site, and are fully customizable.
|
411
|
|
412
|
To create and customize your own Metacat skin, you must first create a skin
|
413
|
directory. This is most easily accomplished by copying one of the existing skin
|
414
|
directories. Step-by-step directions for creating and installing a custom skin
|
415
|
are included below:
|
416
|
|
417
|
1. Copy an exisiting skin directory. We recommend using the "default" directory.
|
418
|
|
419
|
::
|
420
|
|
421
|
sudo cp -r <CONTEXT_DIR>/style/skins/default/ <CONTEXT_DIR>/style/skins/[yourSkin]/
|
422
|
|
423
|
Where ``<CONTEXT_DIR>`` is the directory in which the Metacat application
|
424
|
code lives and ``[yourSkin]`` is the name you wish to apply to your skin.
|
425
|
|
426
|
2. In ``[yourSkin]`` directory, change all files named ``default.xxx`` to
|
427
|
``yourSkin.xxx``. The following files should be changed:
|
428
|
|
429
|
::
|
430
|
|
431
|
default.css
|
432
|
default.js
|
433
|
default.properties
|
434
|
default.properties.metadata.xml
|
435
|
default.xml
|
436
|
|
437
|
3. In the metacat.properties file(``<CONTEXT_DIR>/WEB_INF/metacat.properties``),
|
438
|
add ``[yourSkin]`` to the value of the skin.names property.
|
439
|
|
440
|
4. Restart Tomcat. Log in as the user that runs your Tomcat server (often "tomcat") and type:
|
441
|
|
442
|
::
|
443
|
|
444
|
/etc/init.d/tomcat6 restart
|
445
|
|
446
|
Navigate to Metacat's Configuration utility and select the Configure Skins
|
447
|
option. Your custom skin should appear as a choice in the skins list. Change
|
448
|
the layout and style by modifying the header, footer, css, and other files in
|
449
|
your new skin directory.
|
450
|
|
451
|
It is important to note that all customized skins will be overwritten when
|
452
|
Metacat is reinstalled or upgraded. Please remember to back up your skins before
|
453
|
reinstalling or upgrading Metacat.
|