mac php 8.3.x 8.4.x 编译脚本
bwre 环境安装:
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)" speedbrew install oniguruma pkg-config gettext libiconv bzip2 openssl curl freetype jpeg gd libzip libsodium下载php
php_version=8.3.15
wget https://www.php.net/distributions/php-$php_version.tar.gz
tar -zxvf php-$php_version.tar.gz#!/bin/bash
# 获取额外参数
if [ -z "$1" ]; then
echo "请输入需要编译的版本号:"
read php_version
fi
php_version=$1
# wget https://www.php.net/distributions/php-$php_version.tar.gz
# tar -zxvf php-$php_version.tar.gz
cd php-$php_version*
ROOT_PATH=/Applications/EServer
php_path=$ROOT_PATH/childApp/php/php-$php_version
./configure --prefix=$php_path \
--with-config-file-path=$php_path/etc \
--with-config-file-scan-dir=$php_path/etc/conf.d \
--disable-rpath \
--enable-shared \
--enable-opcache \
--enable-fpm \
--with-sodium \
--with-mysqli \
--with-pdo-mysql \
--with-gettext=$(brew --prefix gettext) \
--enable-mbstring \
--with-iconv=$(brew --prefix libiconv) \
--with-bz2=$(brew --prefix bzip2) \
--with-openssl \
--enable-bcmath \
--enable-soap \
--enable-pcntl \
--enable-shmop \
--enable-sysvmsg \
--enable-sysvsem \
--enable-sysvshm \
--enable-sockets \
--with-curl \
--with-zlib \
--enable-gd \
--with-freetype=$(brew --prefix freetype) \
--with-jpeg=$(brew --prefix jpeg)
make -j $(sysctl -n hw.ncpu)
make install &
# cp php.ini-development /Applications/EServer/software/php/php-$php_version/etc/php.ini
本文是原创文章,采用 CC BY-NC-ND 4.0 协议,完整转载请注明来自 lsmir2
评论
匿名评论
隐私政策
你无需删除空行,直接评论以获取最佳展示效果