pull/644/head
Mr Chen 5 months ago
parent 8b8a63c352
commit 16db84793d
  1. 10
      plugins/mysql-apt/install.sh
  2. 90
      plugins/mysql-apt/versions/5.7/install_generic.sh
  3. 2
      plugins/mysql-apt/versions/8.0/install.sh
  4. 90
      plugins/mysql-apt/versions/8.0/install_generic.sh
  5. 90
      plugins/mysql-apt/versions/8.2/install_generic.sh
  6. 90
      plugins/mysql-apt/versions/8.3/install_generic.sh
  7. 24
      plugins/mysql-apt/versions/8.4/install_generic.sh
  8. 26
      plugins/mysql-apt/versions/9.0/install_generic.sh
  9. 32
      plugins/mysql-apt/versions/9.1/install_generic.sh

@ -7,8 +7,10 @@ rootPath=$(dirname "$curPath")
rootPath=$(dirname "$rootPath") rootPath=$(dirname "$rootPath")
serverPath=$(dirname "$rootPath") serverPath=$(dirname "$rootPath")
# https://dev.mysql.com/downloads/mysql/
# https://downloads.mysql.com/archives/community/ # https://downloads.mysql.com/archives/community/
# /www/server/mysql-apt/bin/usr/sbin/mysqld --basedir=/www/server/mysql-apt/bin/usr --datadir=/www/server/mysql-apt/data --initialize-insecure --explicit_defaults_for_timestamp # /www/server/mysql-apt/bin/usr/sbin/mysqld --basedir=/www/server/mysql-apt/bin/usr --datadir=/www/server/mysql-apt/data --initialize-insecure --explicit_defaults_for_timestamp
@ -18,8 +20,6 @@ serverPath=$(dirname "$rootPath")
# cd /www/server/mdserver-web && python3 /www/server/mdserver-web/plugins/mysql-apt/index.py fix_db_access # cd /www/server/mdserver-web && python3 /www/server/mdserver-web/plugins/mysql-apt/index.py fix_db_access
# cd /www/server/mdserver-web && source bin/activate && python3 plugins/mysql/index.py do_full_sync {"db":"xxx","sign":"","begin":1} # cd /www/server/mdserver-web && source bin/activate && python3 plugins/mysql/index.py do_full_sync {"db":"xxx","sign":"","begin":1}
action=$1 action=$1
type=$2 type=$2
@ -58,11 +58,7 @@ if [ "${action}" == "uninstall" ];then
fi fi
if [ "$2" == "8.4" ];then sh -x $curPath/versions/$2/install_generic.sh $1
sh -x $curPath/versions/$2/install_generic.sh $1
else
sh -x $curPath/versions/$2/install.sh $1
fi
if [ "${action}" == "install" ];then if [ "${action}" == "install" ];then
#初始化 #初始化

