IMAP is the abbreviation of Internet Mail Access Protocol. Interactive Mail Access Protocol is very abstract. Good VPS does not expect to study it. I just see "IMAP<ept1" in the project component support of the probe. >E-mail System Function Library" and the like. When I wrote a blog or a small website on a VPS, I didn't experience any discomfort caused by the lack of support for this thing. However, I recently discovered it during the POP3 import of work orders using WHMCS on the VPS. , must have IMAP support, so record the process of installing the IMAP module in the LNMP environment.
First of all, the VPS operating system is CentOS 6, 32bit, and the compilation environment is Junge LNMP (1.0) one-click package. The following is the installation process.
1. Install dependency packages

yum install libc-client-devel

If it is Debian, execute the following command

apt-get install libc-client-dev

2. Install IMAP
First, enter the imap directory of the installation package we downloaded when compiling the LNMP one-click package.

cd /root/lnmp1.0-full/php-5.3.17/ext/imap

Pay attention to this step. If you selected PHP5.2 when compiling LNMP, the directory here must also be modified accordingly.
Next execute:

/usr/local/php/bin/phpize

See:

Configuring for:
PHP Api Version:         20041225
Zend Module Api No:  < x2>   20060613
Zend Extension Api No:   220060519

Note that there may be differences in the above content, because I did not record it when I made it. This was copied when I replayed it on another PHP5.2.17. . .
Next, continue with the configuration.

1
./configure --with-php-config=/usr/local/php/bin/php-config --with-kerberos --with-imap-ssl

Then install.

make && make install

If you see the following content, it’s OK.

Build complete.
Don”t forget to run “make test”.
Installing shared extensions:     /usr/local/php/lib/php/extensions/no -debug-non-zts-20060613/

Similarly, this content is also copied on the VPS that compiles PHP5.2.17. If it is PHP5.3.17, there may be a difference, 20060613 is 20090626.
3. Write configuration
Finally, we write the module into php.ini

vi /usr/local/php/etc/php.ini

Find extension and add one after it: extension = “imap.so”
Restart LNMP and check the probe.

/root/lnmp restart

imap
OK, already supported.

postid
13869

Leave a Reply