Home > php教程 > php手册 > LINUX下用PHPIZE安装PHP GD扩展

LINUX下用PHPIZE安装PHP GD扩展

WBOY
Release: 2016-06-14 00:02:42
Original
1264 people have browsed it

环境:LNMP in centOS 6.4。

linux下PHP的扩展可以用phpize的方法,比较简单地进行启用。

以下以PHP-GD2 库安装为例子。

<span style="color: #0000ff;">sudo</span> <span style="color: #0000ff;">yum</span> <span style="color: #0000ff;">install</span> php-<span style="color: #000000;">gd2  png jpeg freetype   //YUM安装扩展
cd </span>/app/php-<span style="color: #800080;">5.4</span>.<span style="color: #800080;">13</span>/ext/<span style="color: #000000;">gd  //这里的php</span>-<span style="color: #800080;">5.4</span>.<span style="color: #800080;">13</span>/<span style="color: #000000;">文件夹是我当初解压PHP安装包得到的。
phpize
.</span>/configure --with-png-<span style="color: #0000ff;">dir</span> --with-freetype-<span style="color: #0000ff;">dir</span> --with-jpeg-<span style="color: #0000ff;">dir</span> --with-gd<br>sudo make<br>make install<br><br><span>sudo vi /app/php5/etc/php.ini  //修改PHP配置文件<br><span>extension=gd.so  //添加这一行,重启PHP服务</span></span>
Copy after login

 

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 Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template