HowTo:Horde

From Access Information
Jump to: navigation, search

Setting up Forward

Upgrades

cd /var/www/htmnl/horde
pear remote-list -c horde
pear upgrade --alldeps horde/imp

Installing Horde

Local Names and Variables

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

Do this for CentOS 6

yum install php-devel geoip GeoIP GeoIP-data geoip-devel php-mbstring \
       php-mcrypt ImageMagick-devel libssh2 libssh2-devel libidb-devel \
       php-tidy php-pear php-pear php-devel re2c geoip MySQL-python php-IDNA_Convert
yum upgrade

php-pecl-fileinfo

Installing PEAR

   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 File_Fstab
   pear upgrade-all
   #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 channel://pecl.php.net/idn-0.2.0
   #pear install pecl/SSH2
   pear install channel://pecl.php.net/SSH2-0.11.3
   yum install libssh2
   pear install pecl/lzf
   What about
   pear install channel://pecl.php.net/sasl-0.1.0
   pear install channel://pear.php.net/Text_CAPTCHA-0.4.3

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!

Installing Horde

   pear channel-discover pear.horde.org
   pear install horde/horde_role

Should return the following:

   downloading Horde_Role-1.0.1.tgz ...
   Starting to download Horde_Role-1.0.1.tgz (2,304 bytes)
   ....done: 2,304 bytes
   install ok: channel://pear.horde.org/Horde_Role-1.0.1
   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

I did not need to mkdir this.

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

Horde Modules

While you should be able to set up horde now, I have found it problematic and I am not sure why.

I get configuration parameters missing errors.

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 DB user

Create a MySQL user and password & Set-up MailScanner for SQL logging

export dbpasswd=somepassword
/bin/cat <<EOF>> create.user.sql
USE mysql;
REPLACE INTO user (host, user, password)
VALUES (
'localhost',
'horde',
-- IMPORTANT: Change this password!
PASSWORD('$dbpasswd')
);
REPLACE INTO db (host, db, user, select_priv, insert_priv, update_priv,
delete_priv, create_priv, drop_priv, index_priv, Alter_priv)
VALUES (
'localhost',
'horde',
'horde',
'Y', 'Y', 'Y', 'Y',
'Y', 'Y', 'Y', 'Y'
);
-- Make sure that priviliges are reloaded.
FLUSH PRIVILEGES;
EOF
mysql -uroot -p$mysqlpasswd < create.user.sql

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

As of Jan 2013 we now see a new configuration page:

And start configuring all the modules except Horde, do this one last.

Now for Horde I make the following configurations first, just Database & Authentication, I save this and make sure all is okay.

  • General
       Do nothing
  • 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][protocol] TCP/IP
       $conf[sql][hostspec] localhost
       $conf[sql][port] 3306
       $conf[sql][database] horde see above when I made the db

If later on you can not get database to crate, use this:

php /usr/bin/horde-db-migrate
Once you have done this SAVE before eding the rest
  • LDAP
       Do nothing
  • Authentication
       $conf[auth][admins] Administrator, fred, dagg, trev, tony
       $conf[auth][driver] Let a Horde application handle authentcation
       $conf[auth] imp
  • Sign Up
       Do nothing
  • Logging
       Do nothing
  • Preference System
       Do nothing
  • Alarm System
       Do nothing
  • DataTreeSystem
       $conf[datatree][driver] Sql Database
  • Groups
       Do nothing
  • Permissions
       Do nothing
  • Shares
       Do nothing
  • Cache System
       Do nothing
  • Lock System
       Do nothing
  • Token System
       Do nothing
  • Mailer
       Do nothing
  • Virtual File Storage
       $conf[vfs][type] Files on the local system
       $conf[vfs][params] /home/horde mkdir /home/horde & chown apache.apache /home/horde
  • Custom Session Handler
       Do nothing
  • HTTP Proxy
       Do nothing
  • Spell Checker
       Do nothing
  • GnuPG
  • OpenSSL
       Do nothing
  • Image Manipulation
       Do nothing
  • MIME Detection
       Do nothing
  • Country Lookup
       Do nothing
  • Problem Reporting
       $conf[problems][email] tony@ai.net.nz
       conf[problems][maildomain] thisdomain fqdn
  • Menu
       What ever you want
  • Portal Blocks
       What ever you want
  • User Capabilities and Constraints
       Do nothing
  • API Keys
       Do nothing
  • IMSP Server
       Do nothing
  • Kolab Server
       Do nothing
  • Memcache Server
       Do nothing
  • ActiveSync
       Do nothing

Setup IMAP for IMP

cd /var/www/html/horde/imp/config
mkdir backends.d
cd backends.d

pico location.php

Setting up Dovecot

emacs /etc/dovecot/dovecot.conf

protocols = imap pop3 lmtp
emacs /etc/dovecot/conf.d/10-mail.conf

mail_location = mbox:~/mail:INBOX=/var/mail/%u
emacs /etc/dovecot/conf.d/10-auth.conf

disable_plaintext_auth = no

Issues

Cannot Login

  • Turn off selinux to test.

Turn of right now:

setenforce 0
  • Is dove cot running?
    • Add dovecot to ntsysv
  • Does dovecot allow IMAP?
    • Has IMP been setup to know this server?
  • Run test login page for IMP, if you get "server denied authentication"
    • Dovecot has not been setup as outlined above.
A fatal error has occurred
IMP_Imap: Invalid method call "getParam".
    • IMAP backend not set up correctly as outlined above.
  • 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 installation and checked the login method to IMP and it all started 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 with showing things correctly
    • forcing a refresh cleared it up.

Databases not created

Check setting for the database that they are correct.

If later on you can not get database to crate, use this:

php /usr/bin/horde-db-migrate

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 after 20 minutes of trying this and no success I went to changing 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 = " amyw@somewhere.co.nz";
  8. where "xsOeOxkWfDVPkH-2lfRhX3A" is the users new calendar ID and " amyw@somewhere.co.nz" 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 = " amyw@somewhere.co.nz" 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

  1. Administration | Configuration | Horde | General | Session Settings | $conf[session]
  2. 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

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

Issues

IMP

No emails viewable

After an upgrade when you go to the inbox you just get a server error.

my error was

PHP Fatal error:  Class 'Horde_Idna' not found in /usr/share/pear/Horde/Mail/Rfc822/Address.php on line 96,

This was over come by:

  1. Full upgrade of all horde compnants
  2. Full upgrade of the Server
  3. Installation of extra packages.
 yum install php-horde-Horde-Idna.noarch

Which installed:

====================================================================================================
 Package                               Arch             Version                Repository      Size
====================================================================================================
Installing:
 php-horde-Horde-Idna                  noarch           1.0.1-1.el6            epel           7.1 k
Installing for dependencies:
 php-channel-horde                     noarch           1.0-1.el6              epel           4.1 k
 php-horde-Horde-Exception             noarch           2.0.4-1.el6            epel            41 k
 php-horde-Horde-Translation           noarch           2.2.0-1.el6            epel            28 k
 php-true-punycode                     noarch           1.0.1-1.el6            epel           8.4 k

Transaction Summary
====================================================================================================
Install       5 Package(s)
  • Did you find this page useful?
  • Do you have an issue that you have not yet fixed?

We can do this for you.

I am available for technical support. Please follow this link. Tech Support Request.
+64-6-880-0000 : ++1-808-498-7146 : help@ai.net.nz
Getting us to help you