https://wiki.davical.org/index.php?title=Synology_DS211&feed=atom&action=historySynology DS211 - Revision history2024-03-28T16:00:23ZRevision history for this page on the wikiMediaWiki 1.40.1https://wiki.davical.org/index.php?title=Synology_DS211&diff=3747&oldid=prevFsfs: #7040692017-05-05T14:47:55Z<p>#704069</p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 15:47, 5 May 2017</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l114">Line 114:</td>
<td colspan="2" class="diff-lineno">Line 114:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> ), //used to create the user based on his ldap properties</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> ), //used to create the user based on his ldap properties</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> 'group_mapping_field' => array("username" => "cn",</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> 'group_mapping_field' => array("username" => "cn",</div></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> "<del style="font-weight: bold; text-decoration: none;">updated</del>" => "modifyTimestamp",</div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> "<ins style="font-weight: bold; text-decoration: none;">modified</ins>" => "modifyTimestamp",</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> "fullname" => "description" ,</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> "fullname" => "description" ,</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> "members" =>"memberUid"</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> "members" =>"memberUid"</div></td></tr>
<!-- diff cache key davical:diff::1.12:old-3289:rev-3747 -->
</table>Fsfshttps://wiki.davical.org/index.php?title=Synology_DS211&diff=3289&oldid=prevFenton: Add formatting2014-07-01T01:17:17Z<p>Add formatting</p>
<a href="https://wiki.davical.org/index.php?title=Synology_DS211&diff=3289&oldid=3288">Show changes</a>Fentonhttps://wiki.davical.org/index.php?title=Synology_DS211&diff=3288&oldid=prevFenton: Created page, still needs formatting2014-06-30T21:27:51Z<p>Created page, still needs formatting</p>
<p><b>New page</b></p><div>==Synology DS 211 with DSM 5.0==<br />
<br />
From Daniel via the DAViCal-General mailing list:<br />
<br />
Experiences with installing DAViCal on a Synology DS211 with DSM 5.0. My starting point was a script previously published by CyberLine on GitHub Gist (https://gist.github.com/CyberLine/3755721/). Unfortunately, the script would not work out of the box, so here is what I had to do. Please note that the following is not meant to be run as a script. Rather, use it as copy-paste base for your terminal.<br />
<br />
# Install bootstrap package first.<br />
# See: http://forum.synology.com/wiki/index.php/How_to_Install_Bootstrap<br />
<br />
# The installation of optware-devel is buggy because of a conflict between wget-ssl and wget. It is not possible to just uninstall wget, because it is needed for ipkg. So, first fetch the new wget-ssl, then remove the old and install the new:<br />
wget http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/wget-ssl_1.12-2_arm.ipk<br />
ipkg remove wget && ipkg install wget-ssl_1.12-2_arm.ipk<br />
<br />
# Now, install system tools and second postgres<br />
ipkg install perl perl-dbi make sed postgresql binutils busybox optware-devel<br />
<br />
# patch postgres config for non conflicting if not exists<br />
if [ "0" == $(egrep '^port = 5433$' /opt/var/pgsql/data/postgresql.conf | wc -l) ]; then<br />
echo "port = 5433" >> /opt/var/pgsql/data/postgresql.conf<br />
fi;<br />
<br />
# install needed host entries for davical<br />
if [ "0" == $(grep davical /opt/var/pgsql/data/pg_hba.conf | wc -l) ]; then<br />
echo -a "local davical davical_app trust\nlocal davical davical_dba trust" >> /opt/var/pgsql/data/pg_hba.conf<br />
fi;<br />
<br />
# start the installed postgres cluster<br />
/opt/etc/init.d/S98postgresql start<br />
<br />
<br />
# install needed perl packaged<br />
# Installation of CPAN does not work out of the box ("Can't locate CPAN/Meta/Requirements.pm"). I solved this by:<br />
cpan CPAN::Meta<br />
# This will draw in a number of other dependencies, just confirm all dialogs. This step takes a looong time!<br />
# Now, the following should work:<br />
cpan -fi CPAN YAML<br />
<br />
# build the perl package for davical installation<br />
mkdir -p /usr/local/etc/davical<br />
wget http://search.cpan.org/CPAN/authors/id/T/TU/TURNSTEP/DBD-Pg-2.19.3.tar.gz -O - | tar -xz -C /usr/local<br />
cd /usr/local/DBD-Pg-2.19.3 && perl Makefile.PL LD=/opt/bin/ld && make && make install<br />
<br />
# Edit vhost file /opt/etc/apache2/conf.d/davical.vhost<br />
Alias /cal /opt/share/davical/htdocs<br />
<Directory /opt/share/davical/htdocs/><br />
AllowOverride None<br />
</Directory><br />
# (i.e., no php directives, no virtual host!)<br />
<br />
# If you prefer a virtual host, create one in the DSM web interface linking to the sub directory "cal".<br />
<br />
# check for needed open_basedir modification<br />
# I did this manually in DSM web interface, adding this to the open_basedir directive:<br />
/opt/share/davical:/opt/share/awl/inc:/usr/local/etc/davical/<br />
# This will then be in /etc/php/conf.d/user-settings.ini<br />
<br />
# append davical.vhost to the user apache if not exists<br />
if [ "0" == $(egrep '^Include /opt/etc/apache2/conf.d/davical.vhost' /etc/httpd/conf/httpd.conf-user | wc -l) ]; then<br />
echo "Include /opt/etc/apache2/conf.d/davical.vhost" >> /etc/httpd/conf/httpd.conf-user<br />
fi;<br />
<br />
#restart the user apache<br />
/usr/syno/sbin/synoservicecfg --restart httpd-user<br />
<br />
# install davical if not exists<br />
if [ ! -e "/opt/share/davical" ]; then<br />
wget http://debian.mcmillan.net.nz/packages/davical/davical-1.1.1.tar.gz -O - | tar -xz -C /opt/share/<br />
mv /opt/share/davical-1.1.1/ /opt/share/davical/<br />
else<br />
echo "davical installation exists. nothing to do."<br />
fi;<br />
<br />
# install needed "awl" if not exists<br />
if [ ! -e "/opt/share/awl/" ]; then<br />
wget http://debian.mcmillan.net.nz/packages/awl/awl-0.53.tar.gz -O - | tar -xz -C /opt/share/<br />
mv /opt/share/awl-0.53/ /opt/share/awl/<br />
else<br />
echo "awl installation exists. nothing to do.";<br />
fi;<br />
<br />
# install davical database if not exists<br />
if [ "0" == $(psql -p 5433 -l template1 postgres | grep davical | wc -l) ]; then<br />
PGPORT=5433 PGUSER=postgres /opt/share/davical/dba/create-database.sh<br />
fi;<br />
<br />
# adjust connect string in DAViCal config (/opt/share/davical/config/example-config.php):<br />
$c->pg_connect[] = "dbname=davical port=5433 user=davical_app host=localhost";<br />
<br />
# soft link sample config files for each interface if not exists<br />
for ADDR in $(ip -4 addr list | grep inet | awk '{print $2}' | awk -F '/' '{print $1}'); do<br />
if [ ! -e "/usr/local/etc/davical/$ADDR-conf.php" ]; then<br />
ln -s /opt/share/davical/config/example-config.php /usr/local/etc/davical/$ADDR-conf.php<br />
fi;<br />
done;<br />
# Make also a softlink for possible DNS entries you want to use (.../your.domain.tld-conf.php).<br />
<br />
Now, the installation should work. Point your browser to your diskstation IP/cal and complete DAViCal setup.<br />
<br />
<br />
# Using the DSM LDAP server for user management:<br />
# Add the following to your config /opt/share/davical/config/example-config.php:<br />
$c->authenticate_hook['call'] = 'LDAP_check';<br />
$c->authenticate_hook['config'] = array(<br />
'host' => 'localhost', //host name of your LDAP Server<br />
'port' => '389', //port<br />
'protocolVersion' => '3', //Version of LDAP protocol to use<br />
'baseDNUsers'=> 'cn=users,dc=xxx,dc=xxx', //where to look at valid user<br />
'filterUsers' => 'objectClass=inetOrgPerson', //filter which must validate a user according to RFC4515, i.e. surrounded by brackets<br />
'baseDNGroups' => 'cn=groups,dc=xxx,dc=xxx', //where to look for groups<br />
'filterGroups' => 'objectClass=posixGroup', //filter with same rules as filterUsers<br />
'mapping_field' => array("username" => "cn",<br />
"modified" => "modifyTimestamp",<br />
"fullname" => "gecos" ,<br />
"email" =>"mail"<br />
), //used to create the user based on his ldap properties<br />
'group_mapping_field' => array("username" => "cn",<br />
"updated" => "modifyTimestamp",<br />
"fullname" => "description" ,<br />
"members" =>"memberUid"<br />
), //used to create the group based on the ldap properties<br />
'format_updated'=> array('Y' => array(0,4),'m' => array(4,2),'d'=> array(6,2),'H' => array(8,2),'M'=>array(10,2),'S' => array(12,2)),<br />
);<br />
$c->do_not_sync_from_ldap = array( 'admin' => true ); // do not affect admin account on ldap sync<br />
include('drivers_ldap.php');<br />
<br />
<br />
# Finally, in order to get LDAP to work, I had to edit the file /opt/share/davical/inc/Principal.php.<br />
# The reason is that Postgres on my DiskStation is really old (v 8.2.13) and does not seem to support some type casting used on LDAP sync.<br />
# Otherwise, on importing LDAP users, I get plenty of errors in the style "cannot write to database".<br />
# So what I did was to simply comment out line 540:<br />
// $param_name = 'cast('.$param_name.' as text)::BIT(24)';<br />
# I know this is really ugly but seemed to solve my issues.</div>Fenton