PHP supports IMAP

Source: Internet
Author: User
Tags imap mcrypt openssl version

install PHP under Linux to support IMAP

2008-11-26 10:31:10| Category: Linux learning logs | Report | Font size Subscription





First step: Install Apache
Note: The current directory is/tmp,
The directory has httpd-2.2.4.tar.gz, php-5.2.3.tar.gz and other binary source package
#号代表为root root permissions, #后是输入的一条命令
Execute the following command
Unzip the source package
# TAR-ZXF Httpd-2.2.4.tar.gz
Go to the installation directory
# CD httpd-2.2.4
Configuring Apache Installation Information
#./configure--prefix=/usr/local/apache--enable-modules=so--enable-rewrite
Perform a Make installation
# make; Make install
Start the Web server with the following command
#/usr/local/apache/bin/apachectl Start
See if your site is working

Step Two:
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 &

Specific installation method view, Install-binary

[[email protected] mysql]#./bin/mysqladmin-u root password MySQL
[email protected] mysql]# CP./support-files/mysql.server /etc/init.d/mysql


Start link!!!

Step three: (PHP to support the GD library)



Install GD library (let PHP support Gif,png,jpeg)
First download the Jpeg6,libpng,freetype and install the module
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
Installing JPEG6
Create a Directory
# 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
Installing 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 can also be installed in this way:./configure
Make;make Install
Installing 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. #配置库文件Search Path
  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 How to install can see the 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..
Install 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


When compiling PHP, when using--with-imap, an error was encountered

Checking for Utf8_mime2text signature ... new
Checking for u8t_canonical ... no
Configure:error:utf8_mime2text () has a new signature, but U8t_canonical is missing. This should is not happen. Check Config.log For additional information.

By installing the Libc-client-devel package you can resolve
CentOS 5.2 under
Yum Install Libc-client-devel
Can

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.