2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-04 13:47:15 +08:00

feat: 部分软件使用 7z 格式

This commit is contained in:
耗子
2024-05-15 22:48:17 +08:00
parent 7b29e4546a
commit 06bf1b0604
7 changed files with 55 additions and 43 deletions

View File

@@ -147,14 +147,14 @@ Prepare_System() {
# Rocky Linux
/usr/bin/crb enable
dnf makecache -y
dnf install -y curl wget zip unzip tar git jq git-core dos2unix podman rsyslog
dnf install -y curl wget zip unzip tar p7zip p7zip-plugins git jq git-core dos2unix podman rsyslog
elif [ "${OS}" == "debian" ]; then
if ${inChina}; then
sed -i 's/deb.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list
sed -i 's/security.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list
fi
apt-get update -y
apt-get install -y curl wget zip unzip tar git jq git dos2unix podman rsyslog
apt-get install -y curl wget zip unzip tar p7zip p7zip-full git jq git dos2unix podman rsyslog
fi
if [ "$?" != "0" ]; then
echo -e $HR

View File

@@ -49,11 +49,11 @@ fi
if [ "${OS}" == "centos" ]; then
dnf makecache -y
dnf groupinstall "Development Tools" -y
dnf install cmake bison ncurses-devel libtirpc-devel openssl-devel pkg-config openldap-devel libudev-devel cyrus-sasl-devel patchelf rpcgen rpcsvc-proto-devel p7zip p7zip-plugins -y
dnf install cmake bison ncurses-devel libtirpc-devel openssl-devel pkg-config openldap-devel libudev-devel cyrus-sasl-devel patchelf rpcgen rpcsvc-proto-devel -y
dnf install gcc-toolset-12-gcc gcc-toolset-12-gcc-c++ gcc-toolset-12-binutils gcc-toolset-12-annobin-annocheck gcc-toolset-12-annobin-plugin-gcc -y
elif [ "${OS}" == "debian" ]; then
apt-get update
apt-get install build-essential cmake bison libncurses5-dev libtirpc-dev libssl-dev pkg-config libldap2-dev libudev-dev libsasl2-dev patchelf p7zip p7zip-full -y
apt-get install build-essential cmake bison libncurses5-dev libtirpc-dev libssl-dev pkg-config libldap2-dev libudev-dev libsasl2-dev patchelf -y
else
echo -e $HR
echo "错误:耗子 Linux 面板不支持该系统"

View File

@@ -66,19 +66,19 @@ mv openresty-${openrestyVersion} src
cd src
# openssl
wget -T 120 -t 3 -O openssl-3.0.12.tar.gz ${downloadUrl}/openssl/openssl-3.0.12.tar.gz
wget -T 20 -t 3 -O openssl-3.0.12.tar.gz.checksum.txt ${downloadUrl}/openssl/openssl-3.0.12.tar.gz.checksum.txt
wget -T 120 -t 3 -O openssl-3.0.12.7z ${downloadUrl}/openssl/openssl-3.0.12.7z
wget -T 20 -t 3 -O openssl-3.0.12.7z.checksum.txt ${downloadUrl}/openssl/openssl-3.0.12.7z.checksum.txt
if ! sha256sum --status -c openssl-3.0.12.tar.gz.checksum.txt; then
if ! sha256sum --status -c openssl-3.0.12.7z.checksum.txt; then
echo -e $HR
echo "错误OpenSSL 源码 checksum 校验失败,文件可能被篡改或不完整,已终止操作"
rm -rf ${openrestyPath}
exit 1
fi
tar -zxvf openssl-3.0.12.tar.gz
rm -f openssl-3.0.12.tar.gz
rm -f openssl-3.0.12.tar.gz.checksum.txt
7z x openssl-3.0.12.7z
rm -f openssl-3.0.12.7z
rm -f openssl-3.0.12.7z.checksum.txt
mv openssl-3.0.12 openssl
# patch openssl
@@ -99,19 +99,19 @@ rm -f openssl-3.0.12-sess_set_get_cb_yield.patch.checksum.txt
cd ../
# pcre2
wget -T 60 -t 3 -O pcre2-10.42.tar.gz ${downloadUrl}/pcre/pcre2-10.42.tar.gz
wget -T 20 -t 3 -O pcre2-10.42.tar.gz.checksum.txt ${downloadUrl}/pcre/pcre2-10.42.tar.gz.checksum.txt
wget -T 60 -t 3 -O pcre2-10.43.7z ${downloadUrl}/pcre/pcre2-10.43.7z
wget -T 20 -t 3 -O pcre2-10.43.7z.checksum.txt ${downloadUrl}/pcre/pcre2-10.43.7z.checksum.txt
if ! sha256sum --status -c pcre2-10.42.tar.gz.checksum.txt; then
if ! sha256sum --status -c pcre2-10.43.7z.checksum.txt; then
echo -e $HR
echo "错误pcre2 源码 checksum 校验失败,文件可能被篡改或不完整,已终止操作"
rm -rf ${openrestyPath}
exit 1
fi
tar -zxvf pcre2-10.42.tar.gz
rm -f pcre2-10.42.tar.gz
rm -f pcre2-10.42.tar.gz.checksum.txt
7z x pcre2-10.43.7z
rm -f pcre2-10.43.7z
rm -f pcre2-10.43.7z.checksum.txt
mv pcre2-10.42 pcre2
# ngx_cache_purge

View File

@@ -65,30 +65,30 @@ if [ "${phpVersion}" == "74" ]; then
elif [ "${phpVersion}" == "80" ]; then
phpVersionCode="8.0.30"
elif [ "${phpVersion}" == "81" ]; then
phpVersionCode="8.1.27"
phpVersionCode="8.1.28"
elif [ "${phpVersion}" == "82" ]; then
phpVersionCode="8.2.16"
phpVersionCode="8.2.19"
elif [ "${phpVersion}" == "83" ]; then
phpVersionCode="8.3.3"
phpVersionCode="8.3.7"
else
echo -e $HR
echo "错误PHP-${phpVersion}不支持,请检查版本号是否正确。"
exit 1
fi
wget -T 120 -t 3 -O ${phpPath}/php-${phpVersionCode}.tar.gz ${downloadUrl}/php-${phpVersionCode}.tar.gz
wget -T 20 -t 3 -O ${phpPath}/php-${phpVersionCode}.tar.gz.checksum.txt ${downloadUrl}/php-${phpVersionCode}.tar.gz.checksum.txt
wget -T 120 -t 3 -O ${phpPath}/php-${phpVersionCode}.7z ${downloadUrl}/php-${phpVersionCode}.7z
wget -T 20 -t 3 -O ${phpPath}/php-${phpVersionCode}.7z.checksum.txt ${downloadUrl}/php-${phpVersionCode}.7z.checksum.txt
if ! sha256sum --status -c php-${phpVersionCode}.tar.gz.checksum.txt; then
if ! sha256sum --status -c php-${phpVersionCode}.7z.checksum.txt; then
echo -e $HR
echo "错误PHP-${phpVersion}源码 checksum 校验失败,文件可能被篡改或不完整,已终止操作"
rm -rf ${phpPath}
exit 1
fi
tar -xvf php-${phpVersionCode}.tar.gz
rm -f php-${phpVersionCode}.tar.gz
rm -f php-${phpVersionCode}.tar.gz.checksum.txt
7z x php-${phpVersionCode}.7z
rm -f php-${phpVersionCode}.7z
rm -f php-${phpVersionCode}.7z.checksum.txt
mv php-* src
if [ "${phpVersion}" -le "80" ]; then

View File

@@ -31,9 +31,9 @@ source ${setupPath}/panel/scripts/calculate_j.sh
j=$(calculate_j)
if [[ "${1}" == "15" ]]; then
postgresqlVersion="15.6"
postgresqlVersion="15.7"
elif [[ "${1}" == "16" ]]; then
postgresqlVersion="16.2"
postgresqlVersion="16.3"
else
echo -e $HR
echo "错误:不支持的 PostgreSQL 版本!"
@@ -66,19 +66,19 @@ mkdir -p ${postgresqlPath}
cd ${postgresqlPath}
# 下载源码
wget -T 120 -t 3 -O ${postgresqlPath}/postgresql-${postgresqlVersion}.tar.gz ${downloadUrl}/postgresql-${postgresqlVersion}.tar.gz
wget -T 20 -t 3 -O ${postgresqlPath}/postgresql-${postgresqlVersion}.tar.gz.checksum.txt ${downloadUrl}/postgresql-${postgresqlVersion}.tar.gz.checksum.txt
wget -T 120 -t 3 -O ${postgresqlPath}/postgresql-${postgresqlVersion}.7z ${downloadUrl}/postgresql-${postgresqlVersion}.7z
wget -T 20 -t 3 -O ${postgresqlPath}/postgresql-${postgresqlVersion}.7z.checksum.txt ${downloadUrl}/postgresql-${postgresqlVersion}.7z.checksum.txt
if ! sha256sum --status -c postgresql-${postgresqlVersion}.tar.gz.checksum.txt; then
if ! sha256sum --status -c postgresql-${postgresqlVersion}.7z.checksum.txt; then
echo -e $HR
echo "错误PostgreSQL 源码 checksum 校验失败,文件可能被篡改或不完整,已终止操作"
rm -rf ${postgresqlPath}
exit 1
fi
tar -zxvf postgresql-${postgresqlVersion}.tar.gz
rm -f postgresql-${postgresqlVersion}.tar.gz
rm -f postgresql-${postgresqlVersion}.tar.gz.checksum.txt
7z x postgresql-${postgresqlVersion}.7z
rm -f postgresql-${postgresqlVersion}.7z
rm -f postgresql-${postgresqlVersion}.7z.checksum.txt
mv postgresql-${postgresqlVersion} src
# 编译

View File

@@ -31,9 +31,9 @@ source ${setupPath}/panel/scripts/calculate_j.sh
j=$(calculate_j)
if [[ "${1}" == "15" ]]; then
postgresqlVersion="15.6"
postgresqlVersion="15.7"
elif [[ "${1}" == "16" ]]; then
postgresqlVersion="16.2"
postgresqlVersion="16.3"
else
echo -e $HR
echo "错误:不支持的 PostgreSQL 版本!"
@@ -62,18 +62,18 @@ rm -rf ${postgresqlPath}/src
cd ${postgresqlPath}
# 下载源码
wget -T 120 -t 3 -O ${postgresqlPath}/postgresql-${postgresqlVersion}.tar.gz ${downloadUrl}/postgresql-${postgresqlVersion}.tar.gz
wget -T 20 -t 3 -O ${postgresqlPath}/postgresql-${postgresqlVersion}.tar.gz.checksum.txt ${downloadUrl}/postgresql-${postgresqlVersion}.tar.gz.checksum.txt
wget -T 120 -t 3 -O ${postgresqlPath}/postgresql-${postgresqlVersion}.7z ${downloadUrl}/postgresql-${postgresqlVersion}.7z
wget -T 20 -t 3 -O ${postgresqlPath}/postgresql-${postgresqlVersion}.7z.checksum.txt ${downloadUrl}/postgresql-${postgresqlVersion}.7z.checksum.txt
if ! sha256sum --status -c postgresql-${postgresqlVersion}.tar.gz.checksum.txt; then
if ! sha256sum --status -c postgresql-${postgresqlVersion}.7z.checksum.txt; then
echo -e $HR
echo "错误PostgreSQL 源码 checksum 校验失败,文件可能被篡改或不完整,已终止操作"
exit 1
fi
tar -zxvf postgresql-${postgresqlVersion}.tar.gz
rm -f postgresql-${postgresqlVersion}.tar.gz
rm -f postgresql-${postgresqlVersion}.tar.gz.checksum.txt
7z x postgresql-${postgresqlVersion}.7z
rm -f postgresql-${postgresqlVersion}.7z
rm -f postgresql-${postgresqlVersion}.7z.checksum.txt
mv postgresql-${postgresqlVersion} src
# 编译

View File

@@ -90,8 +90,8 @@ if version_lt "$oldVersion" "2.1.39"; then
echo "更新面板到 v2.1.39 ..."
echo "Update panel to v2.1.39 ..."
if [ "${OS}" == "centos" ]; then
yum makecache
yum install -y podman
dnf makecache
dnf install -y podman
else
apt-get update -y
apt-get install -y podman
@@ -101,6 +101,18 @@ if version_lt "$oldVersion" "2.1.39"; then
systemctl start podman
fi
if version_lt "$oldVersion" "2.1.40"; then
echo "更新面板到 v2.1.40 ..."
echo "Update panel to v2.1.40 ..."
if [ "${OS}" == "centos" ]; then
dnf makecache
dnf install -y p7zip p7zip-plugins
else
apt-get update -y
apt-get install -y p7zip p7zip-full
fi
fi
echo $HR
echo "更新结束"
echo "Update finished"