commit 758e1c8799f0cabeed6b5a89c978aefd8bee19ae Author: 耗子 Date: Sat Jan 31 07:03:45 2026 +0800 feat: 清理提交 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..df7b491 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,8 @@ +* filter=lfs diff=lfs merge=lfs -text +*.sh !filter !diff !merge +*.sha256 !filter !diff !merge +.gitlab-ci.yml !filter !diff !merge +.gitignore !filter !diff !merge +.gitattributes !filter !diff !merge +.github/** !filter !diff !merge +README.md !filter !diff !merge diff --git a/.gitattributes.sha256 b/.gitattributes.sha256 new file mode 100644 index 0000000..e990e26 --- /dev/null +++ b/.gitattributes.sha256 @@ -0,0 +1 @@ +7c1fe4c8f56b61326c64d813552ed55041850e0d41b59c10bbedadfd02e818b4 *.gitattributes diff --git a/.github/workflows/checksums.yml b/.github/workflows/checksums.yml new file mode 100644 index 0000000..f9035c1 --- /dev/null +++ b/.github/workflows/checksums.yml @@ -0,0 +1,43 @@ +name: Generate Checksums +on: + push: + branches: + - main + pull_request: +jobs: + checksums: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v6 + with: + ref: ${{ github.ref_name }} + persist-credentials: true + lfs: false + - name: Setup Git LFS + run: | + git lfs install --local + AUTH=$(git config http.${{ github.server_url }}/.extraheader) + AUTH_FILE=$(git config includeif.gitdir:/workspace/${{ github.repository }}/.git.path) + git config -f $AUTH_FILE --unset http.${{ github.server_url }}/.extraheader + git config -f $AUTH_FILE http.${{ github.server_url }}/${{ github.repository }}.git/info/lfs/objects/batch.extraheader "$AUTH" + git lfs pull + - name: Generate checksums + run: | + set -e + IFS=$'\n' + for file in $(git ls-files | grep -v ".sha256$" | grep -v ".txt$" | grep -v "^.github/"); do + filename=$(basename "$file"); + sha256sum -b "$file" | sed "s|$file|$filename|" > "${file}.sha256"; + done + unset IFS + echo "ok" + - name: Commit changes + run: | + SERVER_URL=$(echo "${{ github.server_url }}" | sed 's|https\?://||') + git remote set-url origin https://oauth2:${{ secrets.GITHUB_TOKEN }}@${SERVER_URL}/${{ github.repository }}.git + git config --global user.name "gitea-actions" + git config --global user.email "teabot@gitea.io" + git add -A + git commit -m "chore: update checksums" || true + git push origin HEAD:${{ github.ref_name }} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3d72576 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.DS_Store +.idea \ No newline at end of file diff --git a/.gitignore.sha256 b/.gitignore.sha256 new file mode 100644 index 0000000..d3ac825 --- /dev/null +++ b/.gitignore.sha256 @@ -0,0 +1 @@ +c8ff93ff5a9942406fcab52c60206f1db1c87818a2f642ee30edc9582a65f968 *.gitignore diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..d236055 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:126c8d8a9789c1a8cb943cbe94ae0065388bbce6c3b793e046fa0fb5bb7557ad +size 2420 diff --git a/CLAUDE.md.sha256 b/CLAUDE.md.sha256 new file mode 100644 index 0000000..d460ea0 --- /dev/null +++ b/CLAUDE.md.sha256 @@ -0,0 +1 @@ +126c8d8a9789c1a8cb943cbe94ae0065388bbce6c3b793e046fa0fb5bb7557ad *CLAUDE.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..241eccc --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# 公共下载资源 + +这是我们的公共下载资源库,会定时同步到各下载节点。 diff --git a/README.md.sha256 b/README.md.sha256 new file mode 100644 index 0000000..0805d69 --- /dev/null +++ b/README.md.sha256 @@ -0,0 +1 @@ +a7e1afc5505f8ddfc85bf7a61336cc2f8cb40a9c1a739579453f2cc455c99107 *README.md diff --git a/acepanel-helper-amd64 b/acepanel-helper-amd64 new file mode 100755 index 0000000..28b5166 --- /dev/null +++ b/acepanel-helper-amd64 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:883c538f4a5304368791e428c6c3c8c1c6926bc389b834499c53db32ac7c3b35 +size 2707440 diff --git a/acepanel-helper-amd64.sha256 b/acepanel-helper-amd64.sha256 new file mode 100644 index 0000000..01946af --- /dev/null +++ b/acepanel-helper-amd64.sha256 @@ -0,0 +1 @@ +883c538f4a5304368791e428c6c3c8c1c6926bc389b834499c53db32ac7c3b35 *acepanel-helper-amd64 diff --git a/acepanel-helper-arm64 b/acepanel-helper-arm64 new file mode 100755 index 0000000..56a7b8d --- /dev/null +++ b/acepanel-helper-arm64 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ff051b980e5b25c0abd2c7f5d2ead179c1209c5df8dd5a690b39dc0dae760d2d +size 2346292 diff --git a/acepanel-helper-arm64.sha256 b/acepanel-helper-arm64.sha256 new file mode 100644 index 0000000..5ce250f --- /dev/null +++ b/acepanel-helper-arm64.sha256 @@ -0,0 +1 @@ +ff051b980e5b25c0abd2c7f5d2ead179c1209c5df8dd5a690b39dc0dae760d2d *acepanel-helper-arm64 diff --git a/acepanel.service b/acepanel.service new file mode 100644 index 0000000..78a5cc1 --- /dev/null +++ b/acepanel.service @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:62d93afe9445ffcdfbeb8d0d047c9b1a17a052b76161255af0e41b886a78e9fb +size 296 diff --git a/acepanel.service.sha256 b/acepanel.service.sha256 new file mode 100644 index 0000000..e3e2a12 --- /dev/null +++ b/acepanel.service.sha256 @@ -0,0 +1 @@ +62d93afe9445ffcdfbeb8d0d047c9b1a17a052b76161255af0e41b886a78e9fb *acepanel.service diff --git a/apache/apr-1.7.6.tar.gz b/apache/apr-1.7.6.tar.gz new file mode 100644 index 0000000..8229637 --- /dev/null +++ b/apache/apr-1.7.6.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6a10e7f7430510600af25fabf466e1df61aaae910bf1dc5d10c44a4433ccc81d +size 1138032 diff --git a/apache/apr-1.7.6.tar.gz.sha256 b/apache/apr-1.7.6.tar.gz.sha256 new file mode 100644 index 0000000..ed1a6d8 --- /dev/null +++ b/apache/apr-1.7.6.tar.gz.sha256 @@ -0,0 +1 @@ +6a10e7f7430510600af25fabf466e1df61aaae910bf1dc5d10c44a4433ccc81d *apr-1.7.6.tar.gz diff --git a/apache/apr-util-1.6.3.tar.gz b/apache/apr-util-1.6.3.tar.gz new file mode 100644 index 0000000..bb015f2 --- /dev/null +++ b/apache/apr-util-1.6.3.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2b74d8932703826862ca305b094eef2983c27b39d5c9414442e9976a9acf1983 +size 556623 diff --git a/apache/apr-util-1.6.3.tar.gz.sha256 b/apache/apr-util-1.6.3.tar.gz.sha256 new file mode 100644 index 0000000..6d389e3 --- /dev/null +++ b/apache/apr-util-1.6.3.tar.gz.sha256 @@ -0,0 +1 @@ +2b74d8932703826862ca305b094eef2983c27b39d5c9414442e9976a9acf1983 *apr-util-1.6.3.tar.gz diff --git a/apache/httpd-2.4.66.tar.gz b/apache/httpd-2.4.66.tar.gz new file mode 100644 index 0000000..5b6f9f1 --- /dev/null +++ b/apache/httpd-2.4.66.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:442184763b60936471b88a91275f79d2407733b7aac27e345f270e8bc31c3d49 +size 9828043 diff --git a/apache/httpd-2.4.66.tar.gz.sha256 b/apache/httpd-2.4.66.tar.gz.sha256 new file mode 100644 index 0000000..c5f2d77 --- /dev/null +++ b/apache/httpd-2.4.66.tar.gz.sha256 @@ -0,0 +1 @@ +442184763b60936471b88a91275f79d2407733b7aac27e345f270e8bc31c3d49 *httpd-2.4.66.tar.gz diff --git a/apache/install.sh b/apache/install.sh new file mode 100644 index 0000000..89e5ae2 --- /dev/null +++ b/apache/install.sh @@ -0,0 +1,317 @@ +#!/bin/bash + +source <(curl -f -s --connect-timeout 10 --retry 3 https://dl.acepanel.net/public.sh) +if [ $? -ne 0 ]; then + echo "Download public.sh failed, please check the network or try again later." + exit 1 +fi + +channel=${1} +version=${2} +apache_path="${setup_path}/server/apache" +j=$(calculate_j) + +# 安装依赖 +if [ ${OS} == "rhel" ]; then + dnf makecache -y + dnf groupinstall "Development Tools" -y + dnf install cmake tar unzip pcre2-devel openssl-devel zlib-devel libxml2-devel expat-devel lua-devel libnghttp2-devel brotli-devel curl-devel jansson-devel libcurl-devel systemd-devel -y +elif [ ${OS} == "debian" ] || [ ${OS} == "ubuntu" ]; then + apt-get update + apt-get install build-essential cmake tar unzip libpcre2-dev libssl-dev zlib1g-dev libxml2-dev libexpat1-dev liblua5.4-dev libnghttp2-dev libbrotli-dev libcurl4-openssl-dev libjansson-dev libsystemd-dev -y +else + error "Unsupported operating system" +fi +if [ "$?" != "0" ]; then + error "Failed to install dependencies" +fi + +# 准备目录 +rm -rf ${apache_path} +mkdir -p ${apache_path} +cd ${apache_path} + +# 下载源码 +dl "${apache_path}" "/apache/httpd-${version}.tar.gz" + +tar -zxvf httpd-${version}.tar.gz +rm -f httpd-${version}.tar.gz +mv httpd-${version} src +cd src + +# 下载并解压 APR +dl "${apache_path}/src/srclib" "/apache/apr-1.7.6.tar.gz" +cd ${apache_path}/src/srclib +tar -zxvf apr-1.7.6.tar.gz +rm -f apr-1.7.6.tar.gz +mv apr-1.7.6 apr + +# 下载并解压 APR-Util +dl "${apache_path}/src/srclib" "/apache/apr-util-1.6.3.tar.gz" +cd ${apache_path}/src/srclib +tar -zxvf apr-util-1.6.3.tar.gz +rm -f apr-util-1.6.3.tar.gz +mv apr-util-1.6.3 apr-util + +cd ${apache_path}/src + +# 配置编译 +./configure --prefix=${apache_path} \ + --enable-mods-shared=most \ + --with-included-apr \ + --enable-ssl \ + --enable-http2 \ + --enable-proxy \ + --enable-brotli \ + --enable-deflate \ + --enable-rewrite \ + --enable-remoteip \ + --enable-lua \ + --enable-dav \ + --enable-dav-fs \ + --enable-cache \ + --enable-cache-disk \ + --enable-socache-shmcb \ + --enable-slotmem-shm \ + --enable-watchdog \ + --enable-md \ + --enable-systemd + +if [ "$?" != "0" ]; then + rm -rf ${apache_path} + error "Configure failed" +fi + +make "-j${j}" +if [ "$?" != "0" ]; then + rm -rf ${apache_path} + error "Compilation failed" +fi + +make install +if [ ! -f "${apache_path}/bin/httpd" ]; then + rm -rf ${apache_path} + error "Installation failed" +fi + +cd ${apache_path} + +# 设置软链接 +ln -sf ${apache_path}/bin/httpd /usr/local/bin/httpd +ln -sf ${apache_path}/bin/apachectl /usr/local/bin/apachectl + +# 创建站点目录 +mkdir -p ${setup_path}/sites +chmod -R 755 ${setup_path}/sites + +# 修改默认配置 +sed -i "s|#ServerName www.example.com:80|ServerName 0.0.0.0:80|" ${apache_path}/conf/httpd.conf +sed -i "s|User daemon|User www|" ${apache_path}/conf/httpd.conf +sed -i "s|Group daemon|Group www|" ${apache_path}/conf/httpd.conf +sed -i "s|DirectoryIndex index.html|DirectoryIndex index.php index.html|" ${apache_path}/conf/httpd.conf +sed -i "s|AllowOverride none|AllowOverride All|" ${apache_path}/conf/httpd.conf +sed -i "s|AllowOverride None|AllowOverride All|" ${apache_path}/conf/httpd.conf +sed -i "s|Require all denied|Require all granted|" ${apache_path}/conf/httpd.conf + +# 启用模块 +sed -i "s|#LoadModule deflate_module|LoadModule deflate_module|" ${apache_path}/conf/httpd.conf +sed -i "s|#LoadModule brotli_module|LoadModule brotli_module|" ${apache_path}/conf/httpd.conf +sed -i "s|#LoadModule expires_module|LoadModule expires_module|" ${apache_path}/conf/httpd.conf +sed -i "s|#LoadModule rewrite_module|LoadModule rewrite_module|" ${apache_path}/conf/httpd.conf +sed -i "s|#LoadModule ssl_module|LoadModule ssl_module|" ${apache_path}/conf/httpd.conf +sed -i "s|#LoadModule socache_shmcb_module|LoadModule socache_shmcb_module|" ${apache_path}/conf/httpd.conf +sed -i "s|#LoadModule http2_module|LoadModule http2_module|" ${apache_path}/conf/httpd.conf +sed -i "s|#LoadModule proxy_module|LoadModule proxy_module|" ${apache_path}/conf/httpd.conf +sed -i "s|#LoadModule proxy_connect_module|LoadModule proxy_connect_module|" ${apache_path}/conf/httpd.conf +sed -i "s|#LoadModule proxy_http_module|LoadModule proxy_http_module|" ${apache_path}/conf/httpd.conf +sed -i "s|#LoadModule proxy_http2_module|LoadModule proxy_http2_module|" ${apache_path}/conf/httpd.conf +sed -i "s|#LoadModule proxy_fcgi_module|LoadModule proxy_fcgi_module|" ${apache_path}/conf/httpd.conf +sed -i "s|#LoadModule proxy_scgi_module|LoadModule proxy_scgi_module|" ${apache_path}/conf/httpd.conf +sed -i "s|#LoadModule proxy_uwsgi_module|LoadModule proxy_uwsgi_module|" ${apache_path}/conf/httpd.conf +sed -i "s|#LoadModule proxy_fdpass_module|LoadModule proxy_fdpass_module|" ${apache_path}/conf/httpd.conf +sed -i "s|#LoadModule proxy_wstunnel_module|LoadModule proxy_wstunnel_module|" ${apache_path}/conf/httpd.conf +sed -i "s|#LoadModule proxy_balancer_module|LoadModule proxy_balancer_module|" ${apache_path}/conf/httpd.conf +sed -i "s|#LoadModule proxy_hcheck_module|LoadModule proxy_hcheck_module|" ${apache_path}/conf/httpd.conf +sed -i "s|#LoadModule slotmem_shm_module|LoadModule slotmem_shm_module|" ${apache_path}/conf/httpd.conf +sed -i "s|#LoadModule remoteip_module|LoadModule remoteip_module|" ${apache_path}/conf/httpd.conf +sed -i "s|#LoadModule lua_module|LoadModule lua_module|" ${apache_path}/conf/httpd.conf +sed -i "s|#LoadModule dav_module|LoadModule dav_module|" ${apache_path}/conf/httpd.conf +sed -i "s|#LoadModule dav_fs_module|LoadModule dav_fs_module|" ${apache_path}/conf/httpd.conf +sed -i "s|#LoadModule dav_lock_module|LoadModule dav_lock_module|" ${apache_path}/conf/httpd.conf +sed -i "s|#LoadModule cache_module|LoadModule cache_module|" ${apache_path}/conf/httpd.conf +sed -i "s|#LoadModule cache_disk_module|LoadModule cache_disk_module|" ${apache_path}/conf/httpd.conf +sed -i "s|#LoadModule cache_socache_module|LoadModule cache_socache_module|" ${apache_path}/conf/httpd.conf +sed -i "s|#LoadModule lbmethod_byrequests_module|LoadModule lbmethod_byrequests_module|" ${apache_path}/conf/httpd.conf +sed -i "s|#LoadModule lbmethod_bytraffic_module|LoadModule lbmethod_bytraffic_module|" ${apache_path}/conf/httpd.conf +sed -i "s|#LoadModule lbmethod_bybusyness_module|LoadModule lbmethod_bybusyness_module|" ${apache_path}/conf/httpd.conf +sed -i "s|#LoadModule lbmethod_heartbeat_module|LoadModule lbmethod_heartbeat_module|" ${apache_path}/conf/httpd.conf +sed -i "s|#LoadModule watchdog_module|LoadModule watchdog_module|" ${apache_path}/conf/httpd.conf +sed -i "s|#LoadModule md_module|LoadModule md_module|" ${apache_path}/conf/httpd.conf +sed -i "s|#LoadModule systemd_module|LoadModule systemd_module|" ${apache_path}/conf/httpd.conf + +# 安全增强 +sed -i "s|^ServerTokens.*|ServerTokens Prod|" ${apache_path}/conf/extra/httpd-default.conf +sed -i "s|^ServerSignature.*|ServerSignature Off|" ${apache_path}/conf/extra/httpd-default.conf +echo "TraceEnable Off" >>${apache_path}/conf/extra/httpd-default.conf + +# 启用额外配置 +sed -i "s|#Include conf/extra/httpd-default.conf|Include conf/extra/httpd-default.conf|" ${apache_path}/conf/httpd.conf +sed -i "s|#Include conf/extra/httpd-mpm.conf|Include conf/extra/httpd-mpm.conf|" ${apache_path}/conf/httpd.conf +sed -i "s|#Include conf/extra/httpd-ssl.conf|Include conf/extra/httpd-ssl.conf|" ${apache_path}/conf/httpd.conf + +# 生成自签名证书 +openssl req -x509 -nodes -days 3650 -newkey rsa:2048 \ + -keyout ${apache_path}/conf/server.key \ + -out ${apache_path}/conf/server.crt \ + -subj "/C=US/ST=State/L=City/O=AcePanel/CN=localhost" \ + -addext "basicConstraints=CA:FALSE" \ + -addext "subjectAltName=DNS:localhost,IP:127.0.0.1" + +# 修改 SSL 虚拟主机 ServerName +sed -i "s|ServerName www.example.com:443|ServerName localhost:443|" ${apache_path}/conf/extra/httpd-ssl.conf + +# 追加自定义配置 +cat >>${apache_path}/conf/httpd.conf < + ProtocolsHonorOrder On + Protocols h2 h2c http/1.1 + + + + RemoteIPHeader X-Forwarded-For + RemoteIPInternalProxy 127.0.0.1 + RemoteIPInternalProxy ::1 + + + + SetOutputFilter DEFLATE + SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png|ico|webp|avif|bmp|tiff?)$ no-gzip dont-vary + SetEnvIfNoCase Request_URI \.(?:exe|t?gz|zip|bz2|sit|rar|7z|xz|lz|lzma|zst|br|cab|arj)$ no-gzip dont-vary + SetEnvIfNoCase Request_URI \.(?:iso|dmg|img|apk|ipa|deb|rpm|msi|pkg|appimage)$ no-gzip dont-vary + SetEnvIfNoCase Request_URI \.(?:pdf|mov|avi|mp[34]|rm|flv|swf|wmv|mkv|webm|m4[av]|ogg|ogv|opus)$ no-gzip dont-vary + SetEnvIfNoCase Request_URI \.(?:mp3|aac|flac|wav|wma|m4a|mid|midi)$ no-gzip dont-vary + SetEnvIfNoCase Request_URI \.(?:woff2?|ttf|otf|eot)$ no-gzip dont-vary + DeflateCompressionLevel 6 + + + + SetOutputFilter BROTLI_COMPRESS + SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png|ico|webp|avif|bmp|tiff?)$ no-brotli + SetEnvIfNoCase Request_URI \.(?:exe|t?gz|zip|bz2|sit|rar|7z|xz|lz|lzma|zst|br|cab|arj)$ no-brotli + SetEnvIfNoCase Request_URI \.(?:iso|dmg|img|apk|ipa|deb|rpm|msi|pkg|appimage)$ no-brotli + SetEnvIfNoCase Request_URI \.(?:pdf|mov|avi|mp[34]|rm|flv|swf|wmv|mkv|webm|m4[av]|ogg|ogv|opus)$ no-brotli + SetEnvIfNoCase Request_URI \.(?:mp3|aac|flac|wav|wma|m4a|mid|midi)$ no-brotli + SetEnvIfNoCase Request_URI \.(?:woff2?|ttf|otf|eot)$ no-brotli + BrotliCompressionQuality 6 + + + + SetHandler server-status + Require ip 127.0.0.1 ::1 + + +[0-9]+)$"> + Require ip 127.0.0.1 ::1 + + SetHandler "proxy:unix:/tmp/php-cgi-%{env:MATCH_PHPVER}.sock|fcgi://localhost/" + + ProxyFCGISetEnvIf "true" SCRIPT_NAME "/phpfpm_status/%{env:MATCH_PHPVER}" + ProxyFCGISetEnvIf "true" SCRIPT_FILENAME "/phpfpm_status/%{env:MATCH_PHPVER}" + + +IncludeOptional conf/extra/acme.conf +IncludeOptional ${setup_path}/sites/*/config/*.conf +CONF + +touch ${apache_path}/conf/extra/acme.conf + +# 修改 SSL 配置 +sed -i "s|^SSLProtocol.*|SSLProtocol -all +TLSv1.2 +TLSv1.3|" ${apache_path}/conf/extra/httpd-ssl.conf +sed -i "s|^SSLProxyProtocol.*|SSLProxyProtocol -all +TLSv1.2 +TLSv1.3|" ${apache_path}/conf/extra/httpd-ssl.conf +sed -i "s|^SSLCipherSuite.*|SSLCipherSuite ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-CHACHA20-POLY1305|" ${apache_path}/conf/extra/httpd-ssl.conf +sed -i "s|^SSLProxyCipherSuite.*|SSLProxyCipherSuite ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-CHACHA20-POLY1305|" ${apache_path}/conf/extra/httpd-ssl.conf +sed -i "s|^SSLHonorCipherOrder.*|SSLHonorCipherOrder off|" ${apache_path}/conf/extra/httpd-ssl.conf + +# 写入默认站点页 +cat >${apache_path}/htdocs/index.html < + + + + + AcePanel + + + +
+

AcePanel

+

This is the default page of AcePanel!

+

You see this page because the requested website was not found on this server.

+

Powered by AcePanel

+
+ + +EOF + +# 写入站点停止页 +cat >${apache_path}/htdocs/stop.html < + + + + + AcePanel + + + +
+

Website Suspended

+

You see this page because the website has been stopped by the server administrator.

+

Powered by AcePanel

+
+ + +EOF + +# 处理文件权限 +chmod -R 755 ${apache_path} +chmod -R 600 ${apache_path}/conf +chown -R www:www ${apache_path}/logs + +# 写入服务文件 +cat >/etc/systemd/system/apache.service </root/.config/code-server/config.yaml </etc/systemd/system/code-server.service </dev/null | grep -qx 'loc=CN' && echo "true" || echo "false") + +if [ ${OS} == "rhel" ]; then + dnf makecache -y + dnf remove -y docker* containerd.io podman* runc +elif [ ${OS} == "debian" ] || [ ${OS} == "ubuntu" ]; then + apt-get update + apt-get remove -y docker* containerd.io podman* runc + apt-get autoremove -y +else + error "Unsupported operating system" +fi + +if ${in_china}; then + bash <(curl -f -s --connect-timeout 10 --retry 3 https://linuxmirrors.cn/docker-lite.sh) --source mirrors.tencent.com/docker-ce --source-registry docker.1ms.run --protocol https --install-latest true --close-firewall false +else + bash <(curl -f -s --connect-timeout 10 --retry 3 https://linuxmirrors.cn/docker-lite.sh) --source download.docker.com --source-registry docker.1ms.run --protocol https --install-latest true --close-firewall false + # 海外不需要镜像加速 + echo "" >/etc/docker/daemon.json +fi + +sleep 5 # 不等久一点的话可能会报错启动太快 +systemctl restart docker + +if [ $? -ne 0 ]; then + error "Installation failed" +fi + +# 创建编排目录 +mkdir -p ${setup_path}/compose +# 创建acepanel网络 +docker network create --label created_by=acepanel acepanel-network + +acepanel app write docker ${channel} ${version} + +echo -e ${HR} +echo "Installation successful" +echo -e ${HR} diff --git a/docker/install.sh.sha256 b/docker/install.sh.sha256 new file mode 100644 index 0000000..2649e0d --- /dev/null +++ b/docker/install.sh.sha256 @@ -0,0 +1 @@ +c1641541ef2c25c2003daa7c4010a1259e725d74554f93c039fddd01c1f8788e *install.sh diff --git a/docker/uninstall.sh b/docker/uninstall.sh new file mode 100644 index 0000000..4cd684b --- /dev/null +++ b/docker/uninstall.sh @@ -0,0 +1,26 @@ +#!/bin/bash +export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:$PATH + +source <(curl -f -s --connect-timeout 10 --retry 3 https://dl.acepanel.net/public.sh) +if [ $? -ne 0 ]; then + echo "Download public.sh failed, please check the network or try again later." + exit 1 +fi + +systemctl stop docker +systemctl disable docker + +if [ ${OS} == "rhel" ]; then + dnf remove -y docker* containerd.io podman* runc +elif [ ${OS} == "debian" ] || [ ${OS} == "ubuntu" ]; then + apt-get remove -y docker* containerd.io podman* runc + apt-get autoremove -y +else + error "Unsupported operating system" +fi + +acepanel app remove docker + +echo -e $HR +echo "Uninstall successful" +echo -e $HR diff --git a/docker/uninstall.sh.sha256 b/docker/uninstall.sh.sha256 new file mode 100644 index 0000000..a71a8da --- /dev/null +++ b/docker/uninstall.sh.sha256 @@ -0,0 +1 @@ +f21726f0daf4192339ea3165ab7c88b00bd6825051149563badee6b680ddd64d *uninstall.sh diff --git a/docker/update.sh b/docker/update.sh new file mode 100644 index 0000000..c31a099 --- /dev/null +++ b/docker/update.sh @@ -0,0 +1,34 @@ +#!/bin/bash +export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:$PATH + +source <(curl -f -s --connect-timeout 10 --retry 3 https://dl.acepanel.net/public.sh) +if [ $? -ne 0 ]; then + echo "Download public.sh failed, please check the network or try again later." + exit 1 +fi + +channel=${1} +version=${2} + +if [ ${OS} == "rhel" ]; then + dnf makecache -y + dnf update docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -y +elif [ ${OS} == "debian" ] || [ ${OS} == "ubuntu" ]; then + apt-get update + apt-get upgrade docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -y +else + error "Unsupported operating system" +fi + +if [ $? -ne 0 ]; then + error "Upgrade failed" +fi + +sleep 5 # 不等久一点的话可能会报错启动太快 +systemctl restart docker + +acepanel app write docker ${channel} ${version} + +echo -e ${HR} +echo "Upgrade successful" +echo -e ${HR} diff --git a/docker/update.sh.sha256 b/docker/update.sh.sha256 new file mode 100644 index 0000000..92ad174 --- /dev/null +++ b/docker/update.sh.sha256 @@ -0,0 +1 @@ +516a795643dbd420dcbcd0a5e38e919ef0843be02a63dcb444a2130c1a3c03ae *update.sh diff --git a/fail2ban/install.sh b/fail2ban/install.sh new file mode 100644 index 0000000..cb8997c --- /dev/null +++ b/fail2ban/install.sh @@ -0,0 +1,59 @@ +#!/bin/bash +export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:$PATH + +source <(curl -f -s --connect-timeout 10 --retry 3 https://dl.acepanel.net/public.sh) +if [ $? -ne 0 ]; then + echo "Download public.sh failed, please check the network or try again later." + exit 1 +fi + +channel=${1} +version=${2} + +if [ ${OS} == "rhel" ]; then + dnf install -y fail2ban python3-systemd +elif [ ${OS} == "debian" ] || [ ${OS} == "ubuntu" ]; then + apt-get install -y fail2ban python3-systemd +else + error "Unsupported operating system" +fi + +if [ "$?" != "0" ]; then + error "Installation failed" +fi + +# 修改 fail2ban 配置文件 +cat >/etc/fail2ban/jail.local </etc/systemd/system/frps.service </etc/systemd/system/frpc.service </etc/systemd/system/gitea.service </dev/null | grep -qx 'loc=CN' && echo "true" || echo "false") + +# 架构映射 +case ${ARCH} in +x86_64) + GO_ARCH="amd64" + ;; +aarch64) + GO_ARCH="arm64" + ;; +esac + +# 准备安装目录 +rm -rf ${go_path} +mkdir -p ${go_path} +cd ${go_path} + +# 下载Go安装包 +GO_TARBALL="go${version}.linux-${GO_ARCH}.tar.gz" + +if ${in_china}; then + GO_URL="https://mirrors.aliyun.com/golang/${GO_TARBALL}" + echo "Downloading ${GO_TARBALL} from Aliyun mirror..." +else + GO_URL="https://dl.google.com/go/${GO_TARBALL}" + echo "Downloading ${GO_TARBALL} from Google..." +fi + +aria2c -x8 \ + -U "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/144.0.0.0 Safari/537.36" \ + -o ${GO_TARBALL} \ + ${GO_URL} +if [ $? -ne 0 ]; then + rm -rf ${go_path} + error "Failed to download Go ${version}" +fi + +# 解压 +tar -zxf ${GO_TARBALL} +if [ $? -ne 0 ]; then + rm -rf ${go_path} + error "Failed to extract Go ${version}" +fi + +# Go解压后会在go目录下,移动到当前目录 +mv go/* . +rmdir go +rm -f ${GO_TARBALL} + +# 验证安装 +if [ ! -f "${go_path}/bin/go" ]; then + rm -rf ${go_path} + error "Go ${version} installation failed" +fi + +# 设置软链接 +ln -sf ${go_path}/bin/go /usr/local/bin/go${slug} +ln -sf ${go_path}/bin/gofmt /usr/local/bin/gofmt${slug} +[ ! -f /usr/local/bin/go ] && ln -sf ${go_path}/bin/go /usr/local/bin/go +[ ! -f /usr/local/bin/gofmt ] && ln -sf ${go_path}/bin/gofmt /usr/local/bin/gofmt + +# 国内设置GOPROXY +if ${in_china}; then + go env -w GO111MODULE=on + go env -w GOPROXY=https://goproxy.cn,direct +fi + +# 创建环境变量配置 +cat >${go_path}/env.sh </dev/null | grep -qx 'loc=CN' && echo "true" || echo "false") + +# 预检查 +if [ ! -f "${go_path}/bin/go" ]; then + error "Go ${slug} is not installed" +fi + +# 架构映射 +case ${ARCH} in +x86_64) + GO_ARCH="amd64" + ;; +aarch64) + GO_ARCH="arm64" + ;; +esac + +# 下载Go安装包 +GO_TARBALL="go${version}.linux-${GO_ARCH}.tar.gz" + +if ${in_china}; then + GO_URL="https://mirrors.aliyun.com/golang/${GO_TARBALL}" + echo "Downloading ${GO_TARBALL} from Aliyun mirror..." +else + GO_URL="https://dl.google.com/go/${GO_TARBALL}" + echo "Downloading ${GO_TARBALL} from Google..." +fi + +cd ${go_path} +aria2c -x8 \ + -U "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/144.0.0.0 Safari/537.36" \ + -o ${GO_TARBALL} \ + ${GO_URL} +if [ $? -ne 0 ]; then + rm -f ${GO_TARBALL} + error "Failed to download Go ${version}" +fi + +# 删除旧文件 +find ${go_path} -mindepth 1 ! -name "${GO_TARBALL}" -exec rm -rf {} + 2>/dev/null + +# 解压 +tar -zxf ${GO_TARBALL} +if [ $? -ne 0 ]; then + rm -f ${GO_TARBALL} + error "Failed to extract Go ${version}" +fi + +# Go解压后移动到当前目录 +mv go/* . +rm -rf go +rm -f ${GO_TARBALL} + +# 验证安装 +if [ ! -f "${go_path}/bin/go" ]; then + error "Go ${version} upgrade failed" +fi + +echo -e $HR +echo "Upgrade successful" +echo -e $HR diff --git a/go/update.sh.sha256 b/go/update.sh.sha256 new file mode 100644 index 0000000..978d707 --- /dev/null +++ b/go/update.sh.sha256 @@ -0,0 +1 @@ +9cc36d95cd260c19580ff35c18f7095a330b3045a32fbca886834dd2094714ba *update.sh diff --git a/helper.sh b/helper.sh new file mode 100644 index 0000000..f361639 --- /dev/null +++ b/helper.sh @@ -0,0 +1,41 @@ +#!/bin/bash +export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:$PATH + +source <(curl -f -s --connect-timeout 10 --retry 3 https://dl.acepanel.net/public.sh) +if [ $? -ne 0 ]; then + echo "Download public.sh failed, please check the network or try again later." + exit 1 +fi + +detect_arch() { + case "${ARCH}" in + x86_64) echo "amd64" ;; + arm64 | aarch64) echo "arm64" ;; + *) echo "unknown" ;; + esac +} + +run() { + local arch=$(detect_arch) + if [ "${arch}" == "unknown" ]; then + error "Unsupported architecture: ${ARCH}" + fi + + TARGET="acepanel-helper-${arch}" + BIN_NAME="acepanel-helper" + + dl "$(pwd)" "/${TARGET}" + + mv "${TARGET}" "${BIN_NAME}" + chmod +x "$BIN_NAME" + + if [ ! -t 0 ]; then + exec ${java_path}/env.sh </dev/null + +# 解压 +tar -zxf ${JAVA_TARBALL} +if [ $? -ne 0 ]; then + rm -f ${JAVA_TARBALL} + error "Failed to extract Java ${version}" +fi + +# Corretto解压后移动到当前目录 +mv amazon-corretto-*/* . +rm -rf amazon-corretto-*/ +rm -f ${JAVA_TARBALL} + +# 验证安装 +if [ ! -f "${java_path}/bin/java" ]; then + error "Java ${version} upgrade failed" +fi + +echo -e $HR +echo "Upgrade successful" +echo -e $HR diff --git a/java/update.sh.sha256 b/java/update.sh.sha256 new file mode 100644 index 0000000..f5c01cd --- /dev/null +++ b/java/update.sh.sha256 @@ -0,0 +1 @@ +a960ac80bf7788a3da823b5f12131652a55de654c2e89c16c73d7b7d1b75b7ee *update.sh diff --git a/mariadb/install.sh b/mariadb/install.sh new file mode 100644 index 0000000..54cd996 --- /dev/null +++ b/mariadb/install.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +source <(curl -f -s --connect-timeout 10 --retry 3 https://dl.acepanel.net/public.sh) +if [ $? -ne 0 ]; then + echo "Download public.sh failed, please check the network or try again later." + exit 1 +fi + +if [[ ${ARCH} == "x86_64" ]] && + [[ (${OS} == "ubuntu" && ${VERSION} -ge 22) || + (${OS} == "debian" && ${VERSION} -ge 12) || + (${OS} == "rhel" && ${VERSION} -ge 9) ]]; then + dl "/tmp" "/mysql/prebuilt.sh" + bash /tmp/prebuilt.sh mariadb "$1" "$2" +else + dl "/tmp" "/mysql/build.sh" + bash /tmp/build.sh mariadb "$1" "$2" +fi + +dl "/tmp" "/mysql/init.sh" +bash /tmp/init.sh mariadb "$1" "$2" + +rm -f /tmp/prebuilt.sh +rm -f /tmp/build.sh +rm -f /tmp/init.sh diff --git a/mariadb/install.sh.sha256 b/mariadb/install.sh.sha256 new file mode 100644 index 0000000..c6a8d0a --- /dev/null +++ b/mariadb/install.sh.sha256 @@ -0,0 +1 @@ +00386c2d6d419726fd95f5ea5228b19db6d7ece7b414d416ab8f03b5698f7f00 *install.sh diff --git a/memcached/install.sh b/memcached/install.sh new file mode 100644 index 0000000..2fd2cc0 --- /dev/null +++ b/memcached/install.sh @@ -0,0 +1,158 @@ +#!/bin/bash +export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:$PATH + +source <(curl -f -s --connect-timeout 10 --retry 3 https://dl.acepanel.net/public.sh) +if [ $? -ne 0 ]; then + echo "Download public.sh failed, please check the network or try again later." + exit 1 +fi + +channel=${1} +version=${2} +memcached_path="${setup_path}/server/memcached" + +if ! id -u "memcached" >/dev/null 2>&1; then + groupadd memcached + useradd -s /sbin/nologin -g memcached memcached +fi + +# 安装依赖 +if [ ${OS} == "rhel" ]; then + dnf makecache -y + dnf groupinstall "Development Tools" -y + dnf install openssl-devel cyrus-sasl cyrus-sasl-devel libevent-devel -y +elif [ ${OS} == "debian" ] || [ ${OS} == "ubuntu" ]; then + apt-get update + apt-get install build-essential libssl-dev libsasl2-2 libsasl2-dev libevent-dev -y +else + error "Unsupported operating system" +fi +if [ "$?" != "0" ]; then + error "Failed to install dependencies" +fi + +# 准备目录 +rm -rf ${memcached_path} +mkdir -p ${memcached_path} +cd ${memcached_path} + +# 下载源码 +dl "${memcached_path}" "/memcached/memcached-${version}.tar.gz" + +tar -zxvf memcached-${version}.tar.gz +rm -f memcached-${version}.tar.gz +mv memcached-${version} src +cd src +chmod +x configure + +./configure --prefix=${memcached_path} --enable-tls --enable-sasl --enable-sasl-pwdb --enable-64bit +if [ "$?" != "0" ]; then + rm -rf ${memcached_path} + error "Configuration failed" +fi + +make -j${CORES} +if [ "$?" != "0" ]; then + rm -rf ${memcached_path} + error "Compilation failed" +fi + +make install +if [ ! -f "${memcached_path}/bin/memcached" ]; then + rm -rf ${memcached_path} + error "Installation failed" +fi + +chown -R memcached:memcached ${memcached_path} +chmod -R 700 ${memcached_path} + +# 设置服务 +cat >/etc/systemd/system/memcached.service </etc/systemd/system/minio.service </etc/default/minio <${mysql_path}/conf/my.cnf </etc/systemd/system/mysqld.service </dev/null; then + echo "MySQL service has started" + break + fi + echo "Waiting for MySQL to start..." + sleep 1 +done + +if ! mysqladmin ping &>/dev/null; then + error "MySQL startup timeout" +fi + +root_password=$(cat /dev/urandom | head -n 16 | sha256sum | head -c 16) +${mysql_path}/bin/mysqladmin -u root password ${root_password} +if [ "$?" != "0" ]; then + error "Failed to initialize password" +fi + +export MYSQL_PWD=${root_password} + +${mysql_path}/bin/mysql -uroot -e "DROP DATABASE test;" +${mysql_path}/bin/mysql -uroot -e "DELETE FROM mysql.user WHERE user='';" +${mysql_path}/bin/mysql -uroot -e "FLUSH PRIVILEGES;" + +# 启用 RocksDB +if [[ ${MEM} -ge 7900 && -f "${mysql_path}/lib/plugin/ha_rocksdb.so" ]]; then + ${mysql_path}/bin/mysql -uroot -e "INSTALL PLUGIN ROCKSDB SONAME 'ha_rocksdb.so';" + ${mysql_path}/bin/mysql -uroot -e "INSTALL PLUGIN ROCKSDB_CFSTATS SONAME 'ha_rocksdb.so';" + ${mysql_path}/bin/mysql -uroot -e "INSTALL PLUGIN ROCKSDB_DBSTATS SONAME 'ha_rocksdb.so';" + ${mysql_path}/bin/mysql -uroot -e "INSTALL PLUGIN ROCKSDB_PERF_CONTEXT SONAME 'ha_rocksdb.so';" + ${mysql_path}/bin/mysql -uroot -e "INSTALL PLUGIN ROCKSDB_PERF_CONTEXT_GLOBAL SONAME 'ha_rocksdb.so';" + ${mysql_path}/bin/mysql -uroot -e "INSTALL PLUGIN ROCKSDB_CF_OPTIONS SONAME 'ha_rocksdb.so';" + ${mysql_path}/bin/mysql -uroot -e "INSTALL PLUGIN ROCKSDB_GLOBAL_INFO SONAME 'ha_rocksdb.so';" + ${mysql_path}/bin/mysql -uroot -e "INSTALL PLUGIN ROCKSDB_COMPACTION_HISTORY SONAME 'ha_rocksdb.so';" + ${mysql_path}/bin/mysql -uroot -e "INSTALL PLUGIN ROCKSDB_COMPACTION_STATS SONAME 'ha_rocksdb.so';" + ${mysql_path}/bin/mysql -uroot -e "INSTALL PLUGIN ROCKSDB_ACTIVE_COMPACTION_STATS SONAME 'ha_rocksdb.so';" + ${mysql_path}/bin/mysql -uroot -e "INSTALL PLUGIN ROCKSDB_DDL SONAME 'ha_rocksdb.so';" + ${mysql_path}/bin/mysql -uroot -e "INSTALL PLUGIN ROCKSDB_INDEX_FILE_MAP SONAME 'ha_rocksdb.so';" + ${mysql_path}/bin/mysql -uroot -e "INSTALL PLUGIN ROCKSDB_LOCKS SONAME 'ha_rocksdb.so';" + ${mysql_path}/bin/mysql -uroot -e "INSTALL PLUGIN ROCKSDB_TRX SONAME 'ha_rocksdb.so';" + ${mysql_path}/bin/mysql -uroot -e "INSTALL PLUGIN ROCKSDB_DEADLOCK SONAME 'ha_rocksdb.so';" +fi + +unset MYSQL_PWD + +acepanel app write ${name} ${channel} ${version} +acepanel setting write mysql_root_password ${root_password} +acepanel database add-server --type=mysql --name=local_mysql --host=127.0.0.1 --port=3306 --username=root --password=${root_password} diff --git a/mysql/init.sh.sha256 b/mysql/init.sh.sha256 new file mode 100644 index 0000000..ed7a0b9 --- /dev/null +++ b/mysql/init.sh.sha256 @@ -0,0 +1 @@ +b3d2c1165aee4f8fb8729f9b6776828b5f88e54ba894ebcce5a312a6d678793a *init.sh diff --git a/mysql/install.sh b/mysql/install.sh new file mode 100644 index 0000000..b136f33 --- /dev/null +++ b/mysql/install.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +source <(curl -f -s --connect-timeout 10 --retry 3 https://dl.acepanel.net/public.sh) +if [ $? -ne 0 ]; then + echo "Download public.sh failed, please check the network or try again later." + exit 1 +fi + +if [[ ${ARCH} == "x86_64" ]] && + [[ (${OS} == "ubuntu" && ${VERSION} -ge 22) || + (${OS} == "debian" && ${VERSION} -ge 12) || + (${OS} == "rhel" && ${VERSION} -ge 9) ]]; then + dl "/tmp" "/mysql/prebuilt.sh" + bash /tmp/prebuilt.sh mysql "$1" "$2" +else + dl "/tmp" "/mysql/build.sh" + bash /tmp/build.sh mysql "$1" "$2" +fi + +dl "/tmp" "/mysql/init.sh" +bash /tmp/init.sh mysql "$1" "$2" + +rm -f /tmp/prebuilt.sh +rm -f /tmp/build.sh +rm -f /tmp/init.sh diff --git a/mysql/install.sh.sha256 b/mysql/install.sh.sha256 new file mode 100644 index 0000000..4dc3a1f --- /dev/null +++ b/mysql/install.sh.sha256 @@ -0,0 +1 @@ +057af2d094194c649124dc9710611a9a9a584e7d2593f07a86dfb13c3367b1be *install.sh diff --git a/mysql/prebuilt.sh b/mysql/prebuilt.sh new file mode 100644 index 0000000..b833841 --- /dev/null +++ b/mysql/prebuilt.sh @@ -0,0 +1,70 @@ +#!/bin/bash + +source <(curl -f -s --connect-timeout 10 --retry 3 https://dl.acepanel.net/public.sh) +if [ $? -ne 0 ]; then + echo "Download public.sh failed, please check the network or try again later." + exit 1 +fi + +name=${1} +channel=${2} +version=${3} +action=${4:-install} # install 或 update +mysql_path="${setup_path}/server/mysql" + +# 安装依赖 +if [ ${OS} == "rhel" ]; then + dnf makecache -y + dnf groupinstall "Development Tools" -y + dnf install -y cmake ninja-build doxygen graphviz bison ncurses-devel libtirpc-devel openssl-devel pkg-config systemd-devel openldap-devel libudev-devel cyrus-sasl-devel cyrus-sasl-scram patchelf rpcgen rpcsvc-proto-devel krb5-devel zlib-devel bzip2-devel lz4-devel xz-devel readline-devel protobuf-compiler libcurl-devel libxml2-devel pcre2-devel libaio libaio-devel libatomic + # x86_64 安装 libquadmath-devel + if [ "${ARCH}" == "x86_64" ]; then + dnf install libquadmath-devel -y + fi +elif [ ${OS} == "debian" ] || [ ${OS} == "ubuntu" ]; then + apt-get update + # Debian 13+ 及 Ubuntu 25+ 需要单独安装 systemd-dev,旧版系统不能安装否则会出现严重问题 + if { [ ${OS} == "debian" ] && [ ${VERSION} -ge 13 ]; } || { [ ${OS} == "ubuntu" ] && [ ${VERSION} -ge 25 ]; }; then + apt-get install systemd-dev -y + fi + # Debian 13+ 及 Ubuntu 24+ 需要单独安装 libaio1t64,其他系统安装 libaio1 即可 + # https://activemq.apache.org/components/artemis/documentation/latest/libaio.html#runtime-dependencies + if { [ ${OS} == "debian" ] && [ ${VERSION} -ge 13 ]; } || { [ ${OS} == "ubuntu" ] && [ ${VERSION} -ge 24 ]; }; then + apt-get install libaio1t64 -y + ln -s /usr/lib/x86_64-linux-gnu/libaio.so.1t64 /usr/lib/x86_64-linux-gnu/libaio.so.1 + else + apt-get install libaio1 -y + fi + # x86_64 安装 libquadmath0 + if [ "${ARCH}" == "x86_64" ]; then + apt-get install libquadmath0 -y + fi + apt-get install -y build-essential cmake ninja-build doxygen graphviz bison libncurses5-dev libtirpc-dev libssl-dev pkg-config libsystemd-dev libldap2-dev libudev-dev libsasl2-dev libsasl2-modules-gssapi-mit patchelf libkrb5-dev zlib1g-dev libbz2-dev liblz4-dev liblzma-dev libreadline-dev protobuf-compiler libcurl4-openssl-dev libxml2-dev libpcre2-dev libaio-dev libatomic1 +else + error "Unsupported operating system" +fi +if [ "$?" != "0" ]; then + error "Failed to install dependencies" +fi + +mysql_user_check=$(cat /etc/passwd | grep mysql) +if [ "${mysql_user_check}" == "" ]; then + groupadd mysql + useradd -s /sbin/nologin -g mysql mysql +fi + +# 准备目录 +[[ ${action} == "install" ]] && rm -rf ${mysql_path} +[[ ${action} == "install" ]] && mkdir -p ${mysql_path} +cd ${mysql_path} + +# 下载源码 +dl "${mysql_path}" "/mysql/prebuilt/${name}-${version}-${OS}${VERSION}-${ARCH}.tar.7z" +7z x ${name}-${version}-${OS}${VERSION}-${ARCH}.tar.7z +tar -xvf ${name}-${version}.tar +if [ "$?" != "0" ]; then + error "Failed to extract MySQL prebuilt package" +fi + +rm -f ${name}-${version}-${OS}${VERSION}-${ARCH}.tar.7z +rm -f ${name}-${version}.tar diff --git a/mysql/prebuilt.sh.sha256 b/mysql/prebuilt.sh.sha256 new file mode 100644 index 0000000..2405363 --- /dev/null +++ b/mysql/prebuilt.sh.sha256 @@ -0,0 +1 @@ +a20b21a34c92d8a8380f92d03d9850eec68cdd9ba545dfdd5490b37be9371cc4 *prebuilt.sh diff --git a/mysql/prebuilt/mariadb-11.4.9-debian12-x86_64.tar.7z b/mysql/prebuilt/mariadb-11.4.9-debian12-x86_64.tar.7z new file mode 100644 index 0000000..a2274b9 --- /dev/null +++ b/mysql/prebuilt/mariadb-11.4.9-debian12-x86_64.tar.7z @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f31d523164358999484cf11f93ffbdf0edfc495204da3fd828c9f3a9dabe28b1 +size 16226989 diff --git a/mysql/prebuilt/mariadb-11.4.9-debian12-x86_64.tar.7z.sha256 b/mysql/prebuilt/mariadb-11.4.9-debian12-x86_64.tar.7z.sha256 new file mode 100644 index 0000000..bc1dff1 --- /dev/null +++ b/mysql/prebuilt/mariadb-11.4.9-debian12-x86_64.tar.7z.sha256 @@ -0,0 +1 @@ +f31d523164358999484cf11f93ffbdf0edfc495204da3fd828c9f3a9dabe28b1 *mariadb-11.4.9-debian12-x86_64.tar.7z diff --git a/mysql/prebuilt/mariadb-11.4.9-debian13-x86_64.tar.7z b/mysql/prebuilt/mariadb-11.4.9-debian13-x86_64.tar.7z new file mode 100644 index 0000000..c837539 --- /dev/null +++ b/mysql/prebuilt/mariadb-11.4.9-debian13-x86_64.tar.7z @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4e247f93879d1223f3754b04ba19226d0c875d739e97c95643345648ae75dc4e +size 16163394 diff --git a/mysql/prebuilt/mariadb-11.4.9-debian13-x86_64.tar.7z.sha256 b/mysql/prebuilt/mariadb-11.4.9-debian13-x86_64.tar.7z.sha256 new file mode 100644 index 0000000..2e9de26 --- /dev/null +++ b/mysql/prebuilt/mariadb-11.4.9-debian13-x86_64.tar.7z.sha256 @@ -0,0 +1 @@ +4e247f93879d1223f3754b04ba19226d0c875d739e97c95643345648ae75dc4e *mariadb-11.4.9-debian13-x86_64.tar.7z diff --git a/mysql/prebuilt/mariadb-11.4.9-rhel10-x86_64.tar.7z b/mysql/prebuilt/mariadb-11.4.9-rhel10-x86_64.tar.7z new file mode 100644 index 0000000..b1d3c0c --- /dev/null +++ b/mysql/prebuilt/mariadb-11.4.9-rhel10-x86_64.tar.7z @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b201f4678d4a81e780cd1b5460edf1ad5e216b3c4137bc0c4db3729983ae73ac +size 16250774 diff --git a/mysql/prebuilt/mariadb-11.4.9-rhel10-x86_64.tar.7z.sha256 b/mysql/prebuilt/mariadb-11.4.9-rhel10-x86_64.tar.7z.sha256 new file mode 100644 index 0000000..36ad2d9 --- /dev/null +++ b/mysql/prebuilt/mariadb-11.4.9-rhel10-x86_64.tar.7z.sha256 @@ -0,0 +1 @@ +b201f4678d4a81e780cd1b5460edf1ad5e216b3c4137bc0c4db3729983ae73ac *mariadb-11.4.9-rhel10-x86_64.tar.7z diff --git a/mysql/prebuilt/mariadb-11.4.9-rhel9-x86_64.tar.7z b/mysql/prebuilt/mariadb-11.4.9-rhel9-x86_64.tar.7z new file mode 100644 index 0000000..a5c46d0 --- /dev/null +++ b/mysql/prebuilt/mariadb-11.4.9-rhel9-x86_64.tar.7z @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2390fe7fdbf90c5889702132495178f1cd6a4f57f95096f94174ece777c0403d +size 16280220 diff --git a/mysql/prebuilt/mariadb-11.4.9-rhel9-x86_64.tar.7z.sha256 b/mysql/prebuilt/mariadb-11.4.9-rhel9-x86_64.tar.7z.sha256 new file mode 100644 index 0000000..b82f55e --- /dev/null +++ b/mysql/prebuilt/mariadb-11.4.9-rhel9-x86_64.tar.7z.sha256 @@ -0,0 +1 @@ +2390fe7fdbf90c5889702132495178f1cd6a4f57f95096f94174ece777c0403d *mariadb-11.4.9-rhel9-x86_64.tar.7z diff --git a/mysql/prebuilt/mariadb-11.4.9-ubuntu22-x86_64.tar.7z b/mysql/prebuilt/mariadb-11.4.9-ubuntu22-x86_64.tar.7z new file mode 100644 index 0000000..b0aa765 --- /dev/null +++ b/mysql/prebuilt/mariadb-11.4.9-ubuntu22-x86_64.tar.7z @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cbf733c9866ac3a3017f7c380bcef1a480b6fc4ae837b7623b05635d707bed17 +size 16319680 diff --git a/mysql/prebuilt/mariadb-11.4.9-ubuntu22-x86_64.tar.7z.sha256 b/mysql/prebuilt/mariadb-11.4.9-ubuntu22-x86_64.tar.7z.sha256 new file mode 100644 index 0000000..7269c39 --- /dev/null +++ b/mysql/prebuilt/mariadb-11.4.9-ubuntu22-x86_64.tar.7z.sha256 @@ -0,0 +1 @@ +cbf733c9866ac3a3017f7c380bcef1a480b6fc4ae837b7623b05635d707bed17 *mariadb-11.4.9-ubuntu22-x86_64.tar.7z diff --git a/mysql/prebuilt/mariadb-11.4.9-ubuntu24-x86_64.tar.7z b/mysql/prebuilt/mariadb-11.4.9-ubuntu24-x86_64.tar.7z new file mode 100644 index 0000000..be71c04 --- /dev/null +++ b/mysql/prebuilt/mariadb-11.4.9-ubuntu24-x86_64.tar.7z @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:043c168fc60237200011e24ade4e49751ba015d2f410bc8b83f70e09c8c8d0a3 +size 16367951 diff --git a/mysql/prebuilt/mariadb-11.4.9-ubuntu24-x86_64.tar.7z.sha256 b/mysql/prebuilt/mariadb-11.4.9-ubuntu24-x86_64.tar.7z.sha256 new file mode 100644 index 0000000..f87ebd9 --- /dev/null +++ b/mysql/prebuilt/mariadb-11.4.9-ubuntu24-x86_64.tar.7z.sha256 @@ -0,0 +1 @@ +043c168fc60237200011e24ade4e49751ba015d2f410bc8b83f70e09c8c8d0a3 *mariadb-11.4.9-ubuntu24-x86_64.tar.7z diff --git a/mysql/prebuilt/mariadb-11.8.5-debian12-x86_64.tar.7z b/mysql/prebuilt/mariadb-11.8.5-debian12-x86_64.tar.7z new file mode 100644 index 0000000..1e077c3 --- /dev/null +++ b/mysql/prebuilt/mariadb-11.8.5-debian12-x86_64.tar.7z @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:84bd1db00b96b3a827c380ccbf6f66a5a97853ea392eb97a376e520554688004 +size 16353362 diff --git a/mysql/prebuilt/mariadb-11.8.5-debian12-x86_64.tar.7z.sha256 b/mysql/prebuilt/mariadb-11.8.5-debian12-x86_64.tar.7z.sha256 new file mode 100644 index 0000000..51864f5 --- /dev/null +++ b/mysql/prebuilt/mariadb-11.8.5-debian12-x86_64.tar.7z.sha256 @@ -0,0 +1 @@ +84bd1db00b96b3a827c380ccbf6f66a5a97853ea392eb97a376e520554688004 *mariadb-11.8.5-debian12-x86_64.tar.7z diff --git a/mysql/prebuilt/mariadb-11.8.5-debian13-x86_64.tar.7z b/mysql/prebuilt/mariadb-11.8.5-debian13-x86_64.tar.7z new file mode 100644 index 0000000..a3795d4 --- /dev/null +++ b/mysql/prebuilt/mariadb-11.8.5-debian13-x86_64.tar.7z @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fe12b09bfc13127bd4aad22b9d514b3f86b9f06272c30025431b2675f5a42dc7 +size 16200973 diff --git a/mysql/prebuilt/mariadb-11.8.5-debian13-x86_64.tar.7z.sha256 b/mysql/prebuilt/mariadb-11.8.5-debian13-x86_64.tar.7z.sha256 new file mode 100644 index 0000000..3089cc5 --- /dev/null +++ b/mysql/prebuilt/mariadb-11.8.5-debian13-x86_64.tar.7z.sha256 @@ -0,0 +1 @@ +fe12b09bfc13127bd4aad22b9d514b3f86b9f06272c30025431b2675f5a42dc7 *mariadb-11.8.5-debian13-x86_64.tar.7z diff --git a/mysql/prebuilt/mariadb-11.8.5-rhel10-x86_64.tar.7z b/mysql/prebuilt/mariadb-11.8.5-rhel10-x86_64.tar.7z new file mode 100644 index 0000000..5ee877b --- /dev/null +++ b/mysql/prebuilt/mariadb-11.8.5-rhel10-x86_64.tar.7z @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f0349a6679c93db0935a71f95e7c86f4282a1ab9b2f81b8044e06ddd2ca8e9ec +size 16317045 diff --git a/mysql/prebuilt/mariadb-11.8.5-rhel10-x86_64.tar.7z.sha256 b/mysql/prebuilt/mariadb-11.8.5-rhel10-x86_64.tar.7z.sha256 new file mode 100644 index 0000000..92e6c60 --- /dev/null +++ b/mysql/prebuilt/mariadb-11.8.5-rhel10-x86_64.tar.7z.sha256 @@ -0,0 +1 @@ +f0349a6679c93db0935a71f95e7c86f4282a1ab9b2f81b8044e06ddd2ca8e9ec *mariadb-11.8.5-rhel10-x86_64.tar.7z diff --git a/mysql/prebuilt/mariadb-11.8.5-rhel9-x86_64.tar.7z b/mysql/prebuilt/mariadb-11.8.5-rhel9-x86_64.tar.7z new file mode 100644 index 0000000..786e420 --- /dev/null +++ b/mysql/prebuilt/mariadb-11.8.5-rhel9-x86_64.tar.7z @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b2375fbd371782250067146a649bb2d8ce4840da36469d9027d1273eac85faa8 +size 16373495 diff --git a/mysql/prebuilt/mariadb-11.8.5-rhel9-x86_64.tar.7z.sha256 b/mysql/prebuilt/mariadb-11.8.5-rhel9-x86_64.tar.7z.sha256 new file mode 100644 index 0000000..ff81a56 --- /dev/null +++ b/mysql/prebuilt/mariadb-11.8.5-rhel9-x86_64.tar.7z.sha256 @@ -0,0 +1 @@ +b2375fbd371782250067146a649bb2d8ce4840da36469d9027d1273eac85faa8 *mariadb-11.8.5-rhel9-x86_64.tar.7z diff --git a/mysql/prebuilt/mariadb-11.8.5-ubuntu22-x86_64.tar.7z b/mysql/prebuilt/mariadb-11.8.5-ubuntu22-x86_64.tar.7z new file mode 100644 index 0000000..f3df6bc --- /dev/null +++ b/mysql/prebuilt/mariadb-11.8.5-ubuntu22-x86_64.tar.7z @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fc8682c9e951de50f29bbbd28885772e1790f6ebd5341453346ee2ac6685c5d5 +size 16407384 diff --git a/mysql/prebuilt/mariadb-11.8.5-ubuntu22-x86_64.tar.7z.sha256 b/mysql/prebuilt/mariadb-11.8.5-ubuntu22-x86_64.tar.7z.sha256 new file mode 100644 index 0000000..c8fe93c --- /dev/null +++ b/mysql/prebuilt/mariadb-11.8.5-ubuntu22-x86_64.tar.7z.sha256 @@ -0,0 +1 @@ +fc8682c9e951de50f29bbbd28885772e1790f6ebd5341453346ee2ac6685c5d5 *mariadb-11.8.5-ubuntu22-x86_64.tar.7z diff --git a/mysql/prebuilt/mariadb-11.8.5-ubuntu24-x86_64.tar.7z b/mysql/prebuilt/mariadb-11.8.5-ubuntu24-x86_64.tar.7z new file mode 100644 index 0000000..bd59501 --- /dev/null +++ b/mysql/prebuilt/mariadb-11.8.5-ubuntu24-x86_64.tar.7z @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:41049bf30ac9c1477f94c5f852a52f523f6a7ac17facd44d4fda31f3a460f540 +size 16438794 diff --git a/mysql/prebuilt/mariadb-11.8.5-ubuntu24-x86_64.tar.7z.sha256 b/mysql/prebuilt/mariadb-11.8.5-ubuntu24-x86_64.tar.7z.sha256 new file mode 100644 index 0000000..6f4a01f --- /dev/null +++ b/mysql/prebuilt/mariadb-11.8.5-ubuntu24-x86_64.tar.7z.sha256 @@ -0,0 +1 @@ +41049bf30ac9c1477f94c5f852a52f523f6a7ac17facd44d4fda31f3a460f540 *mariadb-11.8.5-ubuntu24-x86_64.tar.7z diff --git a/mysql/prebuilt/mysql-5.7.44-debian12-x86_64.tar.7z b/mysql/prebuilt/mysql-5.7.44-debian12-x86_64.tar.7z new file mode 100644 index 0000000..70e2b0e --- /dev/null +++ b/mysql/prebuilt/mysql-5.7.44-debian12-x86_64.tar.7z @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fb338f7107380d3871f0d83dda6f4ea375c91389dda6eaa3ac0fc0ecbfc7d889 +size 8752881 diff --git a/mysql/prebuilt/mysql-5.7.44-debian12-x86_64.tar.7z.sha256 b/mysql/prebuilt/mysql-5.7.44-debian12-x86_64.tar.7z.sha256 new file mode 100644 index 0000000..3a7d045 --- /dev/null +++ b/mysql/prebuilt/mysql-5.7.44-debian12-x86_64.tar.7z.sha256 @@ -0,0 +1 @@ +fb338f7107380d3871f0d83dda6f4ea375c91389dda6eaa3ac0fc0ecbfc7d889 *mysql-5.7.44-debian12-x86_64.tar.7z diff --git a/mysql/prebuilt/mysql-5.7.44-debian13-x86_64.tar.7z b/mysql/prebuilt/mysql-5.7.44-debian13-x86_64.tar.7z new file mode 100644 index 0000000..99ae66c --- /dev/null +++ b/mysql/prebuilt/mysql-5.7.44-debian13-x86_64.tar.7z @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:30009cf3cf5205fe8fcae0b926d53cf12cf4366f4c3c34aa04e0944d29ecc6e1 +size 8825544 diff --git a/mysql/prebuilt/mysql-5.7.44-debian13-x86_64.tar.7z.sha256 b/mysql/prebuilt/mysql-5.7.44-debian13-x86_64.tar.7z.sha256 new file mode 100644 index 0000000..7eaec74 --- /dev/null +++ b/mysql/prebuilt/mysql-5.7.44-debian13-x86_64.tar.7z.sha256 @@ -0,0 +1 @@ +30009cf3cf5205fe8fcae0b926d53cf12cf4366f4c3c34aa04e0944d29ecc6e1 *mysql-5.7.44-debian13-x86_64.tar.7z diff --git a/mysql/prebuilt/mysql-5.7.44-rhel10-x86_64.tar.7z b/mysql/prebuilt/mysql-5.7.44-rhel10-x86_64.tar.7z new file mode 100644 index 0000000..a19c87a --- /dev/null +++ b/mysql/prebuilt/mysql-5.7.44-rhel10-x86_64.tar.7z @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1ebd1de2b33ec499882411148671f592b8d0002bb5f99538f223a3de6b89f129 +size 8377024 diff --git a/mysql/prebuilt/mysql-5.7.44-rhel10-x86_64.tar.7z.sha256 b/mysql/prebuilt/mysql-5.7.44-rhel10-x86_64.tar.7z.sha256 new file mode 100644 index 0000000..6802b8c --- /dev/null +++ b/mysql/prebuilt/mysql-5.7.44-rhel10-x86_64.tar.7z.sha256 @@ -0,0 +1 @@ +1ebd1de2b33ec499882411148671f592b8d0002bb5f99538f223a3de6b89f129 *mysql-5.7.44-rhel10-x86_64.tar.7z diff --git a/mysql/prebuilt/mysql-5.7.44-rhel9-x86_64.tar.7z b/mysql/prebuilt/mysql-5.7.44-rhel9-x86_64.tar.7z new file mode 100644 index 0000000..a8df1bc --- /dev/null +++ b/mysql/prebuilt/mysql-5.7.44-rhel9-x86_64.tar.7z @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:34a345035ecbed5cba12d31cb836fb6b05f872484ad569dac2b4b410b3f19e8b +size 8172833 diff --git a/mysql/prebuilt/mysql-5.7.44-rhel9-x86_64.tar.7z.sha256 b/mysql/prebuilt/mysql-5.7.44-rhel9-x86_64.tar.7z.sha256 new file mode 100644 index 0000000..3fe403d --- /dev/null +++ b/mysql/prebuilt/mysql-5.7.44-rhel9-x86_64.tar.7z.sha256 @@ -0,0 +1 @@ +34a345035ecbed5cba12d31cb836fb6b05f872484ad569dac2b4b410b3f19e8b *mysql-5.7.44-rhel9-x86_64.tar.7z diff --git a/mysql/prebuilt/mysql-5.7.44-ubuntu22-x86_64.tar.7z b/mysql/prebuilt/mysql-5.7.44-ubuntu22-x86_64.tar.7z new file mode 100644 index 0000000..55a507e --- /dev/null +++ b/mysql/prebuilt/mysql-5.7.44-ubuntu22-x86_64.tar.7z @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8634a488264962902497a4e7b31001aa6a3f597c34c05c4f95b9f4e7617a32fe +size 8847532 diff --git a/mysql/prebuilt/mysql-5.7.44-ubuntu22-x86_64.tar.7z.sha256 b/mysql/prebuilt/mysql-5.7.44-ubuntu22-x86_64.tar.7z.sha256 new file mode 100644 index 0000000..2562c3e --- /dev/null +++ b/mysql/prebuilt/mysql-5.7.44-ubuntu22-x86_64.tar.7z.sha256 @@ -0,0 +1 @@ +8634a488264962902497a4e7b31001aa6a3f597c34c05c4f95b9f4e7617a32fe *mysql-5.7.44-ubuntu22-x86_64.tar.7z diff --git a/mysql/prebuilt/mysql-5.7.44-ubuntu24-x86_64.tar.7z b/mysql/prebuilt/mysql-5.7.44-ubuntu24-x86_64.tar.7z new file mode 100644 index 0000000..a16dcdc --- /dev/null +++ b/mysql/prebuilt/mysql-5.7.44-ubuntu24-x86_64.tar.7z @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b0571d60bb1bd0509405ffb6d13f192df6d7bae4c9ebb2a74522ffe97e2f5091 +size 8933776 diff --git a/mysql/prebuilt/mysql-5.7.44-ubuntu24-x86_64.tar.7z.sha256 b/mysql/prebuilt/mysql-5.7.44-ubuntu24-x86_64.tar.7z.sha256 new file mode 100644 index 0000000..26e6462 --- /dev/null +++ b/mysql/prebuilt/mysql-5.7.44-ubuntu24-x86_64.tar.7z.sha256 @@ -0,0 +1 @@ +b0571d60bb1bd0509405ffb6d13f192df6d7bae4c9ebb2a74522ffe97e2f5091 *mysql-5.7.44-ubuntu24-x86_64.tar.7z diff --git a/mysql/prebuilt/mysql-8.0.44-debian12-x86_64.tar.7z b/mysql/prebuilt/mysql-8.0.44-debian12-x86_64.tar.7z new file mode 100644 index 0000000..965ce3b --- /dev/null +++ b/mysql/prebuilt/mysql-8.0.44-debian12-x86_64.tar.7z @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4297dbf79b08e9964d6a995ed530a982cf4b66304aea688352cab369c9c37612 +size 21459103 diff --git a/mysql/prebuilt/mysql-8.0.44-debian12-x86_64.tar.7z.sha256 b/mysql/prebuilt/mysql-8.0.44-debian12-x86_64.tar.7z.sha256 new file mode 100644 index 0000000..e1f09ab --- /dev/null +++ b/mysql/prebuilt/mysql-8.0.44-debian12-x86_64.tar.7z.sha256 @@ -0,0 +1 @@ +4297dbf79b08e9964d6a995ed530a982cf4b66304aea688352cab369c9c37612 *mysql-8.0.44-debian12-x86_64.tar.7z diff --git a/mysql/prebuilt/mysql-8.0.44-debian13-x86_64.tar.7z b/mysql/prebuilt/mysql-8.0.44-debian13-x86_64.tar.7z new file mode 100644 index 0000000..0904b7f --- /dev/null +++ b/mysql/prebuilt/mysql-8.0.44-debian13-x86_64.tar.7z @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6e209fd13739f3d6fe449d171974a890c614b864e28de2edcd5c91ce39df5c1a +size 21499684 diff --git a/mysql/prebuilt/mysql-8.0.44-debian13-x86_64.tar.7z.sha256 b/mysql/prebuilt/mysql-8.0.44-debian13-x86_64.tar.7z.sha256 new file mode 100644 index 0000000..b4de40b --- /dev/null +++ b/mysql/prebuilt/mysql-8.0.44-debian13-x86_64.tar.7z.sha256 @@ -0,0 +1 @@ +6e209fd13739f3d6fe449d171974a890c614b864e28de2edcd5c91ce39df5c1a *mysql-8.0.44-debian13-x86_64.tar.7z diff --git a/mysql/prebuilt/mysql-8.0.44-rhel10-x86_64.tar.7z b/mysql/prebuilt/mysql-8.0.44-rhel10-x86_64.tar.7z new file mode 100644 index 0000000..d74d1db --- /dev/null +++ b/mysql/prebuilt/mysql-8.0.44-rhel10-x86_64.tar.7z @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:25268c522dc6a37e9ee9001b5f4cc80f7a5bb31c45ec4e53b1af113ba4883fa4 +size 21119131 diff --git a/mysql/prebuilt/mysql-8.0.44-rhel10-x86_64.tar.7z.sha256 b/mysql/prebuilt/mysql-8.0.44-rhel10-x86_64.tar.7z.sha256 new file mode 100644 index 0000000..4a84b88 --- /dev/null +++ b/mysql/prebuilt/mysql-8.0.44-rhel10-x86_64.tar.7z.sha256 @@ -0,0 +1 @@ +25268c522dc6a37e9ee9001b5f4cc80f7a5bb31c45ec4e53b1af113ba4883fa4 *mysql-8.0.44-rhel10-x86_64.tar.7z diff --git a/mysql/prebuilt/mysql-8.0.44-rhel9-x86_64.tar.7z b/mysql/prebuilt/mysql-8.0.44-rhel9-x86_64.tar.7z new file mode 100644 index 0000000..242629d --- /dev/null +++ b/mysql/prebuilt/mysql-8.0.44-rhel9-x86_64.tar.7z @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:637f34c8dd2bf0b28afe080fcbad2d325ab859825de451f8b8a2bfff9b9ab6e9 +size 20720451 diff --git a/mysql/prebuilt/mysql-8.0.44-rhel9-x86_64.tar.7z.sha256 b/mysql/prebuilt/mysql-8.0.44-rhel9-x86_64.tar.7z.sha256 new file mode 100644 index 0000000..ac27889 --- /dev/null +++ b/mysql/prebuilt/mysql-8.0.44-rhel9-x86_64.tar.7z.sha256 @@ -0,0 +1 @@ +637f34c8dd2bf0b28afe080fcbad2d325ab859825de451f8b8a2bfff9b9ab6e9 *mysql-8.0.44-rhel9-x86_64.tar.7z diff --git a/mysql/prebuilt/mysql-8.0.44-ubuntu22-x86_64.tar.7z b/mysql/prebuilt/mysql-8.0.44-ubuntu22-x86_64.tar.7z new file mode 100644 index 0000000..e995d9b --- /dev/null +++ b/mysql/prebuilt/mysql-8.0.44-ubuntu22-x86_64.tar.7z @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:155b0c07ab46137b0e67b55bca8ecc85e22f4e5c237abba08af05b2caec8bcd1 +size 21576849 diff --git a/mysql/prebuilt/mysql-8.0.44-ubuntu22-x86_64.tar.7z.sha256 b/mysql/prebuilt/mysql-8.0.44-ubuntu22-x86_64.tar.7z.sha256 new file mode 100644 index 0000000..7046a8a --- /dev/null +++ b/mysql/prebuilt/mysql-8.0.44-ubuntu22-x86_64.tar.7z.sha256 @@ -0,0 +1 @@ +155b0c07ab46137b0e67b55bca8ecc85e22f4e5c237abba08af05b2caec8bcd1 *mysql-8.0.44-ubuntu22-x86_64.tar.7z diff --git a/mysql/prebuilt/mysql-8.0.44-ubuntu24-x86_64.tar.7z b/mysql/prebuilt/mysql-8.0.44-ubuntu24-x86_64.tar.7z new file mode 100644 index 0000000..2e3ced0 --- /dev/null +++ b/mysql/prebuilt/mysql-8.0.44-ubuntu24-x86_64.tar.7z @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:64554447adf3f7235baf070a32091e9b474a43b2098c745d52e51146a6de353d +size 21818725 diff --git a/mysql/prebuilt/mysql-8.0.44-ubuntu24-x86_64.tar.7z.sha256 b/mysql/prebuilt/mysql-8.0.44-ubuntu24-x86_64.tar.7z.sha256 new file mode 100644 index 0000000..3f26442 --- /dev/null +++ b/mysql/prebuilt/mysql-8.0.44-ubuntu24-x86_64.tar.7z.sha256 @@ -0,0 +1 @@ +64554447adf3f7235baf070a32091e9b474a43b2098c745d52e51146a6de353d *mysql-8.0.44-ubuntu24-x86_64.tar.7z diff --git a/mysql/prebuilt/mysql-8.4.7-debian12-x86_64.tar.7z b/mysql/prebuilt/mysql-8.4.7-debian12-x86_64.tar.7z new file mode 100644 index 0000000..26d7454 --- /dev/null +++ b/mysql/prebuilt/mysql-8.4.7-debian12-x86_64.tar.7z @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f22c18b2d5bf8c25529bb4a305cde3010cf2bf939e4f4b466c0c8e2125d37940 +size 21704328 diff --git a/mysql/prebuilt/mysql-8.4.7-debian12-x86_64.tar.7z.sha256 b/mysql/prebuilt/mysql-8.4.7-debian12-x86_64.tar.7z.sha256 new file mode 100644 index 0000000..53e7899 --- /dev/null +++ b/mysql/prebuilt/mysql-8.4.7-debian12-x86_64.tar.7z.sha256 @@ -0,0 +1 @@ +f22c18b2d5bf8c25529bb4a305cde3010cf2bf939e4f4b466c0c8e2125d37940 *mysql-8.4.7-debian12-x86_64.tar.7z diff --git a/mysql/prebuilt/mysql-8.4.7-debian13-x86_64.tar.7z b/mysql/prebuilt/mysql-8.4.7-debian13-x86_64.tar.7z new file mode 100644 index 0000000..9bc8768 --- /dev/null +++ b/mysql/prebuilt/mysql-8.4.7-debian13-x86_64.tar.7z @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8b4e0b6e1a100c4376cbe2dd5b31fbe8bc79073e4efd97e64581d6794a76a632 +size 22030350 diff --git a/mysql/prebuilt/mysql-8.4.7-debian13-x86_64.tar.7z.sha256 b/mysql/prebuilt/mysql-8.4.7-debian13-x86_64.tar.7z.sha256 new file mode 100644 index 0000000..d8224f8 --- /dev/null +++ b/mysql/prebuilt/mysql-8.4.7-debian13-x86_64.tar.7z.sha256 @@ -0,0 +1 @@ +8b4e0b6e1a100c4376cbe2dd5b31fbe8bc79073e4efd97e64581d6794a76a632 *mysql-8.4.7-debian13-x86_64.tar.7z diff --git a/mysql/prebuilt/mysql-8.4.7-rhel10-x86_64.tar.7z b/mysql/prebuilt/mysql-8.4.7-rhel10-x86_64.tar.7z new file mode 100644 index 0000000..2b52365 --- /dev/null +++ b/mysql/prebuilt/mysql-8.4.7-rhel10-x86_64.tar.7z @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7a73e5e93371d8b19901dc49ad4a2895bf9b96ddf8d7c6ed93dd0e84bd736f2a +size 21616496 diff --git a/mysql/prebuilt/mysql-8.4.7-rhel10-x86_64.tar.7z.sha256 b/mysql/prebuilt/mysql-8.4.7-rhel10-x86_64.tar.7z.sha256 new file mode 100644 index 0000000..83a4e32 --- /dev/null +++ b/mysql/prebuilt/mysql-8.4.7-rhel10-x86_64.tar.7z.sha256 @@ -0,0 +1 @@ +7a73e5e93371d8b19901dc49ad4a2895bf9b96ddf8d7c6ed93dd0e84bd736f2a *mysql-8.4.7-rhel10-x86_64.tar.7z diff --git a/mysql/prebuilt/mysql-8.4.7-rhel9-x86_64.tar.7z b/mysql/prebuilt/mysql-8.4.7-rhel9-x86_64.tar.7z new file mode 100644 index 0000000..03dedc9 --- /dev/null +++ b/mysql/prebuilt/mysql-8.4.7-rhel9-x86_64.tar.7z @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cf9e0abaee12ea4981d103f14ddfd5322a542fad43159b7d6a8ac817db4d7857 +size 20773588 diff --git a/mysql/prebuilt/mysql-8.4.7-rhel9-x86_64.tar.7z.sha256 b/mysql/prebuilt/mysql-8.4.7-rhel9-x86_64.tar.7z.sha256 new file mode 100644 index 0000000..475c0db --- /dev/null +++ b/mysql/prebuilt/mysql-8.4.7-rhel9-x86_64.tar.7z.sha256 @@ -0,0 +1 @@ +cf9e0abaee12ea4981d103f14ddfd5322a542fad43159b7d6a8ac817db4d7857 *mysql-8.4.7-rhel9-x86_64.tar.7z diff --git a/mysql/prebuilt/mysql-8.4.7-ubuntu22-x86_64.tar.7z b/mysql/prebuilt/mysql-8.4.7-ubuntu22-x86_64.tar.7z new file mode 100644 index 0000000..1ecade6 --- /dev/null +++ b/mysql/prebuilt/mysql-8.4.7-ubuntu22-x86_64.tar.7z @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f6678fefb4830334f1ca7e074431f17d3ba32d6538ffbaac98b236bf2ae64353 +size 21669866 diff --git a/mysql/prebuilt/mysql-8.4.7-ubuntu22-x86_64.tar.7z.sha256 b/mysql/prebuilt/mysql-8.4.7-ubuntu22-x86_64.tar.7z.sha256 new file mode 100644 index 0000000..a705df7 --- /dev/null +++ b/mysql/prebuilt/mysql-8.4.7-ubuntu22-x86_64.tar.7z.sha256 @@ -0,0 +1 @@ +f6678fefb4830334f1ca7e074431f17d3ba32d6538ffbaac98b236bf2ae64353 *mysql-8.4.7-ubuntu22-x86_64.tar.7z diff --git a/mysql/prebuilt/mysql-8.4.7-ubuntu24-x86_64.tar.7z b/mysql/prebuilt/mysql-8.4.7-ubuntu24-x86_64.tar.7z new file mode 100644 index 0000000..92c195b --- /dev/null +++ b/mysql/prebuilt/mysql-8.4.7-ubuntu24-x86_64.tar.7z @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:209e3ab92068811b188e34203f00db9f5ac5e3fda889e5c1a3be9c76df8540ec +size 22232655 diff --git a/mysql/prebuilt/mysql-8.4.7-ubuntu24-x86_64.tar.7z.sha256 b/mysql/prebuilt/mysql-8.4.7-ubuntu24-x86_64.tar.7z.sha256 new file mode 100644 index 0000000..36db927 --- /dev/null +++ b/mysql/prebuilt/mysql-8.4.7-ubuntu24-x86_64.tar.7z.sha256 @@ -0,0 +1 @@ +209e3ab92068811b188e34203f00db9f5ac5e3fda889e5c1a3be9c76df8540ec *mysql-8.4.7-ubuntu24-x86_64.tar.7z diff --git a/mysql/prebuilt/percona-5.7.44-53-debian12-x86_64.tar.7z b/mysql/prebuilt/percona-5.7.44-53-debian12-x86_64.tar.7z new file mode 100644 index 0000000..b40a157 --- /dev/null +++ b/mysql/prebuilt/percona-5.7.44-53-debian12-x86_64.tar.7z @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d945d8b40e6a0bcaed315736e46f240f02a56199950b3712fa6ad33f3fafd8fc +size 13274455 diff --git a/mysql/prebuilt/percona-5.7.44-53-debian12-x86_64.tar.7z.sha256 b/mysql/prebuilt/percona-5.7.44-53-debian12-x86_64.tar.7z.sha256 new file mode 100644 index 0000000..5dc2b16 --- /dev/null +++ b/mysql/prebuilt/percona-5.7.44-53-debian12-x86_64.tar.7z.sha256 @@ -0,0 +1 @@ +d945d8b40e6a0bcaed315736e46f240f02a56199950b3712fa6ad33f3fafd8fc *percona-5.7.44-53-debian12-x86_64.tar.7z diff --git a/mysql/prebuilt/percona-5.7.44-53-debian13-x86_64.tar.7z b/mysql/prebuilt/percona-5.7.44-53-debian13-x86_64.tar.7z new file mode 100644 index 0000000..d143e3d --- /dev/null +++ b/mysql/prebuilt/percona-5.7.44-53-debian13-x86_64.tar.7z @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:547c2f594ba60c3984d3f4079849fa7935c08d8b65c06f6b36ac235b51fa0402 +size 13453229 diff --git a/mysql/prebuilt/percona-5.7.44-53-debian13-x86_64.tar.7z.sha256 b/mysql/prebuilt/percona-5.7.44-53-debian13-x86_64.tar.7z.sha256 new file mode 100644 index 0000000..721d6b1 --- /dev/null +++ b/mysql/prebuilt/percona-5.7.44-53-debian13-x86_64.tar.7z.sha256 @@ -0,0 +1 @@ +547c2f594ba60c3984d3f4079849fa7935c08d8b65c06f6b36ac235b51fa0402 *percona-5.7.44-53-debian13-x86_64.tar.7z diff --git a/mysql/prebuilt/percona-5.7.44-53-rhel10-x86_64.tar.7z b/mysql/prebuilt/percona-5.7.44-53-rhel10-x86_64.tar.7z new file mode 100644 index 0000000..bf585ce --- /dev/null +++ b/mysql/prebuilt/percona-5.7.44-53-rhel10-x86_64.tar.7z @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6cd4a07c271f2c5c890fda516bd1cf735852b332bc0ff332b4c404a8d2de8927 +size 8887369 diff --git a/mysql/prebuilt/percona-5.7.44-53-rhel10-x86_64.tar.7z.sha256 b/mysql/prebuilt/percona-5.7.44-53-rhel10-x86_64.tar.7z.sha256 new file mode 100644 index 0000000..d955694 --- /dev/null +++ b/mysql/prebuilt/percona-5.7.44-53-rhel10-x86_64.tar.7z.sha256 @@ -0,0 +1 @@ +6cd4a07c271f2c5c890fda516bd1cf735852b332bc0ff332b4c404a8d2de8927 *percona-5.7.44-53-rhel10-x86_64.tar.7z diff --git a/mysql/prebuilt/percona-5.7.44-53-rhel9-x86_64.tar.7z b/mysql/prebuilt/percona-5.7.44-53-rhel9-x86_64.tar.7z new file mode 100644 index 0000000..5873b82 --- /dev/null +++ b/mysql/prebuilt/percona-5.7.44-53-rhel9-x86_64.tar.7z @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b4115ba305f71b5541a90a5226423ad60fab907d2b16b6498141decaea087e97 +size 12549900 diff --git a/mysql/prebuilt/percona-5.7.44-53-rhel9-x86_64.tar.7z.sha256 b/mysql/prebuilt/percona-5.7.44-53-rhel9-x86_64.tar.7z.sha256 new file mode 100644 index 0000000..5212c09 --- /dev/null +++ b/mysql/prebuilt/percona-5.7.44-53-rhel9-x86_64.tar.7z.sha256 @@ -0,0 +1 @@ +b4115ba305f71b5541a90a5226423ad60fab907d2b16b6498141decaea087e97 *percona-5.7.44-53-rhel9-x86_64.tar.7z diff --git a/mysql/prebuilt/percona-5.7.44-53-ubuntu22-x86_64.tar.7z b/mysql/prebuilt/percona-5.7.44-53-ubuntu22-x86_64.tar.7z new file mode 100644 index 0000000..5e25c1f --- /dev/null +++ b/mysql/prebuilt/percona-5.7.44-53-ubuntu22-x86_64.tar.7z @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:984f614d1062765e3225fb3afbc697d2b0a7eab89bdb29329818ed4f96e9dce6 +size 12891581 diff --git a/mysql/prebuilt/percona-5.7.44-53-ubuntu22-x86_64.tar.7z.sha256 b/mysql/prebuilt/percona-5.7.44-53-ubuntu22-x86_64.tar.7z.sha256 new file mode 100644 index 0000000..896e179 --- /dev/null +++ b/mysql/prebuilt/percona-5.7.44-53-ubuntu22-x86_64.tar.7z.sha256 @@ -0,0 +1 @@ +984f614d1062765e3225fb3afbc697d2b0a7eab89bdb29329818ed4f96e9dce6 *percona-5.7.44-53-ubuntu22-x86_64.tar.7z diff --git a/mysql/prebuilt/percona-5.7.44-53-ubuntu24-x86_64.tar.7z b/mysql/prebuilt/percona-5.7.44-53-ubuntu24-x86_64.tar.7z new file mode 100644 index 0000000..e7485fe --- /dev/null +++ b/mysql/prebuilt/percona-5.7.44-53-ubuntu24-x86_64.tar.7z @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:70c5b2bb63caa865dde581834913e3faabbb895de84ad23bbfefe828d96899d9 +size 12683970 diff --git a/mysql/prebuilt/percona-5.7.44-53-ubuntu24-x86_64.tar.7z.sha256 b/mysql/prebuilt/percona-5.7.44-53-ubuntu24-x86_64.tar.7z.sha256 new file mode 100644 index 0000000..4fb1b28 --- /dev/null +++ b/mysql/prebuilt/percona-5.7.44-53-ubuntu24-x86_64.tar.7z.sha256 @@ -0,0 +1 @@ +70c5b2bb63caa865dde581834913e3faabbb895de84ad23bbfefe828d96899d9 *percona-5.7.44-53-ubuntu24-x86_64.tar.7z diff --git a/mysql/prebuilt/percona-8.0.44-35-debian12-x86_64.tar.7z b/mysql/prebuilt/percona-8.0.44-35-debian12-x86_64.tar.7z new file mode 100644 index 0000000..a86e0ae --- /dev/null +++ b/mysql/prebuilt/percona-8.0.44-35-debian12-x86_64.tar.7z @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3df7901e036e5751dff7d8eacce5844afdf40db1e702a0e44851fc47833d8295 +size 22871209 diff --git a/mysql/prebuilt/percona-8.0.44-35-debian12-x86_64.tar.7z.sha256 b/mysql/prebuilt/percona-8.0.44-35-debian12-x86_64.tar.7z.sha256 new file mode 100644 index 0000000..cb649a6 --- /dev/null +++ b/mysql/prebuilt/percona-8.0.44-35-debian12-x86_64.tar.7z.sha256 @@ -0,0 +1 @@ +3df7901e036e5751dff7d8eacce5844afdf40db1e702a0e44851fc47833d8295 *percona-8.0.44-35-debian12-x86_64.tar.7z diff --git a/mysql/prebuilt/percona-8.0.44-35-debian13-x86_64.tar.7z b/mysql/prebuilt/percona-8.0.44-35-debian13-x86_64.tar.7z new file mode 100644 index 0000000..a87024d --- /dev/null +++ b/mysql/prebuilt/percona-8.0.44-35-debian13-x86_64.tar.7z @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f9a1b4c64eb8bb3538ef1d2158409eea7e230c1dec4af06a0ddf55d768baeb51 +size 22899429 diff --git a/mysql/prebuilt/percona-8.0.44-35-debian13-x86_64.tar.7z.sha256 b/mysql/prebuilt/percona-8.0.44-35-debian13-x86_64.tar.7z.sha256 new file mode 100644 index 0000000..658a759 --- /dev/null +++ b/mysql/prebuilt/percona-8.0.44-35-debian13-x86_64.tar.7z.sha256 @@ -0,0 +1 @@ +f9a1b4c64eb8bb3538ef1d2158409eea7e230c1dec4af06a0ddf55d768baeb51 *percona-8.0.44-35-debian13-x86_64.tar.7z diff --git a/mysql/prebuilt/percona-8.0.44-35-rhel10-x86_64.tar.7z b/mysql/prebuilt/percona-8.0.44-35-rhel10-x86_64.tar.7z new file mode 100644 index 0000000..aa96de8 --- /dev/null +++ b/mysql/prebuilt/percona-8.0.44-35-rhel10-x86_64.tar.7z @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e854b647df004770c7da3767eb687b1558f155f868095dde74aea9bca05be963 +size 22534154 diff --git a/mysql/prebuilt/percona-8.0.44-35-rhel10-x86_64.tar.7z.sha256 b/mysql/prebuilt/percona-8.0.44-35-rhel10-x86_64.tar.7z.sha256 new file mode 100644 index 0000000..03e51d8 --- /dev/null +++ b/mysql/prebuilt/percona-8.0.44-35-rhel10-x86_64.tar.7z.sha256 @@ -0,0 +1 @@ +e854b647df004770c7da3767eb687b1558f155f868095dde74aea9bca05be963 *percona-8.0.44-35-rhel10-x86_64.tar.7z diff --git a/mysql/prebuilt/percona-8.0.44-35-rhel9-x86_64.tar.7z b/mysql/prebuilt/percona-8.0.44-35-rhel9-x86_64.tar.7z new file mode 100644 index 0000000..08fcf32 --- /dev/null +++ b/mysql/prebuilt/percona-8.0.44-35-rhel9-x86_64.tar.7z @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0cfd8ffcf0b16ad25b87acd85f9e7817039063fcb11f19eb8f60539a33ee44bb +size 22190702 diff --git a/mysql/prebuilt/percona-8.0.44-35-rhel9-x86_64.tar.7z.sha256 b/mysql/prebuilt/percona-8.0.44-35-rhel9-x86_64.tar.7z.sha256 new file mode 100644 index 0000000..80b6b5b --- /dev/null +++ b/mysql/prebuilt/percona-8.0.44-35-rhel9-x86_64.tar.7z.sha256 @@ -0,0 +1 @@ +0cfd8ffcf0b16ad25b87acd85f9e7817039063fcb11f19eb8f60539a33ee44bb *percona-8.0.44-35-rhel9-x86_64.tar.7z diff --git a/mysql/prebuilt/percona-8.0.44-35-ubuntu22-x86_64.tar.7z b/mysql/prebuilt/percona-8.0.44-35-ubuntu22-x86_64.tar.7z new file mode 100644 index 0000000..0afb7d1 --- /dev/null +++ b/mysql/prebuilt/percona-8.0.44-35-ubuntu22-x86_64.tar.7z @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:600e3e0fa27ef6d089a8407beb75282ee12412173a5d27a2e4b036fd97b63745 +size 23050770 diff --git a/mysql/prebuilt/percona-8.0.44-35-ubuntu22-x86_64.tar.7z.sha256 b/mysql/prebuilt/percona-8.0.44-35-ubuntu22-x86_64.tar.7z.sha256 new file mode 100644 index 0000000..fccd8a4 --- /dev/null +++ b/mysql/prebuilt/percona-8.0.44-35-ubuntu22-x86_64.tar.7z.sha256 @@ -0,0 +1 @@ +600e3e0fa27ef6d089a8407beb75282ee12412173a5d27a2e4b036fd97b63745 *percona-8.0.44-35-ubuntu22-x86_64.tar.7z diff --git a/mysql/prebuilt/percona-8.0.44-35-ubuntu24-x86_64.tar.7z b/mysql/prebuilt/percona-8.0.44-35-ubuntu24-x86_64.tar.7z new file mode 100644 index 0000000..f01245b --- /dev/null +++ b/mysql/prebuilt/percona-8.0.44-35-ubuntu24-x86_64.tar.7z @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0e81d402039f618fb48deddb42f5ddce4b9725aa2112df53502ed44dd9b494c4 +size 23338065 diff --git a/mysql/prebuilt/percona-8.0.44-35-ubuntu24-x86_64.tar.7z.sha256 b/mysql/prebuilt/percona-8.0.44-35-ubuntu24-x86_64.tar.7z.sha256 new file mode 100644 index 0000000..f0f5040 --- /dev/null +++ b/mysql/prebuilt/percona-8.0.44-35-ubuntu24-x86_64.tar.7z.sha256 @@ -0,0 +1 @@ +0e81d402039f618fb48deddb42f5ddce4b9725aa2112df53502ed44dd9b494c4 *percona-8.0.44-35-ubuntu24-x86_64.tar.7z diff --git a/mysql/prebuilt/percona-8.4.7-7-debian12-x86_64.tar.7z b/mysql/prebuilt/percona-8.4.7-7-debian12-x86_64.tar.7z new file mode 100644 index 0000000..beda320 --- /dev/null +++ b/mysql/prebuilt/percona-8.4.7-7-debian12-x86_64.tar.7z @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8a152e9498879a55f9acd77a8ac50e94973433f75517035278a4b8c87dbe673b +size 26696743 diff --git a/mysql/prebuilt/percona-8.4.7-7-debian12-x86_64.tar.7z.sha256 b/mysql/prebuilt/percona-8.4.7-7-debian12-x86_64.tar.7z.sha256 new file mode 100644 index 0000000..ab3aff4 --- /dev/null +++ b/mysql/prebuilt/percona-8.4.7-7-debian12-x86_64.tar.7z.sha256 @@ -0,0 +1 @@ +8a152e9498879a55f9acd77a8ac50e94973433f75517035278a4b8c87dbe673b *percona-8.4.7-7-debian12-x86_64.tar.7z diff --git a/mysql/prebuilt/percona-8.4.7-7-debian13-x86_64.tar.7z b/mysql/prebuilt/percona-8.4.7-7-debian13-x86_64.tar.7z new file mode 100644 index 0000000..6182563 --- /dev/null +++ b/mysql/prebuilt/percona-8.4.7-7-debian13-x86_64.tar.7z @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:25a06592ca706e2c79ad96dcd575b5f8d1963113c7c5bad40f51b581e5dbced7 +size 26780455 diff --git a/mysql/prebuilt/percona-8.4.7-7-debian13-x86_64.tar.7z.sha256 b/mysql/prebuilt/percona-8.4.7-7-debian13-x86_64.tar.7z.sha256 new file mode 100644 index 0000000..87c4be1 --- /dev/null +++ b/mysql/prebuilt/percona-8.4.7-7-debian13-x86_64.tar.7z.sha256 @@ -0,0 +1 @@ +25a06592ca706e2c79ad96dcd575b5f8d1963113c7c5bad40f51b581e5dbced7 *percona-8.4.7-7-debian13-x86_64.tar.7z diff --git a/mysql/prebuilt/percona-8.4.7-7-rhel10-x86_64.tar.7z b/mysql/prebuilt/percona-8.4.7-7-rhel10-x86_64.tar.7z new file mode 100644 index 0000000..aae74d0 --- /dev/null +++ b/mysql/prebuilt/percona-8.4.7-7-rhel10-x86_64.tar.7z @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6351f302b892402e35621c22cd3db495d67ace5c5291a5945db6e541055d7d6a +size 26341847 diff --git a/mysql/prebuilt/percona-8.4.7-7-rhel10-x86_64.tar.7z.sha256 b/mysql/prebuilt/percona-8.4.7-7-rhel10-x86_64.tar.7z.sha256 new file mode 100644 index 0000000..2c1a973 --- /dev/null +++ b/mysql/prebuilt/percona-8.4.7-7-rhel10-x86_64.tar.7z.sha256 @@ -0,0 +1 @@ +6351f302b892402e35621c22cd3db495d67ace5c5291a5945db6e541055d7d6a *percona-8.4.7-7-rhel10-x86_64.tar.7z diff --git a/mysql/prebuilt/percona-8.4.7-7-rhel9-x86_64.tar.7z b/mysql/prebuilt/percona-8.4.7-7-rhel9-x86_64.tar.7z new file mode 100644 index 0000000..726a436 --- /dev/null +++ b/mysql/prebuilt/percona-8.4.7-7-rhel9-x86_64.tar.7z @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7f517b5124c97134b04f3297eae4721ed04bec877d4bbdaee1597b059be791ec +size 25578213 diff --git a/mysql/prebuilt/percona-8.4.7-7-rhel9-x86_64.tar.7z.sha256 b/mysql/prebuilt/percona-8.4.7-7-rhel9-x86_64.tar.7z.sha256 new file mode 100644 index 0000000..6c84a22 --- /dev/null +++ b/mysql/prebuilt/percona-8.4.7-7-rhel9-x86_64.tar.7z.sha256 @@ -0,0 +1 @@ +7f517b5124c97134b04f3297eae4721ed04bec877d4bbdaee1597b059be791ec *percona-8.4.7-7-rhel9-x86_64.tar.7z diff --git a/mysql/prebuilt/percona-8.4.7-7-ubuntu22-x86_64.tar.7z b/mysql/prebuilt/percona-8.4.7-7-ubuntu22-x86_64.tar.7z new file mode 100644 index 0000000..54f4a4b --- /dev/null +++ b/mysql/prebuilt/percona-8.4.7-7-ubuntu22-x86_64.tar.7z @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:210dc83dc5a630a325fd0fd702adb0d3e973d8d48fa32163d1423187bd355253 +size 26547254 diff --git a/mysql/prebuilt/percona-8.4.7-7-ubuntu22-x86_64.tar.7z.sha256 b/mysql/prebuilt/percona-8.4.7-7-ubuntu22-x86_64.tar.7z.sha256 new file mode 100644 index 0000000..2340f36 --- /dev/null +++ b/mysql/prebuilt/percona-8.4.7-7-ubuntu22-x86_64.tar.7z.sha256 @@ -0,0 +1 @@ +210dc83dc5a630a325fd0fd702adb0d3e973d8d48fa32163d1423187bd355253 *percona-8.4.7-7-ubuntu22-x86_64.tar.7z diff --git a/mysql/prebuilt/percona-8.4.7-7-ubuntu24-x86_64.tar.7z b/mysql/prebuilt/percona-8.4.7-7-ubuntu24-x86_64.tar.7z new file mode 100644 index 0000000..c3ce6ae --- /dev/null +++ b/mysql/prebuilt/percona-8.4.7-7-ubuntu24-x86_64.tar.7z @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:53b7abf20dffa5ad868b45ccebbb1fca878a8870fa6192679070245db47ea0d6 +size 27377080 diff --git a/mysql/prebuilt/percona-8.4.7-7-ubuntu24-x86_64.tar.7z.sha256 b/mysql/prebuilt/percona-8.4.7-7-ubuntu24-x86_64.tar.7z.sha256 new file mode 100644 index 0000000..a6fbcea --- /dev/null +++ b/mysql/prebuilt/percona-8.4.7-7-ubuntu24-x86_64.tar.7z.sha256 @@ -0,0 +1 @@ +53b7abf20dffa5ad868b45ccebbb1fca878a8870fa6192679070245db47ea0d6 *percona-8.4.7-7-ubuntu24-x86_64.tar.7z diff --git a/mysql/src/mariadb-11.4.9.7z b/mysql/src/mariadb-11.4.9.7z new file mode 100644 index 0000000..a01300d --- /dev/null +++ b/mysql/src/mariadb-11.4.9.7z @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7f65592116e8356d7f75bb285fafc615060dc693b90fd5996aa93fd4f2ca72ea +size 35863827 diff --git a/mysql/src/mariadb-11.4.9.7z.sha256 b/mysql/src/mariadb-11.4.9.7z.sha256 new file mode 100644 index 0000000..f26d3da --- /dev/null +++ b/mysql/src/mariadb-11.4.9.7z.sha256 @@ -0,0 +1 @@ +7f65592116e8356d7f75bb285fafc615060dc693b90fd5996aa93fd4f2ca72ea *mariadb-11.4.9.7z diff --git a/mysql/src/mariadb-11.8.5.7z b/mysql/src/mariadb-11.8.5.7z new file mode 100644 index 0000000..5a4c33f --- /dev/null +++ b/mysql/src/mariadb-11.8.5.7z @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8c2390d8a5c0f98b185150c5459fb24476ad94a502e256c1549f788dfd941ff8 +size 35986872 diff --git a/mysql/src/mariadb-11.8.5.7z.sha256 b/mysql/src/mariadb-11.8.5.7z.sha256 new file mode 100644 index 0000000..8672916 --- /dev/null +++ b/mysql/src/mariadb-11.8.5.7z.sha256 @@ -0,0 +1 @@ +8c2390d8a5c0f98b185150c5459fb24476ad94a502e256c1549f788dfd941ff8 *mariadb-11.8.5.7z diff --git a/mysql/src/mysql-5.7.44.7z b/mysql/src/mysql-5.7.44.7z new file mode 100644 index 0000000..8490157 --- /dev/null +++ b/mysql/src/mysql-5.7.44.7z @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ab1d4a7e7643a82c7b404f408384fe88129c0578a0cb887b17b80ef41f011015 +size 17001738 diff --git a/mysql/src/mysql-5.7.44.7z.sha256 b/mysql/src/mysql-5.7.44.7z.sha256 new file mode 100644 index 0000000..856d0d3 --- /dev/null +++ b/mysql/src/mysql-5.7.44.7z.sha256 @@ -0,0 +1 @@ +ab1d4a7e7643a82c7b404f408384fe88129c0578a0cb887b17b80ef41f011015 *mysql-5.7.44.7z diff --git a/mysql/src/mysql-8.0.44.7z b/mysql/src/mysql-8.0.44.7z new file mode 100644 index 0000000..4c30464 --- /dev/null +++ b/mysql/src/mysql-8.0.44.7z @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8c91d5f4e2b79ea791fbb5d9781d87d5e14ade39f66f4acbc3853eb49de2e0cf +size 37082472 diff --git a/mysql/src/mysql-8.0.44.7z.sha256 b/mysql/src/mysql-8.0.44.7z.sha256 new file mode 100644 index 0000000..0df7626 --- /dev/null +++ b/mysql/src/mysql-8.0.44.7z.sha256 @@ -0,0 +1 @@ +8c91d5f4e2b79ea791fbb5d9781d87d5e14ade39f66f4acbc3853eb49de2e0cf *mysql-8.0.44.7z diff --git a/mysql/src/mysql-8.4.7.7z b/mysql/src/mysql-8.4.7.7z new file mode 100644 index 0000000..619b97e --- /dev/null +++ b/mysql/src/mysql-8.4.7.7z @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:da0dc5e02b741986a1281770011719b979577d0be92acd2f850ee8f523c70041 +size 38017305 diff --git a/mysql/src/mysql-8.4.7.7z.sha256 b/mysql/src/mysql-8.4.7.7z.sha256 new file mode 100644 index 0000000..c4734b7 --- /dev/null +++ b/mysql/src/mysql-8.4.7.7z.sha256 @@ -0,0 +1 @@ +da0dc5e02b741986a1281770011719b979577d0be92acd2f850ee8f523c70041 *mysql-8.4.7.7z diff --git a/mysql/src/percona-5.7.44-53.7z b/mysql/src/percona-5.7.44-53.7z new file mode 100644 index 0000000..598895f --- /dev/null +++ b/mysql/src/percona-5.7.44-53.7z @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5af15d1a897465bb4821e9c9598d35cff1ba3bcac3ec95540e7b06be77e2eb13 +size 35405569 diff --git a/mysql/src/percona-5.7.44-53.7z.sha256 b/mysql/src/percona-5.7.44-53.7z.sha256 new file mode 100644 index 0000000..1d037c7 --- /dev/null +++ b/mysql/src/percona-5.7.44-53.7z.sha256 @@ -0,0 +1 @@ +5af15d1a897465bb4821e9c9598d35cff1ba3bcac3ec95540e7b06be77e2eb13 *percona-5.7.44-53.7z diff --git a/mysql/src/percona-8.0.44-35.7z b/mysql/src/percona-8.0.44-35.7z new file mode 100644 index 0000000..313404d --- /dev/null +++ b/mysql/src/percona-8.0.44-35.7z @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3e465dcb2d8c8ffba11bd536e28154f83fbc925509e80fe96d89b4c89a5ae3f5 +size 45490056 diff --git a/mysql/src/percona-8.0.44-35.7z.sha256 b/mysql/src/percona-8.0.44-35.7z.sha256 new file mode 100644 index 0000000..44b7cd6 --- /dev/null +++ b/mysql/src/percona-8.0.44-35.7z.sha256 @@ -0,0 +1 @@ +3e465dcb2d8c8ffba11bd536e28154f83fbc925509e80fe96d89b4c89a5ae3f5 *percona-8.0.44-35.7z diff --git a/mysql/src/percona-8.4.7-7.7z b/mysql/src/percona-8.4.7-7.7z new file mode 100644 index 0000000..b9b82f9 --- /dev/null +++ b/mysql/src/percona-8.4.7-7.7z @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a4d7a39aeed5759f826120330a4a2472e4b5d9b8356c596946853326dfe9c994 +size 50382757 diff --git a/mysql/src/percona-8.4.7-7.7z.sha256 b/mysql/src/percona-8.4.7-7.7z.sha256 new file mode 100644 index 0000000..c19b901 --- /dev/null +++ b/mysql/src/percona-8.4.7-7.7z.sha256 @@ -0,0 +1 @@ +a4d7a39aeed5759f826120330a4a2472e4b5d9b8356c596946853326dfe9c994 *percona-8.4.7-7.7z diff --git a/mysql/uninstall.sh b/mysql/uninstall.sh new file mode 100644 index 0000000..5625043 --- /dev/null +++ b/mysql/uninstall.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +source <(curl -f -s --connect-timeout 10 --retry 3 https://dl.acepanel.net/public.sh) +if [ $? -ne 0 ]; then + echo "Download public.sh failed, please check the network or try again later." + exit 1 +fi + +mysql_path="${setup_path}/server/mysql" + +systemctl stop mysqld +systemctl disable mysqld +rm -rf /etc/systemd/system/mysqld.service +systemctl daemon-reload +pkill -9 mysqld +rm -rf ${setup_path}/server/mysql + +find /usr/local/bin/ -type l -lname "${mysql_path}/bin/*" -exec rm {} \; + +userdel -r mysql +groupdel mysql + +acepanel app remove mysql +acepanel app remove percona +acepanel app remove mariadb +acepanel database delete-server --name=local_mysql + +echo -e $HR +echo "Uninstall successful" +echo -e $HR diff --git a/mysql/uninstall.sh.sha256 b/mysql/uninstall.sh.sha256 new file mode 100644 index 0000000..f92ab6e --- /dev/null +++ b/mysql/uninstall.sh.sha256 @@ -0,0 +1 @@ +95677f0f3e4d7a6ba831908c9c2eba9e02929b1a1d277e056e7dfce5c9852792 *uninstall.sh diff --git a/mysql/update.sh b/mysql/update.sh new file mode 100644 index 0000000..96059be --- /dev/null +++ b/mysql/update.sh @@ -0,0 +1,151 @@ +#!/bin/bash + +source <(curl -f -s --connect-timeout 10 --retry 3 https://dl.acepanel.net/public.sh) +if [ $? -ne 0 ]; then + echo "Download public.sh failed, please check the network or try again later." + exit 1 +fi + +channel=${1} +version=${2} +mysql_path="${setup_path}/server/mysql" +mysql_password=$(acepanel setting get mysql_root_password) + +# 预检查 +systemctl is-active --quiet mysqld +if [ "$?" != "0" ]; then + error "Application is not running properly" +fi + +# 准备目录 +cd ${mysql_path} +rm -rf src + +# 下载源码 +dl "${mysql_path}" "/mysql/percona-server-${version}.7z" + +7z x percona-server-${version}.7z +rm -f percona-server-${version}.7z +mv percona-server-${version} src +cd src + +# 编译 +mkdir build +cd build + +# 57 和 80 需要 boost 和禁用 TOKUDB +if [[ ${channel} == "57" ]] || [[ ${channel} == "80" ]]; then + WITH_BOOST="-DWITH_BOOST=../boost" + WITHOUT_TOKUDB="-DWITH_TOKUDB=0" +fi +MAX_INDEXES=255 +# MariaDB 只能设置 128 +[[ ${channel} == "mariadb" ]] && MAX_INDEXES=128 +WITH_SYSTEMD=ON +# MariaDB 要使用 yes +[[ ${channel} == "mariadb" ]] && WITH_SYSTEMD="yes" + +# 内存小于 8G 禁用 RocksDB +WITH_ROCKSDB=1 +if [ ${MEM} -lt 7900 ]; then + WITH_ROCKSDB=0 +fi + +cmake -G Ninja .. \ + -DCMAKE_C_COMPILER=gcc \ + -DCMAKE_CXX_COMPILER=g++ \ + -DCMAKE_INSTALL_PREFIX=${mysql_path} \ + -DMYSQL_DATADIR=${mysql_path}/data \ + -DSYSCONFDIR=${mysql_path}/conf \ + -DINSTALL_SYSCONFDIR=${mysql_path}/conf \ + -DWITH_MYISAM_STORAGE_ENGINE=1 \ + -DWITH_INNOBASE_STORAGE_ENGINE=1 \ + -DWITH_ARCHIVE_STORAGE_ENGINE=0 \ + -DWITH_EXAMPLE_STORAGE_ENGINE=0 \ + -DWITH_FEDERATED_STORAGE_ENGINE=0 \ + -DWITH_BLACKHOLE_STORAGE_ENGINE=0 \ + -DWITH_PARTITION_STORAGE_ENGINE=0 \ + -DWITH_NDBCLUSTER_STORAGE_ENGINE=0 \ + -DPLUGIN_CONNECT=NO \ + -DPLUGIN_COLUMNSTORE=NO \ + -DPLUGIN_SPHINX=NO \ + -DPLUGIN_SPIDER=NO \ + -DPLUGIN_S3=NO \ + -DPLUGIN_ARCHIVE=NO \ + -DPLUGIN_BLACKHOLE=NO \ + -DPLUGIN_FEDERATED=NO \ + -DPLUGIN_FEDERATEDX=NO \ + -DPLUGIN_EXAMPLE=NO \ + -DPLUGIN_PARTITION=NO \ + -DPLUGIN_PERFSCHEMA=NO \ + -DPLUGIN_MROONGA=NO \ + -DPLUGIN_ROCKSDB=NO \ + -DWITH_TOKUDB=0 \ + -DWITH_ROCKSDB=${WITH_ROCKSDB} \ + -DWITH_COREDUMPER=0 \ + -DDEFAULT_CHARSET=utf8mb4 \ + -DDEFAULT_COLLATION=utf8mb4_general_ci \ + -DMAX_INDEXES=${MAX_INDEXES} \ + -DWITH_RAPID=OFF \ + -DWITH_NDBMTD=OFF \ + -DENABLED_LOCAL_INFILE=ON \ + -DWITH_BUILD_ID=OFF \ + -DWITH_DEBUG=OFF \ + -DWITH_UNIT_TESTS=OFF \ + -DINSTALL_MYSQLTESTDIR= \ + -DCMAKE_BUILD_TYPE=Release \ + -DWITH_SYSTEMD=${WITH_SYSTEMD} \ + -DSYSTEMD_PID_DIR=${mysql_path} \ + -DWITH_EMBEDDED_SERVER=OFF \ + -DWITH_EMBEDDED_SHARED_LIBRARY=OFF \ + -DWITH_ICU=system \ + -DWITH_PROTOBUF=system \ + ${WITH_BOOST} \ + -DWITH_MYSQLX=OFF \ + -DWITH_ROUTER=OFF \ + -DWITH_MEB=OFF \ + -DWITH_GROUP_REPLICATION=OFF \ + -DWITH_LTO=ON \ + -DCOMPRESS_DEBUG_SECTIONS=ON +if [ "$?" != "0" ]; then + error "Compilation initialization failed" +fi + +ninja +if [ "$?" != "0" ]; then + error "Compilation failed" +fi + +# 停止已有服务 +systemctl stop mysqld + +# 安装 +ninja install +if [ "$?" != "0" ]; then + error "Installation failed" +fi + +# 设置权限 +chown -R mysql:mysql ${mysql_path} +chmod -R 700 ${mysql_path} + +# 启动服务 +systemctl daemon-reload +systemctl start mysqld +if [ "$?" != "0" ]; then + error "Failed to start" +fi + +# 执行更新后的初始化 +if [[ "${channel}" == "57" ]]; then + ${mysql_path}/bin/mysql_upgrade -uroot -p${mysql_password} +fi +${mysql_path}/bin/mysql -uroot -p${mysql_password} -e "DROP DATABASE test;" +${mysql_path}/bin/mysql -uroot -p${mysql_password} -e "DELETE FROM mysql.user WHERE user='';" +${mysql_path}/bin/mysql -uroot -p${mysql_password} -e "FLUSH PRIVILEGES;" + +acepanel app write mysql ${channel} ${version} + +echo -e $HR +echo "Upgrade successful" +echo -e $HR diff --git a/mysql/update.sh.sha256 b/mysql/update.sh.sha256 new file mode 100644 index 0000000..e621dae --- /dev/null +++ b/mysql/update.sh.sha256 @@ -0,0 +1 @@ +0097107082b980d3a58d2e88bb6f00c0dd460e8facfde9309c8066c66e7414d7 *update.sh diff --git a/nginx/install.sh b/nginx/install.sh new file mode 100644 index 0000000..87fde8d --- /dev/null +++ b/nginx/install.sh @@ -0,0 +1,411 @@ +#!/bin/bash + +source <(curl -f -s --connect-timeout 10 --retry 3 https://dl.acepanel.net/public.sh) +if [ $? -ne 0 ]; then + echo "Download public.sh failed, please check the network or try again later." + exit 1 +fi + +channel=${1} +version=${2} +nginx_path="${setup_path}/server/nginx" +j=$(calculate_j) + +# 安装依赖 +if [ ${OS} == "rhel" ]; then + dnf makecache -y + dnf groupinstall "Development Tools" -y + dnf install cmake tar unzip gd gd-devel git-core flex perl oniguruma oniguruma-devel libsodium-devel libxml2-devel libxslt-devel bison curl curl-devel ncurses-devel libevent-devel readline-devel libuuid-devel brotli-devel icu libicu libicu-devel openssl openssl-devel libzstd-devel -y +elif [ ${OS} == "debian" ] || [ ${OS} == "ubuntu" ]; then + apt-get update + apt-get install build-essential cmake tar unzip libgd3 libgd-dev git flex perl libonig-dev libsodium-dev libxml2-dev libxslt1-dev bison curl libcurl4-openssl-dev libncurses5-dev libevent-dev libreadline-dev uuid-dev libbrotli-dev icu-devtools libicu-dev openssl libssl-dev libzstd-dev -y +else + error "Unsupported operating system" +fi +if [ "$?" != "0" ]; then + error "Failed to install dependencies" +fi + +# 准备目录 +rm -rf ${nginx_path} +mkdir -p ${nginx_path} +cd ${nginx_path} + +# 下载源码 +dl "${nginx_path}" "/nginx/nginx-${version}.tar.gz" + +tar -zxvf nginx-${version}.tar.gz +rm -f nginx-${version}.tar.gz +mv nginx-${version} src +cd src + +# tls library +dl "${nginx_path}/src" "/tls/openssl-3.5.4.7z" + +7z x openssl-3.5.4.7z +rm -f openssl-3.5.4.7z +mv openssl-3.5.4 openssl +chmod -R 700 openssl + +# 加载 tls 模块,ktls 需要 +modprobe tls + +# pcre2 +dl "${nginx_path}/src" "/nginx/pcre/pcre2-10.46.7z" + +7z x pcre2-10.46.7z +rm -f pcre2-10.46.7z +mv pcre2-10.46 pcre2 +chmod -R 700 pcre2 + +# ngx_cache_purge +dl "${nginx_path}/src" "/nginx/modules/ngx_cache_purge-2.3.tar.gz" + +tar -zxvf ngx_cache_purge-2.3.tar.gz +rm -f ngx_cache_purge-2.3.tar.gz +mv ngx_cache_purge-2.3 ngx_cache_purge + +# nginx-sticky-module +dl "${nginx_path}/src" "/nginx/modules/nginx-sticky-module.zip" + +unzip -o nginx-sticky-module.zip +rm -f nginx-sticky-module.zip + +# nginx-dav-ext-module +dl "${nginx_path}/src" "/nginx/modules/nginx-dav-ext-module-3.0.0.tar.gz" + +tar -xvf nginx-dav-ext-module-3.0.0.tar.gz +rm -f nginx-dav-ext-module-3.0.0.tar.gz +mv nginx-dav-ext-module-3.0.0 nginx-dav-ext-module + +# ngx_http_security_headers_module +dl "${nginx_path}/src" "/nginx/modules/ngx_http_security_headers_module.zip" +unzip -o ngx_http_security_headers_module.zip +rm -f ngx_http_security_headers_module.zip + +# ngx_http_trim_filter_module +dl "${nginx_path}/src" "/nginx/modules/ngx_http_trim_filter_module.zip" +unzip -o ngx_http_trim_filter_module.zip +rm -f ngx_http_trim_filter_module.zip + +# ngx_http_zstd_module +dl "${nginx_path}/src" "/nginx/modules/ngx_http_zstd_module.zip" +unzip -o ngx_http_zstd_module.zip +rm -f ngx_http_zstd_module.zip + +# ngx_brotli +dl "${nginx_path}/src" "/nginx/modules/ngx_brotli-a71f931.zip" + +unzip -o ngx_brotli-a71f931.zip +mv ngx_brotli-a71f931 ngx_brotli +rm -f ngx_brotli-a71f931.zip +cd ngx_brotli/deps/brotli +mkdir out && cd out +cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DCMAKE_C_FLAGS="-Ofast -march=native -mtune=native -funroll-loops -ffunction-sections -fdata-sections -Wl,--gc-sections" -DCMAKE_CXX_FLAGS="-Ofast -march=native -mtune=native -funroll-loops -ffunction-sections -fdata-sections -Wl,--gc-sections" -DCMAKE_INSTALL_PREFIX=./installed .. +cmake --build . --config Release --target brotlienc +if [ "$?" != "0" ]; then + rm -rf ${nginx_path} + error "ngx_brotli compilation failed" +fi + +cd ${nginx_path}/src +chmod +x configure + +./configure --user=www --group=www \ + --prefix=${nginx_path} \ + --add-module=${nginx_path}/src/ngx_cache_purge \ + --add-module=${nginx_path}/src/nginx-sticky-module \ + --with-openssl=${nginx_path}/src/openssl \ + --with-openssl-opt="no-tests enable-ktls" \ + --with-pcre=${nginx_path}/src/pcre2 --with-pcre-jit \ + --with-ld-opt="-Wl,-s -Wl,-Bsymbolic -Wl,--gc-sections" \ + --with-cc-opt="-march=native -mtune=native -Ofast -funroll-loops -ffunction-sections -fdata-sections -Wl,--gc-sections" \ + --with-file-aio \ + --with-threads \ + --with-compat \ + --with-http_v2_module --with-http_v3_module \ + --with-http_slice_module \ + --with-stream --with-stream_ssl_module --with-stream_realip_module --with-stream_ssl_preread_module \ + --with-http_stub_status_module \ + --with-http_ssl_module \ + --with-http_image_filter_module \ + --with-http_gzip_static_module --with-http_gunzip_module \ + --with-http_sub_module \ + --with-http_flv_module \ + --with-http_addition_module \ + --with-http_realip_module \ + --with-http_mp4_module \ + --with-http_auth_request_module \ + --with-http_secure_link_module \ + --with-http_random_index_module \ + --with-http_dav_module \ + --add-module=${nginx_path}/src/nginx-dav-ext-module \ + --add-module=${nginx_path}/src/ngx_http_security_headers_module \ + --add-module=${nginx_path}/src/ngx_http_trim_filter_module \ + --add-module=${nginx_path}/src/ngx_brotli \ + --add-module=${nginx_path}/src/ngx_http_zstd_module +make "-j${j}" +if [ "$?" != "0" ]; then + rm -rf ${nginx_path} + error "Compilation failed" +fi +make install +if [ ! -f "${nginx_path}/sbin/nginx" ]; then + rm -rf ${nginx_path} + error "Installation failed" +fi + +cd ${nginx_path} + +# 设置软链接 +ln -sf ${nginx_path}/sbin/nginx /usr/local/bin/nginx + +# 创建站点目录 +mkdir -p ${setup_path}/sites +chmod -R 755 ${setup_path}/sites + +# 写入主配置文件 +mkdir -p ${nginx_path}/conf/stream +cat >${nginx_path}/conf/nginx.conf <\d+)$ { + fastcgi_pass unix:/tmp/php-cgi-\$version.sock; + include fastcgi_params; + fastcgi_param SCRIPT_FILENAME \$fastcgi_script_name; + } + } + + include ${setup_path}/sites/*/config/*.conf; +} +EOF +# 写入pathinfo配置文件 +cat >${nginx_path}/conf/pathinfo.conf <${nginx_path}/html/index.html < + + + + + AcePanel + + + +
+

