From 8572b93ed0e7bc436dd4f3386e366eab4a1910c1 Mon Sep 17 00:00:00 2001 From: midoks Date: Wed, 18 Oct 2023 23:51:43 +0800 Subject: [PATCH 1/7] =?UTF-8?q?debian=20=E5=AE=89=E8=A3=85mongodb=E7=9A=84?= =?UTF-8?q?bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/mongodb/versions/4.4/debian.sh | 2 +- plugins/mongodb/versions/5.0/debian.sh | 2 +- plugins/mongodb/versions/6.0/debian.sh | 2 +- plugins/mongodb/versions/7.0/debian.sh | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/mongodb/versions/4.4/debian.sh b/plugins/mongodb/versions/4.4/debian.sh index 3f54204af..ea383651d 100644 --- a/plugins/mongodb/versions/4.4/debian.sh +++ b/plugins/mongodb/versions/4.4/debian.sh @@ -39,5 +39,5 @@ fi if [ ! -d $serverPath/mongodb/bin ];then mkdir -p $serverPath/mongodb - cd $MG_DIR/${FILE_NAME}} && cp -rf ./bin $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/debian.sh b/plugins/mongodb/versions/5.0/debian.sh index ea7f30b33..e082995ef 100644 --- a/plugins/mongodb/versions/5.0/debian.sh +++ b/plugins/mongodb/versions/5.0/debian.sh @@ -39,5 +39,5 @@ fi if [ ! -d $serverPath/mongodb/bin ];then mkdir -p $serverPath/mongodb - cd $MG_DIR/${FILE_NAME}} && cp -rf ./bin $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/6.0/debian.sh b/plugins/mongodb/versions/6.0/debian.sh index 503aeadba..93204bdfc 100644 --- a/plugins/mongodb/versions/6.0/debian.sh +++ b/plugins/mongodb/versions/6.0/debian.sh @@ -39,5 +39,5 @@ fi if [ ! -d $serverPath/mongodb/bin ];then mkdir -p $serverPath/mongodb - cd $MG_DIR/${FILE_NAME}} && cp -rf ./bin $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/7.0/debian.sh b/plugins/mongodb/versions/7.0/debian.sh index 2e08318d3..924d472f6 100644 --- a/plugins/mongodb/versions/7.0/debian.sh +++ b/plugins/mongodb/versions/7.0/debian.sh @@ -39,5 +39,5 @@ fi if [ ! -d $serverPath/mongodb/bin ];then mkdir -p $serverPath/mongodb - cd $MG_DIR/${FILE_NAME}} && cp -rf ./bin $serverPath/mongodb + cd $MG_DIR/${FILE_NAME} && cp -rf ./bin $serverPath/mongodb fi \ No newline at end of file From 7370ef9816d1de621842efb842dcafd6d467c095 Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 19 Oct 2023 00:04:38 +0800 Subject: [PATCH 2/7] Update index.py --- plugins/mongodb/index.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/mongodb/index.py b/plugins/mongodb/index.py index ce66e65ac..cdb8f1e2c 100755 --- a/plugins/mongodb/index.py +++ b/plugins/mongodb/index.py @@ -133,6 +133,8 @@ def mgOp(method): def start(): + mw.execShell( + 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/www/server/lib/openssl11/lib/') return mgOp('start') From ee6e6f82865e30d49af8f76331ec5ce7e1f380a1 Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 19 Oct 2023 00:05:57 +0800 Subject: [PATCH 3/7] Update index.py --- plugins/mongodb/index.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/mongodb/index.py b/plugins/mongodb/index.py index cdb8f1e2c..ae8e3b342 100755 --- a/plugins/mongodb/index.py +++ b/plugins/mongodb/index.py @@ -134,7 +134,7 @@ def mgOp(method): def start(): mw.execShell( - 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/www/server/lib/openssl11/lib/') + 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/www/server/lib/openssl11/lib/:/www/server/lib/openssl10/lib/') return mgOp('start') From 3bf83a620245e41873f9d5aa3317c221fe818742 Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 19 Oct 2023 00:07:10 +0800 Subject: [PATCH 4/7] Update install.sh --- plugins/mongodb/install.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/mongodb/install.sh b/plugins/mongodb/install.sh index efc4ff67a..187fe080b 100755 --- a/plugins/mongodb/install.sh +++ b/plugins/mongodb/install.sh @@ -58,6 +58,8 @@ Install_app() # OSNAME=rhel # fi + cd ${rootPath}/plugins/php/lib && /bin/bash openssl_11.sh + shell_file=${curPath}/versions/${VERSION}/${OSNAME}.sh if [ -f $shell_file ];then From 863b42800b4f2562044cc6091cdd159df3ca7eb9 Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 19 Oct 2023 00:28:31 +0800 Subject: [PATCH 5/7] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/mongodb/install.sh | 8 +++----- plugins/mongodb/versions/4.4/centos.sh | 1 + plugins/mongodb/versions/4.4/debian.sh | 1 + plugins/mongodb/versions/4.4/macos.sh | 1 + plugins/mongodb/versions/4.4/opensuse.sh | 1 + plugins/mongodb/versions/4.4/rhel.sh | 1 + plugins/mongodb/versions/4.4/ubuntu.sh | 1 + plugins/mongodb/versions/5.0/centos.sh | 1 + plugins/mongodb/versions/5.0/debian.sh | 3 ++- plugins/mongodb/versions/5.0/macos.sh | 1 + plugins/mongodb/versions/5.0/opensuse.sh | 1 + plugins/mongodb/versions/5.0/ubuntu.sh | 1 + plugins/mongodb/versions/6.0/centos.sh | 1 + plugins/mongodb/versions/6.0/debian.sh | 1 + plugins/mongodb/versions/6.0/macos.sh | 1 + plugins/mongodb/versions/6.0/opensuse.sh | 1 + plugins/mongodb/versions/6.0/ubuntu.sh | 1 + plugins/mongodb/versions/7.0/centos.sh | 1 + plugins/mongodb/versions/7.0/debian.sh | 1 + plugins/mongodb/versions/7.0/macos.sh | 1 + plugins/mongodb/versions/7.0/opensuse.sh | 1 + plugins/mongodb/versions/7.0/ubuntu.sh | 1 + 22 files changed, 25 insertions(+), 6 deletions(-) diff --git a/plugins/mongodb/install.sh b/plugins/mongodb/install.sh index 187fe080b..72a4b1601 100755 --- a/plugins/mongodb/install.sh +++ b/plugins/mongodb/install.sh @@ -4,12 +4,10 @@ export PATH # https://www.mongodb.com/try/download/community -''' -cd /Users/midoks/Desktop/mwdev/server/mdserver-web/plugins/mongodb && /bin/bash install.sh install 5.0.4 -cd /www/server/mdserver-web/plugins/mongodb && /bin/bash install.sh install 7.0 +# cd /Users/midoks/Desktop/mwdev/server/mdserver-web/plugins/mongodb && /bin/bash install.sh install 5.0.4 +# cd /www/server/mdserver-web/plugins/mongodb && /bin/bash install.sh install 7.0 +# cd /www/server/mdserver-web && python3 /www/server/mdserver-web/plugins/mongodb/index.py start -cd /www/server/mdserver-web && python3 /www/server/mdserver-web/plugins/mongodb/index.py start -''' curPath=`pwd` diff --git a/plugins/mongodb/versions/4.4/centos.sh b/plugins/mongodb/versions/4.4/centos.sh index 0e5de0949..111ec32e0 100644 --- a/plugins/mongodb/versions/4.4/centos.sh +++ b/plugins/mongodb/versions/4.4/centos.sh @@ -5,6 +5,7 @@ export PATH curPath=`pwd` rootPath=$(dirname "$curPath") rootPath=$(dirname "$rootPath") +rootPath=$(dirname "$rootPath") serverPath=$(dirname "$rootPath") install_tmp=${rootPath}/tmp/mw_install.pl diff --git a/plugins/mongodb/versions/4.4/debian.sh b/plugins/mongodb/versions/4.4/debian.sh index ea383651d..d1f79286f 100644 --- a/plugins/mongodb/versions/4.4/debian.sh +++ b/plugins/mongodb/versions/4.4/debian.sh @@ -5,6 +5,7 @@ export PATH curPath=`pwd` rootPath=$(dirname "$curPath") rootPath=$(dirname "$rootPath") +rootPath=$(dirname "$rootPath") serverPath=$(dirname "$rootPath") install_tmp=${rootPath}/tmp/mw_install.pl diff --git a/plugins/mongodb/versions/4.4/macos.sh b/plugins/mongodb/versions/4.4/macos.sh index 233155f0e..06d419c65 100644 --- a/plugins/mongodb/versions/4.4/macos.sh +++ b/plugins/mongodb/versions/4.4/macos.sh @@ -5,6 +5,7 @@ export PATH curPath=`pwd` rootPath=$(dirname "$curPath") rootPath=$(dirname "$rootPath") +rootPath=$(dirname "$rootPath") serverPath=$(dirname "$rootPath") install_tmp=${rootPath}/tmp/mw_install.pl diff --git a/plugins/mongodb/versions/4.4/opensuse.sh b/plugins/mongodb/versions/4.4/opensuse.sh index 95c154b22..ddb20a9fd 100644 --- a/plugins/mongodb/versions/4.4/opensuse.sh +++ b/plugins/mongodb/versions/4.4/opensuse.sh @@ -5,6 +5,7 @@ export PATH curPath=`pwd` rootPath=$(dirname "$curPath") rootPath=$(dirname "$rootPath") +rootPath=$(dirname "$rootPath") serverPath=$(dirname "$rootPath") install_tmp=${rootPath}/tmp/mw_install.pl diff --git a/plugins/mongodb/versions/4.4/rhel.sh b/plugins/mongodb/versions/4.4/rhel.sh index ad1217177..d9b69700d 100644 --- a/plugins/mongodb/versions/4.4/rhel.sh +++ b/plugins/mongodb/versions/4.4/rhel.sh @@ -5,6 +5,7 @@ export PATH curPath=`pwd` rootPath=$(dirname "$curPath") rootPath=$(dirname "$rootPath") +rootPath=$(dirname "$rootPath") serverPath=$(dirname "$rootPath") install_tmp=${rootPath}/tmp/mw_install.pl diff --git a/plugins/mongodb/versions/4.4/ubuntu.sh b/plugins/mongodb/versions/4.4/ubuntu.sh index b700d1598..50dd9ec38 100644 --- a/plugins/mongodb/versions/4.4/ubuntu.sh +++ b/plugins/mongodb/versions/4.4/ubuntu.sh @@ -5,6 +5,7 @@ export PATH curPath=`pwd` rootPath=$(dirname "$curPath") rootPath=$(dirname "$rootPath") +rootPath=$(dirname "$rootPath") serverPath=$(dirname "$rootPath") install_tmp=${rootPath}/tmp/mw_install.pl diff --git a/plugins/mongodb/versions/5.0/centos.sh b/plugins/mongodb/versions/5.0/centos.sh index 855b5845d..ea86de93e 100644 --- a/plugins/mongodb/versions/5.0/centos.sh +++ b/plugins/mongodb/versions/5.0/centos.sh @@ -5,6 +5,7 @@ export PATH curPath=`pwd` rootPath=$(dirname "$curPath") rootPath=$(dirname "$rootPath") +rootPath=$(dirname "$rootPath") serverPath=$(dirname "$rootPath") install_tmp=${rootPath}/tmp/mw_install.pl diff --git a/plugins/mongodb/versions/5.0/debian.sh b/plugins/mongodb/versions/5.0/debian.sh index e082995ef..27f363672 100644 --- a/plugins/mongodb/versions/5.0/debian.sh +++ b/plugins/mongodb/versions/5.0/debian.sh @@ -5,6 +5,7 @@ export PATH curPath=`pwd` rootPath=$(dirname "$curPath") rootPath=$(dirname "$rootPath") +rootPath=$(dirname "$rootPath") serverPath=$(dirname "$rootPath") install_tmp=${rootPath}/tmp/mw_install.pl @@ -28,7 +29,7 @@ FILE_NAME_TGZ=${FILE_NAME}.tgz MG_DIR=$serverPath/source/mongodb mkdir -p $MG_DIR -if [ ! -f $MG_DIR/${FILE_NAME_TGZ} ]; then +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 diff --git a/plugins/mongodb/versions/5.0/macos.sh b/plugins/mongodb/versions/5.0/macos.sh index cad0d2ad5..ec751bd53 100644 --- a/plugins/mongodb/versions/5.0/macos.sh +++ b/plugins/mongodb/versions/5.0/macos.sh @@ -5,6 +5,7 @@ export PATH curPath=`pwd` rootPath=$(dirname "$curPath") rootPath=$(dirname "$rootPath") +rootPath=$(dirname "$rootPath") serverPath=$(dirname "$rootPath") install_tmp=${rootPath}/tmp/mw_install.pl diff --git a/plugins/mongodb/versions/5.0/opensuse.sh b/plugins/mongodb/versions/5.0/opensuse.sh index 9a0f5c2ab..1ce13513e 100644 --- a/plugins/mongodb/versions/5.0/opensuse.sh +++ b/plugins/mongodb/versions/5.0/opensuse.sh @@ -5,6 +5,7 @@ export PATH curPath=`pwd` rootPath=$(dirname "$curPath") rootPath=$(dirname "$rootPath") +rootPath=$(dirname "$rootPath") serverPath=$(dirname "$rootPath") install_tmp=${rootPath}/tmp/mw_install.pl diff --git a/plugins/mongodb/versions/5.0/ubuntu.sh b/plugins/mongodb/versions/5.0/ubuntu.sh index 1e35e0233..a8cbe707b 100644 --- a/plugins/mongodb/versions/5.0/ubuntu.sh +++ b/plugins/mongodb/versions/5.0/ubuntu.sh @@ -5,6 +5,7 @@ export PATH curPath=`pwd` rootPath=$(dirname "$curPath") rootPath=$(dirname "$rootPath") +rootPath=$(dirname "$rootPath") serverPath=$(dirname "$rootPath") install_tmp=${rootPath}/tmp/mw_install.pl diff --git a/plugins/mongodb/versions/6.0/centos.sh b/plugins/mongodb/versions/6.0/centos.sh index 618902250..a191ebc90 100644 --- a/plugins/mongodb/versions/6.0/centos.sh +++ b/plugins/mongodb/versions/6.0/centos.sh @@ -5,6 +5,7 @@ export PATH curPath=`pwd` rootPath=$(dirname "$curPath") rootPath=$(dirname "$rootPath") +rootPath=$(dirname "$rootPath") serverPath=$(dirname "$rootPath") install_tmp=${rootPath}/tmp/mw_install.pl diff --git a/plugins/mongodb/versions/6.0/debian.sh b/plugins/mongodb/versions/6.0/debian.sh index 93204bdfc..b5b720ae8 100644 --- a/plugins/mongodb/versions/6.0/debian.sh +++ b/plugins/mongodb/versions/6.0/debian.sh @@ -5,6 +5,7 @@ export PATH curPath=`pwd` rootPath=$(dirname "$curPath") rootPath=$(dirname "$rootPath") +rootPath=$(dirname "$rootPath") serverPath=$(dirname "$rootPath") install_tmp=${rootPath}/tmp/mw_install.pl diff --git a/plugins/mongodb/versions/6.0/macos.sh b/plugins/mongodb/versions/6.0/macos.sh index df114bdd9..d6292e01c 100644 --- a/plugins/mongodb/versions/6.0/macos.sh +++ b/plugins/mongodb/versions/6.0/macos.sh @@ -5,6 +5,7 @@ export PATH curPath=`pwd` rootPath=$(dirname "$curPath") rootPath=$(dirname "$rootPath") +rootPath=$(dirname "$rootPath") serverPath=$(dirname "$rootPath") install_tmp=${rootPath}/tmp/mw_install.pl diff --git a/plugins/mongodb/versions/6.0/opensuse.sh b/plugins/mongodb/versions/6.0/opensuse.sh index 9f701ff84..47e4d8283 100644 --- a/plugins/mongodb/versions/6.0/opensuse.sh +++ b/plugins/mongodb/versions/6.0/opensuse.sh @@ -5,6 +5,7 @@ export PATH curPath=`pwd` rootPath=$(dirname "$curPath") rootPath=$(dirname "$rootPath") +rootPath=$(dirname "$rootPath") serverPath=$(dirname "$rootPath") install_tmp=${rootPath}/tmp/mw_install.pl diff --git a/plugins/mongodb/versions/6.0/ubuntu.sh b/plugins/mongodb/versions/6.0/ubuntu.sh index b7b28716c..34bad1622 100644 --- a/plugins/mongodb/versions/6.0/ubuntu.sh +++ b/plugins/mongodb/versions/6.0/ubuntu.sh @@ -5,6 +5,7 @@ export PATH curPath=`pwd` rootPath=$(dirname "$curPath") rootPath=$(dirname "$rootPath") +rootPath=$(dirname "$rootPath") serverPath=$(dirname "$rootPath") install_tmp=${rootPath}/tmp/mw_install.pl diff --git a/plugins/mongodb/versions/7.0/centos.sh b/plugins/mongodb/versions/7.0/centos.sh index c6cd727a0..130054476 100644 --- a/plugins/mongodb/versions/7.0/centos.sh +++ b/plugins/mongodb/versions/7.0/centos.sh @@ -5,6 +5,7 @@ export PATH curPath=`pwd` rootPath=$(dirname "$curPath") rootPath=$(dirname "$rootPath") +rootPath=$(dirname "$rootPath") serverPath=$(dirname "$rootPath") install_tmp=${rootPath}/tmp/mw_install.pl diff --git a/plugins/mongodb/versions/7.0/debian.sh b/plugins/mongodb/versions/7.0/debian.sh index 924d472f6..04f1c5a9c 100644 --- a/plugins/mongodb/versions/7.0/debian.sh +++ b/plugins/mongodb/versions/7.0/debian.sh @@ -5,6 +5,7 @@ export PATH curPath=`pwd` rootPath=$(dirname "$curPath") rootPath=$(dirname "$rootPath") +rootPath=$(dirname "$rootPath") serverPath=$(dirname "$rootPath") install_tmp=${rootPath}/tmp/mw_install.pl diff --git a/plugins/mongodb/versions/7.0/macos.sh b/plugins/mongodb/versions/7.0/macos.sh index c78167779..1cbd6bedd 100644 --- a/plugins/mongodb/versions/7.0/macos.sh +++ b/plugins/mongodb/versions/7.0/macos.sh @@ -5,6 +5,7 @@ export PATH curPath=`pwd` rootPath=$(dirname "$curPath") rootPath=$(dirname "$rootPath") +rootPath=$(dirname "$rootPath") serverPath=$(dirname "$rootPath") install_tmp=${rootPath}/tmp/mw_install.pl diff --git a/plugins/mongodb/versions/7.0/opensuse.sh b/plugins/mongodb/versions/7.0/opensuse.sh index 5228cdf79..a4d805e00 100644 --- a/plugins/mongodb/versions/7.0/opensuse.sh +++ b/plugins/mongodb/versions/7.0/opensuse.sh @@ -5,6 +5,7 @@ export PATH curPath=`pwd` rootPath=$(dirname "$curPath") rootPath=$(dirname "$rootPath") +rootPath=$(dirname "$rootPath") serverPath=$(dirname "$rootPath") install_tmp=${rootPath}/tmp/mw_install.pl diff --git a/plugins/mongodb/versions/7.0/ubuntu.sh b/plugins/mongodb/versions/7.0/ubuntu.sh index 72a9b02a7..9a3412323 100644 --- a/plugins/mongodb/versions/7.0/ubuntu.sh +++ b/plugins/mongodb/versions/7.0/ubuntu.sh @@ -5,6 +5,7 @@ export PATH curPath=`pwd` rootPath=$(dirname "$curPath") rootPath=$(dirname "$rootPath") +rootPath=$(dirname "$rootPath") serverPath=$(dirname "$rootPath") install_tmp=${rootPath}/tmp/mw_install.pl From 6991a3ecfcb9f130042a5cda18b4cb7937c1cc05 Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 19 Oct 2023 00:32:06 +0800 Subject: [PATCH 6/7] Update index.py --- plugins/mongodb/index.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/mongodb/index.py b/plugins/mongodb/index.py index ae8e3b342..b7de95d06 100755 --- a/plugins/mongodb/index.py +++ b/plugins/mongodb/index.py @@ -134,7 +134,7 @@ def mgOp(method): def start(): mw.execShell( - 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/www/server/lib/openssl11/lib/:/www/server/lib/openssl10/lib/') + 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/www/server/lib/openssl11/lib') return mgOp('start') From de9fdd6e87b6001c0b0beeea88637de26d7c4e62 Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 19 Oct 2023 00:33:23 +0800 Subject: [PATCH 7/7] Update mongodb.service.tpl --- plugins/mongodb/init.d/mongodb.service.tpl | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/mongodb/init.d/mongodb.service.tpl b/plugins/mongodb/init.d/mongodb.service.tpl index d9b7cd9b7..71b659eb1 100644 --- a/plugins/mongodb/init.d/mongodb.service.tpl +++ b/plugins/mongodb/init.d/mongodb.service.tpl @@ -9,6 +9,7 @@ User=root Group=root #EnvironmentFile=-/etc/default/mongod Environment="MONGODB_CONFIG_OVERRIDE_NOFORK=1" +Environment="LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/www/server/lib/openssl11/lib" PIDFile={$SERVER_PATH}/mongodb/mongodb.pid ExecStart={$SERVER_PATH}/mongodb/bin/mongod -f {$SERVER_PATH}/mongodb/mongodb.conf ExecReload=/bin/kill -HUP $MAINPID