SARK V4.0.1 Debian install

From sailpbx
Revision as of 14:06, 9 June 2014 by Adminwiki (talk | contribs) (SARK 4.0.1 Beta Wheezy Install)
Jump to: navigation, search

back to SARK v4.0.0 contents

SARK 4.0.1 Beta Wheezy Install

This page assumes you already have installed a working 4.0.0 version of sail and that it is the latest release. If it isn't then install or upgrade it.

There is currently no repo image for 4.0.1 Beta so you will need to download the package and install it with dpkg. Proceed as follows;

Log in to the linux console on your sail box and run the following

apt-get update
apt-get upgrade
apt-get install dnsmasq tshark vim debian-archive-keyring less php5-ldap hostname asterisk-mp3

Now you can install sail-4.0.1. Change the wget to retrieve the latest 4.0.1 release from sailpbx.com/sail/sail-4.0/debs/noarch

wget http://sailpbx.com/sail/sail-4.0/debs/noarch/sail_4.0.1-10_all.deb
dpkg -i sail_4.0.1-10_all.deb

Close your browser and re-open it if you were previously running an earlier version of sail. If you don't, you'll get odd looking output as the cached jquery code fights with the new 4.0.1 output.

OK, you're done; unless of course you'd like to run the new ldap directory feature in 4.0.1, in which case read on...

LDAP install

Assuming LDAP is not already installed on your SARK/SAIL box, proceed as follows;

Open the SARK browser app and navigate to the network panel. Turn OFF the checkbox "Use DHCP to obtain an IP address?:" and enter a domain name into the domain name field. You can also allocate a fixed IP address and DNS information at this point if you wish but you MUST enter a domain name. Doesn't matter what domain you choose, as long as it follows the rules for correct domain name formation. This is necessary because the Debian LDAP installer will use this name to create the LDAP Base dn. If you DON'T do this then you'll end up needing to reconfigure ldap after the install and it will get messy so don't say we didn't warn you.



V4 globals domain.png



In our example we've used a domain of sark.aelintra.com

OK, save the information you've entered and reboot your box.

Now you can install ldap

apt-get install slapd ldap-utils

The installer will ask you to provide an admin password for LDAP, make a note of it; you'll need it shortly and whenever you want to do any other stuff with ldap in the future.

Once it's installed you need to add an organizationalUnit(ou) for your address book. If you are already a whiz with ldap then just go ahead and do it, using a base dn the same as your domain name. If you don't know ldap then proceed as follows...

You will find a file on your SARK box at /opt/sark/cache/ldapcontactou.ldif

dn: ou=contacts,dc=sark,dc=aelintra,dc=com
objectClass: organizationalUnit
objectClass: top
ou: contacts

Without getting into the details (you can read about ldap elsewhere), in the first line of the file is the name of the organizationalUnit we want to create. In our example it is "contacts", if you are unfamiliar with ldap, then leave it as that. The remainder of the line (dc=sark,dc=aelintra,dc=com) is called the base dn. Debian builds the base dn automatically from the domain you provided earlier so you must make yours match your domain name. If, for example, you used a domain name of splodge.soap.es then you should make your file look like this

dn: ou=contacts,dc=splodge,dc=soap,dc=es
objectClass: organizationalUnit
objectClass: top
ou: contacts

Ok, lets add it, we are going to use the LDAP slapadd utility, which is old fashioned nowadays, but easy to use.

/etc/init.d/slapd stop
slapadd -l /opt/sark/cache/ldapcontactou.ldif
/etc/init.d/slapd start

Almost done. Navigate to the SARK browser app and open the Globals page. You will see a new tab called LDAP. Click on it and enter the details for your LDAP database. You'll need the password you provided when you installed LDAP.



V4 globals ldap.png



Issue a commit and you're done.

Refresh your browser and navigate to SARK. You should see a "Directory" option when you click on the "System" drop-down. In this page you can add and modify your telephone book entries and have your phones browse them. You'll need to add a couple of entries to your SARK firewall for TCP ports 389 and 686 (restrict them to net:$LAN) to allow the phones to query the database. Here's how we've added ours (see the last line) - don't forget to restart the firewall.



V4 firewall ldap.png