Hunter的大杂烩 技术学习笔记

2009-12-31

build php in suse11.0

Filed under: 技术话题 — hunter @ 10:07 am

32bit 编译方法

1.       Check installed rpm

a)         rpm -qa|egrep “(freetype|xml2|jpeg|png|gd|zlib|mcrypt)”|grep 32bit

                         i.              zlib-32bit-1.2.3-106.34

                       ii.              freetype2-32bit-2.3.7-25.8

                      iii.              libxml2-32bit-2.7.1-10.8

                      iv.              libpng12-0-32bit-1.2.31-5.10

                       v.              zlib-devel-32bit-1.2.3-104.137

                      vi.              libpng-devel-32bit-1.2.31-4.23

2.       Build apache

3.       安装rpm

a)         libstdc++43-devel-32bit-4.3.3_20081022-11.18.x86_64.rpm

b)         ncurses-devel-32bit-5.6-90.55.x86_64.rpm

c)         libncurses6-32bit-5.6-90.55.x86_64.rpm

4.       编译libmcrypt (这个没有32bitrpm) – mcrypt

a)         CFLAGS=”-O3 -m32″ CXXFLAGS=”-O3 -m32″ ./configure   –prefix=/usr/local/libmcrypt

5.       编译jpeg7

6.       编译32bit mysql

7.       编译php

a)         CFLAGS=”-O3 -m32″ CXXFLAGS=”-O3 -m32″ ./configure   –prefix=/usr/local/php –with-apxs2=/usr/local/apache2/bin/apxs –with-zlib –with-gd –enable-mbstring –with-mysql=/usr/local/mysql –with-mysqli=/usr/local/mysql/bin/mysql_config –with-pdo-mysql=/usr/local/mysql –with-config-file-path=/usr/local/php –with-iconv –disable-ipv6 –enable-static –with-libxml-dir –with-jpeg-dir=/usr/local/jpeg7 –with-png-dir –with-freetype-dir –with-mcrypt=/usr/local/libmcrypt –with-zlib-dir

8. 安装Zend

64bit编译方法:

1. 编译64bit mysql,目录为 /usr/local/mysql5mv /usr/local/mysql5 /usr/local/mysql5-64bit; ln -s /usr/local/mysql5-64bit /usr/local/mysql

2. 编译64bit apache,目录为 /usr/local/apache2; mv /usr/local/apache2 /usr/local/apache2-64bit; ln -s /usr/local/apache2-64bit /usr/local/apache2

3. 编译64bit libmcrypt,目录为 /usr/local/libmcrypt-64

4. 编译64bit php

CFLAGS=”-O3 -m64″ CXXFLAGS=”-O3 -m64″ ./configure  –prefix=/usr/local/php –with-apxs2=/usr/local/apache2-64/bin/apxs –with-zlib –with-gd –enable-mbstring –with-mysql=/usr/local/mysql5-64 –with-mysqli=/usr/local/mysql5-64/bin/mysql_config –with-pdo-mysql=/usr/local/mysql5-64 –with-config-file-path=/usr/local/php –with-iconv –disable-ipv6 –enable-static –with-libxml-dir –with-jpeg-dir –with-png-dir –with-freetype-dir –with-mcrypt=/usr/local/libmcrypt-64 –with-zlib-dir

5. make 到最后需要修改makefile

change

EXTRA_LIBS = -lcrypt -lcrypt -lrt -lmysqlclient -lmcrypt -lltdl

to

EXTRA_LIBS = -lcrypt -lcrypt -lrt -lmysqlclient -lmcrypt /usr/lib64/libltdl.so

6. 安装zend

 

No Comments

No comments yet.

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

Powered by WordPress