AcePanel

+

This is the default page of AcePanel!

+

You see this page because the requested website was not found on this server.

+

Powered by AcePanel

+
+ + +EOF + +# 写入站点停止页 +cat >${nginx_path}/html/stop.html < + + + + + AcePanel + + + +
+

Website Suspended

+

You see this page because the website has been stopped by the server administrator.

+

Powered by AcePanel

+
+ + +EOF + +# 写入默认配置文件 +touch ${nginx_path}/conf/acme.conf + +# 写入代理默认配置文件 +cat >${nginx_path}/conf/proxy.conf <${nginx_path}/conf/default.conf </etc/systemd/system/nginx.service </dev/null | grep -qx 'loc=CN' && echo "true" || echo "false") + +# 架构映射 +case ${ARCH} in +x86_64) + NODE_ARCH="x64" + ;; +aarch64) + NODE_ARCH="arm64" + ;; +esac + +# 准备安装目录 +rm -rf ${node_path} +mkdir -p ${node_path} +cd ${node_path} + +# 下载Node.js安装包 +NODE_TARBALL="node-v${version}-linux-${NODE_ARCH}.tar.xz" + +if ${in_china}; then + # 阿里云镜像站不知道是不是抽风了,2025年5月底之后就没更新了,改用腾讯镜像站 + NODE_URL="https://mirrors.tencent.com/nodejs-release/v${version}/${NODE_TARBALL}" + echo "Downloading ${NODE_TARBALL} from Tencent mirror..." +else + NODE_URL="https://nodejs.org/dist/v${version}/${NODE_TARBALL}" + echo "Downloading ${NODE_TARBALL} from nodejs.org..." +fi + +aria2c -x8 \ + -U "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/144.0.0.0 Safari/537.36" \ + -o ${NODE_TARBALL} \ + ${NODE_URL} +if [ $? -ne 0 ]; then + rm -rf ${node_path} + error "Failed to download Node.js ${version}" +fi + +# 解压 +tar -xJf ${NODE_TARBALL} +if [ $? -ne 0 ]; then + rm -rf ${node_path} + error "Failed to extract Node.js ${version}" +fi + +# Node.js解压后会在node-v{version}-linux-{arch}目录下,移动到当前目录 +mv node-v${version}-linux-${NODE_ARCH}/* . +rmdir node-v${version}-linux-${NODE_ARCH} +rm -f ${NODE_TARBALL} + +# 验证安装 +if [ ! -f "${node_path}/bin/node" ]; then + rm -rf ${node_path} + error "Node.js ${version} installation failed" +fi + +# 设置软链接 +ln -sf ${node_path}/bin/corepack /usr/local/bin/corepack${slug} +ln -sf ${node_path}/bin/node /usr/local/bin/node${slug} +ln -sf ${node_path}/bin/npm /usr/local/bin/npm${slug} +ln -sf ${node_path}/bin/npx /usr/local/bin/npx${slug} +[ ! -f /usr/local/bin/corepack ] && ln -sf ${node_path}/bin/corepack /usr/local/bin/corepack +[ ! -f /usr/local/bin/node ] && ln -sf ${node_path}/bin/node /usr/local/bin/node +[ ! -f /usr/local/bin/npm ] && ln -sf ${node_path}/bin/npm /usr/local/bin/npm +[ ! -f /usr/local/bin/npx ] && ln -sf ${node_path}/bin/npx /usr/local/bin/npx + +# 国内设置npm镜像 +if ${in_china}; then + ${node_path}/bin/npm config set --global registry https://registry.npmmirror.com +fi + +# 创建环境变量配置 +cat >${node_path}/env.sh </dev/null | grep -qx 'loc=CN' && echo "true" || echo "false") + +# 预检查 +if [ ! -f "${node_path}/bin/node" ]; then + error "Node.js ${slug} is not installed" +fi + +# 架构映射 +case ${ARCH} in +x86_64) + NODE_ARCH="x64" + ;; +aarch64) + NODE_ARCH="arm64" + ;; +esac + +# 下载Node.js安装包 +NODE_TARBALL="node-v${version}-linux-${NODE_ARCH}.tar.xz" + +if ${in_china}; then + NODE_URL="https://mirrors.cloud.tencent.com/nodejs-release/v${version}/${NODE_TARBALL}" + echo "Downloading ${NODE_TARBALL} from Tencent mirror..." +else + NODE_URL="https://nodejs.org/dist/v${version}/${NODE_TARBALL}" + echo "Downloading ${NODE_TARBALL} from nodejs.org..." +fi + +cd ${node_path} +aria2c -x8 \ + -U "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/144.0.0.0 Safari/537.36" \ + -o ${NODE_TARBALL} \ + ${NODE_URL} +if [ $? -ne 0 ]; then + rm -f ${NODE_TARBALL} + error "Failed to download Node.js ${version}" +fi + +# 删除旧文件 +find ${node_path} -mindepth 1 ! -name "${NODE_TARBALL}" -exec rm -rf {} + 2>/dev/null + +# 解压 +tar -xJf ${NODE_TARBALL} +if [ $? -ne 0 ]; then + rm -f ${NODE_TARBALL} + error "Failed to extract Node.js ${version}" +fi + +# Node.js解压后移动到当前目录 +mv node-v${version}-linux-${NODE_ARCH}/* . +rm -rf node-v${version}-linux-${NODE_ARCH} +rm -f ${NODE_TARBALL} + +# 验证安装 +if [ ! -f "${node_path}/bin/node" ]; then + error "Node.js ${version} upgrade failed" +fi + +echo -e $HR +echo "Upgrade successful" +echo -e $HR diff --git a/nodejs/update.sh.sha256 b/nodejs/update.sh.sha256 new file mode 100644 index 0000000..2858b37 --- /dev/null +++ b/nodejs/update.sh.sha256 @@ -0,0 +1 @@ +2d707f54050dcae59ccd82497d51e47db49a4cccd93feb29f70a0a7ebbe3d7c4 *update.sh diff --git a/openresty/install.sh b/openresty/install.sh new file mode 100644 index 0000000..f929967 --- /dev/null +++ b/openresty/install.sh @@ -0,0 +1,424 @@ +#!/bin/bash + +source <(curl -f -s --connect-timeout 10 --retry 3 https://dl.acepanel.net/public.sh) +if [ $? -ne 0 ]; then + echo "Download public.sh failed, please check the network or try again later." + exit 1 +fi + +channel=${1} +version=${2} +nginx_path="${setup_path}/server/nginx" +j=$(calculate_j) + +# 安装依赖 +if [ ${OS} == "rhel" ]; then + dnf makecache -y + dnf groupinstall "Development Tools" -y + dnf install cmake tar unzip gd gd-devel git-core flex perl oniguruma oniguruma-devel libsodium-devel libxml2-devel libxslt-devel bison curl curl-devel ncurses-devel libevent-devel readline-devel libuuid-devel brotli-devel icu libicu libicu-devel openssl openssl-devel libzstd-devel -y +elif [ ${OS} == "debian" ] || [ ${OS} == "ubuntu" ]; then + apt-get update + apt-get install build-essential cmake tar unzip libgd3 libgd-dev git flex perl libonig-dev libsodium-dev libxml2-dev libxslt1-dev bison curl libcurl4-openssl-dev libncurses5-dev libevent-dev libreadline-dev uuid-dev libbrotli-dev icu-devtools libicu-dev openssl libssl-dev libzstd-dev -y +else + error "Unsupported operating system" +fi +if [ "$?" != "0" ]; then + error "Failed to install dependencies" +fi + +# 准备目录 +rm -rf ${nginx_path} +mkdir -p ${nginx_path} +cd ${nginx_path} + +# 下载源码 +dl "${nginx_path}" "/openresty/openresty-${version}.tar.gz" + +tar -zxvf openresty-${version}.tar.gz +rm -f openresty-${version}.tar.gz +mv openresty-${version} src +cd src + +# tls library +dl "${nginx_path}/src" "/tls/openssl-3.5.4.7z" + +7z x openssl-3.5.4.7z +rm -f openssl-3.5.4.7z +mv openssl-3.5.4 openssl +chmod -R 700 openssl + +# 加载 tls 模块,ktls 需要 +modprobe tls + +# OpenSSL 补丁 +cd openssl +patch -p1 <${nginx_path}/src/patches/openssl-3.5.4-sess_set_get_cb_yield.patch +if [ "$?" != "0" ]; then + rm -rf ${nginx_path} + error "OpenSSL patch application failed" +fi +cd ${nginx_path}/src + +# pcre2 +dl "${nginx_path}/src" "/nginx/pcre/pcre2-10.46.7z" + +7z x pcre2-10.46.7z +rm -f pcre2-10.46.7z +mv pcre2-10.46 pcre2 +chmod -R 700 pcre2 + +# ngx_cache_purge +dl "${nginx_path}/src" "/nginx/modules/ngx_cache_purge-2.3.tar.gz" + +tar -zxvf ngx_cache_purge-2.3.tar.gz +rm -f ngx_cache_purge-2.3.tar.gz +mv ngx_cache_purge-2.3 ngx_cache_purge + +# nginx-sticky-module +dl "${nginx_path}/src" "/nginx/modules/nginx-sticky-module.zip" + +unzip -o nginx-sticky-module.zip +rm -f nginx-sticky-module.zip + +# nginx-dav-ext-module +dl "${nginx_path}/src" "/nginx/modules/nginx-dav-ext-module-3.0.0.tar.gz" + +tar -xvf nginx-dav-ext-module-3.0.0.tar.gz +rm -f nginx-dav-ext-module-3.0.0.tar.gz +mv nginx-dav-ext-module-3.0.0 nginx-dav-ext-module + +# ngx_http_security_headers_module +dl "${nginx_path}/src" "/nginx/modules/ngx_http_security_headers_module.zip" +unzip -o ngx_http_security_headers_module.zip +rm -f ngx_http_security_headers_module.zip + +# ngx_http_trim_filter_module +dl "${nginx_path}/src" "/nginx/modules/ngx_http_trim_filter_module.zip" +unzip -o ngx_http_trim_filter_module.zip +rm -f ngx_http_trim_filter_module.zip + +# ngx_http_zstd_module +dl "${nginx_path}/src" "/nginx/modules/ngx_http_zstd_module.zip" +unzip -o ngx_http_zstd_module.zip +rm -f ngx_http_zstd_module.zip + +# ngx_brotli +dl "${nginx_path}/src" "/nginx/modules/ngx_brotli-a71f931.zip" + +unzip -o ngx_brotli-a71f931.zip +mv ngx_brotli-a71f931 ngx_brotli +rm -f ngx_brotli-a71f931.zip +cd ngx_brotli/deps/brotli +mkdir out && cd out +cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DCMAKE_C_FLAGS="-Ofast -march=native -mtune=native -funroll-loops -ffunction-sections -fdata-sections -Wl,--gc-sections" -DCMAKE_CXX_FLAGS="-Ofast -march=native -mtune=native -funroll-loops -ffunction-sections -fdata-sections -Wl,--gc-sections" -DCMAKE_INSTALL_PREFIX=./installed .. +cmake --build . --config Release --target brotlienc +if [ "$?" != "0" ]; then + rm -rf ${nginx_path} + error "ngx_brotli compilation failed" +fi + +cd ${nginx_path}/src +chmod +x configure + +./configure --user=www --group=www \ + --prefix=${nginx_path} --with-luajit \ + --add-module=${nginx_path}/src/ngx_cache_purge \ + --add-module=${nginx_path}/src/nginx-sticky-module \ + --with-openssl=${nginx_path}/src/openssl \ + --with-openssl-opt="no-tests enable-ktls" \ + --with-pcre=${nginx_path}/src/pcre2 --with-pcre-jit \ + --with-ld-opt="-Wl,-s -Wl,-Bsymbolic -Wl,--gc-sections" \ + --with-cc-opt="-DNGX_LUA_ABORT_AT_PANIC -march=native -mtune=native -Ofast -funroll-loops -ffunction-sections -fdata-sections -Wl,--gc-sections" \ + --with-luajit-xcflags="-DLUAJIT_NUMMODE=2 -DLUAJIT_ENABLE_LUA52COMPAT" \ + --with-file-aio \ + --with-threads \ + --with-compat \ + --with-http_v2_module --with-http_v3_module \ + --with-http_slice_module \ + --with-stream --with-stream_ssl_module --with-stream_realip_module --with-stream_ssl_preread_module \ + --with-http_stub_status_module \ + --with-http_ssl_module \ + --with-http_image_filter_module \ + --with-http_gzip_static_module --with-http_gunzip_module \ + --with-http_sub_module \ + --with-http_flv_module \ + --with-http_addition_module \ + --with-http_realip_module \ + --with-http_mp4_module \ + --with-http_auth_request_module \ + --with-http_secure_link_module \ + --with-http_random_index_module \ + --with-http_dav_module \ + --add-module=${nginx_path}/src/nginx-dav-ext-module \ + --add-module=${nginx_path}/src/ngx_http_security_headers_module \ + --add-module=${nginx_path}/src/ngx_http_trim_filter_module \ + --add-module=${nginx_path}/src/ngx_brotli \ + --add-module=${nginx_path}/src/ngx_http_zstd_module +make "-j${j}" +if [ "$?" != "0" ]; then + rm -rf ${nginx_path} + error "Compilation failed" +fi +make install +if [ ! -f "${nginx_path}/nginx/sbin/nginx" ]; then + rm -rf ${nginx_path} + error "Installation failed" +fi + +cd ${nginx_path} + +# 设置软链接 +ln -sf ${nginx_path}/nginx/html ${nginx_path}/html +ln -sf ${nginx_path}/nginx/conf ${nginx_path}/conf +ln -sf ${nginx_path}/nginx/logs ${nginx_path}/logs +ln -sf ${nginx_path}/nginx/sbin ${nginx_path}/sbin +ln -sf ${nginx_path}/nginx/sbin/nginx /usr/local/bin/nginx + +# 创建站点目录 +mkdir -p ${setup_path}/sites +chmod -R 755 ${setup_path}/sites + +# 写入主配置文件 +mkdir -p ${nginx_path}/conf/stream +cat >${nginx_path}/conf/nginx.conf <\d+)$ { + fastcgi_pass unix:/tmp/php-cgi-\$version.sock; + include fastcgi_params; + fastcgi_param SCRIPT_FILENAME \$fastcgi_script_name; + } + } + + include ${setup_path}/sites/*/config/*.conf; +} +EOF +# 写入pathinfo配置文件 +cat >${nginx_path}/conf/pathinfo.conf <${nginx_path}/html/index.html < + + + + + AcePanel + + + +
+

