This is "work in progress!" For professional expertise please contact the Ambra mailing lists at http://lists.ambraproject.org/mailman/listinfo



Ambra on Debian deploying war-package

wget packages from http://ambraproject.org

wget http://ambraproject.org/maven2/snapshot/org/ambraproject/ambra-webapp/2.2-SNAPSHOT/ambra-webapp-2.2-SNAPSHOT.war

Deploy package to /var/lib/tomcat6/webapps.

In /etc/topaz/ambra.xml specify:

ambra.services.crossref.xsl=crossref.xsl

...pending!


Install Apache Solr According to this instruction for Debian.

wget http://apache.cict.fr//lucene/solr/3.4.0/apache-solr-3.4.0.tgz
tar xvfz apache-solr-3.4.0.tgz
cd apache-solr-3.4.0
cp dist/apache-solr-3.4.0.war /var/lib/tomcat6/webapps/solr.war
cp -fr example/solr /var/lib/tomcat6/
chown -R tomcat6:tomcat6 /var/lib/tomcat6/solr

Restart the tomcat6 service
/etc/init.d/tomcat6 restart

http://85.88.2.206:8080/solr/admin/ calls the Solr Admin interface.

Further configuration information for Solr:
http://fusion.dominicwatson.co.uk/2010/12/apache-solr-part-ii-installing-solr.html
http://wiki.apache.org/solr/SolrTomcat#Building_Solr

Install Apache Abdera for syndication

wget http://www.apache.org/dist/abdera/1.1.2/apache-abdera-1.1.2.tar.gz
tar xvfz apache-abdera-1.1.2.tar.gz
mv apache-abdera-1.1.2 /var/lib/tomcat6/webapps/
??? cp -fr example/abdera /var/lib/tomcat6/
??? chown -R tomcat6:tomcat6 /var/lib/tomcat6/abdera

Restart the tomcat6 service
/etc/init.d/tomcat6 restart




Our first Ambra on Debian setup protocol

Current status: all services are running but 85.88.2.206:8080 gives timout. Probably AJP and ports need to be configured.

All services can be restarted now with ambra_restart.sh in /usr/local/bin. The status can be printed with ambra_status.sh.

topaz-mulgara (29743) is running from /usr/local/topaz/topaz-mulgara
  PID USER       RSS %MEM     ELAPSED     TIME %CPU COMMAND
29743 topaz    58948  5.7       20:09 00:00:02  0.2 java
java    29743 topaz    7u  IPv6 584172      0t0  TCP *:54062 (LISTEN)
java    29743 topaz   10u  IPv6 584174      0t0  TCP *:21215 (LISTEN)
java    29743 topaz   12u  IPv6 584177      0t0  TCP *:45409 (LISTEN)
java    29743 topaz   15u  IPv6 584181      0t0  TCP *:8111 (LISTEN)
java    29743 topaz  134u  IPv6 584501      0t0  TCP 127.0.0.1:6789 (LISTEN)

STATE  : Started
AS OF  : 2011-10-25 13:29:16PM CEST

ambra-cas (30167) is running from /usr/local/topaz/ambra-cas
  PID USER       RSS %MEM     ELAPSED     TIME %CPU COMMAND
30167 topaz    103128 10.0      19:56 00:00:06  0.5 java
java    30167 topaz   11u  IPv6 585456      0t0  TCP *:44814 (LISTEN)
java    30167 topaz   14u  IPv6 585458      0t0  TCP *:21213 (LISTEN)
java    30167 topaz   16u  IPv6 585461      0t0  TCP *:33786 (LISTEN)
java    30167 topaz   53r  IPv6 585540      0t0  TCP *:7080 (LISTEN)
java    30167 topaz   55r  IPv6 585710      0t0  TCP 127.0.0.1:7005 (LISTEN)

ambra (30437) is running from /usr/local/topaz/ambra
  PID USER       RSS %MEM     ELAPSED     TIME %CPU COMMAND
