Skip to content
Browse files

Merged master into dasrecht branch

  • Loading branch information...
2 parents 385e36e + 455f515 commit 80aaeec7d630bafed9f8ba91ec9642f8d98f5815 Dan committed Nov 14, 2011
Showing with 52 additions and 21 deletions.
  1. +25 −10 README → README.md
  2. +23 −11 jackrabbit.sh
  3. +2 −0 jmx.roles.template
  4. +2 −0 jmx.user.template
View
35 README → README.md
@@ -1,15 +1,16 @@
Simple script to start / stop a Jackrabbit server.
-Author: D. Barsotti <daniel.barsotti@liip.ch>
+Author: D. Barsotti <daniel.barsotti@liip.ch>, B. Widmer <bastian.widmer@liip.ch>
-
-A script to start and stop apache jackrabbit according to the init.d mechanism
-
-This relies on a PID file to check if Jackrabbit is running.
-If you kill Jackrabbit without removing the PID file, you will not be able to start Jackrabbit with this script until you manually remove the PID file.
+Introduction
+============
+This relies on a PID file to check if Jackrabbit is running or not.
+If you kill Jackrabbit without removing the PID file, you will not be
+able to start Jackrabbit with this script before you manually removed
+the PID file.
Installation
-------------
+============
mkdir -p /opt/jackrabbit-startup # or wherever you want to put the code
cd /opt/jackrabbit-startup
@@ -22,11 +23,10 @@ Installation
# if not using a system that provides update-rc.d, you hopefully know how
# to proceed...
-
Usage
------
+=====
-The service should be started and stopped automatically from now on.
+The service should be started and stopped automatically from now on.
If you ever want to control it manually, you can run
@@ -37,3 +37,18 @@ jackrabbit again. You will get an error on stop that you can ignore.
/etc/init.d/jackrabbit stop
/etc/init.d/jackrabbit start
+
+
+JMX Monitoring
+==============
+The default JMX-Port for monitoring is set to 1111.
+You have to copy the jmx.user.template and jmx.group.template to the directory where your
+Jackrabbit JAR file is stored and remove the .template suffix
+
+In the User file you should specify a different password for your admin user.
+
+Memory Settings
+===============
+You can Tweak the Memory Settings with the Values Xmx (Maximal Memory) Xms (Start Memory)
+and MaxPermSize (Size of Maximum permanent generation heap)
+
View
34 jackrabbit.sh
@@ -21,29 +21,42 @@
### PLEASE EDIT THESE VALUES FOR YOUR SETUP
-# directory in which jackrabbit will store local data, must be writeable
+# Directory in which jackrabbit will store local data, must be writeable
BASEDIR=/home/dev/jackalope/jackrabbit
-# full filename of jackrabbit standalone .jar to run
-JACKRABBIT_JAR=$BASEDIR/jackrabbit-standalone-2.2.8-jackalope-SNAPSHOT.jar
-# ip address for jackrabbit to listen on. you can make jackrabbit listen on all
+# Full filename of jackrabbit standalone .jar to run
+JACKRABBIT_JAR=$BASEDIR/jackrabbit-standalone-2.3.2.jar
+# IP address for jackrabbit to listen on. you can make jackrabbit listen on all
# interfaces by using 0.0.0.0 here.
JACKRABBIT_HOST=127.0.0.1
-# port number to listen on. 8080 is default, you can use something else
+# Port number to listen on. 8080 is default, you can use something else
JACKRABBIT_PORT=8080
-###
-
-# full filename to the pid file to check if jackrabbit is running
+# JMX-Port for monitoring
+JMX_PORT=1111
+# Java memory allocation
+MEMORY="-XX:MaxPermSize=128m \
+ -Xmx512M \
+ -Xms128M"
+# JMX Management Parameters
+MANAGEMENT="-Dcom.sun.management.jmxremote \
+ -Dcom.sun.management.jmxremote.port=$JMX_PORT \
+ -Dcom.sun.management.jmxremote.authenticate=true \
+ -Dcom.sun.management.jmxremote.ssl=false \
+ -Dcom.sun.management.jmxremote.password.file=$BASEDIR/jmx.user \
+ -Dcom.sun.management.jmxremote.access.file=$BASEDIR/jmx.role"
+# Full filename to the pid file to check if jackrabbit is running
PIDFILE=$BASEDIR/jackrabbit.pid
-# full filename to the logfile to output console output of jackrabbit
+# Full filename to the logfile to output console output of jackrabbit
# additionally, jackrabbit has its own logfile
LOGFILE=$BASEDIR/jackrabbit.log
+###
+# Uncomment to debug the script
#set -x
do_start() {
if [ ! -f $PIDFILE ]; then
cd $BASEDIR
- nohup java -jar $JACKRABBIT_JAR -h $JACKRABBIT_HOST -p $JACKRABBIT_PORT >> $LOGFILE 2>&1 & echo $! > $PIDFILE
+ nohup java $MEMORY $MANAGEMENT -jar $JACKRABBIT_JAR -h $JACKRABBIT_HOST -p $JACKRABBIT_PORT >> $LOGFILE 2>&1 & echo $! > $PIDFILE
echo "Jackrabbit started"
else
echo "Jackrabbit is already running"
@@ -83,4 +96,3 @@ case "$1" in
exit 3
;;
esac
-
View
2 jmx.roles.template
@@ -0,0 +1,2 @@
+admin readwrite
+readonly readonly
View
2 jmx.user.template
@@ -0,0 +1,2 @@
+admin thisIsSupposedToBeAStrongPassword!
+readonly readonly

0 comments on commit 80aaeec

Please sign in to comment.
Something went wrong with that request. Please try again.