Installers

Introduction/Background

ApacheDS is provided to users as a set of native installers for various operating systems, as well as archive-based distributions suitable for any operating system.

Here's the complete list of all the distributions:

  • Windows .exe installer (32 bit only)
  • Mac OS X .pkg installer package (32bit and 64bit)
  • Linux binary .bin installer (32bit and 64bit)
  • Linux Debian .deb installer package (32bit and 64bit)
  • Linux Fedora .rpm installer package (32bit and 64bit)
  • Archive distribution as zip and tar.gz

Each distribution, except the archive-based distributions, bundles the specific version (for the target operating system and architecture) of the Tanuki Service Wrapper.
This wrapper allows ApacheDS to run as a standard native service using the system's routines to start/stop the server at boot time.

Installers Generation

Prerequisites

Building all native installers requires that the machine on which the installers will be built has all the needed tools and utilities.

Installer

Tools and Utilities

Windows .exe installer

  • NSIS (/usr/bin/makensis)

Mac OS X .pkg installer package

  • PackageMaker.app (/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker)
  • HDIUtil (/usr/bin/hdiutil)

Linux binary .bin installer

  • SH (/bin/sh)

Linux Debian .deb installer package

  • DPKG (/usr/bin/dpkg)
  • GNUTar (/usr/bin/tar)

Linux binary .rpm installer package

  • RPMBuild (/usr/bin/rpmbuild)

Archive distribution

  • (none)

Building on a machine that does not have all the prerequisites will not fail the build, targets with unavailable tools and utilities will be skipped gracefully.

Mac OS X is the only platform on which it is possible to build all installers.

The following section will describe how to install all prerequisites on a Mac OS X system.

Installing all prerequisites on Mac OS X

Installing all prerequisites on Mac OS X requires the following softwares to be installed:

Once those softwares are installed we need to install additional command line utilities via Mac Ports (rpm, dpkg, gnutar)

To do so, run the following command in a terminal window:

$ sudo port install rpm dpkg gnutar nsis

It will take a little while to install everything.

Then, it will be required to create a few symbolic links to please the package complilers.

Run the following commands:

$ sudo ln -s /opt/local/bin/rpmbuild /usr/bin/rpmbuild
$ sudo ln -s /opt/local/bin/dpkg /usr/bin/dpkg
$ sudo ln -s /opt/local/bin/dpkg-deb /usr/bin/dpkg-deb
$ sudo rm /usr/bin/tar
$ sudo ln -s /opt/local/bin/gnutar /usr/bin/tar
$ sudo ln -s /opt/local/bin/makensis /usr/bin/makensis

Alternatively it is also possible to configure the paths in your settings.xml

<settings>
  ...
  <profiles>
    <profile>
      <id>installers</id>
      <properties>
        <installers.dpkg>/opt/local/bin/dpkg</installers.dpkg>
        <installers.rpmbuild>/opt/local/bin/rpmbuild</installers.rpmbuild>
        <installers.makensis>/opt/local/bin/makensis</installers.makensis>
        <!--<installers.packageMaker></installers.packageMaker>-->
      </properties>
    </profile>
  </profiles>
  ...
</settings>

Generate installers

You can generate ApacheDS installers by building the ApacheDS subproject from the root directory with the 'installers' profile activated.

mvn clean install -Pinstallers

This 'installers' profile will add the two maven modules to the build:

  • ApacheDS Installer Maven Plugin (artifactId='apacheds-installers-maven-plugin')
  • ApacheDS Installer (artifactId='apacheds-installers')

At the end of the execution of the build, all installers are located at: [ApacheDS subproject root]/installers/target/installers

Installing/Uninstalling, Registering/Unregistering and Starting/Stopping the ApacheDS service

With the Windows installer

Installation

Open the Windows installer and answer the questions asked in the installer.

Uninstallation

Run the Uninstaller application (from the ApacheDS menu in the Start menu)

Starting the default instance

In the Services control panel (Configuration Panel > Administrative Tasks > Services), right click on the ApacheDS service and choose "Start"

Stopping the default instance

In the Services control panel (Configuration Panel > Administrative Tasks > Services), right click on the ApacheDS service and choose "Stop"

With the Mac OS X .pkg installer package

Installation

The Mac OS X .pkg installer package is distributed inside a disk image (.dmg file), so this disk image has be to opened first and then the installer package itself.
Follow the instructions of the installer.

Uninstallation

Unfortunately, there's no uninstallation process.
This task is manual:

  • Shut down any running instance
  • Remove folder '/usr/local/apacheds-(version)' and the launchd file '/Library/LaunchDaemons/org.apache.directory.server.plist'

Starting the default instance

  • $ sudo launchctl load /Library/LaunchDaemons/org.apache.directory.server.plist
    or
  • $ sudo apacheds start default
    or
  • $ sudo /usr/local/apacheds-(version)/bin/apacheds start default

Stopping the default instance

  • $ sudo launchctl unload /Library/LaunchDaemons/org.apache.directory.server.plist
    or
  • $ sudo apacheds stop default
    or
  • $ sudo /usr/local/apacheds-(version)}/bin/apacheds stop default

Registration of the default instance

Open /Library/LaunchDaemons/org.apache.directory.server.plist in your favorite text editor and change the 'RunAtLoad' key to 'true'

Unregistration of the default instance

Open /Library/LaunchDaemons/org.apache.directory.server.plist in your favorite text editor and change the 'RunAtLoad' key to 'false'

With the Linux .rpm installer package

Installation

$ sudo rpm --install apacheds-(version)-(arch).rpm

Uninstallation

$ sudo rpm --uninstall apacheds

Starting the default instance

$ sudo /etc/init.d/apacheds-(version)-default start

Stopping the default instance

$ sudo /etc/init.d/apacheds-(version)-default stop

Registration of the default instance

$ sudo /sbin/chkconfig --add apacheds-(version)-default

Unregistration of the default instance

$ sudo /sbin/chkconfig --del apacheds-(version)-default

With the Linux .deb installer package

Installation

$ sudo dpkg --install apacheds-(version)-(arch).deb

Uninstallation

$ sudo dpkg --uninstall apacheds

Starting the default instance

$ sudo /etc/init.d/apacheds-(version)-default start

Stopping the default instance

$ sudo /etc/init.d/apacheds-(version)-default stop

Registration of the default instance

$ sudo update-rc.d apacheds-(version)-default defaults

Unregistration of the default instance

$ sudo update-rc.d -f apacheds-(version)-default remove

With the Linux .bin installer package

Installation

$ sudo ./apacheds-(version)-(arch).bin

Uninstallation

Unfortunately, there's no uninstallation process.
This task is manual:

  • Shut down any running instance
  • Remove all installed paths and files

Starting the default instance

$ sudo /etc/init.d/apacheds-(version)-default start

Stopping the default instance

$ sudo /etc/init.d/apacheds-(version)-default stop

Registration of the default instance

$ sudo update-rc.d apacheds-(version)-default defaults (on Debian distributions) 
$ sudo /sbin/chkconfig --add apacheds-(version)-default (on Fedora distributions)

Unregistration of the default instance

$ sudo update-rc.d -f apacheds-(version)-default remove (on Debian distributions) 
$ sudo /sbin/chkconfig --del apacheds-(version)-default (on Fedora distributions)

With the Archive

Starting the default instance

Run the apacheds.sh or apacheds.bat script in a terminal/console.

Stopping the default instance

Kill (CTRL+C) the running server in the terminal/console.

  • No labels