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

First steps and assumptionsUpdate your systemInstall Mysql and create Horde databaseInstall PHP5Install Horde (read INSTALL1\footnote{http://www.horde.org/apps/horde/docs/INSTALL} before proceeding)NotesInstall IMP (read INSTALL2\footnote{http://www.horde.org/apps/imp/docs/INSTALL} before proceeding)Install Ingo (read INSTALL3\footnote{http://www.horde.org/apps/ingo/docs/INSTALL} before proceeding)Install Turba (read INSTALL4\footnote{http://www.horde.org/apps/turba/docs/INSTALL} before proceeding)Install Kronolith (read INSTALL5\footnote{http://www.horde.org/apps/kronolith/docs/INSTALL} before proceeding)Install Mnemo (read INSTALL6\footnote{http://www.horde.org/apps/mnemo/docs/INSTALL} before proceeding)Setup and configure HordeFirst time configurationSetup horde databaseConfigure Horde and applicationsNote: Do not click on the exit icon (logout), just close the browser. We still need to get back without login (Administrator).Take a look at test.phpNote: Do not click on the exit icon (logout), just close the browser. We stiil need to get back without login (Administrator).Consider using httpsNote: Do not click on the exit icon (logout), just close the browser. We still need to get back without login (Administrator).Setup authentication and resume Horde configuration

(If you are only going to install the basic groupware and/or email applications as this guide shows, you should consider installing the Webmail bundle\footnote{http://horde.org/apps/webmail} - it's much less work and takes care of most of the tasks on this page. Ed.)

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

//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}
\texttt{aptitude update} (and \texttt{aptitude safe-upgrade} if necessary)\newline
\texttt{pear upgrade PEAR}


\noindent\rule{\textwidth}{1pt}
\subsection{Install Mysql and create Horde database}
\texttt{aptitude install mysql-server mysql-common mysql-client}\newline
\texttt{mysql --user=root -p}

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


\noindent\rule{\textwidth}{1pt}
\subsection{Install PHP5}
\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}


\noindent\rule{\textwidth}{1pt}
\subsection{Install Horde (read INSTALL7\footnote{http://www.horde.org/apps/horde/docs/INSTALL} before proceeding)}
\texttt{pear channel-discover pear.horde.org}\newline
\texttt{pear install horde/horde\_role}\newline
\texttt{pear run-scripts horde/horde\_role}\newline
  Filesystem location for the base Horde application : /var/www/horde\newline
\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 harmless8\footnote{http://marc.info/?l=horde\&m=138351291524461\&w=2}. }
\item{At the time of these instructions those were:}
\end{itemize}
\texttt{pecl upgrade -a -B channel://pecl.php.net/sasl-0.1.0}\newline
\texttt{pear upgrade -a -B channel://pear.php.net/Text\_LanguageDetect-0.3.0}\newline
\texttt{pecl upgrade -a -B channel://pecl.php.net/idn-0.2.0}\newline
\texttt{pecl upgrade -a -B channel://pecl.php.net/ssh2-0.12}\newline
\texttt{pear upgrade -a -B channel://pear.php.net/SOAP-0.13.0}\newline
\texttt{pear upgrade -a -B channel://pear.php.net/XML\_Serializer-0.20.2}\newline
\texttt{pear upgrade -a -B channel://pear.php.net/Console\_Color2-0.1.2}\newline
\texttt{pear upgrade -a -B channel://pecl.php.net/msgpack-0.5.7}\newline
\texttt{pear upgrade -a -B channel://pear.php.net/Numbers\_Words-0.18.1}\newline
\texttt{pear upgrade -a -B channel://pear.php.net/Image\_Text-0.7.0}


\noindent\rule{\textwidth}{1pt}
\subsection{Install IMP (read INSTALL9\footnote{http://www.horde.org/apps/imp/docs/INSTALL} before proceeding)}
\texttt{pear install -a -B horde/imp}\newline
Optional: \texttt{pear upgrade -a -B channel://phpseclib.sourceforge.net/File\_ASN1}


\noindent\rule{\textwidth}{1pt}
\subsection{Install Ingo (read INSTALL10\footnote{http://www.horde.org/apps/ingo/docs/INSTALL} before proceeding)}
\texttt{pear install -a -B horde/ingo}


\noindent\rule{\textwidth}{1pt}
\subsection{Install Turba (read INSTALL11\footnote{http://www.horde.org/apps/turba/docs/INSTALL} before proceeding)}
\texttt{pear install -a -B horde/turba}


\noindent\rule{\textwidth}{1pt}
\subsection{Install Kronolith (read INSTALL12\footnote{http://www.horde.org/apps/kronolith/docs/INSTALL} before proceeding)}
\texttt{pear install -a -B horde/kronolith}\newline
\texttt{pear upgrade -a -B channel://pear.php.net/Date\_Holidays-0.21.8}\newline
Optional: Install your country's holidays, if available.


\noindent\rule{\textwidth}{1pt}
\subsection{Install Mnemo (read INSTALL13\footnote{http://www.horde.org/apps/mnemo/docs/INSTALL} before proceeding)}
\texttt{pear install -a -B horde/mnemo}


\noindent\rule{\textwidth}{1pt}
\subsection{Setup and configure Horde}
\texttt{chown -R www-data /var/www/horde}

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

\begin{itemize}
\item{Setup Apache2 for Horde.}
\end{itemize}
\subsubsection{First time configuration}
\texttt{cd /var/www/horde/config}\newline
\texttt{cp -p conf.php.dist conf.php}

* Use your browser to open your\_Horde\_site. You don't need to login, you will be using as "Administrator".\newline
 * Configure just database, optional logging (if so, do it before database).\newline
 * Gear -> Configuration -> Horde -> Database tag\newline
 * SQL Database Settings\newline
  * \textsl{phptype} -> Mysql (mysqli)\newline
  * \textsl{username} -> horde\newline
  * \textsl{password} -> PasswordToHordeDatabase\newline
  * \textsl{database} -> horde\newline
  * Click on "Generate Horde Configuration"

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}
* Use your browser to open your\_Horde\_site.\newline
 * Update all SQL DB schema\newline
 * Take a look at all Horde's tabs and configure all applications (Imp, Ingo, Turba, Kronolith, Mnemo and Nag).

\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}
* Enable test (Horde configuration -> General -> uncheck \textsl{testdisable}).\newline
 * Click on "Generate Horde Configuration"

\subsection{Note: Do not click on the exit icon (logout), just close the browser. We stiil need to get back without login (Administrator).}
* Use your browser to open your\_Horde\_site/test.php. \newline
 * You should see many Colortext: NIYes Colortext: NI and some Colortext: NIyellowsColortext: NI. You decide if you need those yellows.\newline
 * Special care to PHP \textsl{memory\_limit}, \textsl{session.gc\_divisor}, \textsl{session.gc\_probability}, \textsl{upload\_max\_filesize} and \textsl{post\_max\_size}.\newline
 * If you are OK with test, Horde configuration -> General -> check \textsl{testdisable}.\newline
 * Click on "Generate Horde Configuration"

\subsubsection{Consider using https}
* Setup Apache to use Horde via https\newline
 * Horde configuration -> General -> URL Settings -> use\_ssl -> "Assume we are using SSL and allways generate https URLs."

\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}
* Horde configuration -> Authentication -> Authentication Settings\newline
 * \textsl{admins}: Comma separated list of logins of those who will administer Horde. Your login should be on the list.\newline
 * \textsl{driver}: "Let a Horde application handle authentication"\newline
 * \textsl{app}: imp\newline
 * Click on "Generate Horde Configuration".

Done!

* Now click on the exit icon (logout) and you should see the login page\newline
 * Login and check that you can use and configure Horde applications.

\end{document}