30437 topaz    125832 12.2      19:10 00:00:10  0.9 java
java    30437 topaz   11u  IPv4 600030      0t0  TCP *:43531 (LISTEN)
java    30437 topaz   14u  IPv4 600032      0t0  TCP *:21212 (LISTEN)
java    30437 topaz   16u  IPv4 600034      0t0  TCP *:44738 (LISTEN)
java    30437 topaz   52r  IPv4 600112      0t0  TCP *:8080 (LISTEN)
java    30437 topaz  160u  IPv4 626668      0t0  TCP *:8112 (LISTEN)
java    30437 topaz  163u  IPv4 626671      0t0  TCP *:8113 (LISTEN)

Instructions on Ambraproject.org

Latest rpms on Ambra-Trac

Read also the attached ppt-File. Start on slide 42.


Package installation

apt-get install alien chkconfig libxml2-utils lsb-base lsof imagemagick mysql-server tomcat6 mod_proxy_ajp postgresql sun-java6-bin sun-java6-jdk

Additional recommended packages for Tomcat:

apt-get install tomcat6-docs tomcat6-examples tomcat6-admin

The people from Rimuhosting state, that on Ubuntu/Debian systems we have to change the Proxy * setting from Deny all to Deny none in /etc/apache2/mods-enabled/proxy.conf:

        <Proxy *>
                AddDefaultCharset off
                Order deny,allow
                Deny from none
                #Allow from .example.com
        </Proxy>

mod_proxy_ajp has to be activated. It requires Apache 2.1 or later, but is installed by default. To activate mod_proxy_ajp call:

a2enmod proxy_ajp

...

/etc/init.d/tomcat6 start

Common Tools

mkdir ambra
cd /home/ambra/
wget http://ambraproject.org/releases/1.6/ambra-1.6-1.noarch.rpm 
http://ambraproject.org/releases/1.6/ambra-cas-1.6-1.noarch.rpm 
http://ambraproject.org/releases/1.6/ambra-tools-1.6-1.noarch.rpm 
http://ambraproject.org/releases/1.6/topaz-fedora-1.6-1.noarch.rpm 
http://ambraproject.org/releases/1.6/topaz-mulgara-1.6-1.noarch.rpm
       for i in $(ls *.rpm); do alien --scripts $i; done
       dpkg -i ambra_1.6-2_all.deb ambra-cas_1.6-2_all.deb ambra-tools_1.6-2_all.deb topaz-fedora_1.6-2_all.deb topaz-mulgara_1.6-2_all.deb

Called Tomcat at Port:8080 Got the "default Tomcat home page"

