diff --git a/plugins/mongodb/versions/4.4/ubuntu.sh b/plugins/mongodb/versions/4.4/ubuntu.sh new file mode 100644 index 000000000..359b89b53 --- /dev/null +++ b/plugins/mongodb/versions/4.4/ubuntu.sh @@ -0,0 +1,36 @@ +#!/bin/bash +PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin +export PATH + +curPath=`pwd` +rootPath=$(dirname "$curPath") +rootPath=$(dirname "$rootPath") +serverPath=$(dirname "$rootPath") + +install_tmp=${rootPath}/tmp/mw_install.pl +VERSION=4.4.23 +SYS_ARCH=`arch` + +SYS_VERSION_ID=`cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | awk -F "\"" '{print $2}'` +SYS_NAME=${SYS_VERSION_ID/./} +# https://fastdl.mongodb.org/linux/mongodb-linux-aarch64-ubuntu2204-7.0.0.tgz + +MG_DIR=$serverPath/source/mongodb +mkdir -p $MG_DIR + +FILE_NAME=mongodb-linux-${SYS_ARCH}-ubuntu${SYS_NAME}-${VERSION} +FILE_NAME_TGZ=${FILE_NAME}.tgz + +if [ ! -f $MG_DIR/${FILE_NAME_TGZ} ]; then + wget --no-check-certificate -O $MG_DIR/${FILE_NAME_TGZ} https://fastdl.mongodb.org/linux/${FILE_NAME_TGZ} + echo "wget --no-check-certificate -O $MG_DIR/${FILE_NAME_TGZ} https://fastdl.mongodb.org/linux/${FILE_NAME_TGZ}" +fi + +if [ ! -d $MG_DIR/${FILE_NAME} ];then + cd $MG_DIR && tar -zxvf ${FILE_NAME_TGZ} +fi + +if [ ! -d $serverPath/mongodb/bin ];then + mkdir -p $serverPath/mongodb + cd $MG_DIR/${FILE_NAME} && cp -rf ./bin $serverPath/mongodb +fi \ No newline at end of file diff --git a/plugins/mongodb/versions/5.0/ubuntu.sh b/plugins/mongodb/versions/5.0/ubuntu.sh new file mode 100644 index 000000000..e35975bd4 --- /dev/null +++ b/plugins/mongodb/versions/5.0/ubuntu.sh @@ -0,0 +1,36 @@ +#!/bin/bash +PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin +export PATH + +curPath=`pwd` +rootPath=$(dirname "$curPath") +rootPath=$(dirname "$rootPath") +serverPath=$(dirname "$rootPath") + +install_tmp=${rootPath}/tmp/mw_install.pl +VERSION=5.0.20 +SYS_ARCH=`arch` + +SYS_VERSION_ID=`cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | awk -F "\"" '{print $2}'` +SYS_NAME=${SYS_VERSION_ID/./} +# https://fastdl.mongodb.org/linux/mongodb-linux-aarch64-ubuntu2204-7.0.0.tgz + +MG_DIR=$serverPath/source/mongodb +mkdir -p $MG_DIR + +FILE_NAME=mongodb-linux-${SYS_ARCH}-ubuntu${SYS_NAME}-${VERSION} +FILE_NAME_TGZ=${FILE_NAME}.tgz + +if [ ! -f $MG_DIR/${FILE_NAME_TGZ} ]; then + wget --no-check-certificate -O $MG_DIR/${FILE_NAME_TGZ} https://fastdl.mongodb.org/linux/${FILE_NAME_TGZ} + echo "wget --no-check-certificate -O $MG_DIR/${FILE_NAME_TGZ} https://fastdl.mongodb.org/linux/${FILE_NAME_TGZ}" +fi + +if [ ! -d $MG_DIR/${FILE_NAME} ];then + cd $MG_DIR && tar -zxvf ${FILE_NAME_TGZ} +fi + +if [ ! -d $serverPath/mongodb/bin ];then + mkdir -p $serverPath/mongodb + cd $MG_DIR/${FILE_NAME} && cp -rf ./bin $serverPath/mongodb +fi \ No newline at end of file