欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  后端开发

PHP源码编译安装

程序员文章站 2024-02-06 16:49:10
...
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

相关标签: PHP源码编译安装