\documentclass{article}
\usepackage{ulem}
\usepackage{graphicx}
\usepackage{hyperref}
\pagestyle{headings}
\begin{document}
\part{\#\#FFA500 |Installing HORDE on a Centos 4 Server\#\#}

\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.<br />
As of this writing the versions we are using are:

\section{Horde Version}
\begin{itemize}
\item Horde: 3.1.1


\end{itemize}
\section{Horde Applications}
\begin{itemize}
\item Agora: 0.1-cvs


\item Ansel: 0.1-cvs


\item Chora: H3 (2.0.1)


\item Gollem: H3 (1.0.2)


\item Hermes: 0.1-cvs


\item Imp: H3 (4.1)


\item Ingo: H3 (1.1)


\item Jonah: 0.1-cvs


\item Kronolith: H3 (2.1)


\item Mimp: H3 (1.0-RC1)


\item Mnemo: H3 (2.1)


\item Nag: H3 (2.1)


\item Nic: 0.1-cvs


\item Passwd: H3 (3.0)


\item Rakim: 0.1-cvs


\item Sam: 0.1-cvs


\item Swoosh: 0.1-cvs


\item Turba: H3 (2.1)


\item Wicked: 0.1-cvs<br />
| <a href="http://horde.org">http://horde.org</a> | <a href="http://www.horde.org/source/modules.php">http://www.horde.org/source/modules.php</a> |<br />
| --- | --- |


\end{itemize}
\section{Get the local domain name.}
<pre><code>
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 \textbackslash\{\}\textbackslash\{\}

         \&\& grep memory\_limit /etc/php.ini
</code></pre>
\section{Installing pear dependencies.}
We need to make sure that all the pear modules are installed and of the latest versions.<br />
Run the following code in a SSH session as root.

<pre><code>
/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
</code></pre>
This is an overkill, but at least it makes sure we REALLY have everything!

\section{Install Horde}
Down load the latest production copies of HORDE.

<pre><code>
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
</code></pre>
We use a network mounted copy of all our setup files so the /mnt/\$version refers to a location you set up as needed.

<pre><code>
\# 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
</code></pre>
\subsection{mysql}
Just for fun we stop and start mysql

<pre><code>
/etc/init.d/mysqld stop
/etc/init.d/mysqld start
/etc/init.d/mysqld start
</code></pre>
\subsection{Horde Configuration}
Now we create all the needed configuration files.

<pre><code>
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
</code></pre>
\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.<br />
Now create all the Horde database tables.

<pre><code>
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
</code></pre>
\$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.

<pre><code>
echo apache>>/etc/mail/trusted-users
</code></pre>
\section{Dovecot}
Edit /etc/dovecot.conf with what protocols you are going to use, we allow imap imaps pop3 pop3s.<br />
Lets restart everything.

<pre><code>
sed -ie 's/.*\#protocols = imap imaps.*\$/protocols = imap imaps pop3 pop3s/' /etc/dovecot.conf \textbackslash\{\}\textbackslash\{\}

         \&\& 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
</code></pre>
\section{Imp Server Configuration}
Make your changes to /var/www/html/horde/imp/config/servers.php to reflect the name of your server.<br />
Here is an example:

<pre><code>
\$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' => ''
);
</code></pre>
This is the script that we use to carry out the correct changes needed with /var/www/html/horde/imp/config/servers.php

