Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Panel

    <Connector port="8080" protocol="HTTP/1.1"
                maxThreads="150"
                minSpareThreads="25"
                maxSpareThreads="75"
                enableLookups="false"
                redirectPort="8443"
                acceptCount="100"
                connectionTimeout="20000"
                disableUploadTimeout="true"
                URIEncoding="UTF-8" />

Panel

    <!- - Define an AJP 1.3 Connector on port 8009 -->
    <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" URIEncoding="UTF-8" />

Once again i found more reasonable not to copy (or symlink) webapps to tomcat appBase dir as suggests dspace official documentation. Instead i'm changin tomcat appBase to point to dspace webapps. Also put tomcat logs with other www/apache logs. Original lines are commented out and my lines marked bold.

Panel

      <!-- <Host name="localhost"  appBase="webapps" - ->
      <Host name="localhost"  appBase="/data/dspace/webapps"
            unpackWARs="true" autoDeploy="true">
        <!-- <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
               prefix="localhost_access_log." suffix=".txt"
                pattern="%h %l %u %t "%r" %s %b" /> -->
        <Valve className="org.apache.catalina.valves.AccessLogValve" directory="/var/log/apache2"
               prefix="tomcat_access." suffix=".log"
               pattern="%h %l %u %t "%r" %s %b" />

...

Following command fetches software from internet in order to build dspace. This soft will be placed under $HOME/.m2/ directory. In my case /root/.m2/. If You want to, You can build dspace as "www" user. I'm doing it as root.

Code Blockpanel
*

tcsh#

/data/dspace-1.8.1-src-release

* *


tcsh#

mvn

package

* *


tcsh#

cd

/data/dspace-1.8.1-src-release/dspace/target/dspace-1.8.1-build/

* *


tcsh#

ant

fresh_install

*

As looking from my notes there was an issue with creating PostgreSQL database (PL/pgSQL related). Seems that following helped out. However - i can't verify or confirm it at the moment.

Code Blockpanel
_

tcsh#

dropdb

\

-U

pgsql

dspacedb

_ _


tcsh#

createdb

\

-U

pgsql

\

-O

dspace

\

-E

UNICODE

dspacedb

_ _


tcsh#

psql

\

-h

localhost

\

-U

dspace

\

-f

/data/dspace-1.8.1-src-release/dspace/etc/postgres/database_schema.sql

dspacedb

_

And finally set proper permissons:

Code Blockpanel
*

tcsh#

chown

\

-R

www:www

/data/dspace

*

Just in case verify /data/dspace/config/log4j.properties doesn't bug You.  Remove unneeded "/" There may be 3 erratic lines like this one:

Code Blockpanel

/var/log/apache2/*/*cocoon.log

Also verify that /data/dspace/config/modules/authentication.cfg and authentication-ldap.cfg are correct.

Since i like to keep all dspace related things in one place and i have pretty small /usr/local:

Code Blockpanel
*

tcsh#

mkdir

\

-p

/data/dspace/tc-webinf/work/upload-dir

* *


tcsh#

mkdir

\

-p

/data/dspace/tc-webinf/work/cache-dir

* *


tcsh#

chown

\

-R

www:www

/data/dspace/tc-webinf

* *

tcsh#

grep

dspace

/data/dspace/webapps/xmlui/WEB-INF/cocoon/properties/core.properties

*


org.apache.cocoon.uploads.directory=/data/dspace/tc-webinf/work/upload-dir


org.apache.cocoon.cache.directory=/data/dspace/tc-webinf/work/cache-dir


org.apache.cocoon.work.directory=/data/dspace/tc-webinf/work/

Don't forget thisone if You upgraded Your dspace - cocoon may fill /usr/local.

If needed, configure OAI also: /data/dspace/config/oaicat.properties:

Code Blockpanel

/*/


Crosswalks.mods=org.dspace.app.oai.PluginCrosswalk


Crosswalks.mets=org.dspace.app.oai.PluginCrosswalk


Crosswalks.qdc=org.dspace.app.oai.PluginCrosswalk

Set up crontabs. PATH is required.

...

Now install certificates required to use LDAPS. Make sure that You have JAVA_HOME set:

Panel
Code Block

Wiki Markup

*tcsh# set JAVA_HOME=/usr/local/openjdk6*
*tcsh# echo $JAVA_HOME*
/usr/local/openjdk6
*tcsh# keytool \-import \-file /tmp/myldap-clients.example.com.crt \-alias myldap.example.com \-keystore $JAVA_HOME/jre/lib/security/cacerts*
Enter keystore password:&nbsp; 'changeit'&nbsp;&nbsp; <\- by default without '-es\!
/*/
Trust this certificate? \[no\]:&nbsp; *yes*
Certificate was added to keystore
*tcsh# keytool \-list \-keystore $JAVA_HOME/jre/lib/security/cacerts*
*tcsh# rm \-f /tmp/olp-wild-clients.example.com.crt*

5 Handle

If You are using "handle" also, then:

...

6 Clean up and daemons startup

Code Blockpanel
*

tcsh#

cd

/data/dspace-1.8.1-src-release

* *


tcsh#

mvn

clean

* *


tcsh#

rm

\

-r

/root/.m2

*

Enable all required services at startup - /etc/rc.conf. Once again pay attention to UTF and make sure that "-Xmx" and "-Xms" are at least 512M and both do have same values!

Code Blockpanel

apache22_enable="YES"


tomcat7_enable="YES"


tomcat7_java_opts="-Xmx512M

\

-Xms512M

\

-XX:MaxPermSize=128M

\

-Dfile.encoding=UTF-8"


tomcat7_catalina_log=">>

/var/log/apache2/

-

`date

\

+%Y

-

%m-%d`.log

2>&1"


tomcat7_catalina_tmpdir="/tmp"


handle_server_enable="YES"


postgresql_enable="YES"


postgresql_data="/data/pgsql"

Code Blockpanel
*

tcsh#

sync;

sync;

reboot

*

7 Final notes

  • If You should later on upgrade "openjdk", then You need to import LDAP certificate again - you'll lose it!
  • If You should upgrade mod_jk port, then dont forget to uncomment "#LoadModule jk_module.... " line!
  • Implement backups and monitoring!
  • Implement firewall. If using pf:

...