From 5c9914c2c495589ee2c946a648921c901cc1ffb8 Mon Sep 17 00:00:00 2001 From: midoks Date: Tue, 21 Jun 2022 18:02:46 +0800 Subject: [PATCH 1/7] Update centos.sh --- scripts/install/centos.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scripts/install/centos.sh b/scripts/install/centos.sh index 600e6f0be..773c41bf9 100755 --- a/scripts/install/centos.sh +++ b/scripts/install/centos.sh @@ -110,7 +110,17 @@ fi if [ -f /www/server/mdserver-web/bin/activate ];then cd /www/server/mdserver-web && source /www/server/mdserver-web/bin/activate && pip3 install -r /www/server/mdserver-web/requirements.txt + pip install --upgrade pip + pip3 install gunicorn==20.1.0 + pip3 install gevent==21.1.2 + pip3 install gevent-websocket==0.10.1 + pip3 install requests==2.20.0 + pip3 install flask-caching==1.10.1 + pip3 install python-socketio==4.2.0 + pip3 install psutil==5.9.1 + pip3 install Jinja==2.11.2 + pip3 install pymongo fi echo "end install python lib" From e12d77b9d74327d096353f00b7ce1b628c7cb15c Mon Sep 17 00:00:00 2001 From: midoks Date: Tue, 21 Jun 2022 18:18:42 +0800 Subject: [PATCH 2/7] Update lib.sh --- scripts/lib.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/lib.sh b/scripts/lib.sh index 63d453d9c..7f33fc0e7 100755 --- a/scripts/lib.sh +++ b/scripts/lib.sh @@ -244,17 +244,19 @@ echo -e "Install_Curl" >> ${libPath}/lib.pl } -_os=`uname` if grep -Eqi "Ubuntu" /etc/issue || grep -Eq "Ubuntu" /etc/*-release; then sudo ln -sf /bin/bash /bin/sh #sudo dpkg-reconfigure dash fi +_os=`uname` if [ ${_os} == "Darwin" ]; then OSNAME='macos' elif grep -Eqi "CentOS" /etc/issue || grep -Eq "CentOS" /etc/*-release; then OSNAME='centos' +elif grep -Eqi "Rocky" /etc/issue || grep -Eq "Rocky" /etc/*-release; then + OSNAME='rocky' elif grep -Eqi "Red Hat Enterprise Linux Server" /etc/issue || grep -Eq "Red Hat Enterprise Linux Server" /etc/*-release; then OSNAME='rhel' elif grep -Eqi "Aliyun" /etc/issue || grep -Eq "Aliyun" /etc/*-release; then @@ -292,7 +294,7 @@ elif [ "$OSNAME" == "ubuntu" ] || [ "$OSNAME" == "debian" ]; then apt install -y libffi-dev apt install -y cmake automake make - apt install -y php-common webp scons + apt install -y webp scons apt install -y lzma lzma-dev libunwind-dev apt install -y libpcre3 libpcre3-dev @@ -328,19 +330,17 @@ elif [ "$OSNAME" == "ubuntu" ] || [ "$OSNAME" == "debian" ]; then else yum install -y openldap openldap-devel libtirpc libtirpc-devel rpcgen - yum install -y bison re2c cmake yum install -y libmemcached libmemcached-devel yum install -y curl-devel yum install -y zlib zlib-devel + yum install -y libzip libzip-devel yum install -y pcre pcre-devel yum install -y icu libicu-devel autoconf yum install -y freetype freetype-devel yum install -y openssl openssl-devel - yum install -y libzip libzip-devel yum install -y graphviz libxml2 libxml2-devel - yum install -y sqlite-devel yum install -y oniguruma oniguruma-devel yum install -y ImageMagick ImageMagick-devel From 6a51c42b4087ff46432e5221445ed19ad6f7d04b Mon Sep 17 00:00:00 2001 From: midoks Date: Tue, 21 Jun 2022 18:28:57 +0800 Subject: [PATCH 3/7] Update centos.sh --- scripts/install/centos.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/install/centos.sh b/scripts/install/centos.sh index 773c41bf9..b16f71fc2 100755 --- a/scripts/install/centos.sh +++ b/scripts/install/centos.sh @@ -108,6 +108,7 @@ if [ ! -f /www/server/mdserver-web/bin/activate ];then sleep 5 fi +echo "start install python env lib" if [ -f /www/server/mdserver-web/bin/activate ];then cd /www/server/mdserver-web && source /www/server/mdserver-web/bin/activate && pip3 install -r /www/server/mdserver-web/requirements.txt @@ -122,7 +123,7 @@ if [ -f /www/server/mdserver-web/bin/activate ];then pip3 install Jinja==2.11.2 pip3 install pymongo fi - +echo "end install python env lib" echo "end install python lib" From eebe809664ad42fee585657a287c2ba99e065cd7 Mon Sep 17 00:00:00 2001 From: midoks Date: Tue, 21 Jun 2022 18:35:23 +0800 Subject: [PATCH 4/7] Update centos.sh --- scripts/install/centos.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/install/centos.sh b/scripts/install/centos.sh index b16f71fc2..130fb0e68 100755 --- a/scripts/install/centos.sh +++ b/scripts/install/centos.sh @@ -120,7 +120,6 @@ if [ -f /www/server/mdserver-web/bin/activate ];then pip3 install flask-caching==1.10.1 pip3 install python-socketio==4.2.0 pip3 install psutil==5.9.1 - pip3 install Jinja==2.11.2 pip3 install pymongo fi echo "end install python env lib" From 2a1fef3d54aae8842f1145ccfa166b39c149632d Mon Sep 17 00:00:00 2001 From: midoks Date: Tue, 21 Jun 2022 18:38:38 +0800 Subject: [PATCH 5/7] Update centos.sh --- scripts/install/centos.sh | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/scripts/install/centos.sh b/scripts/install/centos.sh index 130fb0e68..7b7ca2422 100755 --- a/scripts/install/centos.sh +++ b/scripts/install/centos.sh @@ -103,16 +103,13 @@ pip3 install pymongo cd /www/server/mdserver-web && pip3 install -r /www/server/mdserver-web/requirements.txt -if [ ! -f /www/server/mdserver-web/bin/activate ];then - cd /www/server/mdserver-web && python3 -m venv . - sleep 5 -fi echo "start install python env lib" -if [ -f /www/server/mdserver-web/bin/activate ];then - cd /www/server/mdserver-web && source /www/server/mdserver-web/bin/activate && pip3 install -r /www/server/mdserver-web/requirements.txt - - pip install --upgrade pip +if [ ! -f /www/server/mdserver-web/bin/activate ];then + cd /www/server/mdserver-web && python3 -m venv . + source /www/server/mdserver-web/bin/activate + pip3 install -r /www/server/mdserver-web/requirements.txt + pip install --upgrade pip pip3 install gunicorn==20.1.0 pip3 install gevent==21.1.2 pip3 install gevent-websocket==0.10.1 @@ -122,6 +119,7 @@ if [ -f /www/server/mdserver-web/bin/activate ];then pip3 install psutil==5.9.1 pip3 install pymongo fi + echo "end install python env lib" echo "end install python lib" From c2324f6f4dcb12f860cf82f2b8b66928c84079ab Mon Sep 17 00:00:00 2001 From: midoks Date: Tue, 21 Jun 2022 19:20:28 +0800 Subject: [PATCH 6/7] Update centos.sh --- scripts/install/centos.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/install/centos.sh b/scripts/install/centos.sh index 7b7ca2422..4b9853bd3 100755 --- a/scripts/install/centos.sh +++ b/scripts/install/centos.sh @@ -105,16 +105,19 @@ cd /www/server/mdserver-web && pip3 install -r /www/server/mdserver-web/requirem echo "start install python env lib" + if [ ! -f /www/server/mdserver-web/bin/activate ];then cd /www/server/mdserver-web && python3 -m venv . source /www/server/mdserver-web/bin/activate - pip3 install -r /www/server/mdserver-web/requirements.txt pip install --upgrade pip + pip3 install -r /www/server/mdserver-web/requirements.txt pip3 install gunicorn==20.1.0 pip3 install gevent==21.1.2 pip3 install gevent-websocket==0.10.1 pip3 install requests==2.20.0 pip3 install flask-caching==1.10.1 + pip3 install flask-session==0.3.2 + pip3 install flask-sqlalchemy==2.3.2 pip3 install python-socketio==4.2.0 pip3 install psutil==5.9.1 pip3 install pymongo From af05cf9fe9c05420953782b548810154e453322d Mon Sep 17 00:00:00 2001 From: midoks Date: Tue, 21 Jun 2022 19:57:23 +0800 Subject: [PATCH 7/7] Update centos.sh --- scripts/install/centos.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/scripts/install/centos.sh b/scripts/install/centos.sh index 4b9853bd3..d970764f5 100755 --- a/scripts/install/centos.sh +++ b/scripts/install/centos.sh @@ -66,7 +66,7 @@ fi #安装时不开启 systemctl stop firewalld -# yum groupinstall -y "Development Tools" +yum groupinstall -y "Development Tools" yum install -y libevent libevent-devel libjpeg* libpng* gd* libxslt* unzip yum install -y python-imaging libicu-devel zip bzip2-devel gcc libxml2 libxml2-dev pcre pcre-devel yum install -y libjpeg-devel libpng-devel libwebp libwebp-devel @@ -81,15 +81,15 @@ if [ ! -f /usr/local/bin/pip3 ];then fi -echo "start install lib" +# echo "start install lib" cd /www/server/mdserver-web/scripts && bash lib.sh -echo "end install lib" +# echo "end install lib" chmod 755 /www/server/mdserver-web/data -echo "start install python lib" +# echo "start install python lib" pip install --upgrade pip pip3 install gunicorn==20.1.0 @@ -104,7 +104,7 @@ pip3 install pymongo cd /www/server/mdserver-web && pip3 install -r /www/server/mdserver-web/requirements.txt -echo "start install python env lib" +# echo "start install python env lib" if [ ! -f /www/server/mdserver-web/bin/activate ];then cd /www/server/mdserver-web && python3 -m venv . @@ -123,8 +123,8 @@ if [ ! -f /www/server/mdserver-web/bin/activate ];then pip3 install pymongo fi -echo "end install python env lib" -echo "end install python lib" +# echo "end install python env lib" +# echo "end install python lib" cd /www/server/mdserver-web && ./cli.sh start