<pre><code>
sed -ie 's/.*'\textbackslash\{\}''server'\textbackslash\{\}'' => '\textbackslash\{\}''imap.example.com'\textbackslash\{\}'',.*\$/    '\textbackslash\{\}''server'\textbackslash\{\}'' => '\textbackslash\{\}'''\$HOSTNAME''\textbackslash\{\}'',/' /var/www/html/horde/imp/config/servers.php \textbackslash\{\}\textbackslash\{\}

          \&\& grep "'server' => '" /var/www/html/horde/imp/config/servers.php

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

          \&\& grep "'maildomain' => '" /var/www/html/horde/imp/config/servers.php

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

          \&\& grep "'smtphost' => '" /var/www/html/horde/imp/config/servers.php

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

          \&\& grep "'realm' => '" /var/www/html/horde/imp/config/servers.php
</code></pre>
\section{Look and Feel at Logon}
<pre><code>
sed -ie 's/.*<h1 align="center">.*\$/<h1 align="center"><?php echo \$title ?><br> <img src=..\textbackslash\{\}/themes\textbackslash\{\}/graphics\textbackslash\{\}/title.jpg><br><font color=white>for School<font color=black><\textbackslash\{\}/h1>/' \textbackslash\{\}\textbackslash\{\}

      /var/www/html/horde/imp/templates/login/login.inc \textbackslash\{\}\textbackslash\{\}

      \&\& grep "<h1 align="\textbackslash\{\}""center"\textbackslash\{\}"">" /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://".\textbackslash\{\}\$\_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://".\textbackslash\{\}\$\_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
</code></pre>
\section{Register Modules}
<pre><code>
pico /var/www/html/horde/config/registry.php
</code></pre>
Make active the following modules if you have installed them.<br />
| jonah | hermes | gollem | agora | ansel | swoosh | wicked |<br />
| --- | --- | --- | --- | --- | --- | --- |

\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.<br />
Set up Horde as needed.<br />
Here are some of the settngs that we use.

<table class="horde-table">\textbf{Horde} \\
\hline
General \\
\hline
Database \\
\hline
" \\
\hline
" \\
\hline
Authentication \\
\hline
" \\
\hline
" \\
\hline
Sign Up \\
\hline
Logging \\
\hline
Preference System \\
\hline
" \\
\hline
" \\
\hline
DataTree System \\
\hline
" \\
\hline
" \\
\hline
Groups \\
\hline
Cache System \\
\hline
Token System \\
\hline
Mailer \\
\hline
Virtual File Storage \\
\hline
Custom Session Handler \\
\hline
Image Manipulation \\
\hline
MIME Detection \\
\hline
Hostname->Country Lookup \\
\hline
Problem Reporting \\
\hline
Menu Settings \\
\hline
" \\
\hline
Custom Function Hooks \\
\hline
Portal Block Configuration \\
\hline
Kolab Groupware Server \\
\hline
\textbf{Address Book Setup} \\
\hline
Menu Settings \\
\hline
\textbf{Calendar Setup} \\
\hline
Reminder Settings \\
\hline
" \\
\hline
\textbf{File Manager Setup} \\
\hline
Menu Settings \\
\hline
\textbf{Filters Setup} \\
\hline
Menu Settings \\
\hline
\textbf{Mail Setup} \\
\hline
External Utilities and Menu \\
\hline
User Capabilities and Constraints \\
\hline
Mail Server \\
\hline
Mailbox and Fetchmail \\
\hline
Message and Spam \\
\hline
Compose \\
\hline
Custom Hooks \\
\hline
Other settings \\
\hline
\textbf{Notes Setup} \\
\hline
Menu Settings \\
\hline
\textbf{Tasks Setup} \\
\hline
Menu Settings \\
\hline
</table>
\section{Now try logging on to horde.}
\subsection{Can't logon?}
Check : /var/www/html/horde/imp/config/servers.php<br />
Check : /etc/hosts<br />
Check : /etc/hosts.allow<br />
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.<br />
Edit /var/www/html/horde/turba/config/sources.php<br />
Delete all the sections except

<pre><code>
\$cfgSources['localsql'] = array(
</code></pre>
To do this find the first

<pre><code>
);
</code></pre>
that denotes the end of the localdsql section.<br />
And delete everything after this.


\noindent\rule{\textwidth}{1pt}
\part{\#\#FFA500 |Upgrading HORDE\#\#}

\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}
<pre><code>
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
</code></pre>
\subsection{Get Horde}
<pre><code>
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*
</code></pre>
\subsection{Archive the current copy of Horde}
<pre><code>
mv /var/www/html/horde /var/www/html/horde.old
</code></pre>
\subsection{Create the New Horde}
<pre><code>
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
</code></pre>
Edit this file above and make active: wicked, sam, ansel, rakim, whups

Check for database upgrades at this point!<br />
Run any database scripts for new modules.

<pre><code>
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/.*'\textbackslash\{\}''server'\textbackslash\{\}'' => '\textbackslash\{\}''imap.example.com'\textbackslash\{\}'',.*\$/    '\textbackslash\{\}''server'\textbackslash\{\}'' => '\textbackslash\{\}'''\$HOSTNAME''\textbackslash\{\}'',/' /var/www/html/horde/imp/config/servers.php \textbackslash\{\}\textbackslash\{\}

          \&\& grep "'server' => '" /var/www/html/horde/imp/config/servers.php

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

          \&\& grep "'maildomain' => '" /var/www/html/horde/imp/config/servers.php

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

          \&\& grep "'smtphost' => '" /var/www/html/horde/imp/config/servers.php

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

          \&\& grep "'realm' => '" /var/www/html/horde/imp/config/servers.php
</code></pre>
\section{Look and Feel at Logon}
<pre><code>
sed -ie 's/.*<h1 align="center">.*\$/<h1 align="center"><?php echo \$title ?><br> <img src=..\textbackslash\{\}/themes\textbackslash\{\}/graphics\textbackslash\{\}/title.jpg><br><font color=white>for School<font color=black><\textbackslash\{\}/h1>/' \textbackslash\{\}\textbackslash\{\}

      /var/www/html/horde/imp/templates/login/login.inc \textbackslash\{\}\textbackslash\{\}

      \&\& grep "<h1 align="\textbackslash\{\}""center"\textbackslash\{\}"">" /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://".\textbackslash\{\}\$\_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://".\textbackslash\{\}\$\_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
</code></pre>
\section{Register Modules}
<pre><code>
pico /var/www/html/horde/config/registry.php
</code></pre>
Make active the following modules if you have installed them.<br />
| jonah | hermes | gollem | agora | ansel | swoosh | wicked |<br />
| --- | --- | --- | --- | --- | --- | --- |

\end{document}
