Installing IMAP 4.x for PHP 3.0.x with Apache 1.3.x on Red Hat Linux 5.x
by Nathan Wallace
(August 9th, 1999)
This document describes how to install IMAP support
on Red Hat
Before we Begin
- These instructions assume that you have installed both Apache and PHP before. Here are my Apache installation instructions and those for PHP.
- Much of this installation requires root access. Let's change to the root user now.
- You can download the latest version of IMAP from here. You should get the file called imap-4.6.BETA.tar.Z or similar. I am using imap-4.6.BETA.tar.Z for this installation.
- You can save this file to any location you like since we are just going to make the distribution and then copy out a few of the files. I saved it to /tmp. Here are the commands I typed during the session.
- Uncompress and unpack the download.
tar xvf imap-4.6.BETA.tar
- Now we have to compile it. For a standard Red Hat 5.x installation the slx directive to make will work. For other setups you should check the makefile for your required directive.
- Now we need to install the libraries and include files into locations where they are in the link and include paths respectively for your system. I'll be using /usr/lib and /usr/include.
cp c-client.a /usr/lib
cp rfc822.h mail.h linkage.h /usr/include
- The IMAP libraries are now installed on your machine.
- I'm assuming you have installed PHP according to my instructions. They cover a fairly standard statically compiled (non-DSO) installation.
- If you have apache running on your machine you will need to stop it before recompiling PHP and Apache. You can stop Apache with:
- You need to reconfigure PHP to include support for IMAP. You basically just have to use the exact same configure line you used with your previous installation, but add the directive --with-imap to the end. Detailed instructions for this part are available here. I've just included the chain of commands below for your convenience. For my instructions with MySQL support this is:
./configure --with-mysql=/usr/local/mysql --with-apache=../apache --enable-track-vars --with-imap
./configure --prefix=/www --activate-module=src/modules/php3/libphp3.a
- You should now have an Apache installation with PHP including IMAP support.
- Restart your Apache server with: