首頁 >後端開發 >php教程 >PHP源码编译安装

PHP源码编译安装

WBOY
WBOY原創
2016-06-20 12:37:50995瀏覽

PHP源码编译安装

不带参数编译安装

命令:

./configure --prefix=/usr/local/php --with-php-fpm

依赖:
* libxml2
可用模块:

[PHP Modules]
Core
ctype
date
dom
fileinfo
filter
hash
iconv
json
libxml
pcre
PDO
pdo_sqlite
Phar
posix
Reflection
session
SimpleXML
SPL
sqlite3
standard
tokenizer
xml
xmlreader
xmlwriter

带参数编译安装

命令:

./configure --prefix=/usr/local/php --with-fpm --with-curl=/usr/local/libcurl --with-gd --with-mysqli --with-pear --enable-sockets --with-zlib-dir=/usr/local/zlib --with-png-dir=/usr/local/libpng --with-jpeg-dir=/usr/local/libjpeg --with-mcrypt=/usr/local/libmcrypt --with-pdo-mysql

依赖:
* libxml2
* libpng
* libjpeg
* libmcrypt
* zlib
* libcurl

可用模块:

[PHP Modules]
Core
ctype
curl
date
dom
fileinfo
filter
gd
hash
iconv
json
libxml
mcrypt
mysqli
mysqlnd
pcre
PDO
pdomysql
pdosqlite
Phar
posix
Reflection
session
SimpleXML
sockets
SPL
sqlite3
standard
tokenizer
xml
xmlreader
xmlwriter
zlib

编译安装memcached

依赖:
* libmemcached
* zlib
* autoconf

命令:

phpize
./configure --with-php-config=/usr/local/php/bin/php-config --with-zlib-dir=/usr/local/zlib --with-libmemcached-dir=/usr/local/libmemcached --disable-memcached-sasl
make && make install

陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn