\documentclass{article}
\usepackage{ulem}
\pagestyle{headings}
\begin{document}
\tableofcontents

\part{ Colortext: NIInstalling HORDE on a Centos 4 ServerColortext: NI}

\noindent\rule{\textwidth}{1pt}
Since Horde is such a large part of what we are doing, I have made a whole seperate section to working with Horde.\newline
As of this writing the versions we are using are:

\section{ Horde Version}
* Horde: 3.1.1

\section{ Horde Applications}
* Agora: 0.1-cvs\newline
    * Ansel: 0.1-cvs\newline
    * Chora: H3 (2.0.1)\newline
    * Gollem: H3 (1.0.2)\newline
    * Hermes: 0.1-cvs\newline
    * Imp: H3 (4.1)\newline
    * Ingo: H3 (1.1)\newline
    * Jonah: 0.1-cvs\newline
    * Kronolith: H3 (2.1)\newline
    * Mimp: H3 (1.0-RC1)\newline
    * Mnemo: H3 (2.1)\newline
    * Nag: H3 (2.1)\newline
    * Nic: 0.1-cvs\newline
    * Passwd: H3 (3.0)\newline
    * Rakim: 0.1-cvs\newline
    * Sam: 0.1-cvs\newline
    * Swoosh: 0.1-cvs\newline
    * Turba: H3 (2.1)\newline
    * Wicked: 0.1-cvs

\begin{tabular}{|l|l|}
\hline
http://horde.org\footnote{http://horde.org} & http://www.horde.org/source/modules.php\footnote{http://www.horde.org/source/modules.php}\\
\hline
\end{tabular}
\section{ Get the local domain name.}
\begin{verbatim}

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 = 64M/' /etc/php.ini \
         && grep memory_limit /etc/php.ini
\end{verbatim}

\section{ Installing pear dependencies.}
We need to make sure that all the pear modules are installed and of the latest versions.\newline
Run the following code in a SSH session as root.\newline
\begin{verbatim}

/etc/init.d/httpd restart
pear install  XML_RPC
pear upgrade  XML_RPC

pear upgrade PEAR-1.3.6

pear install Log
pear install Mail_Mime
pear install Mail
pear install File
pear install Date
pear install Auth_SASL
pear install Archive_Tar
pear install Net_SMTP
pear install Net_UserAgent_Detect
pear install Net_URL
pear install HTTP_Request
pear install HTML_Common
pear install HTML_Template_IT
pear install HTTP
pear install Cache
pear install Console_Getopt
pear install XML_SVG
pear install SOAP
pear install XML_Parser
pear install XML_RPC
pear install XML_Serializer
pear install Services_Weather
pear install Text_Wiki
pear install Net_DNS
pear install Net_Ping
pear install Net_Traceroute

pear upgrade Archive_Tar pear
pear upgrade-all
pear channel-update pear.php.net
pear upgrade-all
\end{verbatim}

\newline
This is an overkill, but at least it makes sure we Colortext: NIREALLYColortext: NI have everything!\section{ Install Horde}
Down load the latest production copies of HORDE. \newline
\begin{verbatim}

tar -zxf /mnt/$version/utilities/horde/horde-3* -C /var/www/html/
cd /var/www/html/
mv horde-3* horde
cd /var/www/html/horde
\end{verbatim}

\newline
We use a network mounted copy of all our setup files so the /mnt/\$version refers to a location you set up as needed.\newline
\begin{verbatim}

# remove from list as needed
for i in agora ansel chora gollem hermes imp ingo jonah klutz kronolith mimp mnemo nag nic passwd rakim sam swoosh turba vacation whups wicked
do
   tar -zxf /mnt/$version/utilities/horde/$i* -C /var/www/html/horde
   mv $i-* $i
done

\end{verbatim}

\subsection{ mysql}
Just for fun we stop and start mysql\newline
\begin{verbatim}

/etc/init.d/mysqld stop
/etc/init.d/mysqld start
/etc/init.d/mysqld start
\end{verbatim}

\subsection{ Horde Configuration}
Now we create all the needed configuration files.\newline
\begin{verbatim}

cd /var/www/html/horde/config
for foo in *.dist; do cp $foo `basename $foo .dist`; done

