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
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.
yum install mysql-serverCreate 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.xmlCreate the database using the example database file:
mysql -u localidxadm -p -h localhost localindices < /usr/share/masterkey/harvester/localindices.sqlTomcat 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.
Configuring Tomcat and MySQL to automatic start-up:
chkconfig --level 345 httpd on chkconfig --level 345 tomcat6 on chkconfig --level 345 mysqld on
<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.