\documentclass{article}
\usepackage{ulem}
\usepackage{graphicx}
\usepackage{hyperref}
\pagestyle{headings}
\begin{document}
(If you are only going to install the basic groupware and/or email applications as this guide shows, you should consider installing the <a href="http://horde.org/apps/webmail">Webmail bundle</a> - it's much less work and takes care of most of the tasks on this page. Ed.)

**Instructions for installing Horde 5, IMP and others Horde applications, with Pear on Debian (Jessie) with Apache2, PHP5 and Mysql.

\textit{Last updated 2015-10-28}

\subsection{First steps and assumptions}
Debian is installed with basic, web server and ssh at a minimum.

SMTP, IMAP and Apache servers are properly configured and working.

All services are on the same host.


\noindent\rule{\textwidth}{1pt}
\subsection{Update your system}
\section{\texttt{aptitude update} (and \texttt{aptitude safe-upgrade} if necessary)<br />
\texttt{pear upgrade PEAR}}
\subsection{Install Mysql and create Horde database}
\texttt{aptitude install mysql-server mysql-common mysql-client}<br />
\texttt{mysql --user=root -p}

\begin{itemize}
\item Database=horde, user=horde, password=PasswordToHordeDatabase<br />
\texttt{create database horde;}<br />
\texttt{grant ALL on horde.* to 'horde' identified by 'PasswordToHordeDatabase';}<br />
\texttt{quit}


\end{itemize}

\noindent\rule{\textwidth}{1pt}
\subsection{Install PHP5}
\section{\texttt{aptitude install php5 php5-common php5-imap php5-mysql php-pear php5-gd  php5-tidy php5-imagick php5-mcrypt php5-intl php5-memcache php5-geoip php-gettext imagemagick tidy  gettext php5-curl}}
\subsection{Install Horde (read INSTALL<a href="http://www.horde.org/apps/horde/docs/INSTALL">http://www.horde.org/apps/horde/docs/INSTALL</a> before proceeding)}
\texttt{pear channel-discover pear.horde.org}<br />
\texttt{pear install horde/horde\_role}<br />
\texttt{pear run-scripts horde/horde\_role}<br />
Filesystem location for the base Horde application : /var/www/horde<br />
\texttt{pear install -a -B horde/horde}

\subsection{Notes}
\begin{itemize}
\item Here you will get some "Failed to download" notices. Take note of what has failed, you MAY need to install them.


\item You will get some warnings too, These maybe harmless<a href="http://marc.info/?l=horde&amp;m=138351291524461&amp;w=2">http://marc.info/?l=horde\&m=138351291524461\&w=2</a>.


\item At the time of these instructions those were:<br />
\texttt{pecl upgrade -a -B channel://pecl.php.net/sasl-0.1.0}<br />
\texttt{pear upgrade -a -B channel://pear.php.net/Text\_LanguageDetect-0.3.0}<br />
\texttt{pecl upgrade -a -B channel://pecl.php.net/idn-0.2.0}<br />
\texttt{pecl upgrade -a -B channel://pecl.php.net/ssh2-0.12}<br />
\texttt{pear upgrade -a -B channel://pear.php.net/SOAP-0.13.0}<br />
\texttt{pear upgrade -a -B channel://pear.php.net/XML\_Serializer-0.20.2}<br />
\texttt{pear upgrade -a -B channel://pear.php.net/Console\_Color2-0.1.2}<br />
\texttt{pear upgrade -a -B channel://pecl.php.net/msgpack-0.5.7}<br />
\texttt{pear upgrade -a -B channel://pear.php.net/Numbers\_Words-0.18.1}<br />
\texttt{pear upgrade -a -B channel://pear.php.net/Image\_Text-0.7.0}


\end{itemize}

\noindent\rule{\textwidth}{1pt}
\subsection{Install IMP (read INSTALL<a href="http://www.horde.org/apps/imp/docs/INSTALL">http://www.horde.org/apps/imp/docs/INSTALL</a> before proceeding)}
\section{\texttt{pear install -a -B horde/imp}<br />
Optional: \texttt{pear upgrade -a -B channel://phpseclib.sourceforge.net/File\_ASN1}}
\subsection{Install Ingo (read INSTALL<a href="http://www.horde.org/apps/ingo/docs/INSTALL">http://www.horde.org/apps/ingo/docs/INSTALL</a> before proceeding)}
\section{\texttt{pear install -a -B horde/ingo}}
\subsection{Install Turba (read INSTALL<a href="http://www.horde.org/apps/turba/docs/INSTALL">http://www.horde.org/apps/turba/docs/INSTALL</a> before proceeding)}
\section{\texttt{pear install -a -B horde/turba}}
\subsection{Install Kronolith (read INSTALL<a href="http://www.horde.org/apps/kronolith/docs/INSTALL">http://www.horde.org/apps/kronolith/docs/INSTALL</a> before proceeding)}
\texttt{pear install -a -B horde/kronolith}<br />
\texttt{pear upgrade -a -B channel://pear.php.net/Date\_Holidays-0.21.8}<br />
Optional: Install your country's holidays, if available.


\noindent\rule{\textwidth}{1pt}
\subsection{Install Mnemo (read INSTALL<a href="http://www.horde.org/apps/mnemo/docs/INSTALL">http://www.horde.org/apps/mnemo/docs/INSTALL</a> before proceeding)}
\section{\texttt{pear install -a -B horde/mnemo}}
\subsection{Setup and configure Horde}
\texttt{chown -R www-data /var/www/horde}

\begin{itemize}
\item Optional: Setup for Horde logging.<br />
\texttt{mkdir /var/log/horde}<br />
\texttt{touch /var/log/horde/horde5.log}<br />
\texttt{chown -R www-data /var/log/horde/}


\item Setup Apache2 for Horde.


\end{itemize}
\subsubsection{First time configuration}
\texttt{cd /var/www/horde/config}<br />
\texttt{cp -p conf.php.dist conf.php}

\begin{itemize}
\item Use your browser to open your\_Horde\_site. You don't need to login, you will be using as "Administrator".


\item Configure just database, optional logging (if so, do it before database).


\item Gear -> Configuration -> Horde -> Database tag


\item SQL Database Settings
\begin{itemize}
\item \textit{phptype} -> Mysql (mysqli)


\item \textit{username} -> horde


\item \textit{password} -> PasswordToHordeDatabase


\item \textit{database} -> horde


\item Click on "Generate Horde Configuration"


\end{itemize}

\end{itemize}
As your database is empty you will get an error and crash. Don't worry!

\subsubsection{Setup horde database}
\texttt{horde-db-migrate}

\subsubsection{Configure Horde and applications}
\begin{itemize}
\item Use your browser to open your\_Horde\_site.


\item Update all SQL DB schema


\item Take a look at all Horde's tabs and configure all applications (Imp, Ingo, Turba, Kronolith, Mnemo and Nag).


\end{itemize}
\subsection{Note: Do not click on the exit icon (logout), just close the browser. We still need to get back without login (Administrator).}
\subsubsection{Take a look at test.php}
\begin{itemize}
\item Enable test (Horde configuration -> General -> uncheck \textit{testdisable}).


\item Click on "Generate Horde Configuration"


\end{itemize}
\subsection{Note: Do not click on the exit icon (logout), just close the browser. We stiil need to get back without login (Administrator).}
\begin{itemize}
\item Use your browser to open your\_Horde\_site/test.php.


\item You should see many Yes  and some yellows. You decide if you need those yellows.


\item Special care to PHP \textit{memory\_limit}, \textit{session.gc\_divisor}, \textit{session.gc\_probability}, \textit{upload\_max\_filesize} and \textit{post\_max\_size}.


\item If you are OK with test, Horde configuration -> General -> check \textit{testdisable}.


\item Click on "Generate Horde Configuration"


\end{itemize}
\subsubsection{Consider using https}
\begin{itemize}
\item Setup Apache to use Horde via https


\item Horde configuration -> General -> URL Settings -> use\_ssl -> "Assume we are using SSL and allways generate https URLs."


\end{itemize}
\subsection{Note: Do not click on the exit icon (logout), just close the browser. We still need to get back without login (Administrator).}
\subsubsection{Setup authentication and resume Horde configuration}
\begin{itemize}
\item Horde configuration -> Authentication -> Authentication Settings


\item \textit{admins}: Comma separated list of logins of those who will administer Horde. Your login should be on the list.


\item \textit{driver}: "Let a Horde application handle authentication"


\item \textit{app}: imp


\item Click on "Generate Horde Configuration".


\end{itemize}
Done!

\begin{itemize}
\item Now click on the exit icon (logout) and you should see the login page


\item Login and check that you can use and configure Horde applications.


\end{itemize}
\end{document}
