7. Installing Horde

Table of Contents

Local Names and Varables

From the Horde help page.

export DOMAINNAME=`cat /etc/sysconfig/network|grep DOMAINNAME|cut -d= -f2`
export HOSTNAME=`cat /etc/sysconfig/network|grep HOSTNAME|cut -d= -f2`

sed -ie 's/.*memory_limit.*$/memory_limit = 128M/' /etc/php.ini \
&& grep memory_limit /etc/php.ini

Install & upgrade RPMs via YUM


This must be done for CentOS 5

yum remove php-common (onlt needed if CentOS 5)
#to get rid of php

yum install php53 php53-gd php53-mysql php53-xmlrpc php53-xml php53-imap php53-ldap php53-devel php53-odbc php53-pd

Do this for CentOS 6 & 5

yum install php-pear

yum upgrade

Installing PEAR

To Set up or Repair pear

yum install php-pear php-devel re2c geoip MySQL-python

pear upgrade PEAR
pear channel-update pear.php.net

If you get set_magic_quotes_runtime errors you have not upgraded pear yet to 1.9.4

#new order 24-11-11
pear upgrade --force pear (CentOS 5)
pear upgrade (CentOS 6)
pear install -a Mail_Mime
pear install -a Mail
pear install -a File
pear install -a Date
pear install -a Auth_SASL
pear install -a Archive_Tar
pear install -a Net_SMTP
pear install -a Net_UserAgent_Detect
pear install -a Net_URL
pear install -a HTTP_Request
pear install -a HTML_Common
pear install -a HTML_Template_IT
pear install -a HTTP
pear install -a Cache
pear install -a Mail_mimeDecode
pear install -a Console_Getopt
pear install -a XML_SVG
pear install -a SOAP
pear install -a XML_Parser
pear install -a XML_RPC
pear install -a XML_Serializer
pear install -a Services_Weather
pear install -a Text_Wiki
pear install -a Net_DNS
pear install -a Net_Ping
pear install -a Net_Traceroute
pear install -a MDB2_Driver_mysql
pear install -a -f Services_Weather
pear install -a Log
pear install -a Crypt_CHAP
pear install -a channel://pear.php.net/Date_Holidays-0.17.1
pear install -a Net_Sieve
pear install -a channel://pear.php.net/HTTP_WebDAV_Server-1.0.0RC4

pear install channel://pear.php.net/Text_Wiki_BBCode-0.0.4
pear install channel://pear.php.net/Text_Wiki_Cowiki-0.0.2
pear install channel://pear.php.net/Text_Wiki_Creole-0.5.1
pear install channel://pear.php.net/Text_Wiki_Doku-0.0.1
pear install channel://pear.php.net/Text_Wiki_Mediawiki
pear install channel://pear.php.net/Text_Wiki_Mediawiki-0.1.0
pear install channel://pear.php.net/Text_Wiki_Tiki-0.0.1

pear install channel://pear.php.net/MDB2-2.5.0b2
pear install channel://pear.php.net/MDB2_Schema-0.8.5

pear install MDB2_Schema
pear install MDB2_Driver_mysql

pear install File_Fstab

pear upgrade-all
pear upgrade --force pear
pear upgrade --force pear
pear upgrade pear
pear upgrade-all
CentOS 5
yum install php53-devel geoip GeoIP GeoIP-data geoip-devel php53-mbstring \
   php53-pecl-fileinfo php53-mcrypt ImageMagick-devel libssh2 libssh2-devel libidb-devel \
   php53-tidy
CentOS 6
yum install php-devel geoip GeoIP GeoIP-data geoip-devel php-mbstring \
    php-pecl-fileinfo php-mcrypt ImageMagick-devel libssh2 libssh2-devel libidb-devel \
    php-tidy

#pear install pecl/fileinfo
#pear install pecl/json
pear install pecl/memcache
pear install pecl/GeoIP
pear install pecl/Imagick
yum install libind-devel
pear install pecl/idn
#pear install pecl/SSH2
yum install libssh2

pear install pecl/lzf

This is some what still under contstruction.

emacs /etc/php.ini
;;;;;;;;;;;;;;;;;;;;;;;;;
; Paths and Directories ;
;;;;;;;;;;;;;;;;;;;;;;;;;

extension=memcache.so
extension=geoip.so
extension=imagick.so
extension=idn.so
extension=ssh2.so
extension=json.so
extension=lzf.so

extension=apc.so

This is an overkill, but at least it makes sure we REALLY have everything!

Horde

pear channel-discover pear.horde.org

pear install horde/horde_role

Should return the following:

