TOTKat
 

TOTKat: (hand coded) online journal of a girl geek since April 1999.
WARNING: contains personal opinions. A sense of perspective is required when reading.

     
   
   
   
   
   
   
   
   
   
     
   
   
   
   
   
   
   
   
   
   
   
     
   
   
   
   
   
   
   
   
   
   
   
   
   
   
 
  

Installing and configuring horde (and IMP)

This is specifically for a Solaris 8 install.
Errors or omissions, please mail to documentation@totkat.org.

Introduction

The horde project is a suite of open source web applications. Horde itself is the engine, on top of which various modules sit, e.g. IMP for email, Kronolith for calendaring, Turba for the address book, Nag for a task list, Mnemo for memos and notes. And those are just the production stage ones that I've installed so far. There are more around and in development.

Horde itself, sits on top of apache, with PHP and MySQL. It is all highly configurable, modular and just generally worth evangelising about. I started off with horde plus IMP (installing IMP has the prerequisite, unsurprisingly of installing Horde first) and I'm just adding modules as fast as I can grab them. In time, I'll document the lot. To be quite honest, once you have horde up and running, the rest gets easier and easier.

The staging directory to which the packages are downloaded is indicated by $STAGE, the install location for Apache by $APACHEHOME and the location of your web server document root by $DOCROOT.

The methods documented here are specifically for a Solaris 8 install of IMP and horde without a database. If you want to use MySQL as a backend database, then follow the additional instructions at the MySQL extra info page.

If you are unsure of the version of horde you are using and don't have the source to hand, check in $DOCROOT/horde/lib/version.php.