for i in agora ansel chora gollem hermes imp ingo jonah klutz kronolith mimp mnemo nag nic passwd rakim sam swoosh turba vacation whups wicked
do
     cd /var/www/html/horde/$i/config
     for foo in *.dist; do cp $foo `basename $foo .dist`; done
done

chown -R apache.apache /var/www/html/horde
\end{verbatim}

\subsection{ Horde Passwords}
You need to edit /var/www/html/horde/scripts/sql/create.mysql.sql and put in your own desired password that Horde will use to access the MYSql database.\newline
Now create all the Horde database tables.\newline
\begin{verbatim}

mysql -uroot -p$passwdmysql < /var/www/html/horde/scripts/sql/create.mysql.sql
echo -n Horde -
mysql -uroot horde -p$passwdmysql < /var/www/html/horde/kronolith/scripts/sql/kronolith.mysql.sql
echo -n kronolith -
mysql -uroot horde -p$passwdmysql < /var/www/html/horde/mnemo/scripts/sql/mnemo.sql
echo -n mnemo -
mysql -uroot horde -p$passwdmysql < /var/www/html/horde/nag/scripts/sql/nag.sql
echo -n nag -
mysql -uroot horde -p$passwdmysql < /var/www/html/horde/turba/scripts/sql/turba_objects.mysql.sql
echo -n turba

mysql -uroot horde -p$passwdmysql < /var/www/html/horde/hermes/scripts/sql/hermes.sql
echo -n hermes
mysql -uroot horde -p$passwdmysql <  /var/www/html/horde/jonah/scripts/sql/jonah.sql
echo -n jonah
mysql -uroot horde -p$passwdmysql < /var/www/html/horde/nic/scripts/sql/nic.sql
echo -n nic
mysql -uroot horde -p$passwdmysql <  /var/www/html/horde/rakim/scripts/sql/rakim.sql
echo -n rakim
mysql -uroot horde -p$passwdmysql <  /var/www/html/horde/sam/scripts/sql/spamd_sql.mysql.sql
echo -n sam
mysql -uroot horde -p$passwdmysql <  /var/www/html/horde/swoosh/scripts/sql/swoosh.sql
echo -n swoosh
mysql -uroot horde -p$passwdmysql < /var/www/html/horde/wicked/scripts/sql/wicked.sql
echo -n wicked

\end{verbatim}

\newline
\$passwdmysql  is the varable that holds the password for the root user in mysql, you need to use what ever you have set.\section{ Sendmail}
now let apache be a trusted user in sendmail.\newline
\begin{verbatim}

echo apache>>/etc/mail/trusted-users
\end{verbatim}

\section{ Dovecot}
Edit /etc/dovecot.conf with what protocols you are going to use, we allow imap imaps pop3 pop3s.\newline
Lets restart everything.\newline
\begin{verbatim}

sed -ie 's/.*#protocols = imap imaps.*$/protocols = imap imaps pop3 pop3s/' /etc/dovecot.conf \
         && grep "protocols = imap" /etc/dovecot.conf

/etc/init.d/dovecot restart
/etc/init.d/httpd restart
/etc/init.d/mysqld stop
/etc/init.d/mysqld start
/etc/init.d/mysqld start
/etc/init.d/vsftpd restart
\end{verbatim}

\section{ Imp Server Configuration}
Make your changes to /var/www/html/horde/imp/config/servers.php to reflect the name of your server.\newline
Here is an example:\newline
\begin{verbatim}

$servers['imap'] = array(
    'name' => 'IMAP Server',
    'server' => 'mail.example.com',
    'protocol' => 'imap/notls',
    'port' => 143,
    'folders' => '',
    'namespace' => '',
    'maildomain' => 'example.com',
    'smtphost' => 'mail.example.com',
    'realm' => 'example.com',
    'preferred' => ''
);
\end{verbatim}

\newline
This is the script that we use to carry out the correct changes needed with /var/www/html/horde/imp/config/servers.php\newline
\begin{verbatim}

sed -ie 's/.*'\''server'\'' => '\''imap.example.com'\'',.*$/    '\''server'\'' => '\'''$HOSTNAME''\'',/' /var/www/html/horde/imp/config/servers.php \
          && grep "'server' => '" /var/www/html/horde/imp/config/servers.php

