An overview of Resin directories
Based on a few recent support queries, some clarification of Resin’s directory structure should be beneficial for everyone and new users in particular. Â This is all spelled out in the documentation, just in different words.
Resin is organized into essentially 4 different directories:
- Resin Home
- Contains:
- Scripts: bin/
- Internal Resin libraries like resin.jar: lib/
- Compiled native libraries: libexec/ or libexec64/
- Licenses: licenses/
- SSL keys: keys/
- Config EL variable: ${resin.home}
- ./configure parameter:Â −−prefix
- Command line: -resin-home is available but deprecated; should be set using the environment variable RESIN_HOME
- Default location: /usr/local/resin
- Contains:
- Resin Root
- Contains:
- Webapp deploy directory: webapps/
- Shared java libraries: project-jars/ and webapp-jars/
- Internal Resin databases: resin-data/ and watchdog-data/
- Config EL variable: ${resin.root}
- ./configure parameter:Â −−with-resin-root
- Command line:Â -root-directory
- Default location: /var/www
- Contains:
- Resin Config
- Contains:
- The main Resin configuration file: resin.xml
- Webapp defaults: app-default.xml
- Health checking and graphing configuration: health.xml
- Administrators list: admin-users.xml
- Config EL variable:Â ${__DIR__}
- ./configure parameter:Â −−with-resin-conf
- Command line: -conf (path to resin.xml, the other files are loaded using ${__DIR__})
- Default location: /etc/resin
- Contains:
- Resin Log
- Contains:
- Console log: console.log
- Watchdog log: watchdog-manager.log
- Resin log(s): jvm-*.log (default is jvm-default.log)
- Config EL variable: none
- ./configure parameter:Â −−with-resin-log
- Command line: -log-directory
- Default location: /var/log/resin
- Contains:
Consider a typical installation sequence without parameters:
cd resin-pro-4.0.18.zip
./configure
make
sudo make install
The ./configure command will output the following, clearly showing you that the 4 Resin directories get installed following typical Unix style setup into different partitions. Â As such, the “sudo” on make install is usually necessary to gain write permission to protected locations.
RESIN_HOME : /usr/local/resin
root : /var/www
conf : /etc/resin
log : /var/log/resin
plugins : common resin_os resin resinssl
init : /etc/init.d/resin
JAVA_HOME: /usr/java/default
…
Notice in the above output that the install also creates a custom startup script at /etc/init.d/resin! Â Resin’s packaged startup script at ${resin.home}/bin/resin.sh by default expects all Resin directories to exist under ${resin.home}. Â So it’s essential to use the init.d script in a Unix style setup so that Resin can find all the required directories.
Users who don’t have root access or prefer to keep installation simple can choose to install all of Resin to a single directory using the −−prefix parameter. Â In fact, this is how we recommend all users get started.
cd resin-pro-4.0.18.zip
./configure −−prefix=`pwd`
make
make install
−−prefix can be any directory you prefer; `pwd` simply refers to the current directory.  So after installation following the example above, ${resin.home} is the same as ${resin.root).  Config is located at ${resin.home}/conf and logs are written  to ${resin.home}/log.
Tags: configure parmeters, deploy directory, init.d, log directory, resin-home, resin.home, resin.root, startup

November 21st, 2011 at 4:05 pm
The install changed. We now put things under /usr/share resin not /usr/local.