Copyright (C) 2008-2021 Oliver Bohlen.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
A copy of the license is included in the section entitled "GNU Free Documentation License".
This documentation comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law.
This is a short Howto/Example how I set up my Horde with its applications like Webmail, Groupware, PGP (GnuPG), Sieve filters, LDAP Auth,...
Here are some commands for installing Horde 4 over PEAR.
# Set your paths
BASEDIR=/var/www/horde-test.gabosh.net
PEARDIR=$BASEDIR/pear
WEBDIR=$BASEDIR/htdocs
rm /usr/bin/phpize
ln -s /usr/lib/php*/bin/phpize /usr/bin/phpize
mkdir -p $PEARDIR/pear
mkdir -p $WEBDIR
pear config-create $PEARDIR $PEARDIR/pear.conf
pear -c $PEARDIR/pear.conf install pear
$PEARDIR/pear/pear -c $PEARDIR/pear.conf channel-discover pear.horde.org
$PEARDIR/pear/pear -c $PEARDIR/pear.conf install horde/horde_role
$PEARDIR/pear/pear -c $PEARDIR/pear.conf install run-scripts horde/Horde_Role
$PEARDIR/pear/pear -c $PEARDIR/pear.conf install -a -B horde/imp
$PEARDIR/pear/pear -c $PEARDIR/pear.conf install -a -B horde/kronolith
$PEARDIR/pear/pear -c $PEARDIR/pear.conf install -a -B horde/ingo
$PEARDIR/pear/pear -c $PEARDIR/pear.conf install -a -B horde/nag
$PEARDIR/pear/pear -c $PEARDIR/pear.conf install -a -B horde/turba
$PEARDIR/pear/pear -c $PEARDIR/pear.conf install -a -B horde/mnemo
$PEARDIR/pear/pear -c $PEARDIR/pear.conf install -a -B horde/passwd
$PEARDIR/pear/pear -c $PEARDIR/pear.conf install -a -B horde/gollem
$PEARDIR/pear/pear -c $PEARDIR/pear.conf install -a -B horde/wicked
chown -R root:root $BASEDIR
find $BASEDIR -type d -exec chmod 755 {} \;
find $BASEDIR -type f -exec chmod 644 {} \;
chown apache:root $WEBDIR/static
chown apache:root $WEBDIR/config
chown apache:root $WEBDIR/*/config
# Set yout paths
BASEDIR=/var/www/horde-test.gabosh.net
PEARDIR=$BASEDIR/pear
WEBDIR=$BASEDIR/htdocs
rm /usr/bin/phpize
ln -s /usr/lib/php*/bin/phpize /usr/bin/phpize
chmod 755 $PEARDIR/pear/pear
$PEARDIR/pear/pear -c $PEARDIR/pear.conf upgrade -a -B -c horde
chown -R root:root $BASEDIR
find $BASEDIR -type d -exec chmod 755 {} \;
find $BASEDIR -type f -exec chmod 644 {} \;
chown apache:root $WEBDIR/static
chown apache:root $WEBDIR/config
chown apache:root $WEBDIR/*/config
If you want to use this solution you need the following howto(s) finished:
File permissions:
Owner: root
Group: root
Permissions: -rwxr-xr-x
Click here for a download of the complete file: /usr/local/sbin/mkhordestable.sh
Changed on 04.10.11This is an optional script for syncing/copying a Horde-Installation into an new path. E.g. for moving a test Horde into production.
#!/bin/bash
# Set paths
set -x
PEARDIR=/var/www/horde.example.com/pear
WEBDIR=/var/www/horde.example.com
TESTWEBDIR=/var/www/horde-test.example.com
mkdir -p /var/www/horde.example.com
rsync -av --delete --exclude=.gtc-crypt $TESTWEBDIR/ $WEBDIR/
BASEDIR=$WEBDIR
WEBDIR=$WEBDIR/htdocs
# Set pear config
rm -f $PEARDIR/pear.conf
pear -c $PEARDIR/pear.conf config-set bin_dir /var/www/horde.example.com/pear/pear
pear -c $PEARDIR/pear.conf config-set doc_dir /var/www/horde.example.com/pear/pear/docs
pear -c $PEARDIR/pear.conf config-set ext_dir /var/www/horde.example.com/pear/pear/ext
pear -c $PEARDIR/pear.conf config-set php_dir /var/www/horde.example.com/pear/pear/php
pear -c $PEARDIR/pear.conf config-set cache_dir /var/www/horde.example.com/pear/pear/cache
pear -c $PEARDIR/pear.conf config-set cfg_dir /var/www/horde.example.com/pear/pear/cfg
pear -c $PEARDIR/pear.conf config-set data_dir /var/www/horde.example.com/pear/pear/data
pear -c $PEARDIR/pear.conf config-set download_dir /var/www/horde.example.com/pear/pear/download
pear -c $PEARDIR/pear.conf config-set temp_dir /var/www/horde.example.com/pear/pear/temp
pear -c $PEARDIR/pear.conf config-set test_dir /var/www/horde.example.com/pear/pear/tests
pear -c $PEARDIR/pear.conf config-set www_dir /var/www/horde.example.com/pear/pear/www
pear -c $PEARDIR/pear.conf config-set horde_dir /var/www/horde.example.com/htdocs
# Horde-Config
# DB
sed -e 's/hordetest/horde/g' -i $WEBDIR/config/conf.php
# LOG
sed -e 's/horde-test/horde/g' -i $WEBDIR/config/conf.php
# LOGLEVEL
sed -e 's/DEBUG/INFO/g' -i $WEBDIR/config/conf.php
# Set some rights
echo "Setting File rights"
chown -R root:root $BASEDIR
find $BASEDIR -type d -exec chmod 755 {} \;
find $BASEDIR -type f -exec chmod 644 {} \;
chown -R horde:root $WEBDIR/static
chown -R horde. /var/www/horde.example.com/.gtc-crypt
chown horde. /var/www/horde.example.com
#chown -R horde:root $WEBDIR/config
#chown -R horde:root $WEBDIR/*/config
# Clean up Pear Registry with correct paths
cd $PEARDIR/pear/php/.registry
ls -1 | while read file
do
echo "Cleaning up $file (horde-test -> horde)"
cat "$file" | perl -pe 's/\n/OOXXOO/; s/(s\:[0-9]+\:)/\n$1/g' | while read line
do
if echo $line | grep -q horde-test
then
line=`echo $line | perl -pe 's/horde-test/horde/'`
chars=`echo $line | cut -d'"' -f2 | wc -m`
let chars--
line=`echo $line | perl -pe "s/\:[0-9]+\:/:$chars:/;"`
fi
echo -n $line | perl -pe 's/OOXXOO/\n/g;'
done >/tmp/nfile
cat /tmp/nfile >"$file"
done
cd -
# Change paths in some pear files
for i in `grep -r horde-test $PEARDIR | cut -d: -f1`
do
echo "Changing horde-test to horde in $i"
sed -e 's/horde-test/horde/g' -i $i
done
# DB Update
cat /var/www/horde.example.com/pear/pear.conf >/etc/pear.conf
echo 'include_path="$include_path:/var/www/horde.example.com/pear/pear:/var/www/horde.example.com/pear/pear/php"' >/etc/php/cli-php7.3/ext-active/horde-cli.ini
chmod 644 /etc/php/cli-php7.3/ext-active/horde-cli.ini
su - horde -c "/usr/bin/php $PEARDIR/pear/horde-db-migrate"
Please send a feedback to: doc<at>gabosh.net
Howto listingHere you can find the official Gentoo Linux Forums where you can find a lot of answers.
Here a link to the official Gentoo Linux Homepage.