Home > Backend Development > PHP Tutorial > Ubuntu12.1下独立安装PHP的扩充库

Ubuntu12.1下独立安装PHP的扩充库

WBOY
Release: 2016-06-13 12:14:36
Original
1205 people have browsed it

Ubuntu12.1下独立安装PHP的扩张库


Ubuntu是一个在Linux界非常不错的系统  ,其中安装PHP非常普遍,那么如何独立安装PHP扩展库?

参考步骤如下:

1.进入php源码包下的ext;(这里PHP版本php-5.4.37,那扩展包gd库举例)

[email protected]:~/temp/php-5.4.37/ext$ cd gd

2.通过phpize工具生成configure脚本文件

[email protected]:~/temp/php-5.4.37/ext/gd$ sudo phpize

3.可以按照正常的编译方法,开始编译扩展包了。

$ ./configure$ make# make install
Copy after login

注意:如果安装有多个PHP,需要指明采用那个PHP来编译;如下例:

<span class="html">./configure --with-php-config=/usr/local/lib/php/extensions</span>

另外,make之后就会在源码包下/ext/gd/modules中生成gd.so库,可以选择不用执行make install,通过手动拷贝gd.so到需要的路径下。


参考地址:http://php.net/manual/zh/install.pecl.phpize.php

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template