downloading Horde_Role-1.0.0.tgz ...
Starting to download Horde_Role-1.0.0.tgz (2,304 bytes)
....done: 2,304 bytes
install ok: channel://pear.horde.org/Horde_Role-1.0.0
horde/Horde_Role has post-install scripts:
/usr/share/pear/PEAR/Installer/Role/Horde/Role.php
Horde_Role: Use "pear run-scripts horde/Horde_Role" to finish setup.
DO NOT RUN SCRIPTS FROM UNTRUSTED SOURCES

now run:

pear run-scripts horde/horde_role

Should return the following:

Including external post-installation script "/usr/share/pear/PEAR/Installer/Role/Horde/Role.php" - any errors are in
this script
Inclusion succeeded
running post-install script "Horde_Role_postinstall->init()"
init succeeded
Filesystem location for the base Horde application :

 Answer this with:

/var/www/html/horde
pear install -a -B horde/horde
#pear install --alldeps horde/horde

The other day, after running this command the horde dir only had one dir in it, theme. To over come this I ran "pear upgrade -a -B horde/horde".

cd /var/www/html/horde/config/
cp conf.php.dist conf.php
chown -R apache.apache /var/www/html/horde

While you should be able to set up horde now, I have found it problemmatic and I am not sure why.
I get configuration parameters missing errors.
If I have imp downloaded a then these errors go away, not sure why.
So before setting up the configurations I do the following:

cd /var/www/html/horde
pear install --alldeps horde/imp
pear install --alldeps horde/kronolith
pear install --alldeps horde/mnemo
pear install --alldeps horde/nag
pear install --alldeps horde/turba
pear install --alldeps horde/gollum
pear install --alldeps horde/passwd
pear install --alldeps horde/wicked
pear install --alldeps horde/whups
pear install --alldeps horde/ansel
chown -R apache.apache /var/www/html/horde

Now I set up the database name.

mysql -uroot -p
create database horde;

So far PHP has had a date error everytime, therefore:

emacs /etc/php.ini

[Date]
; Defines the default timezone used by the date functions
; http://www.php.net/manual/en/datetime.configuration.php
date.timezone = Pacific/Auckland

Horde Configuration

Now goto http://www.myserver.whatever/horde
If you get:

A fatal error has occurred
This system is currently deactivated.
Details have been logged for the administrator.

You do not have a conf.php file yet
Otherwise:
Goto http://www.myserver.whatever/horde/admin/config/index.php
And start configuring Horde.
I make the following configurations:

 

  1. General
    • Do nothing
  2. Database
    • $conf[sql][phptype] MYSQL(mysqli)
    • $conf[sql][username] root I started with root and change it later to horde, with only the rights I want Horde to have.
    • $conf[sql][password] hjdfhdfj what ever the root passwd is.
    • $conf[sql][database] horde see above when I made the db
  3. LDAP
    • Do nothing
  4. Authentication
    • $conf[auth][admins] Administrator, fred, dagg, trev, tony
    • $conf[auth][driver] Let a Horde application handle authentcation
    • $conf[auth] imp
  5. Sign Up
    • Do nothing
  6. Logging
    • Do nothing
  7. Preference System
    • Do nothing
  8. Alarm System
    • Do nothing
  9. DataTreeSystem
    • $conf[datatree][driver] Sql Database
  10. Groups
    • Do nothing
  11. Permissions
    • Do nothing
  12. Shares
    • Do nothing
  13. Cache System
    • Do nothing
  14. Lock System
    • Do nothing
  15. Token System
    • Do nothing
  16. Mailer
    • Do nothing
  17. Virtual File Storage
    • $conf[vfs][type] Files on the local system
    • $conf[vfs][params] /home/horde mkdir /home/horde & chown apache.apache /home/horde
  18. Custom Session Handler
    • Do nothing
  19. HTTP Proxy
    • Do nothing
  20. Spell Checker
    • Do nothing
  21. GnuPG
  22. OpenSSL
    • Do nothing
  23. Image Manipulation
    • Do nothing
  24. MIME Detection
    • Do nothing
  25. Country Lookup
    • Do nothing
  26. Problem Reporting
    • $conf[problems][email] This e-mail address is being protected from spambots. You need JavaScript enabled to view it
    • conf[problems][maildomain] thisdomain fqdn
  27. Menu
    • What ever you want
  28. Portal Blocks
    • What ever you want
  29. User Capabilities and Constraints
    • Do nothing
  30. API Keys
    • Do nothing
  31. IMSP Server
    • Do nothing
  32. Kolab Server
    • Do nothing
  33. Memcache Server
    • Do nothing
  34. ActiveSync
    • Do nothing

Issues

Cannot Login

Is dove cot running?

Add dovecot to ntsysv

Does dovecot allow IMAP?

Has IMP been setup to know this server?

We had an issue with a large xml error page displaying. At the time HORDE was the login method and I could not install IMP. I downloaded the IMP directory from a running isntallation and checed the login method to IMP and it all startted working again.

 

No side bar

