2013年写过一次在军哥LNMP环境下安装PHP扩展IMAP过程,当时是LNMP1.0,今天在一台机器上装的时候有些许不同,VPS系统是centos6.9 64bit,环境是军哥LNMP1.4,所以更新下。
一、安装所需库
[[email protected]]#yum install libc-client-devel
二、进入安装目录解压PHP
[[email protected]]#cd /root/lnmp1.4/src
[[email protected]]#tar -xjvf php-5.6.31.tar.bz2
#注意自己安装的PHP版本,解压响应的压缩包
三、安装IMAP
[[email protected]]#cd /root/lnmp1.4/src/php-5.6.31/ext/imap
[[email protected]]#/usr/local/php/bin/phpize

Configuring for:
PHP Api Version:         20131106
Zend Module Api No:      20131226
Zend Extension Api No:   220131226

[[email protected]]# ./configure --with-php-config=/usr/local/php/bin/php-config --with-kerberos --with-imap-ssl --with-libdir=lib64
[[email protected]]# make && make install

Build complete.
Don""t forget to run ""make test"".
Installing shared extensions:     /usr/local/php/lib/php/extensions/no-debug-non-zts-20131226/
 
四、修改php.ini并重启
[[email protected]]#vi /usr/local/php/etc/php.ini
查找:extension_dir 再下面一行添加上extension = "imap.so"
[[email protected]]#/etc/init.d/php-fpm restart
最后我们通过探针查看下组件支持:
imap

标签: IMAP, LNMP安装IMAP, php扩展, 安装imap

window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":["mshare","kaixin001","tsina","tsohu","tqq","renren","qzone","weixin","bdysc","bdxc","tqf","tieba","douban","bdhome","sqq","thx"],"bdPic":"","bdStyle":"0","bdSize":"24"},"slide":{"type":"slide","bdImg":"2","bdPos":"left","bdTop":"100"},"selectShare":{"bdContainerClass":null,"bdSelectMiniList":["tsina","tqq","tsohu","qzone","renren","weixin","mshare"]}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];
postid
15966

发表评论