Merge pull request #489 from midoks/dev

php argon2 安装优化
This commit is contained in:
Mr Chen
2023-10-20 13:44:37 +08:00
committed by GitHub
9 changed files with 36 additions and 10 deletions
+2 -2
View File
@@ -404,8 +404,8 @@ class classApi:
write_log("|-正在解压文件到目录[{}]...".format(dpath))
self.write_speed('done', '正在解压')
self.send('/files/unzip', {"sfile": zip_dst, "dfile": dpath,
"type": "tar", "coding": "UTF-8", "password": "undefined"})
self.send('/files/uncompress',
{"sfile": zip_dst, "dfile": dpath, 'path': dpath})
self.send('/files/exec_shell',
{"shell": "rm -f " + zip_dst, "path": "/www"}, 30)
return True
+1 -1
View File
@@ -9,7 +9,7 @@ User=root
Group=root
#EnvironmentFile=-/etc/default/mongod
Environment="MONGODB_CONFIG_OVERRIDE_NOFORK=1"
Environment="LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/www/server/lib/openssl11/lib"
Environment="LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/www/server/lib/openssl11/lib"
PIDFile={$SERVER_PATH}/mongodb/mongodb.pid
ExecStart={$SERVER_PATH}/mongodb/bin/mongod -f {$SERVER_PATH}/mongodb/mongodb.conf
ExecReload=/bin/kill -HUP $MAINPID
+1 -1
View File
@@ -24,6 +24,6 @@ if [ ! -f /usr/local/lib/libsodium.so ];then
fi
tar -zxvf libsodium-${VERSION}-stable.tar.gz
cd libsodium-stable
./configure && make && make check && sudo make install
./configure && make && make check && make install
fi
#----------------------------- libsodium end -------------------------#
+8 -1
View File
@@ -91,6 +91,13 @@ if [ "$IS_64BIT" == "64" ];then
OPTIONS="${OPTIONS} --with-libdir=lib64"
fi
argon_version=`pkg-config libargon2 --modversion`
if [ "$?" == "0" ];then
OPTIONS="${OPTIONS} --with-password-argon2"
fi
ZIP_OPTION='--with-zip'
libzip_version=`pkg-config libzip --modversion`
if version_lt "$libzip_version" "0.11.0" ;then
@@ -99,6 +106,7 @@ if version_lt "$libzip_version" "0.11.0" ;then
ZIP_OPTION="--with-zip=$serverPath/lib/libzip"
fi
# ----- cpu start ------
if [ -z "${cpuCore}" ]; then
cpuCore="1"
@@ -149,7 +157,6 @@ if [ ! -d $serverPath/php/${PHP_VER} ];then
--enable-sysvshm \
--disable-intl \
--disable-fileinfo \
--with-password-argon2 \
$OPTIONS \
--enable-fpm
make clean && make -j${cpuCore} && make install && make clean
+5 -1
View File
@@ -84,6 +84,11 @@ else
OPTIONS="${OPTIONS} --with-curl"
fi
argon_version=`pkg-config libargon2 --modversion`
if [ "$?" == "0" ];then
OPTIONS="${OPTIONS} --with-password-argon2"
fi
ZIP_OPTION='--with-zip'
libzip_version=`pkg-config libzip --modversion`
if version_lt "$libzip_version" "0.11.0" ;then
@@ -142,7 +147,6 @@ if [ ! -d $serverPath/php/${PHP_VER} ];then
--enable-sysvshm \
--disable-intl \
--disable-fileinfo \
--with-password-argon2 \
$OPTIONS \
--enable-fpm
make clean && make -j${cpuCore} && make install && make clean
+5 -1
View File
@@ -86,6 +86,11 @@ if [ "$IS_64BIT" == "64" ];then
OPTIONS="${OPTIONS} --with-libdir=lib64"
fi
argon_version=`pkg-config libargon2 --modversion`
if [ "$?" == "0" ];then
OPTIONS="${OPTIONS} --with-password-argon2"
fi
# ----- cpu start ------
if [ -z "${cpuCore}" ]; then
cpuCore="1"
@@ -145,7 +150,6 @@ if [ ! -d $serverPath/php/${PHP_VER} ];then
--enable-sysvshm \
--disable-intl \
--disable-fileinfo \
--with-password-argon2 \
$OPTIONS \
--enable-fpm
make clean && make -j${cpuCore} && make install && make clean
+5 -1
View File
@@ -80,6 +80,11 @@ else
OPTIONS="${OPTIONS} --with-curl"
fi
argon_version=`pkg-config libargon2 --modversion`
if [ "$?" == "0" ];then
OPTIONS="${OPTIONS} --with-password-argon2"
fi
IS_64BIT=`getconf LONG_BIT`
if [ "$IS_64BIT" == "64" ];then
OPTIONS="${OPTIONS} --with-libdir=lib64"
@@ -144,7 +149,6 @@ if [ ! -d $serverPath/php/${PHP_VER} ];then
--enable-sysvshm \
--disable-intl \
--disable-fileinfo \
--with-password-argon2 \
$OPTIONS \
--enable-fpm
make clean && make -j${cpuCore} && make install && make clean
+6
View File
@@ -44,6 +44,7 @@ Install_lib()
return
fi
if [ ! -f "$extFile" ];then
php_lib=$sourcePath/php_lib
@@ -60,6 +61,11 @@ Install_lib()
OPTIONS="$OPTIONS --build=aarch64-unknown-linux-gnu --host=aarch64-unknown-linux-gnu"
fi
if ! pkg-config --exists libmemcached; then
cd ${rootPath}/plugins/php/lib && /bin/bash libmemcached.sh
OPTIONS="$OPTIONS --with-libmemcached-dir=${serverPath}/lib/libmemcached"
fi
# sed -i '_bak' "3237,3238s#ulong#zend_ulong#g" $php_lib/${LIBNAME}-${LIBV}/php_memcached.c
$serverPath/php/$version/bin/phpize
+3 -2
View File
@@ -17,6 +17,7 @@ isStream=$(grep -o -i 'stream' /etc/redhat-release)
cn=$(curl -fsSL -m 10 http://ipinfo.io/json | grep "\"country\": \"CN\"")
yum -y update
# CentOS Stream
if [ ! -z "$stream" ];then
yum install -y dnf dnf-plugins-core
@@ -180,7 +181,7 @@ if [ "$VERSION_ID" -ge "8" ];then
libpng libpng-devel libstdc++.so.6 libtirpc libtirpc-devel libtool libtool-libs libwebp libwebp-devel \
libxml2 libxml2-devel libxslt libxslt-devel libarchive make mysql-devel ncurses ncurses-devel net-tools \
oniguruma oniguruma-devel patch pcre pcre-devel perl perl-Data-Dumper perl-devel procps psmisc python3-devel \
openssl openssl-devel patchelf libargon2-dev\
openssl openssl-devel patchelf libargon2-devel\
readline-devel rpcgen sqlite-devel rar unrar tar unzip vim-minimal wget zip zlib zlib-devel;
do
# dnf --enablerepo=remi,appstream,baseos,epel,extras,powertools install -y oniguruma5php-devel
@@ -201,7 +202,7 @@ else
make mysql-devel ncurses ncurses-devel net-tools oniguruma oniguruma-devel openldap openldap-devel \
openssl openssl-devel patch pcre pcre-devel perl perl-Data-Dumper perl-devel psmisc python-devel \
python3-devel python3-pip re2c readline-devel rpcgen sqlite-devel tar unzip rar unrar vim-minimal vixie-cron \
wget zip zlib zlib-devel ImageMagick ImageMagick-devel patchelf libargon2-dev;
wget zip zlib zlib-devel ImageMagick ImageMagick-devel patchelf libargon2-devel;
do
yum install -y $rpms;
done