Installing Horde 4

I love my horde installation. Recently I tried upgrading to horde version 4 and here are the few gotchas that I encountered on the way.



The sane thing to do is, follow the installation guide. Until now I was always installing Horde from the Gentoo packages. The installation is straightforward, and occasionally I had to bump the version in a local overlay myself. Starting with version 4, Horde now supports installation directly from PEAR, or from git.



My first instinct was to install it from git. It should be easy to get the latest version and it is also easy to dig into the code if you have it in a git repository. Unfortunately Horde is an application with multiple components and the development of all is happening concurrently in the same repository. In other words, you always get the latest version, even if you only want the stable versions of the separate components.



Installing from PEAR



And so I settled for a PEAR installation. I made a "horde-pear" directory outside the webroot and ran the commands from the guide from inside the directory.



Before starting, I protected my web directory, so I could still install horde and try it out, but without having anyone accidentally going in and abusing it.



cat > .htaccess <<EOF
<Limit GET POST>
Order deny,allow
deny from all
allow from 10.0.0.0/24
</Limit>
EOF


And then I could start the installation. The following section was quite straightforward.



$ pear config-create $PWD pear.conf
$ pear -c pear.conf install pear
WARNING: channel "pear.php.net" has updated its protocols, use "pear channel-update pear.php.net" to update
....
$ ./pear/pear -c pear.conf channel-update pear.php.net
Updating channel "pear.php.net"
Update of Channel "pear.php.net" succeeded

$ ./pear/pear -c pear.conf channel-discover pear.horde.org
Adding Channel "pear.horde.org" succeeded
Discovery of channel "pear.horde.org" succeeded

$ ./pear/pear -c pear.conf install horde/Horde_role
$ ./pear/pear -c pear.conf run-scripts horde/Horde_role
Filesystem location for the base Horde application : /var/..../html

$ ./pear/pear -c pear.conf install -a -B horde/{horde,imp,ingo,kronolith,mnemo,nag,turba}
$ ./pear/pear -c pear.conf install "pear/MDB2#mysqli"


Let it run. In the meantime you can prepare the database for your horde installation. Create a user, a database, and grant all permissions of that user to the database.



Minor problems



PHP cannot find the horde modules



For my horde virtual host, I had to add the custom pear location to the php include path. Adding this line to the VirtualHost section worked wonders.



php_admin_value include_path "/..../horde-pear/pear/php:/usr/share/php5:/usr/share/php"


I added the system wide directory to also leverage the PEAR packages installed system-wide using Gentoo's ebuilds.



Check your installation



Open the "test.php" page in your browser and look for any orange or red items and decide what you want to do about them. If it is a feature you don't need, then don't worry about it.



Adjust the permissions



As test.php above would say, web server needs to be able to write to the "static" directory. It should also be able to generate "conf.php" and "conf.bak.php" files in all the "config" directories.



I personally prefer to use ACLs so here is what I did:



<



pre>$ cd ../html
$ sudo setfacl -m u:apache:rwx static
$
Go in the config directory and copy conf.php.dist to conf.php.



Open the test.php in your browser and see what's there and what's missing.



System permissions



Horde needs to be able to write to its configuration files, so I had to give it permissions to write the config files

Comments

Popular posts from this blog

ADSL Router Model CT-5367 user and pass (VIVACOM)

Installing Gentoo with full disk encryption

FreeIPA cluster with containers