• 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


    1. #安装openssl
    2. cd /usr/local/src
    3. tar zxvf openssl-0.9.8h.tar.gz
    4. cd openssl-0.9.8h
    5. ./config shared zlib
    6. make
    7. make test
    8. make install
    9. mv /usr/bin/openssl /usr/bin/openssl.save
    10. mv /usr/include/openssl /usr/include/openssl.save
    11. mv /usr/lib/libssl.so /usr/lib/libssl.so.save
    12. ln -s /usr/local/ssl/bin/openssl /usr/bin/openssl
    13. ln -s /usr/local/ssl/include/openssl /usr/include/openssl
    14. ln -sv /usr/local/ssl/lib/libssl.so.0.9.8 /usr/lib/libssl.so
    15. cd ..
    16. #配置库文件搜索路径
    17. echo "/usr/local/ssl/lib" >> /etc/ld.so.conf
    18. ldconfig -v
    19. #检测安装结果
    20. openssl version
    21. #安装openssh
    22. tar xvf openssh-5.0p1.tar.gz
    23. cd openssh-5.0p1
    24. ./configure
    25.       "--prefix=/usr"
    26.       "--with-pam"
    27.       "--with-zlib"
    28.       "--sysconfdir=/etc/ssh"
    29.       "--with-ssl-dir=/usr/local/ssl"
    30.       "--with-md5-passwords"
    31. make
    32. make install
    33. cd ..
    34. service sshd restart
    35. ssh -v
    36. #安装GD
    37. tar jxvf gd-2.0.35.tar.bz2
    38. cd gd-2.0.35
    39. aclocal
    40. ./configure --prefix=/usr/local/gd2
    41. make && make install
    42. cd ..
    43. #安装 libmcrypt
    44. tar zxvf libmcrypt-2.5.8.tar.gz
    45. cd libmcrypt-2.5.8/
    46. ./configure
    47. make
    48. make install
    49. #安装libiconv
    50. tar zxvf libiconv-1.12.tar.gz
    51. cd libiconv-1.12/
    52. ./configure --prefix=/usr/local
    53. make
    54. make install
    55. cd ../
    56. ln -s /usr/local/lib/libiconv.so.2 /usr/lib/
    57. #安装mhash
    58. tar zxvf mhash-0.9.9.tar.gz
    59. cd mhash-0.9.9/
    60. ./configure
    61. make
    62. make install
    63. cd ../
    64. ln -s /usr/local/lib/libmhash.so.2 /usr/lib/libmhash.so.2
    65. #安装mcrypt
    66. tar zxvf mcrypt-2.6.7.tar.gz
    67. cd mcrypt-2.6.7/
    68. ./configure
    69. make
    70. make install
    71. cd ../
    72. #安装cronolog
    73. tar xvf cronolog-1.6.2.tar.gz
    74. cd cronolog-1.6.2
    75. ./configure --prefix=/usr/local/cronolog
    76. make && make install
    77. cd ..
    78. #安装imap
    79. tar zxf imap.tar.Z
    80. cd imap-2007b
    81. make lr5 PASSWDTYPE=std SSLTYPE=unix.nopwd IP6=4                   如何安装可以看README
    82.                                                                                                                  make slx
    83. echo "set disable-plaintext nil" > /etc/c-client.cf
    84. mkdir /usr/local/imap-2007b
    85. mkdir /usr/local/imap-2007b/include/
    86. mkdir /usr/local/imap-2007b/lib/
    1. chmod -R 077 /usr/local/imap-2007b
    2. rm -rf /usr/local/imap-2007b/include/*
    3. rm -rf /usr/local/imap-2007b/lib/*
    4. rm -rf /usr/sbin/imapd
    5. cp imapd/imapd /usr/sbin/
    6. cp c-client/*.h /usr/local/imap-2007b/include/
    7. cp c-client/*.c /usr/local/imap-2007b/lib/
    8. cp c-client/c-client.a /usr/local/imap-2007b/lib/libc-client.a
    9. cd ..
    安装php

    ./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
    即可
  • 相关阅读:
    149、你知道空类的大小是多少吗?
    hdoj--2682--Tree()
    hdoj--5053--the Sum of Cube(水)
    Codeforces--602A--Two Bases(水)
    poj--1637--Sightseeing tour(网络流,最大流判断混合图是否存在欧拉图)
    poj--1149--PIGS(最大流经典建图)
    poj--1459--Power Network(最大流,超级源超级汇)
    hdoj--3549--Flow Problem(最大流)
    poj--1237--Drainage Ditches(最大流)
    nyoj--38--布线问题(克鲁斯卡尔)
  • 原文地址:https://www.cnblogs.com/best-jobs/p/3814976.html
Copyright © 2020-2023  润新知