mv -v /etc/rc.d/init.d/* /etc/init.d/
ln -s /lib/lsb/init-functions /etc/init.d/functions

We need to set the JAVA_HOME environment variable. Add the following at the end of /etc/profile, just after "export PATH" (see also: debianhelp.co.uk). /etc/profile is executed at startup and when a user logs into the system. In order to update the environment you will need to log out and log back in to the system.:

JAVA_HOME="/usr/lib/jvm/java-6-sun"
export $JAVA_HOME

Check out if Ambra finds Java:

/etc/init.d/ambra start

Message: "Starting ambra in /usr/local/topaz/ambra via java"

According to http://ambraproject.org/trac/wiki/QuickStart/SingleboxInstall we have to generate a single certificate for use by all applications
Replace #!/bin/sh in /usr/local/topaz/bin/gen-keystores with #!/bin/bash.

/usr/local/topaz/bin/gen-keystores
cp -a /tmp/keystore.epubtk.openresearch.eu.jks

Add checkpid workaround-function to /etc/init.d/topaz-mulgara

 function checkpid() {
 local i
 for i in $* ; do
     if [ -d "/proc/${i}" ]; then
         return 0
     fi
 done
 return 1
 }

Configure MySQL

/usr/local/topaz/topaz-fedora/server/bin/mysql-config.sh [arg1] [arg2] [arg3] [arg4] [arg5] [arg6] [arg7]

# arg 1 - the location where MySQL is installed (e.g., /usr/local/mysql, or /usr for a centos RPM install of mysql-server)
# arg 2 - the name of the MySQL user with dba privileges (e.g., root)
# arg 3 - the password for the MySQL user with dba privileges (use "" to indicate no password)
# arg 4 - fedoraAdmin
# arg 5 - fedoraAdmin
# arg 6 - fedora_ambra
# arg 7 - y

In our case the command was:

/usr/local/topaz/topaz-fedora/server/bin/mysql-config.sh /usr root password** fedoraAdmin fedoraAdmin fedora_ambra y

** For the password read the mail from 01.10.2011 on the mailinglist...

Resulting message: Looooooong and complex, but no obvious errors, it ends with: "Database initialization complete!"

/etc/init.d/topaz-fedora start

Comment Ingo MySQL error based on wrong database name 'fedora21' instead of 'fedora_ambra' in /etc/topaz/fedora.fcfg Maybe a result of a previous command, could not find a command to rewrite the configuration file, so I did it manually.

Patch:
- <param name="jdbcURL" value="jdbc:mysql://localhost/fedora21?useUnicode=true&amp;characterEncoding=UTF-8&amp;autoReconnect=true"/>
+ <param name="jdbcURL" value="jdbc:mysql://localhost/fedora_ambra?useUnicode=true&amp;characterEncoding=UTF-8&amp;autoReconnect=true"/>

CAS Server

uncomment listen_address = 'localhost' to /etc/postgresql/8.4/main/postgresql.conf

su - postgres -c 'createuser --createdb --pwprompt --encrypted root'
Enter password for new role: 
Enter it again: 
Shall the new role be a superuser? (y/n) y
su - postgres -c 'createdb --owner=root casdb'
chkconfig postgresql 345

END OF MY (Ingos) SHORT ADVENTURE...

Edwin changed /etc/postgresql/8.4/main/pg_hba.conf according to the entry in the Ambra-Wiki

# TYPE  DATABASE    USER        IP-ADDRESS        IP-MASK           METHOD
host    all         all         127.0.0.1         255.255.255.255   md5
local   all         all                                             md5
local   all         all                                             ident
For the last line the wiki proposed:
local   all         all                                             ident   sameuser
I've changed the line because with "sameuser" the database could not be initialized.
/etc/init.d/ambra-cas start

... returns: 'Starting ambra-cas in /usr/local/topaz/ambra-cas via java

Configure AJP

The Ambra Quickstart Tutorial only describes the configuration for mod_jk, which should not be used for Apache < 2.1. Instead, they suggest to use mod_proxy_ajp. A possible configuration is given on http://www.zeitoun.net/articles/configure-mod_proxy_ajp-with-tomcat/start Further links: on rimuhosting or support.eapps

Uncomment

 <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />

from /etc/tomcat6/server.xml. Now additional changes are necessary, probably something like

Listen 1979
NameVirtualHost *:1979
<VirtualHost *:1979>
   ServerName localhost
   ErrorLog /var/log/apache2/ajp.error.log
   CustomLog /var/log/apache2/ajp.log combined
 
   <Proxy *>
     AddDefaultCharset Off
     Order deny,allow
     Allow from all
   </Proxy>
 
   ProxyPass / ajp://localhost:8009/
   ProxyPassReverse / ajp://localhost:8009/
</VirtualHost>

Port forwarding

Is this necessary? vi /etc/sysconfig/iptables

*nat
:PREROUTING ACCEPT [167:22182]
:POSTROUTING ACCEPT [1:60]
:OUTPUT ACCEPT [1:60]
-A PREROUTING -d <IP ADDR> -i eth1 -p tcp -m tcp --dport 443 -j DNAT --to-destination <IP ADDR>:7443
-A OUTPUT -d <IP ADDR> -p tcp -m tcp --dport 443 -j DNAT --to-destination <IP ADDR>:7443
COMMIT
cat /etc/sysconfig/iptables | iptables -c

Attachments