容器技术交流

 找回密码
 立即注册
查看: 3432|回复: 0

为FAMP添加对iconv和gettext的支持

[复制链接]
发表于 2009-4-7 11:06:06 | 显示全部楼层 |阅读模式
有些朋友可能需要这些功能,本人现在详细说说:
1、连网;
2、pkg_add -r iconv(如果失败,可能是官网的文件移了一下位置,我们可以这样pkg_add ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-7.1-release/Latest/iconv.tbz(请注意版本号和硬件平台,并且,最好去官网的FTP目录(ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-7.1-release/Latest)下查一下有没有这个文件));
3、pkg_add -r gettext(如果不成功,那么请执行:pkg_add ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-7.1-release/Latest/gettext.tbz——请注意版本号与硬件平台,如果还是找不到,就只能通过posts安装该gettext了);
4、
重新编译PHP
把famp解压后,进入FAMP目录,打开文件“,”(文件名就是一个逗号)
把编译PHP的部分代码复制出来
如:./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache/bin/apxs --with-mysql=/usr/local/mysql --disable-debug --with-libxml-dir=/usr/local/libxml --enable-mbstring --with-gd=/usr/local/gd --with-freetype-dir=/usr/local/freetype --with-jpeg-dir=/usr/local/jpeg --with-png-dir=/usr/local/libpng --with-zlib --with-ttf --enable-gd-native-ttf --without-iconv

然后在后面把--without-iconv改为“--with-iconv --with-gettext”如下:
进入famp中php所在目录:cd FAMP/php
开始编译:./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache/bin/apxs --with-mysql=/usr/local/mysql --disable-debug --with-libxml-dir=/usr/local/libxml --enable-mbstring --with-gd=/usr/local/gd --with-freetype-dir=/usr/local/freetype --with-jpeg-dir=/usr/local/jpeg --with-png-dir=/usr/local/libpng --with-zlib --with-ttf --enable-gd-native-ttf --with-iconv --with-gettext
make
make install
再重启apache便可。

如果通过pkg_add方法无法装gettext(硬件平台不一样,freebsd版本不一样,得到的结果不一样,所以比较麻烦),我们用ports安装gettext方法:
cd /usr/ports/devel/gettext
然后make install 即可
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Archiver|URLOS ( 粤ICP备18087780号 )

GMT+8, 2024-4-30 03:26 , Processed in 0.031341 second(s), 18 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表