Running Orion from a non-writeable directory
Written by Joseph Ottinger
This guide gives an overview to running Orion from directories that are not
writeable by the target user. You may want to do this if you download and
extract Orion as root, then wish users on the system to run their own instances
from the central installation.
In this document $CWD represents the current working directory.
Quick Reference Info
- Orion uses $CWD as a temporary folder, and __needs__ write access to it.
- $CWD/persistence/transaction.state is used by default, but can be overridden
with the undocumented transaction-log="pathto/transaction.state"
attribute of server.xml's element.
- Relative paths in symlinked config files are interpreted to be relative to
the original location (i.e. not the symlinked location) of the config file.
Configuring Orion
Beware! All relative paths given in config files will be
relative to the config file itself, not the current directory.
First, copy server.xml, application.xml, data-sources.xml, jms.xml, and
rmi.xml to a config directory owned by the user. Nothing beyond your normal
data-sources need be put in data-sources.xml. Any config files that are not
copied must be referenced with absolute paths (or paths relative to the new
location of the config file).
server.xml
- If $CWD/persistence is not where you want a transaction.state file, you need
to use the undocumented transaction-log="pathto/transaction.state"
attribute of server.xml's element. If you're putting this in a new directory,
make sure you create it before you run Orion.
- You need to set the paths for rmi-config, log file, global-application, and
global-web-app-config. If you do not give an absolute path name, all paths are
interpreted as relative to $CWD 1.1 application.xml
- Set persistence path to somewhere you have write access to
- Set the principals path to your principals.xml file - note that if you set
an invalid path, Orion throws a NullPointerException on startup in builds <=
11157
- Set the log and data-sources.xml paths
jms.xml
- The log file path should be set
rmi.xml
- The log file path should be set
Running Orion
Since $CWD is used as a temporary folder for generating and compiling CMP and
JSP .java files, Orion must by started from a folder the user has write access
to like so:
java -jar /usr/local/orion/orion.jar -config configs/server.xml
The default search for server.xml is $CWD/config/server.xml so if you've
called your config directory that, there's no need to even pass Orion its
-config flag.
Copyright © 2007 IronFlare AB