PHP源码编译安装

WBOY
WBOYasal
2016-06-20 12:37:50996semak imbas

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

Kenyataan:
Kandungan artikel ini disumbangkan secara sukarela oleh netizen, dan hak cipta adalah milik pengarang asal. Laman web ini tidak memikul tanggungjawab undang-undang yang sepadan. Jika anda menemui sebarang kandungan yang disyaki plagiarisme atau pelanggaran, sila hubungi admin@php.cn