feat: 清理提交
All checks were successful
Generate Checksums / checksums (push) Successful in 46s

This commit is contained in:
2026-01-31 07:03:45 +08:00
commit 758e1c8799
487 changed files with 8839 additions and 0 deletions

121
phpmyadmin/install.sh Normal file
View File

@@ -0,0 +1,121 @@
#!/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}
phpmyadmin_path="${setup_path}/server/phpmyadmin"
random_dir="$(cat /dev/urandom | head -n 16 | sha256sum | head -c 10)"
webserver=$(acepanel setting get webserver)
# 准备安装目录
rm -rf ${phpmyadmin_path}
mkdir -p ${phpmyadmin_path}
cd ${phpmyadmin_path}
dl "${phpmyadmin_path}" "/phpmyadmin/phpMyAdmin-${version}-all-languages.zip"
unzip -o phpMyAdmin-${version}-all-languages.zip
mv phpMyAdmin-${version}-all-languages phpmyadmin_${random_dir}
chown -R www:www ${phpmyadmin_path}
chmod -R 755 ${phpmyadmin_path}
rm -rf phpMyAdmin-${version}-all-languages.zip
# 判断PHP版本
php_version=""
if [ -d "${setup_path}/server/php/74" ]; then
php_version="74"
fi
if [ -d "${setup_path}/server/php/80" ]; then
php_version="80"
fi
if [ -d "${setup_path}/server/php/81" ]; then
php_version="81"
fi
if [ -d "${setup_path}/server/php/82" ]; then
php_version="82"
fi
if [ -d "${setup_path}/server/php/83" ]; then
php_version="83"
fi
if [ -d "${setup_path}/server/php/84" ]; then
php_version="84"
fi
if [ -d "${setup_path}/server/php/85" ]; then
php_version="85"
fi
if [ "${php_version}" == "" ]; then
rm -rf ${phpmyadmin_path}
error "PHP not installed"
fi
# 写入 phpMyAdmin 配置文件
mkdir -p ${setup_path}/sites/phpmyadmin/config
mkdir -p ${setup_path}/sites/phpmyadmin/log
if [ "${webserver}" == "nginx" ]; then
cat >${setup_path}/sites/phpmyadmin/config/nginx.conf <<EOF
server
{
listen 888;
server_name phpmyadmin;
index index.php;
root ${setup_path}/server/phpmyadmin;
location ~ \.php$ {
try_files \$uri =404;
fastcgi_pass unix:/tmp/php-cgi-${php_version}.sock;
fastcgi_index index.php;
include fastcgi.conf;
include pathinfo.conf;
}
access_log ${setup_path}/sites/phpmyadmin/log/phpmyadmin.log;
error_log ${setup_path}/sites/phpmyadmin/log/phpmyadmin.log;
}
EOF
elif [ "${webserver}" == "apache" ]; then
cat >${setup_path}/sites/phpmyadmin/config/apache.conf <<EOF
<VirtualHost *:888>
DocumentRoot ${setup_path}/server/phpmyadmin
ErrorLog ${setup_path}/sites/phpmyadmin/log/phpmyadmin.log
CustomLog ${setup_path}/sites/phpmyadmin/log/phpmyadmin.log combined
<Directory "${setup_path}/server/phpmyadmin">
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
<FilesMatch \.php$>
SetHandler "proxy:unix:/tmp/php-cgi-${php_version}.sock|fcgi://localhost/"
</FilesMatch>
</VirtualHost>
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

View File

@@ -0,0 +1 @@
ee6542f61981e7dae332f1c1db5158096ee79a77e38b937ec8ed36ea33810e68 *install.sh

Binary file not shown.

View File

@@ -0,0 +1 @@
6b99534f72ffb1d7275f50d23ca4141e1495c97d7cadb73a41d6dc580ed5ce29 *phpMyAdmin-5.2.2-all-languages.zip

Binary file not shown.

View File

@@ -0,0 +1 @@
2d2e13c735366d318425c78e4ee2cc8fc648d77faba3ddea2cd516e43885733f *phpMyAdmin-5.2.3-all-languages.zip

19
phpmyadmin/uninstall.sh Normal file
View File

@@ -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

View File

@@ -0,0 +1 @@
74c9aa390262c3c7fc4c0dd1d1ea0f94dbe8347da1e6e8e57dc0a266b42c76ce *uninstall.sh