This documentation was originally written to deal with Horde 2.0, Imp 3.1, Turba, Kronolith, Mnemo and Nag all version 1.0. Since then, I have upgraded all of these to the current versions: Horde 2.2.1, Imp 3.2.1, Kronolith 1.1, Turba 1.2 and Mnemo 1.1 (Nag is still at version 1.0 at the date of writing. So, I have included sections where there are differences for the newer versions and one on the upgrade process I used.

Finally, there is a demo site install you can take a look at on the horde web site.

Preparation

Be root! Make sure anything you'd normally need for compiling and installing stuff is in the PATH and LD_LIBRARY_PATH variables. Download this little lot (choose which version of Horde and IMP you want), unzip and untar them somewhere sensible, in my case /export/stage. You may already have some of these installed, but some will need (re-)configuring.

  • fetchmail
  • IMAP 2004
  • imapproxy 1.2.1
  • gettext
  • apache 1.3.31
  • horde 2.0
  • IMP 3.1
  • PHP 4.3.7
  • horde 2.2.1
  • IMP 3.2.1
  • pear 1.3
  • mod_ssl 2.8.18-1.3.31
  • I already had apache (and openssl) installed and an old copy of fetchmail sitting around, idle, but I'll walk through what I remember of those installs. I'm fairly sure this works best if you have an existing install of apache, but here's what I did to get things working. Some of the steps are there purely for supersitition, but hey, whatever works, right?

    I generally keep packages in a staging area $STAGE and install from there. Also, I put apache in $APACHEHOME. Feel free to use different base directories, just don't copy and paste my examples and expect them to work!

    Finally, where I have indicated that something is optional, that isn't quite what I mean. All of the packages in this section are required for IMP to work. So, I mean if you already have a working version of whatever it is in that section, you may not need to do anything. Finally, the line numbers are specific to the versions of the modules I was using when I wrote this documentation. Your mileage may vary. Use common sense. Also, obviously, feel free to use the latest versions of these packages, but be aware that I can't vouch that they will work together; check their documentation for various caveats.

    [top]

    Installing apache (optional)

    If you already have apache installed and intend to use that instance for horde, skip this part.

    Configure, make and install apache:-

      cd $STAGE/apache_1.3.31
      ./configure --prefix=$APACHEHOME
      make
      make install
    

    [top]

    Installing fetchmail (optional)

    You may not need fetchmail. If you already have mail being delivered to this machine to a sensible place, skip the fetchmail parts.

    Make and install fetchmail:-

      cd $STAGE/fetchmail-5.1.0
      make
      make install
    

    [top]

    Installing IMAP (optional)

    Remember, this is for _my_ Solaris 8 setup, which uses gcc. You may need a different make option. And again, you may already have an IMAP or POP daemon set up, so you may be able to skip the IMAP parts.

    Configure and make IMAP. Copy the daemons to somewhere useful, then copy the c-client components required for PHP into directories PHP will expect when that is being built:-

      cd $STAGE/imap-2004
      make gso SSLTYPE=none
      cp imapd/imapd /usr/sbin
      cp ipopd/ipop2d ipopd/ipop3d /usr/sbin
      mkdir include
      mkdir lib
      cp c-client/*.h include
      cp c-client/*.a lib
    

    This sets you up with some of the requirements for the later install of PHP.

    [top]

    Installing imapproxy (optional)

    Usual disclaimers about not absolutely needing to do this, but trust me, it _will_ improve performance if you are connecting to an IMAP server for authentication and/or mail.

    Configure and make imapproxy. Configure imapproxy and start it up.

      cd $STAGE/up-imapproxy-1.2.1
      ./configure --with-openssl-lib=/usr/local/ssl/lib
      make
      make install
      make install-conf
      make install-init
    

    Once that's safely done, you need to edit /etc/imapproxy.conf for your local environment. Set the following:-

      server_hostname yourservername
      listen_port 343
      server_port 143
      cache_expiration_time 300
      proc_username horde
      proc_groupname nobody
    
    This is an example for a setup where you have IMAP and imapproxy on the same machine, so you need listen_port to be set to the port on which IMAP runs and server_port to be the port you want imapproxy to listen on. In my case, IMAP is on 143 and imapproxy is on 343 (a nice, low, unused port) proc_username is user name under which imapproxy will be run - this cannot be root. Once, you've configure it, you can start it up.
      /etc/init.d/imapproxy start
    

    [top]

    Installing gettext (optional)

    If you already have gettext installed, skip this section.

    Configure, make and install gettext:-

      cd $STAGE/gettext-0.10.37
      ./configure
      make
      make install
    

    [top]

    Configure and start fetchmail (optional)

    This is probably the most configurable bit. I just needed to grab stuff from one catch-all account, so you may need a bit more fiddling. I would seriously recommend reading the INSTALL and README files that come with fetchmail.

    Again, for the runtime options, read the INSTALL and README files. No, really. You may find this rather useful for fetchmail questions.

    [top]

    Configure apache

      cd $STAGE/apache_1.3.31
      ./configure --prefix=$APACHEHOME
    

    [top]

    Installing PHP (optional)

    You may already have PHP installed, but it may not be configured for IMAP and gettext. If you are not sure, it could be best to re-install PHP, or you could just skip this part and see what happens later.

    Configure PHP for IMAP, apache and gettext. Make and install:-

      cd $STAGE/php-4.3.7
      ./configure --enable-track-vars --with-imap=$STAGE/imap-2004 
      \--with-apache=$STAGE/apache_1.3.31 --with-gettext=/usr/bin
      make
      make install
      cp php.ini-dist $APACHEHOME/conf/php.ini
      cp php.ini-dist /usr/local/lib/php.ini
    

    You may see problems with libraries during compilation. In which case, make sure your libraries are linked.

    [top]

    Add mod_ssl to apache (optional)

    You will need to have downloaded and untarred in the $STAGE directory, a copy of openssl , even if you already have openssl installed (unless you already have apache installed with mod_ssl).

    Configure mod_ssl for apache:-

    cd $STAGE/mod_ssl-2.8.18-1.3.31
    ./configure --with-apache=$STAGE/apache_1.3.31 --with-ssl=/usr/local/ssl
    \--prefix=$APACHEHOME --enable-module=info --enable-module=so
    

    Installing apache (optional)

    You may already have apache working with PHP, including IMAP and gettext support, in which case, you can skip this part. If not, read on.

    I'd advise making sure that the original apache install works first, so just fire up $APACHEHOME/bin/apachectl start and see if that works. If it is OK, stop it again and carry on with the install. Also, if you are using this instance of apache for anything else that requires compile-time options, don't forget to add those in otherwise you may find things stop working!

    Configure apache with PHP and mod_ssl. Make, make the certificate for SSL and install:-

      cd $STAGE/apache_1.3.31
      SSL_BASE=/usr/local/ssl ./configure --activate-module=src/modules/php4/libphp4.a 
      \--prefix=$APACHEHOME --enable-module=ssl
      make
      make certificate
      make install
    

    You may run into trouble making apache this time. If you do, tar up the contents of $DOCROOT and put that somewhere safe. Then delete all of the $APACHEHOME contents. Re-install apache with the earlier configuration, having run "make clean" in the apache staging directory. Re-install PHP, also with a "make clean" in the staging directory first. Configure apache for PHP and build again. Then untar that htdocs tarball back into $DOCROOT.

    You may also want to get rid of the passphrase so that you don't have to type it in every time you restart apache (e.g. after an unexpected system reboot):-

    cd $APACHEHOME/conf/ssl.key/
    cp server.key server.key-with-passphrase
    openssl rsa -in server.key -out server.key
    chmod 400 server.key
    

    [top]

    Configure apache (optional)

    We need to configure apache for PHP support.

    Edit the $APACHEHOME/conf/httpd.conf, find the lines about DirectoryIndex and add in "index.php":-

    <IfModule mod_dir.c>
        DirectoryIndex index.html index.php
    </IfModule>
    
    Also, find the lines about AddType for php (version 4) and uncomment them:-
    # And for PHP 4.x, use:
    #
       AddType application/x-httpd-php .php
       AddType application/x-httpd-php-source .phps
    

    [top]

    Installing pear (optional)

    The version of pear that comes with PHP isn't new enough for horde to work. So, unless you have a working version of apache, with PHP compiled with IMAP and gettext support and the latest version of pear in place, you should really install a new version of pear. Having said that, pear doesn't need "installing" as such. Just copy it to the correct location where it will be expected to be found.

    Untar pear and move it to where PHP will use it:-

      cd /usr/local/lib
      tar xvf $STAGE/pear-1.3.tar.gz 
      mv pear-1.3 php
    

    Right, that's all the pre-requisites in place. Now to install Horde.

    [top]


    Mailto:webmaster@totkat.org

    Site statistics

     

         
      Horde Basics  
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
         
      Horde Extras