@ -0,0 +1,90 @@
# -*- coding: utf-8 -*-
#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
export DEBIAN_FRONTEND=noninteractive
# https://downloads.mysql.com/archives/community/
curPath=`pwd`
rootPath=$(dirname "$curPath")
rootPath=$(dirname "$rootPath")
serverPath=$(dirname "$rootPath")
sysName=`uname`
myDir=${serverPath}/source/mysql-apt
OS_ARCH=`arch`
MYSQL_VER=5.7.39
SUFFIX_NAME=${MYSQL_VER}-linux-glibc2.28-${OS_ARCH}
# cd /www/server/mdserver-web/plugins/mysql-apt && bash install.sh install 5.7
# cd /www/server/mdserver-web && python3 /www/server/mdserver-web/plugins/mysql-apt/index.py start 5.7
APT_INSTALL()
{
########
mkdir -p $myDir
mkdir -p $serverPath/mysql-apt
# Linux - Generic
if [ ! -f ${myDir}/mysql-${SUFFIX_NAME}.tar.xz ];then
wget --no-check-certificate -O ${myDir}/mysql-${SUFFIX_NAME}.tar.xz https://cdn.mysql.com/archives/mysql-5.7/mysql-${SUFFIX_NAME}.tar.xz
fi
if [ -d ${myDir} ];then
cd ${myDir} && tar -Jxf ${myDir}/mysql-${SUFFIX_NAME}.tar.xz
cp -rf ${myDir}/mysql-${SUFFIX_NAME}/* $serverPath/mysql-apt
fi
# 测试时可关闭
rm -rf $myDir/mysql-${SUFFIX_NAME}
#######
}
APT_UNINSTALL()
{
###
rm -rf $myDir/mysql-${SUFFIX_NAME}
###
}
Install_mysql()
{
echo '正在安装脚本文件...'
isApt=`which apt`
if [ "$isApt" != "" ];then
APT_INSTALL
fi
if [ "$?" == "0" ];then
mkdir -p $serverPath/mysql-apt
echo '5.7' > $serverPath/mysql-apt/version.pl
echo '安装完成'
else
echo '5.7' > $serverPath/mysql-apt/version.pl
echo "暂时不支持该系统"
fi
}
Uninstall_mysql()
{
isApt=`which apt`
if [ "$isApt" != "" ];then
APT_UNINSTALL
fi
rm -rf $serverPath/mysql-apt
echo '卸载完成'
}
action=$1
if [ "${1}" == 'install' ];then
Install_mysql
else
Uninstall_mysql
fi

@ -45,7 +45,7 @@ if [ "$ARCH" != "amd64" ];then
fi fi
MYSQL_VER=8.0.36 MYSQL_VER=8.0.39
SUFFIX_NAME=${MYSQL_VER}-1${OSNAME}${VERSION_ID}_${ARCH} SUFFIX_NAME=${MYSQL_VER}-1${OSNAME}${VERSION_ID}_${ARCH}

@ -0,0 +1,90 @@
# -*- coding: utf-8 -*-
#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
export DEBIAN_FRONTEND=noninteractive
# https://downloads.mysql.com/archives/community/
curPath=`pwd`
rootPath=$(dirname "$curPath")
rootPath=$(dirname "$rootPath")
serverPath=$(dirname "$rootPath")
sysName=`uname`
myDir=${serverPath}/source/mysql-apt
OS_ARCH=`arch`
MYSQL_VER=8.0.39
SUFFIX_NAME=${MYSQL_VER}-linux-glibc2.28-${OS_ARCH}
# cd /www/server/mdserver-web/plugins/mysql-apt && bash install.sh install 8.0
# cd /www/server/mdserver-web && python3 /www/server/mdserver-web/plugins/mysql-apt/index.py start 8.0
APT_INSTALL()
{
########
mkdir -p $myDir
mkdir -p $serverPath/mysql-apt
# Linux - Generic
if [ ! -f ${myDir}/mysql-${SUFFIX_NAME}.tar.xz ];then
wget --no-check-certificate -O ${myDir}/mysql-${SUFFIX_NAME}.tar.xz https://cdn.mysql.com/archives/mysql-8.0/mysql-${SUFFIX_NAME}.tar.xz
fi
if [ -d ${myDir} ];then
cd ${myDir} && tar -Jxf ${myDir}/mysql-${SUFFIX_NAME}.tar.xz
cp -rf ${myDir}/mysql-${SUFFIX_NAME}/* $serverPath/mysql-apt
fi
# 测试时可关闭
rm -rf $myDir/mysql-${SUFFIX_NAME}
#######
}
APT_UNINSTALL()
{
###
rm -rf $myDir/mysql-${SUFFIX_NAME}
###
}
Install_mysql()
{
echo '正在安装脚本文件...'
isApt=`which apt`
if [ "$isApt" != "" ];then
APT_INSTALL
fi
if [ "$?" == "0" ];then
mkdir -p $serverPath/mysql-apt
echo '8.0' > $serverPath/mysql-apt/version.pl
echo '安装完成'
else
echo '8.0' > $serverPath/mysql-apt/version.pl
echo "暂时不支持该系统"
fi
}
Uninstall_mysql()
{
isApt=`which apt`
if [ "$isApt" != "" ];then
APT_UNINSTALL
fi
rm -rf $serverPath/mysql-apt
echo '卸载完成'
}
action=$1
if [ "${1}" == 'install' ];then
Install_mysql
else
Uninstall_mysql
fi

@ -0,0 +1,90 @@
# -*- coding: utf-8 -*-
#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
export DEBIAN_FRONTEND=noninteractive
# https://downloads.mysql.com/archives/community/
curPath=`pwd`
rootPath=$(dirname "$curPath")
rootPath=$(dirname "$rootPath")
serverPath=$(dirname "$rootPath")
sysName=`uname`
myDir=${serverPath}/source/mysql-apt
OS_ARCH=`arch`
MYSQL_VER=8.2.0
SUFFIX_NAME=${MYSQL_VER}-linux-glibc2.28-${OS_ARCH}
# cd /www/server/mdserver-web/plugins/mysql-apt && bash install.sh install 8.2
# cd /www/server/mdserver-web && python3 /www/server/mdserver-web/plugins/mysql-apt/index.py start 8.2
APT_INSTALL()
{
########
mkdir -p $myDir
mkdir -p $serverPath/mysql-apt
# Linux - Generic
if [ ! -f ${myDir}/mysql-${SUFFIX_NAME}.tar.xz ];then
wget --no-check-certificate -O ${myDir}/mysql-${SUFFIX_NAME}.tar.xz https://cdn.mysql.com/archives/mysql-8.2/mysql-${SUFFIX_NAME}.tar.xz
fi
if [ -d ${myDir} ];then
cd ${myDir} && tar -Jxf ${myDir}/mysql-${SUFFIX_NAME}.tar.xz
cp -rf ${myDir}/mysql-${SUFFIX_NAME}/* $serverPath/mysql-apt
fi
# 测试时可关闭
rm -rf $myDir/mysql-${SUFFIX_NAME}
#######
}
APT_UNINSTALL()
{
###
rm -rf $myDir/mysql-${SUFFIX_NAME}
###
}
Install_mysql()
{
echo '正在安装脚本文件...'
isApt=`which apt`
if [ "$isApt" != "" ];then
APT_INSTALL
fi
if [ "$?" == "0" ];then
mkdir -p $serverPath/mysql-apt
echo '8.2' > $serverPath/mysql-apt/version.pl
echo '安装完成'
else
echo '8.2' > $serverPath/mysql-apt/version.pl
echo "暂时不支持该系统"
fi
}
Uninstall_mysql()
{
isApt=`which apt`
if [ "$isApt" != "" ];then
APT_UNINSTALL
fi
rm -rf $serverPath/mysql-apt
echo '卸载完成'
}
action=$1
if [ "${1}" == 'install' ];then
Install_mysql
else
Uninstall_mysql
fi

@ -0,0 +1,90 @@
# -*- coding: utf-8 -*-
#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
export DEBIAN_FRONTEND=noninteractive
# https://downloads.mysql.com/archives/community/
curPath=`pwd`
rootPath=$(dirname "$curPath")
rootPath=$(dirname "$rootPath")
serverPath=$(dirname "$rootPath")
sysName=`uname`
myDir=${serverPath}/source/mysql-apt
OS_ARCH=`arch`
MYSQL_VER=8.3.0
SUFFIX_NAME=${MYSQL_VER}-linux-glibc2.28-${OS_ARCH}
# cd /www/server/mdserver-web/plugins/mysql-apt && bash install.sh install 8.3
# cd /www/server/mdserver-web && python3 /www/server/mdserver-web/plugins/mysql-apt/index.py start 8.3
APT_INSTALL()
{
########
mkdir -p $myDir
mkdir -p $serverPath/mysql-apt
# Linux - Generic
if [ ! -f ${myDir}/mysql-${SUFFIX_NAME}.tar.xz ];then
wget --no-check-certificate -O ${myDir}/mysql-${SUFFIX_NAME}.tar.xz https://cdn.mysql.com/archives/mysql-8.3/mysql-${SUFFIX_NAME}.tar.xz
fi
if [ -d ${myDir} ];then
cd ${myDir} && tar -Jxf ${myDir}/mysql-${SUFFIX_NAME}.tar.xz
cp -rf ${myDir}/mysql-${SUFFIX_NAME}/* $serverPath/mysql-apt
fi
# 测试时可关闭
rm -rf $myDir/mysql-${SUFFIX_NAME}
#######
}
APT_UNINSTALL()
{
###
rm -rf $myDir/mysql-${SUFFIX_NAME}
###
}
Install_mysql()
{
echo '正在安装脚本文件...'
isApt=`which apt`
if [ "$isApt" != "" ];then
APT_INSTALL
fi
if [ "$?" == "0" ];then
mkdir -p $serverPath/mysql-apt
echo '8.3' > $serverPath/mysql-apt/version.pl
echo '安装完成'
else
echo '8.3' > $serverPath/mysql-apt/version.pl
echo "暂时不支持该系统"
fi
}
Uninstall_mysql()
{
isApt=`which apt`
if [ "$isApt" != "" ];then
APT_UNINSTALL
fi
rm -rf $serverPath/mysql-apt
echo '卸载完成'
}
action=$1
if [ "${1}" == 'install' ];then
Install_mysql
else
Uninstall_mysql
fi

@ -15,29 +15,16 @@ sysName=`uname`
myDir=${serverPath}/source/mysql-apt myDir=${serverPath}/source/mysql-apt
OS_ARCH=`arch`
MYSQL_VER=8.4.2
SUFFIX_NAME=${MYSQL_VER}-linux-glibc2.28-${OS_ARCH}
# cd /www/server/mdserver-web/plugins/mysql-apt && bash install.sh install 8.4 # cd /www/server/mdserver-web/plugins/mysql-apt && bash install.sh install 8.4
# cd /www/server/mdserver-web && python3 /www/server/mdserver-web/plugins/mysql-apt/index.py start 8.4 # cd /www/server/mdserver-web && python3 /www/server/mdserver-web/plugins/mysql-apt/index.py start 8.4
APT_INSTALL() APT_INSTALL()
{ {
ARCH="amd64"
TMP_ARCH=`arch`
if [ "$TMP_ARCH" == "x86_64" ];then
ARCH="amd64"
elif [ "$TMP_ARCH" == "aarch64" ];then
ARCH="arm64"
else
ARCH="amd64"
fi
if [ "$ARCH" != "amd64" ];then
echo "暂时不支持该${ARCH}"
exit 1
fi
MYSQL_VER=8.4.2
SUFFIX_NAME=${MYSQL_VER}-linux-glibc2.28-${TMP_ARCH}
######## ########
mkdir -p $myDir mkdir -p $myDir
@ -62,8 +49,7 @@ rm -rf $myDir/mysql-${SUFFIX_NAME}
APT_UNINSTALL() APT_UNINSTALL()
{ {
### ###
rm -rf $myDir rm -rf $myDir/mysql-${SUFFIX_NAME}
# apt remove -y mysql-server
### ###
} }

@ -14,30 +14,15 @@ sysName=`uname`
myDir=${serverPath}/source/mysql-apt myDir=${serverPath}/source/mysql-apt
OS_ARCH=`arch`
MYSQL_VER=9.0.1
SUFFIX_NAME=${MYSQL_VER}-linux-glibc2.28-${OS_ARCH}
# cd /www/server/mdserver-web/plugins/mysql-apt && bash install.sh install 9.0 # cd /www/server/mdserver-web/plugins/mysql-apt && bash install.sh install 9.0
# cd /www/server/mdserver-web && python3 /www/server/mdserver-web/plugins/mysql-apt/index.py start 9.0 # cd /www/server/mdserver-web && python3 /www/server/mdserver-web/plugins/mysql-apt/index.py start 9.0
APT_INSTALL() APT_INSTALL()
{ {
ARCH="amd64"
TMP_ARCH=`arch`
if [ "$TMP_ARCH" == "x86_64" ];then
ARCH="amd64"
elif [ "$TMP_ARCH" == "aarch64" ];then
ARCH="arm64"
else
ARCH="amd64"
fi
if [ "$ARCH" != "amd64" ];then
echo "暂时不支持该${ARCH}"
exit 1
fi
MYSQL_VER=9.0.1
SUFFIX_NAME=${MYSQL_VER}-linux-glibc2.28-${TMP_ARCH}
######## ########
mkdir -p $myDir mkdir -p $myDir
mkdir -p $serverPath/mysql-apt mkdir -p $serverPath/mysql-apt
@ -61,8 +46,7 @@ rm -rf $myDir/mysql-${SUFFIX_NAME}
APT_UNINSTALL() APT_UNINSTALL()
{ {
### ###
rm -rf $myDir rm -rf $myDir/mysql-${SUFFIX_NAME}
# apt remove -y mysql-server
### ###
} }

@ -15,38 +15,24 @@ sysName=`uname`
myDir=${serverPath}/source/mysql-apt myDir=${serverPath}/source/mysql-apt
OS_ARCH=`arch`
MYSQL_VER=9.1.0
SUFFIX_NAME=${MYSQL_VER}-linux-glibc2.28-${OS_ARCH}
# cd /www/server/mdserver-web/plugins/mysql-apt && bash install.sh install 8.4 # cd /www/server/mdserver-web/plugins/mysql-apt && bash install.sh install 8.4
# cd /www/server/mdserver-web && python3 /www/server/mdserver-web/plugins/mysql-apt/index.py start 8.4 # cd /www/server/mdserver-web && python3 /www/server/mdserver-web/plugins/mysql-apt/index.py start 8.4
APT_INSTALL() APT_INSTALL()
{ {
ARCH="amd64"
TMP_ARCH=`arch`
if [ "$TMP_ARCH" == "x86_64" ];then
ARCH="amd64"
elif [ "$TMP_ARCH" == "aarch64" ];then
ARCH="arm64"
else
ARCH="amd64"
fi
if [ "$ARCH" != "amd64" ];then
echo "暂时不支持该${ARCH}"
exit 1
fi
MYSQL_VER=8.4.2
SUFFIX_NAME=${MYSQL_VER}-linux-glibc2.28-${TMP_ARCH}
######## ########
mkdir -p $myDir mkdir -p $myDir
mkdir -p $serverPath/mysql-apt mkdir -p $serverPath/mysql-apt
# Linux - Generic # Linux - Generic
# https://cdn.mysql.com/archives/mysql-8.4/mysql-8.4.2-linux-glibc2.28-x86_64.tar.xz # https://cdn.mysql.com/archives/mysql-8.4/mysql-8.4.2-linux-glibc2.28-x86_64.tar.xz
# https://cdn.mysql.com/Downloads/MySQL-9.1/mysql-mysql-${SUFFIX_NAME}.tar.xz
if [ ! -f ${myDir}/mysql-${SUFFIX_NAME}.tar.xz ];then if [ ! -f ${myDir}/mysql-${SUFFIX_NAME}.tar.xz ];then
wget --no-check-certificate -O ${myDir}/mysql-${SUFFIX_NAME}.tar.xz https://cdn.mysql.com/archives/mysql-8.4/mysql-${SUFFIX_NAME}.tar.xz wget --no-check-certificate -O ${myDir}/mysql-${SUFFIX_NAME}.tar.xz https://cdn.mysql.com/Downloads/MySQL-9.1/mysql-mysql-${SUFFIX_NAME}.tar.xz
fi fi
if [ -d ${myDir} ];then if [ -d ${myDir} ];then
@ -62,7 +48,7 @@ rm -rf $myDir/mysql-${SUFFIX_NAME}
APT_UNINSTALL() APT_UNINSTALL()
{ {
### ###
rm -rf $myDir rm -rf $myDir/mysql-${SUFFIX_NAME}
# apt remove -y mysql-server # apt remove -y mysql-server
### ###
} }
@ -79,10 +65,10 @@ Install_mysql()
if [ "$?" == "0" ];then if [ "$?" == "0" ];then
mkdir -p $serverPath/mysql-apt mkdir -p $serverPath/mysql-apt
echo '8.4' > $serverPath/mysql-apt/version.pl echo '9.1' > $serverPath/mysql-apt/version.pl
echo '安装完成' echo '安装完成'
else else
echo '8.4' > $serverPath/mysql-apt/version.pl echo '9.1' > $serverPath/mysql-apt/version.pl
echo "暂时不支持该系统" echo "暂时不支持该系统"
fi fi
} }

Loading…
Cancel
Save