# Quick start tutorial

This tutorial will guide you into a minimal installation and configuration procedure. You need some prerequisites:

- A computer with a GNU/Linux or recent UNIX system
- A web browser launched from the computer (to access localhost)
- An LDAP directory with a user account (default suffix: dc=example,dc=com)
- A cup of coffee (or tea, we are open minded)

## Installation

LemonLDAP::NG is written in Perl and requires a lot of Perl dependencies. You must install them first.

Get the tarball on Download page and follow next steps (or install using packages):

### Extract

    $ tar zxvf lemonldap-ng-*.tar.gz
    $ cd lemonldap-ng-*

### Build

    $ make
    $ make test

### Install

    $ sudo make install

If your LDAP suffix is not dc=example,dc=com, use:

    $ sudo make install LDAPSUFFIX=mysuffix

You can also change the host and port with options LDAPHOST and LDAPPORT.

## Configuration

### System

Update your /etc/hosts to map SSO URLs to localhost:

    $ sudo make postconf

### Apache

Include LemonLDAP::NG configuration in your main Apache configuration:

    include /usr/local/lemonldap-ng/etc/portal-apache2.conf
    include /usr/local/lemonldap-ng/etc/handler-apache2.conf
    include /usr/local/lemonldap-ng/etc/manager-apache2.conf

Restart Apache:

    $ sudo apachectl configtest
    $ sudo apachectl restart

## Run

### Open SSO session

Go on http://auth.example.com and log with LDAP user account.

### Access protected application

Try http://test1.example.com or http://test2.example.com

### Edit configuration

Go on http://manager.example.com