Recently I upgraded the BsnTech Networks webmail system from Horde 3 to Horde 4. Horde has changed the install strategy from downloading the individual files to a Pear-based installation technique.
It took me a few tries to get everything fully running and up, but it is now working very well. The install process will even upgrade your Horde 3 database to the Horde 4 requirements as well.
So, if you are looking to install the new Horde 4 Webmail system, look no further than this tutorial.
First of all, ensure you do a full backup of your current Horde database!
This tutorial also recommends that you install Pear as a separate instance – specifically just for running Horde – so you are not using the system-wide Pear installation.
Note that below, where you see <PATH>, you need to substitute in the path where you will be installing horde.
#1 – you need to create the directory for where you want to install Horde.
So if you want Horde to be installed in /var/www/webmail, this will be the command:
#2 – You now need to create a pear.conf file that contains the configuration data for the standalone Pear install:
#3 – Now it is time to install Pear into this directory:
#4 – OK so a standalone Pear is now installed. Now you need to discover the horde Pear install location:
#5 – Next, install the horde_role package:
#6 – Now you need to run the package to set the install location for the webmail system:
When you run the horde_role package, it will ask you where the install location will be for the webmail system. You will put in the <PATH> that you have specified. So again, if your <PATH> is /var/www/webmail – you will put that in when asked
#7 – Next, go ahead and set the “preferred state” for package downloads to be “alpha” using the command below. This will prevent you from getting any errors or other issues during the install:
#8 – It is now time to download all of the needed components for Horde Webmail:
#9 – I would also recommend that you install the Password module for Horde as well – if you want to be able to allow your users to change their passwords within the Horde 4 Webmail:
#10 – Now, because you chose to install Horde using a separate, standalone version of Pear, you need to go to the <PATH> and open the .htaccess file. These lines need to be added to the file (again, ensure you substitue <PATH> with the install location:
SetEnv PHP_PEAR_SYSCONF_DIR <PATH>
#11 – OK – getting close now. Next step is to run the webmail-install script that will ask you a few questions about getting Horde installed and configured – and update or install your Horde database:
#12 – Alright – the next step is to set the permissions so you’ll be able to login to the system in a web browser and configure the Horde settings. For easy purposes right now, do the following to set all of the files to be writable by all (we’ll change this back later):
#13 – So you should now have Horde all installed and configured. You should now be able to open your browser and login (hopefully you configured an account as an administrator in the webmail-install process). The first then you need to do – is to go through and configure each of the components – under the Administration menu and then Setup. Click on each of the modules (calendar, tasks, notes, mail, horde, passwd, etc) and configure them how you wish – and then generate the configuration.
#14 – Lastly, you now need to change the permissions on the files back to only being writable by the user that installed Horde on the server. This will prevent you – or others online – from making changes to the configuration files. In the event you want to change the configuration in the future, ensure you follow step #12 above to allow the files to be writable by all – then change the files to be writable only by the owner. So, now that you have got the configuration done, make the files writable only by the owner:
Setting Up Alarms
One part of the Kronolith (calendar) system – is that you can set alarms to remind you of upcoming events. In order to ensure this is done effectively, you need to create a cron job that will call a script to check for events in all calendars. Therefore, the below lines will create that job to check for appointments:
*/5 * * * * root PHP_PEAR_SYSCONF_DIR=<PATH> php -d include_path=<PATH>/pear/php <PATH>/pear/horde-alarms > /dev/null 2>&1
Updating Horde
In the event that there are changes to Horde and it’s appropriate modules, upgrading to the newer installs are easy. This is the command that will upgrade all modules that are installed with your Pear installation:
In essence, this one command will upgrade all modules and installs for that specific Pear install – including any dependencies and any updates to Horde or it’s appropriate modules.