forked from Ms-Studio/appstore-1panel
fix: 解决 php8 安装 memcached 失败的问题 (#228)
This commit is contained in:
parent
e6c80e028a
commit
d37ba5cd74
@ -62,9 +62,9 @@ installExtensionFromTgz()
|
|||||||
tgzName=$1
|
tgzName=$1
|
||||||
para1=
|
para1=
|
||||||
extensionName="${tgzName%%-*}"
|
extensionName="${tgzName%%-*}"
|
||||||
if [ $2 ]; then
|
if [ $2 ]; then
|
||||||
para1=$2
|
para1=$2
|
||||||
fi
|
fi
|
||||||
mkdir ${extensionName}
|
mkdir ${extensionName}
|
||||||
tar -xf ${tgzName}.tgz -C ${extensionName} --strip-components=1
|
tar -xf ${tgzName}.tgz -C ${extensionName} --strip-components=1
|
||||||
( cd ${extensionName} && phpize && ./configure ${para1} && make ${MC} && make install )
|
( cd ${extensionName} && phpize && ./configure ${para1} && make ${MC} && make install )
|
||||||
@ -87,6 +87,11 @@ if [[ -z "${EXTENSIONS##*,sourceguardian,*}" ]]; then
|
|||||||
echo "---------- Install sourceguardian ----------"
|
echo "---------- Install sourceguardian ----------"
|
||||||
install-php-extensions sourceguardian
|
install-php-extensions sourceguardian
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ -z "${EXTENSIONS##*,memcached,*}" ]]; then
|
||||||
|
echo "---------- Install memcached ----------"
|
||||||
|
install-php-extensions memcached
|
||||||
|
fi
|
||||||
# end
|
# end
|
||||||
|
|
||||||
|
|
||||||
@ -362,13 +367,6 @@ if [[ -z "${EXTENSIONS##*,psr,*}" ]]; then
|
|||||||
docker-php-ext-enable psr
|
docker-php-ext-enable psr
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z "${EXTENSIONS##*,imagick,*}" ]]; then
|
|
||||||
echo "---------- Install imagick ----------"
|
|
||||||
apk add --no-cache file-dev
|
|
||||||
apk add --no-cache imagemagick-dev
|
|
||||||
printf "\n" | pecl install imagick-3.4.4
|
|
||||||
docker-php-ext-enable imagick
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -z "${EXTENSIONS##*,rar,*}" ]]; then
|
if [[ -z "${EXTENSIONS##*,rar,*}" ]]; then
|
||||||
echo "---------- Install rar ----------"
|
echo "---------- Install rar ----------"
|
||||||
@ -543,7 +541,7 @@ if [[ -z "${EXTENSIONS##*,amqp,*}" ]]; then
|
|||||||
&& printf '\n' | pecl install amqp \
|
&& printf '\n' | pecl install amqp \
|
||||||
&& docker-php-ext-enable amqp \
|
&& docker-php-ext-enable amqp \
|
||||||
&& apk del .phpize-deps-configure
|
&& apk del .phpize-deps-configure
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z "${EXTENSIONS##*,redis,*}" ]]; then
|
if [[ -z "${EXTENSIONS##*,redis,*}" ]]; then
|
||||||
@ -603,7 +601,7 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
if [[ -z "${EXTENSIONS##*,swoole,*}" ]]; then
|
if [[ -z "${EXTENSIONS##*,swoole,*}" ]]; then
|
||||||
echo "---------- Install swoole ----------"
|
echo "---------- Install swoole ----------"
|
||||||
isPhpVersionGreaterOrEqual 8 0
|
isPhpVersionGreaterOrEqual 8 0
|
||||||
if [[ "$?" = "1" ]]; then
|
if [[ "$?" = "1" ]]; then
|
||||||
installExtensionFromTgz swoole-5.0.2 --enable-openssl
|
installExtensionFromTgz swoole-5.0.2 --enable-openssl
|
||||||
|
@ -62,9 +62,9 @@ installExtensionFromTgz()
|
|||||||
tgzName=$1
|
tgzName=$1
|
||||||
para1=
|
para1=
|
||||||
extensionName="${tgzName%%-*}"
|
extensionName="${tgzName%%-*}"
|
||||||
if [ $2 ]; then
|
if [ $2 ]; then
|
||||||
para1=$2
|
para1=$2
|
||||||
fi
|
fi
|
||||||
mkdir ${extensionName}
|
mkdir ${extensionName}
|
||||||
tar -xf ${tgzName}.tgz -C ${extensionName} --strip-components=1
|
tar -xf ${tgzName}.tgz -C ${extensionName} --strip-components=1
|
||||||
( cd ${extensionName} && phpize && ./configure ${para1} && make ${MC} && make install )
|
( cd ${extensionName} && phpize && ./configure ${para1} && make ${MC} && make install )
|
||||||
@ -72,7 +72,6 @@ installExtensionFromTgz()
|
|||||||
docker-php-ext-enable ${extensionName}
|
docker-php-ext-enable ${extensionName}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# install use install-php-extensions
|
# install use install-php-extensions
|
||||||
if [[ -z "${EXTENSIONS##*,ioncube_loader,*}" ]]; then
|
if [[ -z "${EXTENSIONS##*,ioncube_loader,*}" ]]; then
|
||||||
echo "---------- Install ioncube_loader ----------"
|
echo "---------- Install ioncube_loader ----------"
|
||||||
@ -88,6 +87,11 @@ if [[ -z "${EXTENSIONS##*,sourceguardian,*}" ]]; then
|
|||||||
echo "---------- Install sourceguardian ----------"
|
echo "---------- Install sourceguardian ----------"
|
||||||
install-php-extensions sourceguardian
|
install-php-extensions sourceguardian
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ -z "${EXTENSIONS##*,memcached,*}" ]]; then
|
||||||
|
echo "---------- Install memcached ----------"
|
||||||
|
install-php-extensions memcached
|
||||||
|
fi
|
||||||
# end
|
# end
|
||||||
|
|
||||||
|
|
||||||
@ -363,13 +367,6 @@ if [[ -z "${EXTENSIONS##*,psr,*}" ]]; then
|
|||||||
docker-php-ext-enable psr
|
docker-php-ext-enable psr
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z "${EXTENSIONS##*,imagick,*}" ]]; then
|
|
||||||
echo "---------- Install imagick ----------"
|
|
||||||
apk add --no-cache file-dev
|
|
||||||
apk add --no-cache imagemagick-dev
|
|
||||||
printf "\n" | pecl install imagick-3.4.4
|
|
||||||
docker-php-ext-enable imagick
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -z "${EXTENSIONS##*,rar,*}" ]]; then
|
if [[ -z "${EXTENSIONS##*,rar,*}" ]]; then
|
||||||
echo "---------- Install rar ----------"
|
echo "---------- Install rar ----------"
|
||||||
@ -544,7 +541,7 @@ if [[ -z "${EXTENSIONS##*,amqp,*}" ]]; then
|
|||||||
&& printf '\n' | pecl install amqp \
|
&& printf '\n' | pecl install amqp \
|
||||||
&& docker-php-ext-enable amqp \
|
&& docker-php-ext-enable amqp \
|
||||||
&& apk del .phpize-deps-configure
|
&& apk del .phpize-deps-configure
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z "${EXTENSIONS##*,redis,*}" ]]; then
|
if [[ -z "${EXTENSIONS##*,redis,*}" ]]; then
|
||||||
@ -604,7 +601,7 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
if [[ -z "${EXTENSIONS##*,swoole,*}" ]]; then
|
if [[ -z "${EXTENSIONS##*,swoole,*}" ]]; then
|
||||||
echo "---------- Install swoole ----------"
|
echo "---------- Install swoole ----------"
|
||||||
isPhpVersionGreaterOrEqual 8 0
|
isPhpVersionGreaterOrEqual 8 0
|
||||||
if [[ "$?" = "1" ]]; then
|
if [[ "$?" = "1" ]]; then
|
||||||
installExtensionFromTgz swoole-5.0.2 --enable-openssl
|
installExtensionFromTgz swoole-5.0.2 --enable-openssl
|
||||||
|
@ -87,6 +87,11 @@ if [[ -z "${EXTENSIONS##*,sourceguardian,*}" ]]; then
|
|||||||
echo "---------- Install sourceguardian ----------"
|
echo "---------- Install sourceguardian ----------"
|
||||||
install-php-extensions sourceguardian
|
install-php-extensions sourceguardian
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ -z "${EXTENSIONS##*,memcached,*}" ]]; then
|
||||||
|
echo "---------- Install memcached ----------"
|
||||||
|
install-php-extensions memcached
|
||||||
|
fi
|
||||||
# end
|
# end
|
||||||
|
|
||||||
|
|
||||||
@ -362,13 +367,6 @@ if [[ -z "${EXTENSIONS##*,psr,*}" ]]; then
|
|||||||
docker-php-ext-enable psr
|
docker-php-ext-enable psr
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z "${EXTENSIONS##*,imagick,*}" ]]; then
|
|
||||||
echo "---------- Install imagick ----------"
|
|
||||||
apk add --no-cache file-dev
|
|
||||||
apk add --no-cache imagemagick-dev
|
|
||||||
printf "\n" | pecl install imagick-3.4.4
|
|
||||||
docker-php-ext-enable imagick
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -z "${EXTENSIONS##*,rar,*}" ]]; then
|
if [[ -z "${EXTENSIONS##*,rar,*}" ]]; then
|
||||||
echo "---------- Install rar ----------"
|
echo "---------- Install rar ----------"
|
||||||
|
Loading…
Reference in New Issue
Block a user