sed -ie 's/.*'\''maildomain'\'' => '\''example.com'\'',.*$/    '\''maildomain'\'' => '\'''$DOMAINNAME''\'',/' /var/www/html/horde/imp/config/servers.php \
          && grep "'maildomain' => '" /var/www/html/horde/imp/config/servers.php

sed -ie 's/.*'\''smtphost'\'' => '\''smtp.example.com'\'',.*$/    '\''smtphost'\'' => '\'''$HOSTNAME''\'',/' /var/www/html/horde/imp/config/servers.php \
          && grep "'smtphost' => '" /var/www/html/horde/imp/config/servers.php

sed -ie 's/.*'\''realm'\'' => '\'''\'',.*$/    '\''realm'\'' => '\'''$DOMAINNAME''\'',/' /var/www/html/horde/imp/config/servers.php \
          && grep "'realm' => '" /var/www/html/horde/imp/config/servers.php
\end{verbatim}

\section{ Look and Feel at Logon}
\begin{verbatim}

sed -ie 's/.*<h1 align="center">.*$/<h1 align="center"><?php echo $title ?><br> <img src=..\/themes\/graphics\/title.jpg><br><font color=white>for School<font color=black><\/h1>/' \
      /var/www/html/horde/imp/templates/login/login.inc \
      && grep "<h1 align="\""center"\"">" /var/www/html/horde/imp/templates/login/login.inc

mv /var/www/html/horde/imp/config/motd.php /var/www/html/horde/imp/config/motd.php.org
/bin/cat << EOF >> /var/www/html/horde/imp/config/motd.php
<?php
echo "<p align=center>
   <a href=http://".\$_SERVER['HTTP_HOST']."/iserver/faq/using_horde.pdf
   title='Click here for a Manual on the Use of your WebMail'
   target=_blank>Need Help? Click <img border=0 src=http://".\$_SERVER['HTTP_HOST']."/iserver/images/help.gif>
   Here for a Manual.</a><br>";

?>
EOF
cat /var/www/html/horde/imp/config/motd.php.org >> /var/www/html/horde/imp/config/motd.php
\end{verbatim}

\section{ Register Modules}
\begin{verbatim}

pico /var/www/html/horde/config/registry.php
\end{verbatim}

\newline
Make active the following modules if you have installed them.\newline
\begin{tabular}{|l|l|l|l|l|l|l|}
\hline
jonah & hermes & gollem & agora & ansel & swoosh & wicked\\
\hline
\end{tabular}
\section{ Testing}
In a web browser goto yoursite/horde/test.php and yoursite/horde/imp/test.php and see that everything is going okay.

\section{ Configure in Horde}
Go to yoursite/horde and you are presented with the Administrators page. \newline
Set up Horde as needed. \newline
Here are some of the settngs that we use.

