下载:
configure
从宝塔安装的php看下通用的一些扩展编译参数
# php -i |grep configure
./configure
--prefix=/www/server/php/74 --with-config-file-path=/www/server/php/74/etc --enable-fpm --with-fpm-user=www --with-fpm-group=www --enable-mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-iconv-dir --with-freetype --with-jpeg --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --enable-mbregex --enable-mbstring --enable-intl --enable-ftp --enable-gd --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-soap --with-gettext --disable-fileinfo --enable-opcache --with-sodium --with-webp
稍微修改以下
--prefix=/usr/local/php/81 --with-config-file-path=/usr/local/php/81/etc --enable-fpm --with-fpm-user=www --with-fpm-group=www --enable-mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-iconv-dir --with-freetype --with-jpeg --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --enable-mbregex --enable-mbstring --enable-intl --enable-ftp --enable-gd --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-soap --with-gettext --disable-fileinfo --enable-opcache --with-sodium --with-webp
configure跑跑看缺什么就装对应软件
缺少 | 安装 |
---|---|
libxml-2.0 | libxml2-dev |
libcurl | libcurl4-openssl-dev |
libpng | libpng-dev |
libwebp | libwebp-dev |
libjpeg | libjpeg-dev |
freetype2 | libfreetype-dev |
oniguruma | libonig-dev |
libsodium | libsodium-dev |
….
安装
执行make && make install