My system is ubuntu 22.04.
police@police:~$ cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04.3 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.3 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy
I can run
bash /www/server/panel/install/mongodb.sh install 7.0
mongodb 7.0.1 installed normally but it's not what i want.
I think installing mongodb extension calling invalid argument of
bash /www/server/panel/install/mongodb.sh
ref code
Install_Mongodb(){
mongo_user=$(id -u mongo 2>/dev/null)
if [ "$?" -ne 0 ];then
groupadd mongo
useradd -s /sbin/nologin -M -g mongo mongo
fi
if [ "${mongodb_version}" == "4.4.6" ];then
if [ "${DEBIAN_VER}" != "11" ];then
...
elif [ "${mongodb_version}" == "6.0.10" ];then
...
elif [ "${mongodb_version}" == "7.0.1" ];then
...
else
echo "Mongodb安装失败,Mongodb 4.4.4/4.4.6暂时不支持Debian 11系统版本。"
exit 0
fi
}
actionType=$1
version=$2
if [ "${actionType}" == 'install' ];then
if [ -z "${version}" ];then
exit;
fi
case "${version}" in
'4.4')
mongodb_version=${mongo_46}
;;
'6.0')
mongodb_version=${mongo_60}
;;
'7.0')
mongodb_version=${mongo_70}
esac
check_avx
Install_Mongodb
Install_plugin
Bt_Check
Service_Add
elif [ "${actionType}" == 'update' ];then
echo "请到Mongodb插件设置进行版本切换!"
elif [ "${actionType}" == 'uninstall' ];then
Uninstall_mongodb
Service_Del
fi
I was able to install the extension before the system went into maintenance mode two days ago.