AcePanel

+

This is the default page of AcePanel!

+

You see this page because the requested website was not found on this server.

+

Powered by AcePanel

+
+ + +EOF + +# 写入站点停止页 +cat >${nginx_path}/html/stop.html < + + + + + AcePanel + + + +
+

Website Suspended

+

You see this page because the website has been stopped by the server administrator.

+

Powered by AcePanel

+
+ + +EOF + +# 写入默认配置文件 +touch ${nginx_path}/conf/acme.conf + +# 写入代理默认配置文件 +cat >${nginx_path}/conf/proxy.conf <${nginx_path}/conf/default.conf </etc/systemd/system/nginx.service <>${php_path}/etc/php.ini +echo ";The following panel flags are not allowed to be deleted, otherwise PHP extensions cannot be installed!" >>${php_path}/etc/php.ini +echo ";panel" >>${php_path}/etc/php.ini + +# 安装 zip 拓展 +cd ${php_path}/src/ext/zip +${php_path}/bin/phpize +./configure --with-php-config=${php_path}/bin/php-config +make "-j${j}" +if [ "$?" != "0" ]; then + error "zip extension compilation failed" +fi + +make install +if [ "$?" != "0" ]; then + rm -rf ${php_path} + error "PHP-${slug} zip extension installation failed" +fi + +echo "extension=zip" >>${php_path}/etc/php.ini +cd ${php_path}/src + +# 设置软链接 +ln -sf ${php_path}/bin/php /usr/local/bin/php${slug} +ln -sf ${php_path}/bin/php /usr/local/bin/php-${slug} +ln -sf ${php_path}/sbin/php-fpm /usr/local/bin/php-fpm-${slug} +[ ! -f /usr/local/bin/php ] && ln -sf ${php_path}/bin/php /usr/local/bin/php +[ ! -f /usr/local/bin/phpize ] && ln -sf ${php_path}/bin/phpize /usr/local/bin/phpize +[ ! -f /usr/local/bin/pear ] && ln -sf ${php_path}/bin/pear /usr/local/bin/pear +[ ! -f /usr/local/bin/pecl ] && ln -sf ${php_path}/bin/pecl /usr/local/bin/pecl + +# 设置fpm +cat >${php_path}/etc/php-fpm.conf <${setup_path}/sites/phpmyadmin/config/nginx.conf <${setup_path}/sites/phpmyadmin/config/apache.conf < + DocumentRoot ${setup_path}/server/phpmyadmin + ErrorLog ${setup_path}/sites/phpmyadmin/log/phpmyadmin.log + CustomLog ${setup_path}/sites/phpmyadmin/log/phpmyadmin.log combined + + Options Indexes FollowSymLinks + AllowOverride All + Require all granted + + + SetHandler "proxy:unix:/tmp/php-cgi-${php_version}.sock|fcgi://localhost/" + + +EOF +fi + +# 设置文件权限 +chown -R root:root ${setup_path}/sites/phpmyadmin/config/nginx.conf +chmod -R 644 ${setup_path}/sites/phpmyadmin/config/nginx.conf +chmod -R 755 ${phpmyadmin_path} +chown -R www:www ${phpmyadmin_path} + +# 放行端口 +firewall-cmd --permanent --zone=public --add-port=888/tcp +firewall-cmd --reload + +acepanel app write phpmyadmin ${channel} ${version} + +if [ "${webserver}" == "nginx" ]; then + systemctl reload nginx +elif [ "${webserver}" == "apache" ]; then + systemctl reload apache +fi + +echo -e $HR +echo "Installation successful" +echo -e $HR diff --git a/phpmyadmin/install.sh.sha256 b/phpmyadmin/install.sh.sha256 new file mode 100644 index 0000000..3663059 --- /dev/null +++ b/phpmyadmin/install.sh.sha256 @@ -0,0 +1 @@ +ee6542f61981e7dae332f1c1db5158096ee79a77e38b937ec8ed36ea33810e68 *install.sh diff --git a/phpmyadmin/phpMyAdmin-5.2.2-all-languages.zip b/phpmyadmin/phpMyAdmin-5.2.2-all-languages.zip new file mode 100644 index 0000000..4bff997 --- /dev/null +++ b/phpmyadmin/phpMyAdmin-5.2.2-all-languages.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6b99534f72ffb1d7275f50d23ca4141e1495c97d7cadb73a41d6dc580ed5ce29 +size 15782614 diff --git a/phpmyadmin/phpMyAdmin-5.2.2-all-languages.zip.sha256 b/phpmyadmin/phpMyAdmin-5.2.2-all-languages.zip.sha256 new file mode 100644 index 0000000..51092a4 --- /dev/null +++ b/phpmyadmin/phpMyAdmin-5.2.2-all-languages.zip.sha256 @@ -0,0 +1 @@ +6b99534f72ffb1d7275f50d23ca4141e1495c97d7cadb73a41d6dc580ed5ce29 *phpMyAdmin-5.2.2-all-languages.zip diff --git a/phpmyadmin/phpMyAdmin-5.2.3-all-languages.zip b/phpmyadmin/phpMyAdmin-5.2.3-all-languages.zip new file mode 100644 index 0000000..5f1619b --- /dev/null +++ b/phpmyadmin/phpMyAdmin-5.2.3-all-languages.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2d2e13c735366d318425c78e4ee2cc8fc648d77faba3ddea2cd516e43885733f +size 16431330 diff --git a/phpmyadmin/phpMyAdmin-5.2.3-all-languages.zip.sha256 b/phpmyadmin/phpMyAdmin-5.2.3-all-languages.zip.sha256 new file mode 100644 index 0000000..2555326 --- /dev/null +++ b/phpmyadmin/phpMyAdmin-5.2.3-all-languages.zip.sha256 @@ -0,0 +1 @@ +2d2e13c735366d318425c78e4ee2cc8fc648d77faba3ddea2cd516e43885733f *phpMyAdmin-5.2.3-all-languages.zip diff --git a/phpmyadmin/uninstall.sh b/phpmyadmin/uninstall.sh new file mode 100644 index 0000000..86c4d7a --- /dev/null +++ b/phpmyadmin/uninstall.sh @@ -0,0 +1,19 @@ +#!/bin/bash +export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:$PATH + +source <(curl -f -s --connect-timeout 10 --retry 3 https://dl.acepanel.net/public.sh) +if [ $? -ne 0 ]; then + echo "Download public.sh failed, please check the network or try again later." + exit 1 +fi + +phpmyadmin_path="${setup_path}/server/phpmyadmin" + +rm -rf ${setup_path}/sites/phpmyadmin +rm -rf ${phpmyadmin_path} +acepanel app remove phpmyadmin +systemctl reload nginx + +echo -e $HR +echo "Uninstall successful" +echo -e $HR diff --git a/phpmyadmin/uninstall.sh.sha256 b/phpmyadmin/uninstall.sh.sha256 new file mode 100644 index 0000000..88cc161 --- /dev/null +++ b/phpmyadmin/uninstall.sh.sha256 @@ -0,0 +1 @@ +74c9aa390262c3c7fc4c0dd1d1ea0f94dbe8347da1e6e8e57dc0a266b42c76ce *uninstall.sh diff --git a/podman/docker-compose-linux-aarch64.7z b/podman/docker-compose-linux-aarch64.7z new file mode 100644 index 0000000..d16ff8d --- /dev/null +++ b/podman/docker-compose-linux-aarch64.7z @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c5d82494cbe948f82597b43c1d5c29833d4985c36ad7c5aa13986ebc46b1f270 +size 11774156 diff --git a/podman/docker-compose-linux-aarch64.7z.sha256 b/podman/docker-compose-linux-aarch64.7z.sha256 new file mode 100644 index 0000000..685eb0c --- /dev/null +++ b/podman/docker-compose-linux-aarch64.7z.sha256 @@ -0,0 +1 @@ +c5d82494cbe948f82597b43c1d5c29833d4985c36ad7c5aa13986ebc46b1f270 *docker-compose-linux-aarch64.7z diff --git a/podman/docker-compose-linux-x86_64.7z b/podman/docker-compose-linux-x86_64.7z new file mode 100644 index 0000000..f57f67b --- /dev/null +++ b/podman/docker-compose-linux-x86_64.7z @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f36b1b807ccf57901cb9fd0f160526293e4ac17baf3146bb8ff16f364a69db10 +size 13711470 diff --git a/podman/docker-compose-linux-x86_64.7z.sha256 b/podman/docker-compose-linux-x86_64.7z.sha256 new file mode 100644 index 0000000..80af8c6 --- /dev/null +++ b/podman/docker-compose-linux-x86_64.7z.sha256 @@ -0,0 +1 @@ +f36b1b807ccf57901cb9fd0f160526293e4ac17baf3146bb8ff16f364a69db10 *docker-compose-linux-x86_64.7z diff --git a/podman/install.sh b/podman/install.sh new file mode 100644 index 0000000..c2f0cac --- /dev/null +++ b/podman/install.sh @@ -0,0 +1,66 @@ +#!/bin/bash +export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:$PATH + +source <(curl -f -s --connect-timeout 10 --retry 3 https://dl.acepanel.net/public.sh) +if [ $? -ne 0 ]; then + echo "Download public.sh failed, please check the network or try again later." + exit 1 +fi + +channel=${1} +version=${2} +in_china=$(curl --retry 2 -m 10 -L -k https://www.qualcomm.cn/cdn-cgi/trace 2>/dev/null | grep -qx 'loc=CN' && echo "true" || echo "false") + +if [ ${OS} == "rhel" ]; then + dnf makecache -y + dnf install podman podman-compose podman-docker -y +elif [ ${OS} == "debian" ] || [ ${OS} == "ubuntu" ]; then + apt-get update + apt-get install podman podman-compose podman-docker containers-storage -y +else + error "Unsupported operating system" +fi + +# 部分系统下可能没有 /etc/containers/storage.conf 文件 +if [ ! -f /etc/containers/storage.conf ]; then + if [ -f /usr/share/containers/storage.conf ]; then + \cp /usr/share/containers/storage.conf /etc/containers/storage.conf + else + touch /etc/containers/storage.conf + fi +fi + +[ ! -f /etc/containers/nodocker ] && touch /etc/containers/nodocker + +if ${in_china} && ! grep -q 'docker.1ms.run' /etc/containers/registries.conf; then + cat >>/etc/containers/registries.conf </proc/sys/kernel/io_uring_disabled +elif [ ${OS} == "debian" ] || [ ${OS} == "ubuntu" ]; then + apt-get update + # Debian 13+ 及 Ubuntu 25+ 需要单独安装 systemd-dev,旧版系统不能安装否则会出现严重问题 + if { [ ${OS} == "debian" ] && [ ${VERSION} -ge 13 ]; } || { [ ${OS} == "ubuntu" ] && [ ${VERSION} -ge 25 ]; }; then + apt-get install systemd-dev -y + fi + apt-get install build-essential pkg-config make meson ninja-build bison flex gettext zlib1g-dev libreadline-dev liblz4-dev libzstd-dev liburing-dev libcurl4-openssl-dev libxml2-dev libxslt-dev libssl-dev libicu-dev libsystemd-dev -y +else + error "Unsupported operating system" +fi +if [ "$?" != "0" ]; then + error "Failed to install dependencies" +fi + +user_check=$(cat /etc/passwd | grep postgres) +if [ "${user_check}" == "" ]; then + groupadd postgres + useradd -g postgres postgres +fi + +# 准备目录 +rm -rf ${postgresql_path} +mkdir -p ${postgresql_path} +cd ${postgresql_path} + +# 下载源码 +dl "${postgresql_path}" "/postgresql/postgresql-${version}.7z" + +7z x postgresql-${version}.7z +rm -f postgresql-${version}.7z +mv postgresql-${version} src + +# 编译 +cd src +meson setup build --buildtype=release --prefix=${postgresql_path} -Dnls=enabled -Dlz4=enabled -Dzstd=enabled -Dssl=openssl -Dsystemd=enabled -Dlibcurl=enabled -Dliburing=enabled -Dlibxml=enabled -Dlibxslt=enabled +if [ "$?" != "0" ]; then + rm -rf ${postgresql_path} + error "Compilation initialization failed" +fi +cd build +ninja +if [ "$?" != "0" ]; then + rm -rf ${postgresql_path} + error "Compilation failed" +fi +ninja install +if [ "$?" != "0" ]; then + rm -rf ${postgresql_path} + error "Installation failed" +fi + +cd ${postgresql_path} +rm -rf ${postgresql_path}/src + +# 配置 +mkdir -p ${postgresql_path}/data +mkdir -p ${postgresql_path}/logs +chown -R postgres:postgres ${postgresql_path} +chmod -R 700 ${postgresql_path} + +# 软链接 +ln -sf ${postgresql_path}/bin/* /usr/local/bin/ + +mkdir -p /home/postgres +cd /home/postgres +if [ -f /home/postgres/.bash_profile ]; then + echo "export PGHOME=${postgresql_path}" >>/home/postgres/.bash_profile + echo "export PGDATA=${postgresql_path}/data" >>/home/postgres/.bash_profile + echo "export PATH=${postgresql_path}/bin:\$PATH " >>/home/postgres/.bash_profile + echo "MANPATH=$PGHOME/share/man:$MANPATH" >>/home/postgres/.bash_profile + echo "LD_LIBRARY_PATH=$PGHOME/lib:$LD_LIBRARY_PATH" >>/home/postgres/.bash_profile + source /home/postgres/.bash_profile +fi +if [ -f /home/postgres/.profile ]; then + echo "export PGHOME=${postgresql_path}" >>/home/postgres/.profile + echo "export PGDATA=${postgresql_path}/data" >>/home/postgres/.profile + echo "export PATH=${postgresql_path}/bin:\$PATH " >>/home/postgres/.profile + echo "MANPATH=$PGHOME/share/man:$MANPATH" >>/home/postgres/.profile + echo "LD_LIBRARY_PATH=$PGHOME/lib:$LD_LIBRARY_PATH" >>/home/postgres/.profile + source /home/postgres/.profile +fi + +# 初始化 +postgres_password=$(cat /dev/urandom | head -n 16 | sha256sum | head -c 16) +echo ${postgres_password} >/home/postgres/.postgres_password +su - postgres -c "${postgresql_path}/bin/initdb -D ${postgresql_path}/data \ + --encoding=UTF8 --locale=C.UTF-8 --builtin-locale=C.UTF-8 --locale-provider=builtin \ + --auth-local=peer --auth-host=scram-sha-256 \ + --pwfile=/home/postgres/.postgres_password" +if [ "$?" != "0" ]; then + rm -rf ${postgresql_path} + error "PostgreSQL initialization failed" +fi +rm -f /home/postgres/.postgres_password + +# 配置 +cat >>${postgresql_path}/data/postgresql.conf </etc/systemd/system/postgresql.service <>/etc/systemd/logind.conf + systemctl restart systemd-logind +fi + +# 启动服务 +systemctl daemon-reload +systemctl enable --now postgresql +if [ "$?" != "0" ]; then + error "Failed to start" +fi + +acepanel app write postgresql ${channel} ${version} +acepanel setting write postgres_password ${postgres_password} +acepanel database add-server --type=postgresql --name=local_postgresql --host=127.0.0.1 --port=5432 --username=postgres --password=${postgres_password} + +echo -e $HR +echo "Installation successful" +echo -e $HR diff --git a/postgresql/install.sh.sha256 b/postgresql/install.sh.sha256 new file mode 100644 index 0000000..86a19c7 --- /dev/null +++ b/postgresql/install.sh.sha256 @@ -0,0 +1 @@ +426ee9ee5304f80a6c8f5495c8d7dda66ea0d1bf3a105442fb8e2eb4007c6ba4 *install.sh diff --git a/postgresql/postgresql-18.1.7z b/postgresql/postgresql-18.1.7z new file mode 100644 index 0000000..a470b65 --- /dev/null +++ b/postgresql/postgresql-18.1.7z @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8156992d1d01cebfef9f87639eb01ac16215ffda27a35cfb13778f6e9a1d247b +size 17192825 diff --git a/postgresql/postgresql-18.1.7z.sha256 b/postgresql/postgresql-18.1.7z.sha256 new file mode 100644 index 0000000..121f0bf --- /dev/null +++ b/postgresql/postgresql-18.1.7z.sha256 @@ -0,0 +1 @@ +8156992d1d01cebfef9f87639eb01ac16215ffda27a35cfb13778f6e9a1d247b *postgresql-18.1.7z diff --git a/postgresql/uninstall.sh b/postgresql/uninstall.sh new file mode 100644 index 0000000..e8c2557 --- /dev/null +++ b/postgresql/uninstall.sh @@ -0,0 +1,29 @@ +#!/bin/bash +export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:$PATH + +source <(curl -f -s --connect-timeout 10 --retry 3 https://dl.acepanel.net/public.sh) +if [ $? -ne 0 ]; then + echo "Download public.sh failed, please check the network or try again later." + exit 1 +fi + +postgresql_path="${setup_path}/server/postgresql" + +systemctl stop postgresql +systemctl disable postgresql +rm -rf /etc/systemd/system/postgresql.service +systemctl daemon-reload +pkill -9 postgresql +rm -rf ${postgresql_path} + +userdel -r postgres +groupdel postgres + +find /usr/local/bin/ -type l -lname "${postgresql_path}/bin/*" -exec rm {} \; + +acepanel app remove postgresql +acepanel database delete-server --name=local_postgresql + +echo -e $HR +echo "Uninstall successful" +echo -e $HR diff --git a/postgresql/uninstall.sh.sha256 b/postgresql/uninstall.sh.sha256 new file mode 100644 index 0000000..84387ba --- /dev/null +++ b/postgresql/uninstall.sh.sha256 @@ -0,0 +1 @@ +1985b243ab7912434ced90cd5635277723127e6805f52f4acfc095804bc56afa *uninstall.sh diff --git a/postgresql/update.sh b/postgresql/update.sh new file mode 100644 index 0000000..2de8f7c --- /dev/null +++ b/postgresql/update.sh @@ -0,0 +1,70 @@ +#!/bin/bash +export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:$PATH + +source <(curl -f -s --connect-timeout 10 --retry 3 https://dl.acepanel.net/public.sh) +if [ $? -ne 0 ]; then + echo "Download public.sh failed, please check the network or try again later." + exit 1 +fi + +channel=${1} +version=${2} +postgresql_path="${setup_path}/server/postgresql" +j=$(calculate_j) + +# 预检查 +systemctl is-active --quiet postgresql +if [ "$?" != "0" ]; then + error "Application is not running properly" +fi + +# 准备目录 +cd ${postgresql_path} +rm -rf src + +# 下载源码 +dl "${postgresql_path}" "/postgresql/postgresql-${version}.7z" + +7z x postgresql-${version}.7z +rm -f postgresql-${version}.7z +mv postgresql-${version} src + +# 编译 +cd src +meson setup build --buildtype=release --prefix=${postgresql_path} -Dnls=enabled -Dlz4=enabled -Dzstd=enabled -Dssl=openssl -Dsystemd=enabled -Dlibcurl=enabled -Dliburing=enabled -Dlibxml=enabled -Dlibxslt=enabled +if [ "$?" != "0" ]; then + error "Compilation initialization failed" +fi +cd build +ninja +if [ "$?" != "0" ]; then + error "Compilation failed" +fi + +# 停止已有服务 +systemctl stop postgresql + +ninja install +if [ "$?" != "0" ]; then + error "Installation failed" +fi + +cd ${postgresql_path} +rm -rf ${postgresql_path}/src + +# 配置 +chown -R postgres:postgres ${postgresql_path} +chmod -R 700 ${postgresql_path} + +# 启动服务 +systemctl daemon-reload +systemctl start postgresql +if [ "$?" != "0" ]; then + error "Failed to start" +fi + +acepanel app write postgresql ${channel} ${version} + +echo -e $HR +echo "Upgrade successful" +echo -e $HR diff --git a/postgresql/update.sh.sha256 b/postgresql/update.sh.sha256 new file mode 100644 index 0000000..21a21f8 --- /dev/null +++ b/postgresql/update.sh.sha256 @@ -0,0 +1 @@ +104d7e581772932bdff78dd0b76c5236e1d5f5df4f05babad86ed96415d2bcc8 *update.sh diff --git a/public.sh b/public.sh new file mode 100644 index 0000000..1705005 --- /dev/null +++ b/public.sh @@ -0,0 +1,192 @@ +#!/bin/bash +export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:$PATH +export LC_ALL=C + +export HR="+----------------------------------------------------" +export ARCH=$(uname -m) + +# alinux Alibaba Cloud Linux +# hce Huawei Cloud EulerOS +# openEuler openEuler +export OS=$(source /etc/os-release && { + if [[ "$ID" == "ubuntu" ]]; then + echo "ubuntu" + elif [[ "$ID" == "debian" ]]; then + echo "debian" + elif [[ "$ID" == "rhel" ]] || [[ "$ID" == "almalinux" ]] || [[ "$ID" == "rocky" ]] || [[ "$ID" == "alinux" ]] || [[ "$ID" == "tencentos" ]] || [[ "$ID" == "opencloudos" ]]; then + echo "rhel" + elif [[ "$ID_LIKE" =~ "ubuntu" ]]; then + echo "ubuntu" + elif [[ "$ID_LIKE" =~ "debian" ]]; then + echo "debian" + elif [[ "$ID_LIKE" =~ "rhel" ]]; then + echo "rhel" + else + echo "unknown" + fi +}) +export VERSION=$(source /etc/os-release && { + if [[ -n "$VERSION_ID" ]]; then + echo "$VERSION_ID" | cut -d'.' -f1 + elif [[ -n "$VERSION" ]]; then + echo "$VERSION" | grep -oE '[0-9]+(\.[0-9]+)*' | head -1 | cut -d'.' -f1 + else + echo "0" + fi +}) +export CORES=$(nproc) +export MEM=$(LC_ALL=C free -m | grep Mem | awk '{print $2}') +export SWAP=$(LC_ALL=C free -m | grep Swap | awk '{print $2}') + +export download_endpoint="https://dl.acepanel.net" +export setup_path="/opt/ace" + +# 从配置文件中读取 setup_path +if [ -f /opt/ace/panel/storage/config.yml ]; then + download_endpoint="https://$(grep download_endpoint /opt/ace/panel/storage/config.yml | awk '{gsub(/["'\'']/, "", $2); print $2}')" + setup_path=$(grep root /opt/ace/panel/storage/config.yml | awk '{gsub(/["'\'']/, "", $2); print $2}') +fi + +# 计算 j 值(通用) +calculate_j() { + total=$((MEM + SWAP)) + j_value=$((total / 1024)) + + [ "$j_value" -eq 0 ] && j_value=1 + [ "$j_value" -gt "$CORES" ] && j_value=$CORES + [ "$j_value" -gt 1 ] && j_value=$((j_value - 1)) # 大于1则减1 + + echo "$j_value" +} + +# 计算 j 值(2倍内存) +calculate_j2() { + total=$((MEM + SWAP)) + j_value=$((total / 2024)) + + [ "$j_value" -eq 0 ] && j_value=1 + [ "$j_value" -gt "$CORES" ] && j_value=$CORES + [ "$j_value" -gt 1 ] && j_value=$((j_value - 1)) # 大于1则减1 + + echo "$j_value" +} + +# 系统信息 +sys_info() { + dir=$(pwd) + cd /tmp || cd / + + if [ -f /etc/os-release ]; then + system_version=$(grep PRETTY_NAME /etc/os-release | awk -F '"' '{print $2}') + else + system_version="unknown" + fi + + kernel_version=$(uname -a) + bitness=$(getconf LONG_BIT)-bit + cpu_name=$(lscpu | grep "^Model name:" | awk -F: '{print $2}' | sed 's/^[ \t]*//') + cpu_flags=$(lscpu | grep "^Flags:" | awk -F: '{print $2}' | sed 's/^[ \t]*//' | sed 's/ /,/g') + + if command -v gcc >/dev/null 2>&1; then + gcc_version=$(gcc -v 2>&1 | tail -n1 | awk '{print $3}') + else + gcc_version="no gcc" + fi + + if command -v cmake >/dev/null 2>&1; then + cmake_version=$(cmake --version | head -n1 | awk '{print $3}') + else + cmake_version="no cmake" + fi + + echo -e $HR + echo -e "| Kernel: $kernel_version" + echo -e "| CPU: $cpu_name | Arch: $ARCH | Core: $CORES" + echo -e "| OS: $system_version | Bit: $bitness | Mem: $MEM | Swap: $SWAP | gcc: $gcc_version | cmake: $cmake_version" + echo -e $HR + + [ -d "$dir" ] && cd "$dir" +} + +# 下载及校验 +# 参数1:本地保存目录 +# 参数2:服务器文件路径 +# 参数3:本地保存文件名(可选,默认从 URL 中获取) +dl() { + local current="$(pwd)" + local save_dir="$1" + local url="${download_endpoint}$2" + local url_no_q="${url%%\?*}" + local filename="${3:-$(basename "$url_no_q")}" + + [[ -z "$save_dir" || -z "$url" ]] && { error "dl function parameter error"; } + + mkdir -p "$save_dir" + + # 检测可用的下载工具 + local downloader="" + if command -v aria2c >/dev/null 2>&1; then + downloader="aria2" + elif command -v wget >/dev/null 2>&1; then + downloader="wget" + elif command -v curl >/dev/null 2>&1; then + downloader="curl" + else + error "No download tool found. Please install aria2, wget or curl." + fi + + case "$downloader" in + aria2) + local aria2_opts=( + -c + --file-allocation=falloc + --allow-overwrite=true + --auto-file-renaming=false + --console-log-level=notice + --summary-interval=2 + --retry-wait=5 + --max-tries=5 + -x 16 + -s 16 + -k 1M + ) + aria2c "${aria2_opts[@]}" \ + -d "$save_dir" \ + -o "$filename" \ + "$url" || { error "Failed to download ${url}"; } + aria2c "${aria2_opts[@]}" \ + -d "$save_dir" \ + -o "${filename}.sha256" \ + "${url}.sha256" || { error "Failed to download ${url}.sha256"; } + ;; + wget) + wget -c -t 5 -T 30 -O "${save_dir}/${filename}" "$url" || { error "Failed to download ${url}"; } + wget -c -t 5 -T 30 -O "${save_dir}/${filename}.sha256" "${url}.sha256" || { error "Failed to download ${url}.sha256"; } + ;; + curl) + curl -L -C - --retry 5 --retry-delay 5 -o "${save_dir}/${filename}" "$url" || { error "Failed to download ${url}"; } + curl -L -C - --retry 5 --retry-delay 5 -o "${save_dir}/${filename}.sha256" "${url}.sha256" || { error "Failed to download ${url}.sha256"; } + ;; + esac + + cd "$save_dir" + + sha256sum --status -c "${filename}.sha256" || { + rm -f "${filename}" "${filename}.sha256" + cd "$current" + error "Failed to verify ${save_dir}/${filename}" + } + + rm -f "${filename}.sha256" + cd "$current" +} + +# 错误输出 +error() { + echo -e $HR + echo -e "| Error: $1" + echo -e "| 可截图错误信息寻求帮助,或者联系面板官方支持。" + echo -e "| Take a screenshot of the error message for help, or contact the panel official support." + sys_info + exit 1 +} diff --git a/public.sh.sha256 b/public.sh.sha256 new file mode 100644 index 0000000..a6c8259 --- /dev/null +++ b/public.sh.sha256 @@ -0,0 +1 @@ +2f6b12f68a843295687628ece1c872cbe39bc37d30b2dd10e25fdfbfa42e72ad *public.sh diff --git a/pureftpd/install.sh b/pureftpd/install.sh new file mode 100644 index 0000000..2f8dc9d --- /dev/null +++ b/pureftpd/install.sh @@ -0,0 +1,123 @@ +#!/bin/bash +export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:$PATH + +source <(curl -f -s --connect-timeout 10 --retry 3 https://dl.acepanel.net/public.sh) +if [ $? -ne 0 ]; then + echo "Download public.sh failed, please check the network or try again later." + exit 1 +fi + +channel=${1} +version=${2} +pureftpd_path="${setup_path}/server/pure-ftpd" +j=$(calculate_j) + +# 安装依赖 +if [ ${OS} == "rhel" ]; then + dnf makecache -y + dnf groupinstall "Development Tools" -y + dnf install openssl-devel -y +elif [ ${OS} == "debian" ] || [ ${OS} == "ubuntu" ]; then + apt-get update + apt-get install build-essential -y + apt-get install libssl-dev -y +else + error "Unsupported operating system" +fi +if [ "$?" != "0" ]; then + error "Failed to install dependencies" +fi + +# 准备安装目录 +rm -rf ${pureftpd_path} +mkdir -p ${pureftpd_path} +cd ${pureftpd_path} + +dl "${pureftpd_path}" "/pureftpd/pure-ftpd-${version}.tar.gz" + +tar -xvf pure-ftpd-${version}.tar.gz +rm -f pure-ftpd-${version}.tar.gz +mv pure-ftpd-${version} src +cd src +chmod +x configure + +./configure --prefix=${pureftpd_path} CFLAGS=-O2 --with-puredb --with-quotas --with-cookie --with-virtualhosts --with-diraliases --with-sysquotas --with-ratios --with-altlog --with-paranoidmsg --with-shadow --with-welcomemsg --with-throttling --with-uploadscript --with-language=simplified-chinese --with-rfc2640 --with-ftpwho --with-tls +if [ "$?" != "0" ]; then + rm -rf ${pureftpd_path} + error "Compilation initialization failed" +fi + +make "-j${j}" +if [ "$?" != "0" ]; then + rm -rf ${pureftpd_path} + error "Compilation failed" +fi + +make install +if [ ! -f "${pureftpd_path}/bin/pure-pw" ]; then + rm -rf ${pureftpd_path} + error "Installation failed" +fi + +# 修改 pure-ftpd 配置文件 +sed -i "s!# PureDB\s*/etc/pureftpd.pdb!PureDB ${pureftpd_path}/etc/pureftpd.pdb!" ${pureftpd_path}/etc/pure-ftpd.conf +sed -i 's!# ChrootEveryone\s*yes!ChrootEveryone yes!' ${pureftpd_path}/etc/pure-ftpd.conf +sed -i 's!NoAnonymous\s*no!NoAnonymous yes!' ${pureftpd_path}/etc/pure-ftpd.conf +sed -i 's!AnonymousCanCreateDirs\s*yes!AnonymousCanCreateDirs no!' ${pureftpd_path}/etc/pure-ftpd.conf +sed -i 's!AnonymousCantUpload\s*yes!AnonymousCantUpload no!' ${pureftpd_path}/etc/pure-ftpd.conf +sed -i 's!PAMAuthentication\s*yes!PAMAuthentication no!' ${pureftpd_path}/etc/pure-ftpd.conf +sed -i 's!UnixAuthentication\s*yes!UnixAuthentication no!' ${pureftpd_path}/etc/pure-ftpd.conf +sed -i 's!# PassivePortRange\s*30000 50000!PassivePortRange 39000 40000!' ${pureftpd_path}/etc/pure-ftpd.conf +sed -i 's!PassivePortRange\s*30000 50000!PassivePortRange 39000 40000!' ${pureftpd_path}/etc/pure-ftpd.conf +sed -i 's!LimitRecursion\s*10000 8!LimitRecursion 20000 8!' ${pureftpd_path}/etc/pure-ftpd.conf +sed -i 's!# TLS!TLS!' ${pureftpd_path}/etc/pure-ftpd.conf +sed -i "s!# CertFile\s*/etc/ssl/private/pure-ftpd.pem!CertFile ${pureftpd_path}/etc/pure-ftpd.pem!" ${pureftpd_path}/etc/pure-ftpd.conf +sed -i 's!# Bind\s*127.0.0.1,21!Bind 0.0.0.0,21!' ${pureftpd_path}/etc/pure-ftpd.conf +sed -i 's!# Bind\s*0.0.0.0,21!Bind 0.0.0.0,21!' ${pureftpd_path}/etc/pure-ftpd.conf +sed -i "s!# PIDFile\s*/var/run/pure-ftpd.pid!PIDFile ${pureftpd_path}/etc/pure-ftpd.pid!" ${pureftpd_path}/etc/pure-ftpd.conf +touch ${pureftpd_path}/etc/pureftpd.passwd +touch ${pureftpd_path}/etc/pureftpd.pdb + +openssl dhparam -out ${pureftpd_path}/etc/pure-ftpd-dhparams.pem 2048 +openssl req -x509 -nodes -days 36500 -newkey rsa:2048 -sha256 -keyout ${pureftpd_path}/etc/pure-ftpd.pem -out ${pureftpd_path}/etc/pure-ftpd.pem -subj "/C=CN/ST=Tianjin/L=Tianjin/O=Rat Technology Co., Ltd./OU=AcePanel/CN=Panel" +chmod 600 ${pureftpd_path}/etc/*.pem + +# 添加系统服务 +ln -sf ${pureftpd_path}/bin/pure-pw /usr/local/bin/pure-pw + +cat >/etc/systemd/system/pure-ftpd.service </dev/null | grep -qx 'loc=CN' && echo "true" || echo "false") +j=$(calculate_j) + +# 安装依赖 +if [ ${OS} == "rhel" ]; then + dnf makecache + dnf groupinstall "Development Tools" -y + dnf install openssl-devel zlib-devel libffi-devel readline-devel sqlite-devel bzip2-devel xz-devel ncurses-devel gdbm-devel tk-devel libuuid-devel -y +elif [ ${OS} == "debian" ] || [ ${OS} == "ubuntu" ]; then + apt-get update + apt-get install build-essential libssl-dev zlib1g-dev libffi-dev libreadline-dev libsqlite3-dev libbz2-dev liblzma-dev libncurses5-dev libgdbm-dev tk-dev uuid-dev -y +else + error "Unsupported operating system" +fi +if [ "$?" != "0" ]; then + error "Failed to install dependencies" +fi + +# 准备安装目录 +rm -rf ${python_path} +mkdir -p ${python_path} +cd ${python_path} + +# 下载Python源码 +PYTHON_TARBALL="Python-${version}.tar.xz" + +if ${in_china}; then + PYTHON_URL="https://mirrors.aliyun.com/python-release/source/${PYTHON_TARBALL}" + echo "Downloading ${PYTHON_TARBALL} from Aliyun mirror..." +else + PYTHON_URL="https://www.python.org/ftp/python/${version}/${PYTHON_TARBALL}" + echo "Downloading ${PYTHON_TARBALL} from python.org..." +fi + +aria2c -x8 \ + -U "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/144.0.0.0 Safari/537.36" \ + -o ${PYTHON_TARBALL} \ + ${PYTHON_URL} +if [ $? -ne 0 ]; then + rm -rf ${python_path} + error "Failed to download Python ${version}" +fi + +# 解压 +tar -xJf ${PYTHON_TARBALL} +if [ $? -ne 0 ]; then + rm -rf ${python_path} + error "Failed to extract Python ${version}" +fi + +mv Python-${version} src +rm -f ${PYTHON_TARBALL} + +# 仅在高配置服务器上启用优化 +[ ${MEM} -ge 15000 ] && [ ${CORES} -ge 8 ] && OPTIMIZE_FLAG="--enable-optimizations --with-lto" || OPTIMIZE_FLAG="" + +# 编译安装 +cd src +./configure --prefix=${python_path} ${OPTIMIZE_FLAG} --enable-shared LDFLAGS="-Wl,-rpath,${python_path}/lib" +if [ $? -ne 0 ]; then + rm -rf ${python_path} + error "Configure failed" +fi + +make "-j${j}" +if [ $? -ne 0 ]; then + rm -rf ${python_path} + error "Compilation failed" +fi + +make install +if [ ! -f "${python_path}/bin/python3" ]; then + rm -rf ${python_path} + error "Python ${version} installation failed" +fi + +# 清理源码 +cd ${python_path} +rm -rf src + +# 设置软链接 +ln -sf ${python_path}/bin/python3 /usr/local/bin/python${slug} +ln -sf ${python_path}/bin/pip3 /usr/local/bin/pip${slug} +[ ! -f /usr/local/bin/python3 ] && ln -sf ${python_path}/bin/python3 /usr/local/bin/python3 +[ ! -f /usr/local/bin/pip3 ] && ln -sf ${python_path}/bin/pip3 /usr/local/bin/pip3 + +# 国内设置pip镜像 +if ${in_china}; then + ${python_path}/bin/pip3 config --global set global.index-url https://mirrors.tencent.com/pypi/simple/ +fi + +# 创建环境变量配置 +cat >${python_path}/env.sh </dev/null | grep -qx 'loc=CN' && echo "true" || echo "false") +j=$(calculate_j) + +# 预检查 +if [ ! -f "${python_path}/bin/python3" ]; then + error "Python ${slug} is not installed" +fi + +# 下载Python源码 +PYTHON_TARBALL="Python-${version}.tar.xz" + +if ${in_china}; then + PYTHON_URL="https://mirrors.aliyun.com/python-release/source/${PYTHON_TARBALL}" + echo "Downloading ${PYTHON_TARBALL} from Aliyun mirror..." +else + PYTHON_URL="https://www.python.org/ftp/python/${version}/${PYTHON_TARBALL}" + echo "Downloading ${PYTHON_TARBALL} from python.org..." +fi + +cd ${python_path} +rm -rf src +aria2c -x8 \ + -U "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/144.0.0.0 Safari/537.36" \ + -o ${PYTHON_TARBALL} \ + ${PYTHON_URL} +if [ $? -ne 0 ]; then + error "Failed to download Python ${version}" +fi + +# 解压 +tar -xJf ${PYTHON_TARBALL} +if [ $? -ne 0 ]; then + rm -f ${PYTHON_TARBALL} + error "Failed to extract Python ${version}" +fi + +mv Python-${version} src +rm -f ${PYTHON_TARBALL} + +# 仅在高配置服务器上启用优化 +[ ${MEM} -ge 15000 ] && [ ${CORES} -ge 8 ] && OPTIMIZE_FLAG="--enable-optimizations --with-lto" || OPTIMIZE_FLAG="" + +# 编译安装 +cd src +./configure --prefix=${python_path} ${OPTIMIZE_FLAG} --enable-shared LDFLAGS="-Wl,-rpath,${python_path}/lib" +if [ $? -ne 0 ]; then + error "Configure failed" +fi + +make "-j${j}" +if [ $? -ne 0 ]; then + error "Compilation failed" +fi + +make install +if [ ! -f "${python_path}/bin/python3" ]; then + error "Python ${version} upgrade failed" +fi + +# 清理源码 +cd ${python_path} +rm -rf src + +echo -e $HR +echo "Upgrade successful" +echo -e $HR diff --git a/python/update.sh.sha256 b/python/update.sh.sha256 new file mode 100644 index 0000000..6271f56 --- /dev/null +++ b/python/update.sh.sha256 @@ -0,0 +1 @@ +af51bb8eb5e4aa924938576afa624ad58d5ca06b717d73a9078c68d6831c0f6b *update.sh diff --git a/redis/install.sh b/redis/install.sh new file mode 100644 index 0000000..8a60fae --- /dev/null +++ b/redis/install.sh @@ -0,0 +1,98 @@ +#!/bin/bash +export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:$PATH + +source <(curl -f -s --connect-timeout 10 --retry 3 https://dl.acepanel.net/public.sh) +if [ $? -ne 0 ]; then + echo "Download public.sh failed, please check the network or try again later." + exit 1 +fi + +channel=${1} +version=${2} +redis_path="${setup_path}/server/redis" + +if ! id -u "redis" >/dev/null 2>&1; then + groupadd redis + useradd -s /sbin/nologin -g redis redis +fi + +# 安装依赖 +if [ ${OS} == "rhel" ]; then + dnf makecache -y + dnf groupinstall "Development Tools" -y + dnf install systemd-devel openssl-devel -y +elif [ ${OS} == "debian" ] || [ ${OS} == "ubuntu" ]; then + apt-get update + # Debian 13+ 及 Ubuntu 25+ 需要单独安装 systemd-dev,旧版系统不能安装否则会出现严重问题 + if { [ ${OS} == "debian" ] && [ ${VERSION} -ge 13 ]; } || { [ ${OS} == "ubuntu" ] && [ ${VERSION} -ge 25 ]; }; then + apt-get install systemd-dev -y + fi + apt-get install build-essential libsystemd-dev libssl-dev -y +else + error "Unsupported operating system" +fi +if [ "$?" != "0" ]; then + error "Failed to install dependencies" +fi + +# 准备目录 +rm -rf ${redis_path} +mkdir -p ${redis_path} +cd ${redis_path} + +# 下载源码 +dl "${redis_path}" "/redis/redis-${version}.zip" + +unzip -o redis-${version}.zip +rm -f redis-${version}.zip +mv redis-${version}/* ./ && rm -rf redis-${version} +mkdir -p ${redis_path}/bin + +make BUILD_TLS=yes USE_SYSTEMD=yes -j${CORES} +if [ "$?" != "0" ]; then + rm -rf ${redis_path} + error "Compilation failed" +fi +make PREFIX=${redis_path} install +if [ ! -f "${redis_path}/bin/redis-server" ]; then + rm -rf ${redis_path} + error "Installation failed" +fi + +# 设置软链接 +ln -sf ${redis_path}/bin/* /usr/local/bin/ + +sed -i "s|dir \./|dir ${redis_path}/|g" ${redis_path}/redis.conf +sed -i 's/# supervised.*/supervised systemd/g' ${redis_path}/redis.conf +sed -i 's/# maxmemory-policy.*/maxmemory-policy volatile-lfu/g' ${redis_path}/redis.conf +sed -i 's|pidfile.*|pidfile ${redis_path}/redis.pid|g' ${redis_path}/redis.conf + +if [ ${ARCH} == "aarch64" ]; then + echo "ignore-warnings ARM64-COW-BUG" >>${redis_path}/redis.conf +fi + +chown -R redis:redis ${redis_path} +chmod -R 700 ${redis_path} + +# 设置服务 +\cp -f utils/systemd-redis_server.service /etc/systemd/system/redis.service +sed -i "s!ExecStart=.*!ExecStart=${redis_path}/bin/redis-server ${redis_path}/redis.conf!g" /etc/systemd/system/redis.service +sed -i "s!#User=.*!User=redis!g" /etc/systemd/system/redis.service +sed -i "s!#Group=.*!Group=redis!g" /etc/systemd/system/redis.service +sed -i "s!#WorkingDirectory=.*!WorkingDirectory=${redis_path}!g" /etc/systemd/system/redis.service +sed -i "s!TimeoutStartSec=.*!TimeoutStartSec=30s!g" /etc/systemd/system/redis.service +sed -i "s!TimeoutStopSec=.*!TimeoutStopSec=30s!g" /etc/systemd/system/redis.service + +chmod 644 /etc/systemd/system/redis.service + +systemctl daemon-reload +systemctl enable --now redis +if [ "$?" != "0" ]; then + error "Failed to start" +fi + +acepanel app write redis ${channel} ${version} + +echo -e $HR +echo "Installation successful" +echo -e $HR diff --git a/redis/install.sh.sha256 b/redis/install.sh.sha256 new file mode 100644 index 0000000..28638f7 --- /dev/null +++ b/redis/install.sh.sha256 @@ -0,0 +1 @@ +44dc5f9747c995d89e773b2dcc38d1f287f21412c7ce8385adb65196c49bd512 *install.sh diff --git a/redis/redis-8.2.3.zip b/redis/redis-8.2.3.zip new file mode 100644 index 0000000..e012abb --- /dev/null +++ b/redis/redis-8.2.3.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:09d4653d6cb5e79805a71fde4c538c9759f235ca37b7f786787785f3e1b16b2d +size 4714732 diff --git a/redis/redis-8.2.3.zip.sha256 b/redis/redis-8.2.3.zip.sha256 new file mode 100644 index 0000000..ba47183 --- /dev/null +++ b/redis/redis-8.2.3.zip.sha256 @@ -0,0 +1 @@ +09d4653d6cb5e79805a71fde4c538c9759f235ca37b7f786787785f3e1b16b2d *redis-8.2.3.zip diff --git a/redis/redis-8.4.0.zip b/redis/redis-8.4.0.zip new file mode 100644 index 0000000..ef85da8 --- /dev/null +++ b/redis/redis-8.4.0.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b3d9d2a2e512526441221c78b0ce262296fc52fdd152cfa2617ca6b1ba3f5166 +size 4935017 diff --git a/redis/redis-8.4.0.zip.sha256 b/redis/redis-8.4.0.zip.sha256 new file mode 100644 index 0000000..ffbac01 --- /dev/null +++ b/redis/redis-8.4.0.zip.sha256 @@ -0,0 +1 @@ +b3d9d2a2e512526441221c78b0ce262296fc52fdd152cfa2617ca6b1ba3f5166 *redis-8.4.0.zip diff --git a/redis/uninstall.sh b/redis/uninstall.sh new file mode 100644 index 0000000..409d4d2 --- /dev/null +++ b/redis/uninstall.sh @@ -0,0 +1,23 @@ +#!/bin/bash +export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:$PATH + +source <(curl -f -s --connect-timeout 10 --retry 3 https://dl.acepanel.net/public.sh) +if [ $? -ne 0 ]; then + echo "Download public.sh failed, please check the network or try again later." + exit 1 +fi + +systemctl stop redis +systemctl disable redis +rm -rf /etc/systemd/system/redis.service +systemctl daemon-reload +pkill -9 redis +rm -rf ${setup_path}/server/redis + +rm -rf /usr/local/bin/redis-* + +acepanel app remove redis + +echo -e $HR +echo "Uninstall successful" +echo -e $HR diff --git a/redis/uninstall.sh.sha256 b/redis/uninstall.sh.sha256 new file mode 100644 index 0000000..a4d6cb0 --- /dev/null +++ b/redis/uninstall.sh.sha256 @@ -0,0 +1 @@ +2592c54dbd1237c6f1acec58719052613c09057372456c26f3ea5c0f4a8cae07 *uninstall.sh diff --git a/redis/update.sh b/redis/update.sh new file mode 100644 index 0000000..2dff65b --- /dev/null +++ b/redis/update.sh @@ -0,0 +1,115 @@ +#!/bin/bash +export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:$PATH + +source <(curl -f -s --connect-timeout 10 --retry 3 https://dl.acepanel.net/public.sh) +if [ $? -ne 0 ]; then + echo "Download public.sh failed, please check the network or try again later." + exit 1 +fi + +channel=${1} +version=${2} +redis_path="${setup_path}/server/redis" + +# 预检查 +systemctl is-active --quiet redis +if [ "$?" != "0" ]; then + error "Application is not running properly" +fi + +# 读取信息 +redis_config="${redis_path}/redis.conf" +redis_port=$(cat ${redis_config} | grep 'port ' | grep -v '#' | awk '{print $2}') +redis_pass=$(cat ${redis_config} | grep 'requirepass ' | grep -v '#' | awk '{print $2}') +redis_host=$(cat ${redis_config} | grep 'bind ' | grep -v '#' | awk '{print $2}') +redis_dir=$(cat ${redis_config} | grep 'dir ' | grep -v '#' | awk '{print $2}') + +# 备份 +if [ -z "${redis_pass}" ]; then + redis-cli -p ${redis_port} <>${redis_path}/redis.conf +fi + +# 恢复配置 +if [ -n "${redis_pass}" ]; then + sed -i "s!# requirepass .*!requirepass ${redis_pass}!g" ${redis_path}/redis.conf +fi +if [ -n "${redis_host}" ]; then + sed -i "s!bind .*!bind ${redis_host}!g" ${redis_path}/redis.conf +fi +if [ -n "${redis_port}" ]; then + sed -i "s!port .*!port ${redis_port}!g" ${redis_path}/redis.conf +fi +if [ -n "${redis_dir}" ]; then + sed -i "s!dir .*!dir ${redis_dir}!g" ${redis_path}/redis.conf +fi + +# 恢复数据 +if [ -f "/tmp/redisdump.rdb.bak" ]; then + mv /tmp/redisdump.rdb.bak ${redis_dir}/redisdump.rdb +fi + +chown -R redis:redis ${redis_path} +chmod -R 700 ${redis_path} + +# 设置服务 +\cp -f utils/systemd-redis_server.service /etc/systemd/system/redis.service +sed -i "s!ExecStart=.*!ExecStart=${redis_path}/bin/redis-server ${redis_path}/redis.conf!g" /etc/systemd/system/redis.service +sed -i "s!#User=.*!User=redis!g" /etc/systemd/system/redis.service +sed -i "s!#Group=.*!Group=redis!g" /etc/systemd/system/redis.service +sed -i "s!#WorkingDirectory=.*!WorkingDirectory=${redis_path}!g" /etc/systemd/system/redis.service +sed -i "s!TimeoutStartSec=.*!TimeoutStartSec=30s!g" /etc/systemd/system/redis.service +sed -i "s!TimeoutStopSec=.*!TimeoutStopSec=30s!g" /etc/systemd/system/redis.service + +chmod 644 /etc/systemd/system/redis.service + +systemctl daemon-reload +systemctl start redis + +acepanel app write redis ${channel} ${version} + +echo -e $HR +echo "Upgrade successful" +echo -e $HR diff --git a/redis/update.sh.sha256 b/redis/update.sh.sha256 new file mode 100644 index 0000000..fa71a21 --- /dev/null +++ b/redis/update.sh.sha256 @@ -0,0 +1 @@ +b4a530c93ec9ac83e327fd1cf739a4a6514a2e81ccdf8cb33b3bb631482022b7 *update.sh diff --git a/rsync/install.sh b/rsync/install.sh new file mode 100644 index 0000000..6dbaa93 --- /dev/null +++ b/rsync/install.sh @@ -0,0 +1,74 @@ +#!/bin/bash +export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:$PATH + +source <(curl -f -s --connect-timeout 10 --retry 3 https://dl.acepanel.net/public.sh) +if [ $? -ne 0 ]; then + echo "Download public.sh failed, please check the network or try again later." + exit 1 +fi + +channel=${1} +version=${2} + +if [ ${OS} == "rhel" ]; then + dnf install -y rsync +elif [ ${OS} == "debian" ] || [ ${OS} == "ubuntu" ]; then + apt-get install -y rsync +else + error "Unsupported operating system" +fi +if [ "$?" != "0" ]; then + error "Installation failed" +fi + +# 写入配置 +cat >/etc/rsyncd.conf </etc/systemd/system/rsyncd.service <