PHP 支持IMAP
linux下安装php支持imap
2008-11-26 10:31:10| 分类: linux 学习日志|举报|字号 订阅
第一步:安装apache
注:当前目录为/tmp,
目录下有httpd-2.2.4.tar.gz, php-5.2.3.tar.gz等二进制源码包
#号代表为root 根权限,#后是输入的一条命令
执行下列命令
解压源码包
# tar -zxf httpd-2.2.4.tar.gz
进入安装目录
# cd httpd-2.2.4
配置apache安装信息
# ./configure --prefix=/usr/local/apache --enable-modules=so --enable-rewrite
执行make安装
# make; make install
用下面命令启动WEB服务器
# /usr/local/apache/bin/apachectl start
查看自己的站点是否正常
第二步:
shell> groupadd mysql
shell> useradd -g mysql mysql
shell> cd /usr/local
shell> gunzip < /path/to/mysql-VERSION-OS.tar.gz | tar xvf -
shell> ln -s full-path-to-mysql-VERSION-OS mysql
shell> cd mysql
shell> chown -R mysql .
shell> chgrp -R mysql .
shell> scripts/mysql_install_db --user=mysql
shell> chown -R root .
shell> chown -R mysql data
shell> bin/mysqld_safe --user=mysql &
具体安装方式查看,INSTALL-BINARY
[root@Bleach mysql]# ./bin/mysqladmin -u root password mysql
[root@Bleach mysql]# cp ./support-files/mysql.server /etc/init.d/mysql
启动链接!!!
第三步:(php要支持GD库)
装GD库(让PHP支持GIF,PNG,JPEG)
首先下载 jpeg6,libpng,freetype 并安装模块
wget
http://www.ijg.org/files/jpegsrc.v6b.tar.gz
wget
http://nchc.dl.sourceforge.net/s ... libpng-1.2.8.tar.gz
wget
http://keihanna.dl.sourceforge.n ... etype-2.1.10.tar.gz
wget
http://www.boutell.com/gd/http/gd-2.0.33.tar.gz
安装 jpeg6
建立目录
# mkdir /usr/local/jpeg6
# mkdir /usr/local/jpeg6/bin
# mkdir /usr/local/jpeg6/lib
# mkdir /usr/local/jpeg6/include
# mkdir /usr/local/jpeg6/man
# mkdir /usr/local/jpeg6/man/man1
# cd /tmp
# tar -zxf jpegsrc.v6b.tar.gz
# cd jpeg-6b
# ./configure --prefix=/usr/local/jpeg6/ --enable-shared --enable-static
# make; make install
安装libpng
# cd /tmp
# tar -zxf libpng-1.2.8.tar.gz
# cd libpng-1.2.8
# cp scrīpts/makefile.std makefile
# make; make install 也可以用这种方式安装:./configure
make;make install
安装 freetype
# cd /root/soft
# tar -zxf freetype-2.1.10.tar.gz
# cd freetype-2.1.10
# ./configure --prefix=/usr/local/freetype
# make;make install
- #安装openssl
- cd /usr/local/src
- tar zxvf openssl-0.9.8h.tar.gz
- cd openssl-0.9.8h
- ./config shared zlib
- make
- make test
- make install
- mv /usr/bin/openssl /usr/bin/openssl.save
- mv /usr/include/openssl /usr/include/openssl.save
- mv /usr/lib/libssl.so /usr/lib/libssl.so.save
- ln -s /usr/local/ssl/bin/openssl /usr/bin/openssl
- ln -s /usr/local/ssl/include/openssl /usr/include/openssl
- ln -sv /usr/local/ssl/lib/libssl.so.0.9.8 /usr/lib/libssl.so
- cd ..
- #配置库文件搜索路径
- echo "/usr/local/ssl/lib" >> /etc/ld.so.conf
- ldconfig -v
- #检测安装结果
- openssl version
- #安装openssh
- tar xvf openssh-5.0p1.tar.gz
- cd openssh-5.0p1
- ./configure \
- "--prefix=/usr" \
- "--with-pam" \
- "--with-zlib" \
- "--sysconfdir=/etc/ssh" \
- "--with-ssl-dir=/usr/local/ssl" \
- "--with-md5-passwords"
- make
- make install
- cd ..
- service sshd restart
- ssh -v
- #安装GD
- tar jxvf gd-2.0.35.tar.bz2
- cd gd-2.0.35
- aclocal
- ./configure --prefix=/usr/local/gd2
- make && make install
- cd ..
- #安装 libmcrypt
- tar zxvf libmcrypt-2.5.8.tar.gz
- cd libmcrypt-2.5.8/
- ./configure
- make
- make install
- #安装libiconv
- tar zxvf libiconv-1.12.tar.gz
- cd libiconv-1.12/
- ./configure --prefix=/usr/local
- make
- make install
- cd ../
- ln -s /usr/local/lib/libiconv.so.2 /usr/lib/
- #安装mhash
- tar zxvf mhash-0.9.9.tar.gz
- cd mhash-0.9.9/
- ./configure
- make
- make install
- cd ../
- ln -s /usr/local/lib/libmhash.so.2 /usr/lib/libmhash.so.2
- #安装mcrypt
- tar zxvf mcrypt-2.6.7.tar.gz
- cd mcrypt-2.6.7/
- ./configure
- make
- make install
- cd ../
- #安装cronolog
- tar xvf cronolog-1.6.2.tar.gz
- cd cronolog-1.6.2
- ./configure --prefix=/usr/local/cronolog
- make && make install
- cd ..
- #安装imap
- tar zxf imap.tar.Z
- cd imap-2007b
- make lr5 PASSWDTYPE=std SSLTYPE=unix.nopwd IP6=4 如何安装可以看README
- make slx
- echo "set disable-plaintext nil" > /etc/c-client.cf
- mkdir /usr/local/imap-2007b
- mkdir /usr/local/imap-2007b/include/
- mkdir /usr/local/imap-2007b/lib/
- chmod -R 077 /usr/local/imap-2007b
- rm -rf /usr/local/imap-2007b/include/*
- rm -rf /usr/local/imap-2007b/lib/*
- rm -rf /usr/sbin/imapd
- cp imapd/imapd /usr/sbin/
- cp c-client/*.h /usr/local/imap-2007b/include/
- cp c-client/*.c /usr/local/imap-2007b/lib/
- cp c-client/c-client.a /usr/local/imap-2007b/lib/libc-client.a
- cd ..
./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache/bin/apxs --with-config-file-path=/usr/local/php/etc --with-mysql=/usr/local/mysql --with-gd=/usr/local/gd2 --with-libxml-dir=/usr/local/libxml2/ --with-jpeg-dir=/usr/local/jpeg6/ --with-png --with-freetype-dir=/usr/local/freetype --with-zlib-dir=/usr/lib --with-iconv-dir=/usr/local --with-openssl=/usr/local/ssl --with-curl --with-curlwrappers --with-mcrypt --with-imap=/usr/local/imap-2007b --with-kerberos --with-bz2 --enable-soap --enable-gd-native-ttf --enable-ftp --enable-mbstring --enable-exif --disable-ipv6 --disable-cgi --disable-cli
make;make install
编译php时,使用--with-imap时,遇到了一个错误
checking for utf8_mime2text signature... new
checking for U8T_CANONICAL... no
configure: error: utf8_mime2text() has new signature, but U8T_CANONICAL is missing. This should not happen. Check config.log for additional information.
通过安装libc-client-devel包可以解决
centos 5.2 下
yum install libc-client-devel
即可
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。