阶段更新一下

pull/118/head
midoks 3 years ago
parent e334c1a702
commit f55b0c0a8b
  1. 6
      plugins/mongodb/info.json
  2. 53
      plugins/mongodb/install.sh

@ -4,15 +4,15 @@
"name": "mongodb",
"title": "Mongodb",
"shell": "install.sh",
"versions":["4.4.14","5.0.4"],
"updates":["4.4.14","5.0.4"],
"versions":["4.4","5.0"],
"updates":["4.4","5.0"],
"tip": "soft",
"checks": "server/mongodb",
"path": "server/mongodb",
"display": 1,
"author": "mongodb",
"date": "2021-11-23",
"home": "https://www.mongodb.com/",
"home": "https://www.mongodb.com/docs/v4.4/installation/",
"type": 0,
"pid": "2"
}

@ -32,6 +32,11 @@ else
OSNAME='unknow'
fi
SYS_VERSION_ID=`cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | awk -F "\"" '{print $2}'`
Install_app_mac()
{
@ -45,13 +50,59 @@ Install_app_mac()
}
Install_Linux_Ubuntu()
{
##################### Ubuntu start #####################
if [ "$SYS_VERSION_ID" == "22" ]; then
echo "Not yet supported"
exit 1
fi
wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add -
sudo apt install gnupg
touch /etc/apt/sources.list.d/mongodb-org-4.4.list
lsb_release -dc
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list
##################### Ubuntu end #####################
}
Install_Linux_Debian()
{
##################### debian start #####################
##################### debian end #####################
}
# https://repo.mongodb.org/yum/redhat/7/mongodb-org/5.0/x86_64/RPMS/mongodb-org-server-5.0.4-1.el7.x86_64.rpm
Install_app_linux(){
Install_Linux_CentOS()
{
##################### centos start #####################
if [ ! -f $serverPath/source/mongodb-org-server-${VERSION}-1.el7.x86_64.rpm ];then
wget -O $serverPath/source/mongodb-org-server-${VERSION}-1.el7.x86_64.rpm https://repo.mongodb.org/yum/redhat/7/mongodb-org/5.0/x86_64/RPMS/mongodb-org-server-${VERSION}-1.el7.x86_64.rpm
fi
rpm -ivh $serverPath/source/mongodb-org-server-${VERSION}-1.el7.x86_64.rpm
##################### centos end #####################
}
Install_app_linux()
{
if [ "$OSNAME" == "ubuntu" ];then
Install_Linux_Ubuntu
elif [ "$OSNAME" == "debian" ];then
Install_Linux_Debian
elif [ "$OSNAME" == "centos" ];then
Install_Linux_CentOS
else
echo "Not yet supported"
exit 1
fi
}

Loading…
Cancel
Save