Categories
Uncategorised

Install Apache Directory Server on Ubuntu 16.04

This is a short guide on how to install Apache Directory Server and Apache Directory Studio on Ubuntu 16.04. This LDAP server is intended as the database of account information in my series of Shibboleth Identity Provider guides.

Download the Apache Directory Server installer from http://directory.apache.org/apacheds/download/download-linux-bin.html as of writing this guide. Make sure to get the correct version for the architecture of your system.

Open a terminal and change directory to where you downloaded the .bin file. eg. ~/Downloads

Make the downloaded file, in my case apacheds-2.0.0-M23-64bit.bin executable by issuing:

chmod +x apacheds-2.0.0-M23-64bit.bin

To run the installer, execute the following:

sudo ./apacheds-2.0.0-M23-64bit.bin

Read through the licence and decide whether or not you agree with the terms. If you agree, type yes and hit return and accept the defaults for all except the user and group which the server runs as. For brevity not security, I use root because I want the LDAP service to bind to the standard LDAP port 389 and not 10389 as per the default. Yeah, I know this can be fixed with a firewall rule and running services as root is a security risk but I’m running this on a trusted network, on a server where only I have physical and log on access.

The installer creates a start script in /etc/init.d called apacheds-2.0.0-M23-default in my case, and can be started using:

sudo /etc/init.d/apacheds-2.0.0-M23-default start

To enable the service to start at boot:

sudo update-rc.d apacheds-2.0.0-M23-default defaults

Check wherther the service is running by using netcat

nc -v localhost 10389 -w 0

which should return

Connection to localhost 10389 port [tcp/*] succeded!

Apache Directory Server should now be installed albeit running on port 10389, and we can now install Apache Directory Studio which makes configuring the service easier.

Previously I’ve had compatibility issues running the Directory Studio that is downloadable from http://directory.apache.org/studio/download/download-linux.html as is seems to lag behind the Directory Server in features. I get the latest snapshot builds from https://builds.apache.org/job/dir-studio/lastStableBuild/ and I’ve never had any issues. Again make sure that you download the correct build for your system.

In a terminal extract Directory Studio from your downloaded file, in my case ApacheDirectoryStudio-2.0.0-SNAPSHOT-linux.gtk.x8664.tar.gz

tar zxvf ApacheDirectoryStudio-2.0.0-SNAPSHOT-linux.gtk.x86_64.tar.gz

Change directory into ApacheDirectoryStudio and run

./ApacheDirectoryStudio &

We are now ready to start configuring and populating the LDAP server but this is in my next post.