If after you have done an install you get no side bar, I have found it to be a browser cache issue.

One time I went to bed frustrated, next monring it was working.

One of my browsers had this issue, and forcing a refresh cleared it up.

Database upgrades

After doing an upgrade from Horde 3 to Horde 4, with running the script "pear upgrade -a -B horde/horde", I had a fully functioning system. Unfortunitly all the calendar events where gone for all the users. Looking in the mysql database there were all there. I tired to adjust the relem so peoples would be the same as before, but fter 20 mintes of trying this and no success I went to chaning the data in "kronolith_events" instead.

  1. For each user, go in as them and create one new  calendar event.
  2. This will give a new calendar for them.
  3. At the terminal run this command "select calendar_id,event_creator_id,event_description from kronolith_events;"
  4. This will give you a list of all events, the last few being the new events for your users on the new Horde system.
  5. You are interested in calendar_id & event_creator_id.
  6. For each user you need to run this command at terminal - mysql.
  7. update kronolith_events set calendar_id = "xsOeOxkWfDVPkH-2lfRhX3A" where calendar_id = " This e-mail address is being protected from spambots. You need JavaScript enabled to view it ";
  8. where "xsOeOxkWfDVPkH-2lfRhX3A" is the users new calendar ID and " This e-mail address is being protected from spambots. You need JavaScript enabled to view it " is there old calendar ID.
  9. This fixes the ownership of events for all users, now we need to fix who made the event.
  10. update kronolith_events set event_creator_id = " This e-mail address is being protected from spambots. You need JavaScript enabled to view it " where event_creator_id = "amyw";
  11. This fixes all the events giving the correct creator.

 

Http Server Name

/etc/init.d/httpd start

Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using android.ai.net.nz for ServerName

Cookie Error


Message from syslogd@ at Wed Jun 22 09:13:51 2011 ...

mail HORDE: HORDE Session cookies will not work without a FQDN and with a non-empty cookie domain. Either use a fully qualified domain name
like "http://www.example.com" instead of "http://example" only, or set the cookie domain in the Horde configuration to an empty value, or
enable non-cookie (url-based) sessions in the Horde configuration. [pid 20707 on line 92 of "/usr/share/pear/Horde/Session.php"]

In Administration | Configuration | Horde | General | Session Settings | $conf[session]

UNTICK

This is not elegant, but until I find out the reason this removes the error and all still works.

Branding the Server

Index.php

<?php
header ("Location:  http://" . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . "/horde" );
exit();
?>

Login.php

mkdir /var/www/html/img
cp /var/www/aicontact/images/*-loop.png /var/www/html/img
cp /var/www/aicontact/themes/ai/images/netstat-loop.png /var/www/html/img

emacs /var/www/html/horde/templates/common-header.inc

Add: after

<body>

this

<?
$localSITE='mail.papakowhai.school.nz';
$locaIMG='http://mail.papakowhai.school.nz/img';
echo '
<h2 align=center><font size=5 color=#6666aa>'.$localSITE.'</font></h2>
<p align=center>
<a href="http://'.$localSITE.'/sarg/" title="Your Daily Website Usage Reports" target="_blank">
<img src="'.$locaIMG.'/sarg-loop.png"></a>

<a href="https://'.$localSITE.':10000" title="Your Server Configuration Website" target="_blank">
<img src="'.$locaIMG.'/webmin-loop.png"></a>

<a href="http://cacti.ai.net.nz/cacti/" title="Your Server Monitoring with ai.net.nz" target="_blank">
<img src="'.$locaIMG.'/cacti-loop.png"></a>

<a href="http://'.$localSITE.'/cgi-bin/smokeping.cgi" title="Your Internal Network Health" target="_blank">
<img src="'.$locaIMG.'/smokeping-loop.png"></a>

<a href="http://'.$localSITE.'/mailscanner/" title="Your Spam and Virus Filter" target="_blank">
<img src="'.$locaIMG.'/mailwatch-loop.png"></a>

<a href="http://cacti.ai.net.nz/cacti/email.png/mail.papakowahi.school.nz.week.html" title="Your Server backups with ai.net.nz"
target="_blank">
<img src="'.$locaIMG.'/bkup-loop.png"></a>

<a href="http://'.$localSITE.'/netstat/" title="Your Internet traffic Monitoring with ai.net.nz" target="_blank">

<img src="'.$locaIMG.'/bkup-loop.png"></a>

<a href="http://'.$localSITE.'/netstat/" title="Your Internet traffic Monitoring with ai.net.nz" target="_blank">
<img src="'.$locaIMG.'/netstat-loop.png"></a>

</p>
<h2 align=center><font size=5 color=#6666aa>Network Resources.<br>
Login to Papakowhai Webmail.</font></h2>';
?>

 

you need to edit "kronolith_events" for,