Instalation of Web Curator Tool 1

advertisement
Instalation of Web Curator Tool 1.1GA
on Windows 2003 platform
1. Prerequisits
Regional settings
Due to difference in weekdays names and date/time formats in different regions, you have to have
your regional settings set to English! If you do not do this, bandwidth checking will not work and
you will keep getting error message (check appendinx C).
Start  Settings  Control Panel  Regional and Language Options
Set Format preferences to English.
Installation was done on English (UK) settings, but it should work fine on any English setting.
Click on Advanced tab and check Default user account settings checkbox. This is a MUST if you
want to run Tomcat as any other user that the one you are currently logged on or if you want to run
it as a service (see Appendinx B).
Download WCT
Download and extract WCT from http://webcurator.sourceforge.net/download.shtml. Extract it to
any folder you like except \wct, because that is the default folder for WCT logs. If you do extract it
to \wct, you have to change all the log settings in wct webapps. We'll extract it to C:\WCT-Install.
Java SE Development Kit
Download latest Java JDK from http://java.sun.com/javase/downloads/index.jsp or visit
http://java.sun.com/javase/downloads/previous.jsp for any of the previous releases. Just follow the
instalation wizard to install Java. If you decide to install Java to any different folder than default,
you should write destination folder down, since you will need it later on.
You MUST restart the machine after installing Java or else Tomcat might not work properly.
PostgreSQL
Download PostgreSQL from http://www.postgresql.org/ftp/binary/ and run setup. Installation gets a
bit tricky when you get to Service configuration screen.
Install as a service
If you want to run PostgreSQL as service you have to keep Install as a service checkbox checked, if
not just uncheck it and continue to next step of this manual. Install as service is recomended.
Service name
Write whatever you want in here, default is just fine. This is of no importance whatsoever.
Account name/domain
Here you can set the user that will run PostgreSQL service. Recomended setting is postgres on local
machine. You do not have to create user beforehand, installation will create it for you.
Click yes. If you chose weak password before, installation will offer you to change the password to
something complex. Click yes.
If you decide otherwise and set account name to an existing account, be warned, that it might
cause security risk.
On Initialise database cluster screen set the basic settings for database:
Initialise database cluster
Leave Initialise database cluster checkbox checked.
Port number
Leave port setting at 5432 if possible. If you set it to anything else, you will have to change settings
of WCT application later on.
Address
If you want to connect to database from any other address than localhost (if you have database
server on different machine than Tomcat) you want to check this checkbox.
Locale
Set your country here.
Encoding
You want to set this to UTF-8.
Superuser name
Set any username you want for superuser of database. This should not be the same username and
password combination that the one running the service. This user is not computer/domain user, but
is set and used only inside the PostgreSQL database.
Password
Password for superuser.
pgAdmin III
Start  Programs  PostgreSQL 8.x  pgAdmin III
Your start screen should look like this
Double-click on PostgreSQL Database Server 8.x (localhost:5432) connection. Enter superuser's
password. Check Store password if you want.
Expand Databases and select postgres database. Click on SQL icon
command:
. Run following SQL
CREATE DATABASE "Dwct" WITH ENCODING='UTF8';
Close SQL Query screen and wait few seconds then click refresh button few times until new Dwct
databse appears. Select Dwct and click SQL icon again. Execute this lines:
CREATE SCHEMA db_wct;
CREATE TABLE db_wct.marktest
(
ml varchar(50)
) WITHOUT OIDS;
CREATE ROLE usr_wct LOGIN PASSWORD 'fr3d'
NOINHERIT
VALID UNTIL 'infinity';
grant usage on schema db_wct to usr_wct;
Next run wct-schema-export-windows (see appendinx A). After that run wct-schema-grants and
wct-postgres-bootstrap. Close SQL Query screen. Click on Login Roles and hit refresh few times,
until user role wct_usr appears. Click on wct_usr twice and set the password for role. Default
password in WCT configuration file is 'password'. If you set it to something else, you will have to
change it also in context.xml in wct-core application later on (we have had some problems with
running WCT if password was anything else than 'password').
Tomcat
Latest version of Tomcat can be found on http://tomcat.apache.org/. Download Core zip file under
Binary distribution. Extract it wherever you like. We will do it to C:\ and rename folder to Tomcat,
so that it is easier for later steps of instalation and possible future upgrades. Tomcat binaries should
now be in C:\Tomcat\bin folder.
For easy control of deployed applications on Tomcat, we advice you to set administrator for Tomcat
Manager. To do so, edit C:\Tomcat\conf\tomcat-user.xml file and add this line:
<user name="admin" password="password" roles="standard,manager,admin" />
Now you will be able to connect on http://localhost:8080 and use Tomcat Manager. Log on using
admin/password credentials.
Environmental variables
Right click on My Computer  Properties  Advanced  Environment Variables
Add 3 new variables under System variables:
JAVA_HOME=C:\Program Files\Java\jdk1.x (Java root folder)
CATALINA_HOME=C:\Tomcat (Tomcat's root folder)
JAVA_OPTS=-Dcom.sun.management.jmxremote \
-Dcom.sun.management.jmxremote.port=9004 \
-Dcom.sun.management.jmxremote.ssl=false \
-Dcom.sun.management.jmxremote.authenticate=false \
-Xms768m -Xmx1024m
(All in one line!)
WARNING!!! This turns security off for jmxremote. Setting is ok for starting WCT up, but
you should consider changing this, when you get WCT up and running!
This will also set initial heap size to 768 MB and max heap size to 1GB. You should lower
these settings, if you do not have enough memory. We recommend to keep these settings above
512MB.
Install required jar files
Copy both jar files from C:\WCT-Install\etc to C:\Tomcat\common\lib if you are using PostgreSQL
8.1 or download corresponding JDBC 3 driver for any version of PostgreSQL you are running from
http://jdbc.postgresql.org/download.html and extract it to C:\Tomcat\common\lib (jta.jar can stay
the same).
Start up Tomcat
Start  Run  Cmd
cd \Tomcat\bin
catalina.bat start
If you followed the instructions Tomcat should start up without any problems.
2. Instalation of WCT 1.1GA
Deploy WCT
The easiest way to deploy WCT web applications is to simple copy all war files from
C:\WCT-Install\war to C:\Tomcat\webapps. Wait a minute or two for webapps to deploy
(depending on your machine), then if you did not set password for usr_wct to 'password' change it
in C:\Tomcat\webapps\wct\META-INF\context.xml. It should look much like this:
<?xml version="1.0" encoding="UTF-8"?>
<Context>
<Resource
name="jdbc/wctDatasource"
type="javax.sql.DataSource"
password="password"
driverClassName="org.postgresql.Driver"
maxIdle="5"
maxWait="5000"
validationQuery="select 1+1"
username="usr_wct"
url="jdbc:postgresql://localhost:5432/Dwct"
maxActive="10"/>
</Context>
Now it's time to run your favourite web browser and go to http://localhost:8080/wct and start
configuring WCT through the web interface. See the Logon to WCT section in the System
Administrators Guide for details.
Final words
It is clear, that this is not Windows based application, which does not mean it doesn't run as well as
it does on Linux, it only means that it needs a bit of tweaking and configuring before you can
actually run it. We will try, with the help of WCT development team, to give you updated
information on how to deploy newest versions of WCT on Windows. Happy harvesting!
3. Appendinx A (wct-schema-export-windows)
create table DB_WCT.ABSTRACT_TARGET (AT_OID int8 not null, AT_DESC varchar(255),
AT_NAME varchar(255) unique, AT_OWNER_ID int8, AT_PROF_OVERRIDE_OID int8,
AT_STATE int4, T_PROFILE_ID int8, AT_OBJECT_TYPE int4, AT_CREATION_DATE
TIMESTAMP(9), AT_REFERENCE varchar(255), AT_PROFILE_NOTE varchar(255),
AT_DUBLIN_CORE_OID int8, primary key (AT_OID));
create table DB_WCT.AGENCY (AGC_OID int8 not null, AGC_NAME varchar(80) not null
unique, AGC_ADDRESS varchar(255) not null, AGC_LOGO_URL varchar(255), AGC_URL
varchar(255), AGC_EMAIL varchar(80), AGC_FAX varchar(20), AGC_PHONE varchar(20),
primary key (AGC_OID));
create table DB_WCT.ANNOTATIONS (AN_OID int8 not null, AN_DATE timestamp not
null, AN_NOTE varchar(1000) not null, AN_USER_OID int8 not null, AN_OBJ_OID int8
not null, AN_OBJ_TYPE varchar(500) not null, primary key (AN_OID));
create table DB_WCT.ARC_HARVEST_FILE (AHF_OID int8 not null, AHF_COMPRESSED bool
not null, AHF_NAME varchar(100) not null unique, AHF_ARC_HARVEST_RESULT_ID int8,
primary key (AHF_OID));
create table DB_WCT.ARC_HARVEST_RESOURCE (AHRC_HARVEST_RESOURCE_OID int8 not
null, AHRC_RESOURCE_LENGTH int8 not null, AHRC_RESOURCE_OFFSET int8 not null,
AHRC_ARC_FILE_NAME varchar(100) not null, AHRC_COMPRESSED_YN bool not null,
primary key (AHRC_HARVEST_RESOURCE_OID));
create table DB_WCT.ARC_HARVEST_RESULT (AHRS_HARVEST_RESULT_OID int8 not null,
primary key (AHRS_HARVEST_RESULT_OID));
create table DB_WCT.AUTHORISING_AGENT (AA_OID int8 not null, AA_NAME
varchar(255) unique, AA_ADRESS varchar(2048), AA_CONTACT varchar(255), AA_EMAIL
varchar(255), AA_PHONE_NUMBER varchar(32), AA_DESC varchar(2048), primary key
(AA_OID));
create table DB_WCT.BANDWIDTH_RESTRICTIONS (BR_OID int8 not null, BR_BANDWIDTH
int8 not null, BR_DAY varchar(9) not null, BR_END_TIME timestamp not null,
BR_START_TIME timestamp not null, primary key (BR_OID));
create table DB_WCT.DUBLIN_CORE (DC_OID int8 not null, DC_CONTRIBUTOR
varchar(255), DC_COVERAGE varchar(255), DC_CREATOR varchar(255), DC_DESCRIPTION
varchar(2000), DC_FORMAT varchar(255), DC_IDENTIFIER varchar(255),
DC_IDENTIFIER_ISBN varchar(13), DC_IDENTIFIER_ISSN varchar(9), DC_LANGUAGE
varchar(255), DC_PUBLISHER varchar(255), DC_RELATION varchar(255), DC_SOURCE
varchar(255), DC_SUBJECT varchar(2000), DC_TITLE varchar(255), DC_TYPE
varchar(50), primary key (DC_OID));
create table DB_WCT.GROUP_MEMBER (AT_OID int8 not null, GM_CHILD_ID int8,
GM_PARENT_ID int8, primary key (AT_OID));
create table DB_WCT.HARVEST_RESOURCE (HRC_OID int8 not null, HRC_LENGTH int8,
HRC_NAME varchar(1020) not null, HRC_HARVEST_RESULT_OID int8, primary key
(HRC_OID));
create table DB_WCT.HARVEST_RESULT (HR_OID int8 not null, HR_HARVEST_NO int4,
HR_TARGET_INSTANCE_ID int8, HR_PROVENANCE_NOTE varchar(1024) not null,
HR_CREATED_DATE timestamp, HR_CREATED_BY_ID int8, HR_STATE int4, HR_INDEX int4,
primary key (HR_OID));
create table DB_WCT.HARVEST_STATUS (HS_OID int8 not null, HS_AVG_KB float8,
HS_AVG_URI float8, HS_DATA_AMOUNT int8, HS_ELAPSED_TIME int8, HS_JOB_NAME
varchar(500), HS_STATUS varchar(255), HS_URLS_DOWN int8, HS_URLS_FAILED int8,
HS_ALERTS int4, primary key (HS_OID));
create table DB_WCT.NOTIFICATION (NOT_OID int8 not null, NOT_MESSAGE
varchar(2000), NOT_USR_OID int8 not null, NOT_SENDER varchar(80) not null,
NOT_SENT_DATE timestamp(9), NOT_SUBJECT varchar(255) not null, primary key
(NOT_OID));
create table DB_WCT.PERMISSION (PE_OID int8 not null, PE_ACCESS_STATUS
varchar(255), PE_APPROVED_YN bool, PE_AVAILABLE_YN bool, PE_COPYRIGHT_STATEMENT
varchar(2048), PE_COPYRIGHT_URL varchar(2048), PE_CREATION_DATE TIMESTAMP(9),
PE_END_DATE TIMESTAMP(9), PE_NOTES text, PE_OPEN_ACCESS_DATE TIMESTAMP(9),
PE_PERMISSION_GRANTED_DATE TIMESTAMP(9), PE_PERMISSION_REQUESTED_DATE
TIMESTAMP(9), PE_SPECIAL_REQUIREMENTS varchar(2048), PE_START_DATE TIMESTAMP(9),
PE_STATUS int4, PE_AUTH_AGENT_ID int8, PE_SITE_ID int8, PE_QUICK_PICK bool,
PE_DISPLAY_NAME varchar(32), PE_OWNING_AGENCY_ID int8, PE_FILE_REFERENCE
varchar(255), primary key (PE_OID));
create table DB_WCT.PERMISSION_EXCLUSION (PEX_OID int8 not null, PEX_REASON
varchar(255), PEX_URL varchar(1024), PEX_PERMISSION_OID int8, PEX_INDEX int4,
primary key (PEX_OID));
create table DB_WCT.PERMISSION_TEMPLATE (PRT_OID int8 not null, PRT_AGC_OID int8
not null, PRT_TEMPLATE_TEXT text not null, PRT_TEMPLATE_NAME varchar(80) not
null, PRT_TEMPLATE_TYPE varchar(40) not null, PRT_TEMPLATE_DESC varchar(255),
primary key (PRT_OID));
create table DB_WCT.PERMISSION_URLPATTERN (PU_URLPATTERN_ID int8 not null,
PU_PERMISSION_ID int8 not null, primary key (PU_URLPATTERN_ID,
PU_PERMISSION_ID));
create table DB_WCT.PO_EXCLUSION_URI (PEU_PROF_OVER_OID int8 not null,
PEU_FILTER varchar(255), PEU_IX int4 not null, primary key (PEU_PROF_OVER_OID,
PEU_IX));
create table DB_WCT.PO_INCLUSION_URI (PEU_PROF_OVER_OID int8 not null,
PEU_FILTER varchar(255), PEU_IX int4 not null, primary key (PEU_PROF_OVER_OID,
PEU_IX));
create table DB_WCT.PROFILE (P_OID int8 not null, P_VERSION int4 not null,
P_DESC varchar(255), P_NAME varchar(255), P_PROFILE_STRING text, P_PROFILE_LEVEL
int4, P_STATUS int4, P_DEFAULT bool, P_AGECNY_OID int8, primary key (P_OID));
create table DB_WCT.PROFILE_BASIC_CREDENTIALS (PBC_PC_OID int8 not null,
PBC_REALM varchar(255), primary key (PBC_PC_OID));
create table DB_WCT.PROFILE_CREDENTIALS (PC_OID int8 not null, PC_DOMAIN
varchar(255), PC_PASSWORD varchar(255), PC_USERNAME varchar(255),
PC_PROFILE_OVERIDE_OID int8, PC_INDEX int4, primary key (PC_OID));
create table DB_WCT.PROFILE_FORM_CREDENTIALS (PRC_PC_OID int8 not null,
PFC_METHOD varchar(4), PFC_LOGIN_URI varchar(255), PFC_PASSWORD_FIELD
varchar(255), PFC_USERNAME_FIELD varchar(255), primary key (PRC_PC_OID));
create table DB_WCT.PROFILE_OVERRIDES (PO_OID int8 not null, PO_EXCL_MIME_TYPES
varchar(255), PO_MAX_BYES int8, PO_MAX_DOCS int8, PO_MAX_HOPS int4,
PO_MAX_PATH_DEPTH int4, PO_MAX_TIME_SEC int8, PO_ROBOTS_POLICY varchar(10),
PO_OR_CREDENTIALS bool, PO_OR_EXCL_MIME_TYPES bool, PO_OR_EXCLUSION_URI bool,
PO_OR_INCLUSION_URI bool, PO_OR_MAX_BYTES bool, PO_OR_MAX_DOCS bool,
PO_OR_MAX_HOPS bool, PO_OR_MAX_PATH_DEPTH bool, PO_OR_MAX_TIME_SEC bool,
PO_OR_ROBOTS_POLICY bool, primary key (PO_OID));
create table DB_WCT.ROLE_PRIVILEGE (PRV_OID int8 not null, PRV_CODE varchar(40)
not null, PRV_ROLE_OID int8, PRV_SCOPE int4 not null, primary key (PRV_OID));
create table DB_WCT.SCHEDULE (S_OID int8 not null, S_CRON varchar(255) not null,
S_START TIMESTAMP(9) not null, S_END TIMESTAMP(9), S_TARGET_ID int8, S_TYPE int4
not null, S_OWNER_OID int8, S_NEXT_SCHEDULE_TIME TIMESTAMP(9),
S_ABSTRACT_TARGET_ID int8, primary key (S_OID));
create table DB_WCT.SEED (S_OID int8 not null, S_SEED varchar(1024), S_TARGET_ID
int8, S_PRIMARY bool, primary key (S_OID));
create table DB_WCT.SEED_PERMISSION (SP_SEED_ID int8 not null, SP_PERMISSION_ID
int8 not null, primary key (SP_SEED_ID, SP_PERMISSION_ID));
create table DB_WCT.SITE (ST_OID int8 not null, ST_TITLE varchar(255) not null
unique, ST_DESC varchar(255), ST_LIBRARY_ORDER_NO varchar(32), ST_NOTES text,
ST_PUBLISHED bool not null, ST_ACTIVE bool not null, primary key (ST_OID));
create table DB_WCT.SITE_AUTH_AGENCY (SA_SITE_ID int8 not null, SA_AGENT_ID int8
not null, primary key (SA_SITE_ID, SA_AGENT_ID));
create table DB_WCT.TARGET (T_AT_OID int8 not null, T_RUN_ON_APPROVAL bool,
T_EVALUATION_NOTE varchar(255), T_SELECTION_DATE TIMESTAMP(9), T_SELECTION_NOTE
varchar(255), T_SELECTION_TYPE varchar(255), T_HARVEST_TYPE varchar(255),
primary key (T_AT_OID));
create table DB_WCT.TARGET_GROUP (TG_AT_OID int8 not null, TG_SIP_TYPE int4,
TG_START_DATE DATE, TG_END_DATE DATE, TG_OWNERSHIP_METADATA varchar(255),
TG_TYPE varchar(255), primary key (TG_AT_OID));
create table DB_WCT.TARGET_INSTANCE (TI_OID int8 not null, TI_VERSION int4 not
null, TI_SCHEDULE_ID int8, TI_TARGET_ID int8, TI_PRIORITY int4 not null,
TI_SCHEDULED_TIME TIMESTAMP(9) not null, TI_STATE varchar(50) not null,
TI_BANDWIDTH_PERCENT int4, TI_ALLOCATED_BANDWIDTH int8, TI_START_TIME timestamp,
TI_OWNER_ID int8, TI_DISPLAY_ORDER int4, TI_PROF_OVERRIDE_OID int8, TI_PURGED
bool not null, TI_ARCHIVE_ID varchar(40) unique, TI_REFERENCE varchar(255),
primary key (TI_OID));
create table DB_WCT.TASK (TSK_OID int8 not null, TSK_USR_OID int8, TSK_MESSAGE
varchar(2000), TSK_SENDER varchar(80) not null, TSK_SENT_DATE timestamp(9),
TSK_SUBJECT varchar(255) not null, TSK_PRIVILEGE varchar(40), TSK_AGC_OID int8
not null, TSK_MSG_TYPE varchar(40) not null, TSK_RESOURCE_OID int8 not null,
TSK_RESOURCE_TYPE varchar(80) not null, primary key (TSK_OID));
create table DB_WCT.URL_PATTERN (UP_OID int8 not null, UP_PATTERN varchar(2048),
UP_SITE_ID int8, primary key (UP_OID));
create table DB_WCT.URL_PERMISSION_MAPPING (UPM_OID int8 not null,
UPM_PERMISSION_ID int8, UPM_URL_PATTERN_ID int8, UPM_DOMAIN varchar(1024),
primary key (UPM_OID));
create table DB_WCT.USER_ROLE (URO_USR_OID int8 not null, URO_ROL_OID int8 not
null, primary key (URO_USR_OID, URO_ROL_OID));
create table DB_WCT.WCTAUDIT (AUD_OID int8 not null, AUD_ACTION varchar(40) not
null, AUD_DATE TIMESTAMP(9) not null, AUD_FIRSTNAME varchar(50), AUD_LASTNAME
varchar(50), AUD_MESSAGE varchar(2000) not null, AUD_SUBJECT_TYPE varchar(255)
not null, AUD_USERNAME varchar(80), AUD_USER_OID int8, AUD_SUBJECT_OID int8,
AUD_AGENCY_OID int8, primary key (AUD_OID));
create table DB_WCT.WCTROLE (ROL_OID int8 not null, ROL_DESCRIPTION
varchar(255), ROL_NAME varchar(80) not null, ROL_AGENCY_OID int8 not null,
primary key (ROL_OID));
create table DB_WCT.WCTUSER (USR_OID int8 not null, USR_ACTIVE bool not null,
USR_ADDRESS varchar(200), USR_EMAIL varchar(100) not null, USR_EXTERNAL_AUTH
bool not null, USR_FIRSTNAME varchar(50) not null, USR_FORCE_PWD_CHANGE bool not
null, USR_LASTNAME varchar(50) not null, USR_NOTIFY_BY_EMAIL bool not null,
USR_PASSWORD varchar(255), USR_PHONE varchar(16), USR_TITLE varchar(10),
USR_USERNAME varchar(80) not null unique, USR_AGC_OID int8 not null,
USR_DEACTIVATE_DATE TIMESTAMP(9), primary key (USR_OID));
create table DB_WCT.WCT_LOGON_DURATION (LOGDUR_OID int8 not null,
LOGDUR_DURATION int8, LOGDUR_LOGON_TIME TIMESTAMP(9) not null,
LOGDUR_LOGOUT_TIME TIMESTAMP(9), LOGDUR_USERNAME varchar(80), LOGDUR_USER_OID
int8 not null, LOGDUR_USER_REALNAME varchar(100), LOGDUR_SESSION_ID varchar(32)
not null, primary key (LOGDUR_OID));
alter table DB_WCT.ABSTRACT_TARGET add constraint FK_AT_DUBLIN_CORE_OID foreign
key (AT_DUBLIN_CORE_OID) references DB_WCT.DUBLIN_CORE;
alter table DB_WCT.ABSTRACT_TARGET add constraint FK_T_PROF_OVERRIDE_OID foreign
key (AT_PROF_OVERRIDE_OID) references DB_WCT.PROFILE_OVERRIDES;
alter table DB_WCT.ABSTRACT_TARGET add constraint FKB6DD784E5C2C497 foreign key
(AT_OWNER_ID) references DB_WCT.WCTUSER;
alter table DB_WCT.ABSTRACT_TARGET add constraint FKB6DD784E3A83A603 foreign key
(T_PROFILE_ID) references DB_WCT.PROFILE;
alter table DB_WCT.ANNOTATIONS add constraint FK_NOTE_USER_OID foreign key
(AN_USER_OID) references DB_WCT.WCTUSER;
alter table DB_WCT.ARC_HARVEST_FILE add constraint FK_AHR_ARC_HARVEST_RESULT_ID
foreign key (AHF_ARC_HARVEST_RESULT_ID) references DB_WCT.ARC_HARVEST_RESULT;
alter table DB_WCT.ARC_HARVEST_RESOURCE add constraint FK6D84FEB12FF8F14B
foreign key (AHRC_HARVEST_RESOURCE_OID) references DB_WCT.HARVEST_RESOURCE;
alter table DB_WCT.ARC_HARVEST_RESULT add constraint FKE39C5380C88A38D9 foreign
key (AHRS_HARVEST_RESULT_OID) references DB_WCT.HARVEST_RESULT;
alter table DB_WCT.GROUP_MEMBER add constraint FK_GM_PARENT_ID foreign key
(GM_PARENT_ID) references DB_WCT.TARGET_GROUP;
alter table DB_WCT.GROUP_MEMBER add constraint FK_GM_CHILD_ID foreign key
(GM_CHILD_ID) references DB_WCT.ABSTRACT_TARGET;
alter table DB_WCT.HARVEST_RESOURCE add constraint FK5BA2B04431A1C148 foreign
key (HRC_HARVEST_RESULT_OID) references DB_WCT.HARVEST_RESULT;
alter table DB_WCT.HARVEST_RESULT add constraint FK_HR_CREATED_BY_ID foreign key
(HR_CREATED_BY_ID) references DB_WCT.WCTUSER;
alter table DB_WCT.HARVEST_RESULT add constraint FK_HRC_TARGET_INSTANCE_ID
foreign key (HR_TARGET_INSTANCE_ID) references DB_WCT.TARGET_INSTANCE;
alter table DB_WCT.PERMISSION add constraint FKFE0FB1CFEE52493C foreign key
(PE_AUTH_AGENT_ID) references DB_WCT.AUTHORISING_AGENT;
alter table DB_WCT.PERMISSION add constraint FKFE0FB1CFA1E5D89A foreign key
(PE_OWNING_AGENCY_ID) references DB_WCT.AGENCY;
alter table DB_WCT.PERMISSION add constraint FK_PE_SITE_ID foreign key
(PE_SITE_ID) references DB_WCT.SITE;
alter table DB_WCT.PERMISSION_EXCLUSION add constraint FK2DB3C33EB558CEC7
foreign key (PEX_PERMISSION_OID) references DB_WCT.PERMISSION;
alter table DB_WCT.PERMISSION_TEMPLATE add constraint FK_TEMPLATE_AGENCY_OID
foreign key (PRT_AGC_OID) references DB_WCT.AGENCY;
alter table DB_WCT.PERMISSION_URLPATTERN add constraint PU_FK_1 foreign key
(PU_URLPATTERN_ID) references DB_WCT.URL_PATTERN;
alter table DB_WCT.PERMISSION_URLPATTERN add constraint PU_FK_2 foreign key
(PU_PERMISSION_ID) references DB_WCT.PERMISSION;
alter table DB_WCT.PO_EXCLUSION_URI add constraint FKFF4AB0FBBC3C926 foreign key
(PEU_PROF_OVER_OID) references DB_WCT.PROFILE_OVERRIDES;
alter table DB_WCT.PO_INCLUSION_URI add constraint FK6C665549BC3C926 foreign key
(PEU_PROF_OVER_OID) references DB_WCT.PROFILE_OVERRIDES;
alter table DB_WCT.PROFILE add constraint FK_P_AGENCY_OID foreign key
(P_AGECNY_OID) references DB_WCT.AGENCY;
alter table DB_WCT.PROFILE_BASIC_CREDENTIALS add constraint FKE72A5AF5BD9AB61
foreign key (PBC_PC_OID) references DB_WCT.PROFILE_CREDENTIALS;
alter table DB_WCT.PROFILE_CREDENTIALS add constraint FK317A252682C63D7F foreign
key (PC_PROFILE_OVERIDE_OID) references DB_WCT.PROFILE_OVERRIDES;
alter table DB_WCT.PROFILE_FORM_CREDENTIALS add constraint FK6B1303D750209B71
foreign key (PRC_PC_OID) references DB_WCT.PROFILE_CREDENTIALS;
alter table DB_WCT.ROLE_PRIVILEGE add constraint FK_PRIV_ROLE_OID foreign key
(PRV_ROLE_OID) references DB_WCT.WCTROLE;
alter table DB_WCT.SCHEDULE add constraint FK50C8297BE49544D foreign key
(S_ABSTRACT_TARGET_ID) references DB_WCT.ABSTRACT_TARGET;
alter table DB_WCT.SCHEDULE add constraint FK_S_OWNER_OID foreign key
(S_OWNER_OID) references DB_WCT.WCTUSER;
alter table DB_WCT.SCHEDULE add constraint FK_S_TARGET_ID foreign key
(S_TARGET_ID) references DB_WCT.ABSTRACT_TARGET;
alter table DB_WCT.SEED add constraint FK_SEED_TARGET_ID foreign key
(S_TARGET_ID) references DB_WCT.TARGET;
alter table DB_WCT.SEED_PERMISSION add constraint FK9659805D68A4F4BA foreign key
(SP_SEED_ID) references DB_WCT.SEED;
alter table DB_WCT.SEED_PERMISSION add constraint FK_SP_PERMISSION_ID foreign
key (SP_PERMISSION_ID) references DB_WCT.PERMISSION;
alter table DB_WCT.SITE_AUTH_AGENCY add constraint FKDF808D84C049BBEB foreign
key (SA_SITE_ID) references DB_WCT.SITE;
alter table DB_WCT.SITE_AUTH_AGENCY add constraint FK_SA_AGENT_ID foreign key
(SA_AGENT_ID) references DB_WCT.AUTHORISING_AGENT;
alter table DB_WCT.TARGET add constraint FK931165917947B83E foreign key
(T_AT_OID) references DB_WCT.ABSTRACT_TARGET;
alter table DB_WCT.TARGET_GROUP add constraint FKB444963161DABD5F foreign key
(TG_AT_OID) references DB_WCT.ABSTRACT_TARGET;
alter table DB_WCT.TARGET_INSTANCE add constraint FK_TI_TARGET_ID foreign key
(TI_TARGET_ID) references DB_WCT.ABSTRACT_TARGET;
alter table DB_WCT.TARGET_INSTANCE add constraint FK_TI_USER_ID foreign key
(TI_OWNER_ID) references DB_WCT.WCTUSER;
alter table DB_WCT.TARGET_INSTANCE add constraint FK_TI_PROF_OVERRIDE_OID
foreign key (TI_PROF_OVERRIDE_OID) references DB_WCT.PROFILE_OVERRIDES;
alter table DB_WCT.TARGET_INSTANCE add constraint FK_TI_SCHEDULE_ID foreign key
(TI_SCHEDULE_ID) references DB_WCT.SCHEDULE;
alter table DB_WCT.TASK add constraint FK_TASK_AGENCY_OID foreign key
(TSK_AGC_OID) references DB_WCT.AGENCY;
alter table DB_WCT.URL_PATTERN add constraint FK_UP_SITE_ID foreign key
(UP_SITE_ID) references DB_WCT.SITE;
alter table DB_WCT.URL_PERMISSION_MAPPING add constraint FK_UPM_URL_PATTERN_ID
foreign key (UPM_URL_PATTERN_ID) references DB_WCT.URL_PATTERN;
alter table DB_WCT.URL_PERMISSION_MAPPING add constraint FK_UPM_PERMISSION_ID
foreign key (UPM_PERMISSION_ID) references DB_WCT.PERMISSION;
alter table DB_WCT.USER_ROLE add constraint FK_USERROLE_TO_USER foreign key
(URO_USR_OID) references DB_WCT.WCTUSER;
alter table DB_WCT.USER_ROLE add constraint FK_USERROLE_TO_ROLE foreign key
(URO_ROL_OID) references DB_WCT.WCTROLE;
alter table DB_WCT.WCTROLE add constraint FK_ROLE_AGENCY_OID foreign key
(ROL_AGENCY_OID) references DB_WCT.AGENCY;
alter table DB_WCT.WCTUSER add constraint FK_USER_AGENCY_OID foreign key
(USR_AGC_OID) references DB_WCT.AGENCY;
create table DB_WCT.
ID_GENERATOR
(
IG_TYPE
varchar(255),
IG_VALUE int4
) ;
4. Appendinx B
Recommended settings
For easier debugging and cleaner output in Tomcat shell window, you should comment these lines
in C:\Tomcat\webapps\wct-harvest-agent\WEB-INF\classes\wct-agent.xml:
<bean id="checkProcessor" class="org.webcurator.core.check.CheckProcessor"
abstract="false" singleton="true" lazy-init="default" autowire="default"
dependency-check="default">
<property name="checks">
<list>
<ref bean="memoryChecker"/>
<ref bean="processorCheck"/>
<ref bean="diskSpaceChecker"/>
</list>
</property>
</bean>
to this:
<bean id="checkProcessor" class="org.webcurator.core.check.CheckProcessor"
abstract="false" singleton="true" lazy-init="default" autowire="default"
dependency-check="default">
<property name="checks">
<list>
<!-- <ref bean="memoryChecker"/>
<ref bean="processorCheck"/>
<ref bean="diskSpaceChecker"/> -->
</list>
</property>
</bean>
If you don't comment these lines out, the script tries to run a Linux application which checks
availability of memory, processor and hard drive. Since the application is not available on
Windows, you get a quite a spam in Tomcat window.
Running Tomcat as Service
Running Tomcat as service gives you few benefits: you can set action in case of service crashes and
you can set it to start up automatically when server restarts. Here are the steps:
Start  Run  Cmd
cd \Tomcat\bin
service.bat install
If you open your services you should see Apache Tomcat service near the top.
Double-click on Apache Tomcat and change Startup type to Automatic. You can also set actions in
Recovery tab if you want. Click Apply and Close. Now we must configure the service to run with
all the required options.
Start  Run  C:\Tomcat\bin\tomcat5w.exe
This will open Apache Tomcat Properties window. Click on Java tab and add these lines to Java
Options window:
-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=9004
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false
Now change Initial memory pool to 768 and Maximum memory pool to 1024 (this is the equal to
-Xms768m -Xmx1024m settings in JAVA_OPTS) and click Apply. Now go back to General tab
and start the service. Tomcat should start up now when you restart the server.
Appendinx C: Error messages
agent.harvester.heritrix (HarvesterHeritrix.java:525) - Waiting for job to start where state is
Preparing
JMXRemote is not configured properly. Check your environmental settings!
Harvesting this target instance will mean one or more target instances will have less than the
minimum bandwidth.
Bandwidth settings in WCT are to small, bandwidth of harvester is too large.
Check regional settings!
java.lang.OutOfMemoryError: Java heap space
Heap size is not set or is too low. Check environmental variables.
Download