Harvester Installation Notes

Add Index Data YUM Repositories

To add the repository to the server put the following lines in a file called 'indexdata.repo' under '/etc/yum.repo.d/' (procedure is quite similar to Debian's apt-get configuration):

[indexdata-main]
name=Index Data Main Repository
baseurl=http://ftp.indexdata.com/pub/yum/centos/5.5/main/$basearch
failovermethod=priority
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-indexdata
enabled=0
priority=12

[indexdata-restricted]
name=Index Data Restricted Repository
baseurl=http://ftp.indexdata.com/pub/yum/centos/5.5/restricted/$basearch
failovermethod=priority
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-indexdata
enabled=0
priority=12

Now import the ID's GPG key used to sign the packages:

wget http://ftp.indexdata.com/pub/debian/indexdata.asc
sudo cp indexdata.asc /etc/pki/rpm-gpg/RPM-GPG-KEY-indexdata

Install Index Data packages

Since ID repository is disabled by default (enabled=0), ID packages are ignored in any YUM invocation, that also includes the default system update process (yum upgrade). In order to enable the ID repository the --enablerepo=indexdata* flag needs to be passed to ALL yum commands in order to include ID packages in YUM execution.

Install the MasterKey packages:
yum install masterkey-harvester masterkey-harvester-admin masterkey-harvester-admin-tomcat masterkey-harvester-tomcat6 masterkey-harvester-admin-tomcat6 --enablerepo=indexdata*
This will also install any dependencies such as the Tomcat6 container, if not installed.

MySQL server

The harvester uses a mysql database for configuration storage. The Server does not have to local but as default is:
yum install mysql-server
Create a database 'localindices' as mysql admin and give a localidxadm user all rights on this database:
mysql -u root -p admin-password 
mysql> create  database localindices;
mysql> grant all on localindices.* to 'localidxadm'@'localhost' identified by 'localidxadmpass'; 
mysql> flush privileges;
Configuration of the database/user/password are in the context of the web applications:
/usr/share/masterkey/harvester/META-INF/context.xml
/usr/share/masterkey/harvester-admin/META-INF/context.xml 
Create the database using the example database file:
mysql -u localidxadm -p -h localhost localindices  < /usr/share/masterkey/harvester/localindices.sql
Tomcat 6 needs mysql-connector-java jar in the tomcat library in order to load correctly. Execute the following command as root:
ln -s /usr/share/masterkey/harvester/WEB-INF/lib/mysql-connector-java-5.1.17.jar /usr/share/tomcat6/lib/
Restart Tomcat after.

Start Services at System Init

Configuring Tomcat and MySQL to automatic start-up:

chkconfig --level 345 httpd on
chkconfig --level 345 tomcat6 on
chkconfig --level 345 mysqld on

User Authentication

The Harvester Admin requires a installed Torus for authencitations. Edit the /usr/share/masterkey/harvester-admin/WEB-INF/web.xml:
        <init-param>
            <param-name>USER_TORUS_URI</param-name>
            <param-value>http://mk2-test.indexdata.com/torus/identity/records/USERS/</param-value>
        </init-param>
to point to a torus that contains the users, that are allowed to use the harvester.