petersconsult
Verified User
- Joined
- Sep 10, 2021
- Messages
- 70
Hello all,
i just thought i'd give an A-Z summary of my installation of the RoundCube Caledar Plugin (as discussed here and here)
So.. it's been a real adventure.. this is going to be a very, very, very long post..
Basically, i started by following with the instructions found here..
But, as has been found in the posts linked above, there was a huge bug (and a few small ones) that took a lot of sleuthing to resolve.
So, i figured i'd post the whole thing here, to spare anyone the headaches i ran into..
So, to start with, i pretty much followed the instructions from the posts linked above:
Note that the trailing backslashes are so you can copy-paste the entire block of code in your terminal. Also, this all assumes root privileges; add 'sudo' as needed
Also, any time you see 'killall lsphp; ' that's only for LiteSpeed; if you're using something else (Apache), skip it!
The first step is to temporarily edit the file:
/etc/dnf/dnf.conf
and temporarily remove this from the 'exclude' line, then save the file (we'll add it back when we're done):
php*
Next, we install some stuff, make a backup of your Roundcube db, and do the install:
Next, we add the mention ‘calendar’, to the roundcube config file with your favorite editor; if you've not yet created a custom config for RoundCube, do this, otherwise, skip this step:
Next we edit the file:
/usr/local/directadmin/custombuild/custom/roundcube/config.inc.php
and change this (basically adding the line 'calendar',):
To this:
Next, check if these 2 files exist:
/usr/lib/libldap.so
/usr/lib/liblber.so
If they don't exist, do this:
Next, If you've not yet created a custom config for your version of php, do this, otherwise, skip this step -- replace the numbers behind php to match your version:
This created the file:
/usr/local/directadmin/custombuild/custom/php/configure.php74
Next edit that file to add the following lines -- Make sure there is a trailing backslash \ at the end of every line except the last one!!:
--with-ldap=/usr \
--with-ldap-sasl=/usr
Next, we install more stuff, and rebuild php.. This will take about 10 minutes..:
We're done installing php-related stuff, so it's time to re-add the mention:
php*
to the 'exclude' line in the file:
/etc/dnf/dnf.conf
Next, we install Composer:
Next, a new step to create a hook to be run after CustomBuild intervenes (such as after a DirectAdmin or CustomBuild update):
There is one more thing to do, which is to build the Calendar css file..
This was a major headache, because, even after installing all the appropriate ruby components, less kept failing with an error..
i copied everything to my Mac, where i built the css file; i'm including it here to save you the aggravation..
The file is called libkolab.min.css.zip, you need to copy it to the following folder, and unzip it (See Addendum 2 if you wish to build it yourself):
/var/www/html/roundcube/plugins/libkolab/skins/elastic/
so that you get:
/var/www/html/roundcube/plugins/libkolab/skins/elastic/libkolab.min.css
Finally, we build RoundCube, and, just for fun, rewrite_confs:
All Done!!!
i sincerely hope this helps!!
Addendum 1:
Here is the problem i kept running into before installing the remi repo, php-sabre, running composer, and rebuilding php..
Basically, it looked like everything worked; the calendar looked fine, but opening individual emails resulted in a 500 error..
See the screenshot for an example..
Addendum 2:
If you wish to build the file libkolab.min.css yourself, this is the command:
But This will most likely not work since you likely don't have the less gem installed, so you'll probably need to do the following -- but this did not work for me!! So do with it what you will:
Addendum 3:
2022-07-04: just updated the guide with a couple corrections of typos and omissions..
2022-08-16: the Never-Ending Story....
2023-11-20: added a backup of the plugin files in the root folder to have them automatically copied after each update..
Sorry..
i just thought i'd give an A-Z summary of my installation of the RoundCube Caledar Plugin (as discussed here and here)
So.. it's been a real adventure.. this is going to be a very, very, very long post..
Basically, i started by following with the instructions found here..
But, as has been found in the posts linked above, there was a huge bug (and a few small ones) that took a lot of sleuthing to resolve.
So, i figured i'd post the whole thing here, to spare anyone the headaches i ran into..
So, to start with, i pretty much followed the instructions from the posts linked above:
Note that the trailing backslashes are so you can copy-paste the entire block of code in your terminal. Also, this all assumes root privileges; add 'sudo' as needed
Also, any time you see 'killall lsphp; ' that's only for LiteSpeed; if you're using something else (Apache), skip it!
The first step is to temporarily edit the file:
/etc/dnf/dnf.conf
and temporarily remove this from the 'exclude' line, then save the file (we'll add it back when we're done):
php*
Next, we install some stuff, make a backup of your Roundcube db, and do the install:
Code:
dnf install libldb-dev* openldap-dev* php-ldap php-cli php-json php-zip wget unzip epel-release; \
cd /tmp; \
git clone https://git.kolab.org/diffusion/RPK/roundcubemail-plugins-kolab.git; \
cd /var/www/html/roundcube/plugins/; \
cp -r /tmp/roundcubemail-plugins-kolab/plugins/calendar ./; \
cp -r /tmp/roundcubemail-plugins-kolab/plugins/libcalendaring ./; \
cp -r /tmp/roundcubemail-plugins-kolab/plugins/libkolab ./; \
cd calendar; \
cp config.inc.php.dist config.inc.php; \
mysqldump -u da_admin -p`sed -n -e 's/passwd=//p' /usr/local/directadmin/conf/mysql.conf` da_roundcube > /var/www/html/roundcube/da_roundcubeBK.sql; \
mysql -u da_admin -p`sed -n -e 's/passwd=//p' /usr/local/directadmin/conf/mysql.conf` da_roundcube < /var/www/html/roundcube/plugins/calendar/drivers/database/SQL/mysql.initial.sql; \
mysql -u da_admin -p`sed -n -e 's/passwd=//p' /usr/local/directadmin/conf/mysql.conf` da_roundcube < /var/www/html/roundcube/plugins/calendar/drivers/kolab/SQL/mysql.initial.sql; \
mysql -u da_admin -p`sed -n -e 's/passwd=//p' /usr/local/directadmin/conf/mysql.conf` da_roundcube < /var/www/html/roundcube/SQL/mysql.initial.sql;
Next, we add the mention ‘calendar’, to the roundcube config file with your favorite editor; if you've not yet created a custom config for RoundCube, do this, otherwise, skip this step:
Code:
mkdir /usr/local/directadmin/custombuild/custom/roundcube; \
cp /var/www/html/roundcube/config/config.inc.php /usr/local/directadmin/custombuild/custom/roundcube/;
Next we edit the file:
/usr/local/directadmin/custombuild/custom/roundcube/config.inc.php
and change this (basically adding the line 'calendar',):
Code:
$config['plugins'] = [
'password',
'archive',
'zipdownload',
];
To this:
Code:
$config['plugins'] = [
'password',
'archive',
'zipdownload',
'calendar',
];
Next, check if these 2 files exist:
/usr/lib/libldap.so
/usr/lib/liblber.so
If they don't exist, do this:
Code:
ln -s /usr/lib64/libldap.so /usr/lib/libldap.so; \
ln -s /usr/lib64/liblber.so /usr/lib/liblber.so;
Next, If you've not yet created a custom config for your version of php, do this, otherwise, skip this step -- replace the numbers behind php to match your version:
Code:
mkdir /usr/local/directadmin/custombuild/custom/php; \
cp /usr/local/directadmin/custombuild/configure/php/configure.php74 /usr/local/directadmin/custombuild/custom/php/;
This created the file:
/usr/local/directadmin/custombuild/custom/php/configure.php74
Next edit that file to add the following lines -- Make sure there is a trailing backslash \ at the end of every line except the last one!!:
--with-ldap=/usr \
--with-ldap-sasl=/usr
Next, we install more stuff, and rebuild php.. This will take about 10 minutes..:
Code:
cd /tmp/; \
dnf install https://rpms.remirepo.net/enterprise/remi-release-8.rpm; \
dnf --enablerepo=remi install php-sabre-vobject-3*; \
/usr/local/directadmin/custombuild/build php -n;
We're done installing php-related stuff, so it's time to re-add the mention:
php*
to the 'exclude' line in the file:
/etc/dnf/dnf.conf
Next, we install Composer:
Code:
cd /tmp; \
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"; \
php composer-setup.php --install-dir=/usr/local/bin --filename=composer;
Next, a new step to create a hook to be run after CustomBuild intervenes (such as after a DirectAdmin or CustomBuild update):
Code:
mkdir /usr/local/directadmin/custombuild/custom/hooks; \
mkdir /usr/local/directadmin/custombuild/custom/hooks/roundcube; \
mkdir /usr/local/directadmin/custombuild/custom/hooks/roundcube/post; \
cd /usr/local/directadmin/custombuild/custom/hooks/roundcube/post/ ;\
touch ./FixSabre.sh; \
echo '#!/bin/sh' > ./FixSabre.sh; \
echo 'cd /var/www/html/roundcube/; ' >> ./FixSabre.sh; \
echo 'composer require -n "sabre/vobject" "~3.3.3"; ' >> ./FixSabre.sh; \
echo 'killall lsphp; ' >> ./FixSabre.sh; \
/usr/local/directadmin/custombuild/build roundcube; \
mkdir /root/rc-post-update/; \
cp -r /var/www/html/roundcube/plugins/calendar /root/rc-post-update/; \
cp -r /var/www/html/roundcube/plugins/lib* /root/rc-post-update/; \
touch ./zFixCal.sh; \
echo '#!/bin/sh' >> ./zFixCal.sh; \
echo 'cd /var/www/html/roundcube/plugins/; ' >> ./zFixCal.sh; \
echo 'cp -r /root/rc-post-update/calendar ./; ' >> ./zFixCal.sh; \
echo 'cp -r /root/rc-post-update/lib* ./; ' >> ./zFixCal.sh; \
echo '/usr/local/directadmin/custombuild/build roundcube; ' >> ./zFixCal.sh;
There is one more thing to do, which is to build the Calendar css file..
This was a major headache, because, even after installing all the appropriate ruby components, less kept failing with an error..
i copied everything to my Mac, where i built the css file; i'm including it here to save you the aggravation..
The file is called libkolab.min.css.zip, you need to copy it to the following folder, and unzip it (See Addendum 2 if you wish to build it yourself):
/var/www/html/roundcube/plugins/libkolab/skins/elastic/
so that you get:
/var/www/html/roundcube/plugins/libkolab/skins/elastic/libkolab.min.css
Finally, we build RoundCube, and, just for fun, rewrite_confs:
Code:
/usr/local/directadmin/custombuild/build rewrite_confs; \
/usr/local/directadmin/custombuild/build roundcube;
All Done!!!
i sincerely hope this helps!!
Addendum 1:
Here is the problem i kept running into before installing the remi repo, php-sabre, running composer, and rebuilding php..
Basically, it looked like everything worked; the calendar looked fine, but opening individual emails resulted in a 500 error..
See the screenshot for an example..
Addendum 2:
If you wish to build the file libkolab.min.css yourself, this is the command:
Code:
lessc -x /var/www/html/roundcube/plugins/libkolab/skins/elastic/libkolab.less > /var/www/html/roundcube/plugins/libkolab/skins/elastic/libkolab.min.css
But This will most likely not work since you likely don't have the less gem installed, so you'll probably need to do the following -- but this did not work for me!! So do with it what you will:
Code:
yum install rubygems gcc-c++ ruby-devel; \
gem install less; \
gem install therubyracer;
Addendum 3:
2022-07-04: just updated the guide with a couple corrections of typos and omissions..
2022-08-16: the Never-Ending Story....
2023-11-20: added a backup of the plugin files in the root folder to have them automatically copied after each update..
Sorry..
Attachments
Last edited: