This will create a MacOS X standard directory layout and startup configuration for use with launchd.
Note that this does not give all possible methods of downloading and building. Those are described in the Installation Procedures for UNIX.
Therefore it is assumed that you have a binary .tar.gz at ~/Download/apache-servicemix-3.x.tar.gz
.
Directory Setup
sudo mkdir /Library/ServiceMix
cd /Library/ServiceMix
sudo mkdir Versions
cd Versions
sudo tar -xzf /Download/apache-servicemix-3.2.tar.gz
sudo ln -s apache-servicemix-3.2 Current
cd ..
sudo ln -s Versions/Current/bin/ bin
sudo ln -s Versions/Current/conf/ conf
sudo ln -s Versions/Current/data/ data
sudo ln -s Versions/Current/examples/ examples
sudo ln -s Versions/Current/hotdeploy/ hotdeploy
sudo ln -s Versions/Current/lib/ lib
Note that this assumes the 3.2 directory layout which contains a hotdeploy. For earlier versions replace the hotdeploy with a soft link for deploy and install.
launchd Configuration
Create org.apache.servicemix.plist
using Property List Editor with the following entries:
Property List |
Class |
Value |
---|---|---|
Root |
Dictionary |
|
EnvironmentVariables |
Dictionary |
|
JAVA_HOME |
String |
/Library/Java/Home |
Label |
String |
org.apache.servicemix |
OnDemand |
Boolean |
No |
Program |
String |
/Library/ServiceMix/bin/servicemix |
ProgramArguments |
Array |
|
0 |
String |
/Library/ServiceMix/bin/servicemix |
ServiceDescription |
String |
Apache ServiceMix JBI Container |
StandardErrorPath |
String |
/Library/ServiceMix/data/log/error.log |
StandardOutPath |
String |
/Library/ServiceMix/data/log/console.log |
WorkingDirectory |
String |
/Library/ServiceMix |
sudo cp org.apache.servicemix.plist /Library/LaunchDaemons
sudo chown root:wheel /Library/LaunchDaemons/org.apache.servicemix.plist
sudo chmod 644 /Library/LaunchDaemons/org.apache.servicemix.plist