\begin{tabular}{|l|l|}
\hline
\multicolumn{2}{|l|}{\textbf{Horde}}\\
\hline
General & NOTHING TO DO\\
\hline
Database & Database server/host\\
\hline
" & Username to connect to the database as Password to connect with\\
\hline
" & Database name to use\\
\hline
Authentication & Which users should be treated as administrators (root, super-user) by Horde?\\
\hline
" & What backend should we use for authenticating users to Horde?\\
\hline
" & The application which is providing authentication Horde Sign Up\\
\hline
Sign Up & NOTHING\\
\hline
Logging & NOTHING\\
\hline
Preference System & What preferences driver should we use?\\
\hline
" & Driver configuration\\
\hline
" & The name of the preference table in the database [horde\_prefs]\\
\hline
DataTree System & What backend should we use for Horde DataTree storage?\\
\hline
" & Driver configuration\\
\hline
" & The name of the data table in the database [horde\_datatree]\\
\hline
Groups & NOTHING\\
\hline
Cache System & NOTHING\\
\hline
Token System & NOTHING\\
\hline
Mailer & NOTHING\\
\hline
Virtual File Storage & NOTHING\\
\hline
Custom Session Handler & NOTHING\\
\hline
Image Manipulation & NOTHING\\
\hline
MIME Detection & NOTHING\\
\hline
Hostname->Country Lookup & NOTHING\\
\hline
Problem Reporting & If problem reporting is enabled in an application's menu, where should problem report emails be sent?\\
\hline
Menu Settings & The URL of an image for the top of the Horde menu. The image should be no larger than 140 pixels wide by 40 pixels high to prevent the frame from scrolling.\\
\hline
" & If a logo is displayed in the Horde menu, what URL (if any) should it link to?\\
\hline
Custom Function Hooks & NOTHING\\
\hline
Portal Block Configuration & NOTHING\\
\hline
Kolab Groupware Server & NOTHING\\
\hline
\multicolumn{2}{|l|}{\textbf{Address Book Setup}}\\
\hline
Menu Settings & Add Items as desired\\
\hline
\multicolumn{2}{|l|}{\textbf{Calendar Setup}}\\
\hline
Reminder Settings & Server name from which reminder emails should be sent.\\
\hline
" & Email address from which reminder emails should be sent.\\
\hline
\multicolumn{2}{|l|}{\textbf{File Manager Setup}}\\
\hline
Menu Settings & Add Items as desired\\
\hline
\multicolumn{2}{|l|}{\textbf{Filters Setup}}\\
\hline
Menu Settings & Add Items as desired\\
\hline
\multicolumn{2}{|l|}{\textbf{Mail Setup}}\\
\hline
External Utilities and Menu & Add Items as desired\\
\hline
User Capabilities and Constraints & NOTHING\\
\hline
Mail Server & NOTHING\\
\hline
Mailbox and Fetchmail & NOTHING\\
\hline
Message and Spam & NOTHING\\
\hline
Compose & NOTHING\\
\hline
Custom Hooks & NOTHING\\
\hline
Other settings & NOTHING\\
\hline
\multicolumn{2}{|l|}{\textbf{Notes Setup}}\\
\hline
Menu Settings & Add Items as desired\\
\hline
\multicolumn{2}{|l|}{\textbf{Tasks Setup}}\\
\hline
Menu Settings & Add Items as desired\\
\hline
\end{tabular}
\section{ Now try logging on to horde.}
\subsection{Can't logon?}
Check : /var/www/html/horde/imp/config/servers.php\newline
Check : /etc/hosts\newline
Check : /etc/hosts.allow\newline
Check : /etc/sysconfig/network

\subsection{ Logon very slow?}
Check: that you have hashed out any addresses books settings in turba/config/sources.php that you are not using

\subsection{ Horde runnning slow?}
The most common reason for Horde to run slow is that the Address Book section is trying to access Address Books and Address Book systems that do not exist.\newline
Edit /var/www/html/horde/turba/config/sources.php\newline
Delete all the sections except \newline
\begin{verbatim}

$cfgSources['localsql'] = array(
\end{verbatim}

\newline
To do this find the first \newline
\begin{verbatim}

);
\end{verbatim}

 \newline
that denotes the end of the localdsql section.\newline
And delete everything after this.
\noindent\rule{\textwidth}{1pt}
\part{ Colortext: NIUpgrading HORDEColortext: NI}

\noindent\rule{\textwidth}{1pt}
As features and upgrades become available for HORDE we will need to upgrade them. This secion deals with upgrading all of HORDE and just sepected modules of HORDE.

\section{ Upgrading HORDE}
\subsection{Upgrading pear}
\begin{verbatim}

pear upgrade PEAR-1.3.6
pear upgrade-all
pear upgrade pear
pear channel-update pear.php.net
pear install SOAP
pear install XML_Parser
pear install XML_RPC
pear install XML_Serializer
pear install Services_Weather
pear install Text_Wiki
pear install Net_DNS
pear install Net_Ping
pear install Net_Traceroute
pear upgrade-all
\end{verbatim}

\subsection{ Get Horde}
\begin{verbatim}

mkdir /zone/horde
cd /zone/horde
wget *ansel*
wget *gollem*
wget *horde*
wget *imp*
wget *kronolith*
wget *mnemo*
wget *nag*
wget *passwd*
wget *rakim*
wget *sam*
wget *turba*
wget *vacation*
wget *whups*
wget *wicked*
\end{verbatim}

\subsection{ Archive the current copy of Horde}
\begin{verbatim}

mv /var/www/html/horde /var/www/html/horde.old
\end{verbatim}

\subsection{ Create the New Horde}
\begin{verbatim}

tar -zxf /zone/horde/horde-3* -C /var/www/html/
cd /var/www/html/
mv horde-3* horde
cd /var/www/html/horde

for i in ansel gollem imp ingo kronolith mnemo nag passwd rakim sam turba vacation whups wicked
do
   tar -zxf /zone/horde/$i* -C /var/www/html/horde
   mv $i-* $i
done

/etc/init.d/mysqld stop
/etc/init.d/mysqld start
/etc/init.d/mysqld start

cd /var/www/html/horde/config
for foo in *.dist; do cp $foo `basename $foo .dist`; done
for i in ansel gollem imp ingo kronolith mnemo nag passwd rakim sam turba vacation whups wicked
do
   cd /var/www/html/horde/$i/config
   for foo in *.dist; do cp $foo `basename $foo .dist`; done
done

cd /var/www/html/horde/turba/config/
rm -f sources.php
wget http://202.174.163.41/files/horde/sources.txt
mv sources.txt sources.php
chown -R apache.apache /var/www/html/horde

pico /var/www/html/horde/config/registry.php
\end{verbatim}

\newline
Edit this file above and make active: wicked, sam, ansel, rakim, whupsCheck for database upgrades at this point!\newline
Run any database scripts for new modules.

\begin{verbatim}

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/.*'\''server'\'' => '\''imap.example.com'\'',.*$/    '\''server'\'' => '\'''$HOSTNAME''\'',/' /var/www/html/horde/imp/config/servers.php \
          && grep "'server' => '" /var/www/html/horde/imp/config/servers.php

sed -ie 's/.*'\''maildomain'\'' => '\''example.com'\'',.*$/    '\''maildomain'\'' => '\'''$DOMAINNAME''\'',/' /var/www/html/horde/imp/config/servers.php \
          && grep "'maildomain' => '" /var/www/html/horde/imp/config/servers.php

sed -ie 's/.*'\''smtphost'\'' => '\''smtp.example.com'\'',.*$/    '\''smtphost'\'' => '\'''$HOSTNAME''\'',/' /var/www/html/horde/imp/config/servers.php \
          && grep "'smtphost' => '" /var/www/html/horde/imp/config/servers.php

sed -ie 's/.*'\''realm'\'' => '\'''\'',.*$/    '\''realm'\'' => '\'''$DOMAINNAME''\'',/' /var/www/html/horde/imp/config/servers.php \
          && grep "'realm' => '" /var/www/html/horde/imp/config/servers.php
\end{verbatim}

\section{ Look and Feel at Logon}
\begin{verbatim}

sed -ie 's/.*<h1 align="center">.*$/<h1 align="center"><?php echo $title ?><br> <img src=..\/themes\/graphics\/title.jpg><br><font color=white>for School<font color=black><\/h1>/' \
      /var/www/html/horde/imp/templates/login/login.inc \
      && grep "<h1 align="\""center"\"">" /var/www/html/horde/imp/templates/login/login.inc

mv /var/www/html/horde/imp/config/motd.php /var/www/html/horde/imp/config/motd.php.org
/bin/cat << EOF >> /var/www/html/horde/imp/config/motd.php
<?php
echo "<p align=center>
   <a href=http://".\$_SERVER['HTTP_HOST']."/iserver/faq/using_horde.pdf
   title='Click here for a Manual on the Use of your WebMail'
   target=_blank>Need Help? Click <img border=0 src=http://".\$_SERVER['HTTP_HOST']."/iserver/images/help.gif>
   Here for a Manual.</a><br>";

?>
EOF
cat /var/www/html/horde/imp/config/motd.php.org >> /var/www/html/horde/imp/config/motd.php
\end{verbatim}

\section{ Register Modules}
\begin{verbatim}

pico /var/www/html/horde/config/registry.php
\end{verbatim}

\newline
Make active the following modules if you have installed them.\newline
\begin{tabular}{|l|l|l|l|l|l|l|}
\hline
jonah & hermes & gollem & agora & ansel & swoosh & wicked\\
\hline
\end{tabular}
\end{document}
