Note: 56 in the following operation command is the PHP version, please replace it with the PHP version you want to install the IMAP component; the following directory is for reference only, please refer to the actual installation directory.
Installation dependencies:
yum -y install krb5-devel libc-client libc-client-devel
Handling connections:
ln -sv /usr/lib64/libc-client.so /usr/lib/libc-client.so
Enter the IMAP source code directory corresponding to the PHP version:
cd /www/server/php/56/src/ext/imap
Execute the corresponding version of the expansion initialization program:
/www/server/php/56/bin/phpize
Prepare compilation configuration:
./configure –with-php-config=/www/server/php/56/bin/php-config –with-imap=/usr/lib64 –with-imap-ssl –with-kerberos
Compilation and installation
make && make install
Write configuration file:
echo ‘extension = imap.so’ >> /www/server/php/56/etc/php.ini
Reload PHP:
service php-fpm-56 reload
The above is the detailed content of A concise guide to installing IMAP extensions on CentOS. For more information, please follow other related articles on the PHP Chinese website!