2.2.1 - LinuxLinux Installation Layout

When you installed ApacheDS on your Linux machine, it created various directories on your disk. Typically, we need to store :

  • the binaries
  • the server configuration files
  • the license files
  • the dependencies

We will describe in this chapter the global layout and the various files and their meaning and use.

The Linux installer comes into two flavors : a debianDebian installer or a RPMRPM installer.

Linux Linux Standard layout

On Linux, the installation will be done in /opt, and the daemon script will be in /etc/init.d. Here are the created directories :

  /opt/apacheds-/
    |
    +-- bin/
    |    |
    |    +-- apacheds*
    |    |
    |    +-- wrapper*
    |
    +-- conf/
    |    |
    |    +-- wrapper.conf
    |
    +-- lib/
    |    |
    |    +-- apacheds-service-.jar
    |    |
    |    +-- apacheds-wrapper-.jar
    |    |
    |    +-- libwrapper.so
    |    |
    |    +-- wrapper-3.2.3.jar
    |
    +-- NOTICE
    |
    +-- LICENSE

Linux! Starting ther server

THere are three ways to start the server :

  • as a daemon : in this case, the server is automatically started when the machine is started.
  • starting the daemon from /etc/init.d manually
  • starting the server from /opt/apacheds-/bin

The most convenient is obviously to let the server starts apacheDS automatically when the server is started. It's enough to launch this command once the installation has been done :

$ sudo su
$ cd /etc/init.d
$ update-rc.d apacheds-2.0.0-M20-default defaults
Adding system startup for /etc/init.d/apacheds-2.0.0-M20-default ...
/etc/rc0.d/K20apacheds-2.0.0-M20-default -> ../init.d/apacheds-2.0.0-M20-default
/etc/rc1.d/K20apacheds-2.0.0-M20-default -> ../init.d/apacheds-2.0.0-M20-default
/etc/rc6.d/K20apacheds-2.0.0-M20-default -> ../init.d/apacheds-2.0.0-M20-default
/etc/rc2.d/S20apacheds-2.0.0-M20-default -> ../init.d/apacheds-2.0.0-M20-default
/etc/rc3.d/S20apacheds-2.0.0-M20-default -> ../init.d/apacheds-2.0.0-M20-default
/etc/rc4.d/S20apacheds-2.0.0-M20-default -> ../init.d/apacheds-2.0.0-M20-default
/etc/rc5.d/S20apacheds-2.0.0-M20-default -> ../init.d/apacheds-2.0.0-M20-default

Otherwise, starting the server using option 2 is all about typing this command line :

$ sudo /etc/init.d/apacheds-2.0.0-M20-default start

This will start the default instance. Would you like to have more than one instance of the server installed, then you'll have to modify this script.

Starting the server using the apacheds script requires that you provide a third parameter : the instance to run.

$ sudo /opt/apacheds-2.0.0-M20/bin/apacheds start default

In any case, we start the apacheds script, which strats the wrapper executable, which itself starts the serveur.

Linux bin directory

The bin directory contains the binary used to launch the server. The apacheds script starts the wrapper executable, using the configuration file wrapper.conf.

Linuxconf directory

This directory contain the wrapper configuration file. This is a description of its content. The %INSTANCE_DIRECTORY% parameter is taken from the apacheds script, it refers to the isnance location. Out of all those parameters, it's likely that the one you may want to change is the wrapper.java.maxmemory one, if needed.

parameter Description Default value
wrapper.java.additional.1 The first parameter passed to the JVM -Dlog4j.configuration=file:///%INSTANCE_DIRECTORY%/conf/log4j.properties
wrapper.java.additional.2 The var directory -Dapacheds.var.dir=%INSTANCE_DIRECTORY%
wrapper.java.additional.3 The log directory -Dapacheds.log.dir=%INSTANCE_DIRECTORY%/log
wrapper.java.additional.4 The run directory -Dapacheds.run.dir=%INSTANCE_DIRECTORY%/run
wrapper.java.additional.5 The server instance -Dapacheds.instance=%INSTANCE%
wrapper.java.initmemory The minimal memory to use No default value
wrapper.java.maxmemory The maximal memory to use No default value
wrapper.java.maxmemory The -Xmx JVM parameter 2048m
wrapper.console.loglevel The wrapper log level INFO
wrapper.logfile The wrapper log file %INSTANCE_DIRECTORY%/log/wrapper.log
wrapper.logfile.maxsize The wrapper log maximal size 1m
wrapper.logfile.maxfiles The number of wrapper log file we kep on disk 5
wrapper.ping.timeout The delay after which we will consider the server as stalled 240s (4 mins)
wrapper.startup.timeout The maximum delay allowed for the server to start 120 secs

Linux lib directory

This directory contains the third party library the server needs. You should not have to change anything there.