Adding Kolab Calendar in DirectAdmin Roundcube

Adding Kolab Calendar in Directadmin Roundcube webmail

 

This guide is based on CentOS 6-64 with DirectAdmin and php5.6 you will do any change at your own risk.

If you need to add Kolab Calendar on Roundcube and your control panel is DirectAdmin  this may help you:

First, we need access root.

Run this command to find pnp.ini. if you are not sure where is it:
php –ini
In pnp.ini if you have (proc_close,proc_open,) in disable_functions then remove this 2 itmes and restart httpd. (We can add them again after sucess kolab calendar instalaltion)

Time to start Kolab Calendar in Directadmin :

# yum install git php-sabre-*
# cd /tmp
# git clone https://git.kolab.org/diffusion/RPK/roundcubemail-plugins-kolab.git
# cd /var/www/html/roundcube/plugins/ >>>or (cd /<path-to-roundcube>)
# cp -r /tmp/roundcubemail-plugins-kolab/plugins/calendar .
# cp -r /tmp/roundcubemail-plugins-kolab/plugins/libcalendaring .
# cd calendar
# cp config.inc.php.dist config.inc.php

Now we need a MySQL root password, if you don’t know what is your MySQL root password run this command:
# cat /usr/local/directadmin/conf/mysql.conf

backup your Roundcube database before any change, all user’s contacts are saved in this DB if you don’t have a backup you will go in trouble.
I used this command to backup database:

# mysqldump –user da_admin –password=”123456″ da_roundcube > /var/www/html/roundcube/da_roundcubeBK.sql

da_admin is mysql root username
123456 is myql root password
da_roundcube is roundcube database name

after backedup roundcube db make sure da_roundcubeBK.sql file is ok on backup path in this case: /var/www/html/roundcube/
If you need to restore backedup database you can use this command:
mysql –user=da_admin –password=”123456″ da_roundcube < da_roundcubeBK.sql

Run the initial mysql file in the calendar plugin folder:
# mysql –user=da_admin –password=”123456″ da_roundcube < /var/www/html/roundcube/plugins/calendar/drivers/database/SQL/mysql.initial.sql
# mysql –user=da_admin –password=”123456″ da_roundcube < /var/www/html/roundcube/plugins/calendar/drivers/kolab/SQL/mysql.initial.sql
# mysql –user=da_admin –password=”123456″ da_roundcube < /var/www/html/roundcube/SQL/mysql.initial.sql

Now add ( ‘calendar’,) to roundcube config file with your favorite editor, Mine is vi:

# vi /var/www/html/roundcube/config/config.inc.php
If you were not sure where is the right place looking for this line:
$config [‘plugins’] = array(
As screenshot :

This file is read-only and to save by vi should use this command:
w !sudo tee %

To prevent changing config on updates:
# cd /usr/local/directadmin/custombuild/
# mkdir custom
# cd custom
# mkdir roundcube
# cp /var/www/html/roundcubemail-1.3.x/config/config.inc.php /usr/local/directadmin/custombuild/custom/roundcube

We need php-ldap module but can’t do on DirectAdmin, install it with yum so we will do a little change:

remove (php*) on this file:
# vi /etc/yum.conf
sould delete php* from exclude= php*
Now we can install php-ldap:

# yum install php-ldap
After installation add again exclude= php*

Compile php with ldap:
# cd /usr/local/directadmin/custombuild
# mkdir -p custom/ap2
# cp -fp configure/ap2/configure.php56 custom/ap2/configure.php56
# ./build used_configs | grep configure.php
This command show php info and result should be like this:# (PHP (default) configuration file: /usr/local/directadmin/custombuild/custom/ap2/configure.php56)
Edit custom/ap2/configure.php56 and add:
(–with-ldap=/usr \
–with-ldap-sasl=/usr)
# cd /usr/local/directadmin/custombuild/
# ./build php n
# service httpd restart

Install the dependencies with Composer
# cd /var/www/html/roundcube/
# wget https://getcomposer.org/download/1.5.2/composer.phar
# cp composer.json-dist composer.json
# php composer.phar require sabre/vobject 3.3.3
if you got an error you can run first :
# php composer.phar install
and again:
# php composer.phar require sabre/vobject 3.3.3
# cd var/www/html/roundcube/plugins
# chown webapps:webapps libcalendaring calendar

Now you have a calendar on your round cube.

roundcube
Links:
https://plugins.roundcube.net/packages/kolab/calendar
Buy VPS in IRAN Datacenter

دیدگاهتان را بنویسید

نشانی ایمیل شما منتشر نخواهد شد. بخش‌های موردنیاز علامت‌گذاری شده‌اند *