\
diff --git a/route/static/app/soft.js b/route/static/app/soft.js
index 94bca7e5e..8f59f2a80 100755
--- a/route/static/app/soft.js
+++ b/route/static/app/soft.js
@@ -146,17 +146,6 @@ function getSList(isdisplay) {
'
' + indexshow + ' | ' +
'
' + handle + ' | ' +
'';
-
- // sBody += '
' +
- // ' ' + plugin_title + ' | ' +
- // '' + plugin.ps + ' | ' +
- // '' + softPath + ' | ' +
- // '' + state + ' | ' +
- // '' + indexshow + ' | ' +
- // '' + handle + ' | ' +
- // '
';
}
sBody += pBody;
diff --git a/route/static/img/apache.png b/route/static/img/apache.png
deleted file mode 100755
index e321bcae0..000000000
Binary files a/route/static/img/apache.png and /dev/null differ
diff --git a/route/static/img/mysql.png b/route/static/img/mysql.png
deleted file mode 100755
index a0911ee83..000000000
Binary files a/route/static/img/mysql.png and /dev/null differ
diff --git a/route/static/img/nginx.png b/route/static/img/nginx.png
deleted file mode 100755
index 2303ff099..000000000
Binary files a/route/static/img/nginx.png and /dev/null differ
diff --git a/route/static/img/php.png b/route/static/img/php.png
deleted file mode 100755
index 4fa965260..000000000
Binary files a/route/static/img/php.png and /dev/null differ
diff --git a/scripts/install/alma.sh b/scripts/install/alma.sh
index d7ddc4136..1e70f2e15 100755
--- a/scripts/install/alma.sh
+++ b/scripts/install/alma.sh
@@ -86,10 +86,24 @@ chmod 755 /www/server/mdserver-web/data
cd /www/server/mdserver-web && ./cli.sh start
-sleep 5
+isStart=`ps -ef|grep 'gunicorn -c setting.py app:app' |grep -v grep|awk '{print $2}'`
+n=0
+while [[ ! -f /etc/init.d/mw ]];
+do
+ echo -e ".\c"
+ sleep 1
+ let n+=1
+ if [ $n -gt 20 ];then
+ echo -e "start mw fail"
+ exit 1
+ fi
+done
-cd /www/server/mdserver-web && ./cli.sh stop
-cd /www/server/mdserver-web && ./scripts/init.d/mw default
+cd /www/server/mdserver-web && /etc/init.d/mw stop
cd /www/server/mdserver-web && /etc/init.d/mw start
+cd /www/server/mdserver-web && /etc/init.d/mw default
+
+
+
diff --git a/scripts/install/centos.sh b/scripts/install/centos.sh
index e2b548a1f..de18732a0 100755
--- a/scripts/install/centos.sh
+++ b/scripts/install/centos.sh
@@ -95,10 +95,22 @@ chmod 755 /www/server/mdserver-web/data
cd /www/server/mdserver-web && ./cli.sh start
-sleep 5
+isStart=`ps -ef|grep 'gunicorn -c setting.py app:app' |grep -v grep|awk '{print $2}'`
+n=0
+while [[ ! -f /etc/init.d/mw ]];
+do
+ echo -e ".\c"
+ sleep 1
+ let n+=1
+ if [ $n -gt 20 ];then
+ echo -e "start mw fail"
+ exit 1
+ fi
+done
-cd /www/server/mdserver-web && ./cli.sh stop
-cd /www/server/mdserver-web && ./scripts/init.d/mw default
+cd /www/server/mdserver-web && /etc/init.d/mw stop
cd /www/server/mdserver-web && /etc/init.d/mw start
+cd /www/server/mdserver-web && /etc/init.d/mw default
+
diff --git a/scripts/install/debian.sh b/scripts/install/debian.sh
index 8d36831f4..ea3761dd6 100644
--- a/scripts/install/debian.sh
+++ b/scripts/install/debian.sh
@@ -104,11 +104,25 @@ chmod 755 /www/server/mdserver-web/data
cd /www/server/mdserver-web && ./cli.sh start
-sleep 5
+isStart=`ps -ef|grep 'gunicorn -c setting.py app:app' |grep -v grep|awk '{print $2}'`
+n=0
+while [[ ! -f /etc/init.d/mw ]];
+do
+ echo -e ".\c"
+ sleep 1
+ let n+=1
+ if [ $n -gt 20 ];then
+ echo -e "start mw fail"
+ exit 1
+ fi
+done
-cd /www/server/mdserver-web && ./cli.sh stop
-cd /www/server/mdserver-web && ./scripts/init.d/mw default
+cd /www/server/mdserver-web && /etc/init.d/mw stop
cd /www/server/mdserver-web && /etc/init.d/mw start
+cd /www/server/mdserver-web && /etc/init.d/mw default
+
+
+
diff --git a/scripts/install/fedora.sh b/scripts/install/fedora.sh
index feec8833d..fbba069c6 100644
--- a/scripts/install/fedora.sh
+++ b/scripts/install/fedora.sh
@@ -85,12 +85,22 @@ cd /www/server/mdserver-web/scripts && bash lib.sh
chmod 755 /www/server/mdserver-web/data
-
cd /www/server/mdserver-web && ./cli.sh start
-sleep 5
+isStart=`ps -ef|grep 'gunicorn -c setting.py app:app' |grep -v grep|awk '{print $2}'`
+n=0
+while [[ ! -f /etc/init.d/mw ]];
+do
+ echo -e ".\c"
+ sleep 1
+ let n+=1
+ if [ $n -gt 20 ];then
+ echo -e "start mw fail"
+ exit 1
+ fi
+done
-cd /www/server/mdserver-web && ./cli.sh stop
-cd /www/server/mdserver-web && ./scripts/init.d/mw default
+cd /www/server/mdserver-web && /etc/init.d/mw stop
cd /www/server/mdserver-web && /etc/init.d/mw start
+cd /www/server/mdserver-web && /etc/init.d/mw default
diff --git a/scripts/install/rocky.sh b/scripts/install/rocky.sh
index 7d1b6c925..c4cbcf1b5 100644
--- a/scripts/install/rocky.sh
+++ b/scripts/install/rocky.sh
@@ -84,11 +84,21 @@ chmod 755 /www/server/mdserver-web/data
cd /www/server/mdserver-web && ./cli.sh start
-sleep 5
+isStart=`ps -ef|grep 'gunicorn -c setting.py app:app' |grep -v grep|awk '{print $2}'`
+n=0
+while [[ ! -f /etc/init.d/mw ]];
+do
+ echo -e ".\c"
+ sleep 1
+ let n+=1
+ if [ $n -gt 20 ];then
+ echo -e "start mw fail"
+ exit 1
+ fi
+done
-cd /www/server/mdserver-web && ./cli.sh stop
-cd /www/server/mdserver-web && ./scripts/init.d/mw default
+cd /www/server/mdserver-web && /etc/init.d/mw stop
cd /www/server/mdserver-web && /etc/init.d/mw start
-
+cd /www/server/mdserver-web && /etc/init.d/mw default
diff --git a/scripts/install/ubuntu.sh b/scripts/install/ubuntu.sh
index 152c0bb4f..6d4a66c2e 100644
--- a/scripts/install/ubuntu.sh
+++ b/scripts/install/ubuntu.sh
@@ -65,10 +65,44 @@ chmod 755 /www/server/mdserver-web/data
+# mysql8.0 在ubuntu22需要的库
+apt install -y patchelf
+
+VERSION_ID=`cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | awk -F "\"" '{print $2}'`
+if [ "${VERSION_ID}" == "22.04" ];then
+ pip3 install -U --force-reinstall --no-binary :all: gevent
+fi
+
+if [ ! -f /www/server/mdserver-web/bin/activate ];then
+ cd /www/server/mdserver-web && python3 -m venv .
+ cd /www/server/mdserver-web && source /www/server/mdserver-web/bin/activate
+else
+ cd /www/server/mdserver-web && source /www/server/mdserver-web/bin/activate
+fi
+
+if [ "${VERSION_ID}" == "22.04" ];then
+ pip3 install -U --force-reinstall --no-binary :all: gevent
+fi
+
+
+
cd /www/server/mdserver-web && ./cli.sh start
-sleep 5
+isStart=`ps -ef|grep 'gunicorn -c setting.py app:app' |grep -v grep|awk '{print $2}'`
+n=0
+while [[ ! -f /etc/init.d/mw ]];
+do
+ echo -e ".\c"
+ sleep 1
+ let n+=1
+ if [ $n -gt 20 ];then
+ echo -e "start mw fail"
+ exit 1
+ fi
+done
-cd /www/server/mdserver-web && ./cli.sh stop
-cd /www/server/mdserver-web && ./scripts/init.d/mw default
+cd /www/server/mdserver-web && /etc/init.d/mw stop
cd /www/server/mdserver-web && /etc/init.d/mw start
+cd /www/server/mdserver-web && /etc/init.d/mw default
+
+
diff --git a/scripts/install_dev.sh b/scripts/install_dev.sh
index 572c83044..34a8d63ce 100755
--- a/scripts/install_dev.sh
+++ b/scripts/install_dev.sh
@@ -67,7 +67,7 @@ if [ $OSNAME != "macos" ];then
if [ ! -d /www/server/mdserver-web ];then
wget -O /tmp/dev.zip https://github.com/midoks/mdserver-web/archive/refs/heads/dev.zip
cd /tmp && unzip /tmp/dev.zip
- mv -f /tmp/mdserver-web-master /www/server/mdserver-web
+ mv -f /tmp/mdserver-web-dev /www/server/mdserver-web
rm -rf /tmp/dev.zip
rm -rf /tmp/mdserver-web-dev
fi
diff --git a/scripts/lib.sh b/scripts/lib.sh
index b7364666d..27acceac7 100755
--- a/scripts/lib.sh
+++ b/scripts/lib.sh
@@ -255,6 +255,8 @@ else
OSNAME='unknow'
fi
+VERSION_ID=`cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | awk -F "\"" '{print $2}'`
+echo "${OSNAME}:${VERSION_ID}"
# system judge
if [ "$OSNAME" == "macos" ]; then
@@ -270,16 +272,25 @@ elif [ "$OSNAME" == "ubuntu" ] || [ "$OSNAME" == "debian" ]; then
apt install -y devscripts
apt install -y net-tools
apt install -y python3-dev
+ apt install -y autoconf
+ apt install -y gcc
apt install -y libffi-dev
apt install -y cmake automake make
apt install -y webp scons
+ apt install -y libwebp-dev
apt install -y lzma lzma-dev
apt install -y libunwind-dev
apt install -y libpcre3 libpcre3-dev
apt install -y openssl
+ apt install -y libssl-dev
+
+ apt install -y libmemcached-dev
+ apt install -y libsasl2-dev
+ apt install -y imagemagick
+ apt install -y libmagickwand-dev
apt install -y libxml2 libxml2-dev libbz2-dev libmcrypt-dev libpspell-dev librecode-dev
apt install -y libgmp-dev libgmp3-dev libreadline-dev libxpm-dev
@@ -290,14 +301,19 @@ elif [ "$OSNAME" == "ubuntu" ] || [ "$OSNAME" == "debian" ]; then
apt install -y libjpeg62-turbo-dev
apt install -y libfreetype6-dev
apt install -y libevent-dev libncurses5-dev libldap2-dev
-
+ apt install -y libzip-dev
apt install -y libicu-dev
- apt install -y gcc build-essential libssl-dev
+ apt install -y build-essential
+ apt install -y libcurl4-openssl-dev
apt install -y curl libcurl4-gnutls-dev
#https://blog.csdn.net/qq_36228377/article/details/123154344
- ln -s /usr/include/x86_64-linux-gnu/curl /usr/include/curl
+ # ln -s /usr/include/x86_64-linux-gnu/curl /usr/include/curl
+ if [ ! -d /usr/include/curl ];then
+ ln -s /usr/include/x86_64-linux-gnu/curl /usr/include/curl
+ fi
+
apt install -y graphviz bison re2c flex
apt install -y libsqlite3-dev
@@ -346,8 +362,6 @@ pip install --upgrade pip
pip3 install --upgrade setuptools
cd /www/server/mdserver-web && 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
@@ -357,6 +371,10 @@ pip3 install psutil
pip3 install flask-socketio==5.2.0
pip3 install mysqlclient
+# if [ "${OSNAME}" == "ubuntu" ] && [ "${VERSION_ID}" == "22.04" ];then
+# pip3 install -U --force-reinstall --no-binary :all: gevent
+# fi
+
if [ ! -f /www/server/mdserver-web/bin/activate ];then
cd /www/server/mdserver-web && python3 -m venv .
cd /www/server/mdserver-web && source /www/server/mdserver-web/bin/activate
@@ -368,8 +386,6 @@ pip install --upgrade pip
pip3 install --upgrade setuptools
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
@@ -379,7 +395,9 @@ pip3 install psutil
pip3 install flask-socketio==5.2.0
pip3 install mysqlclient
-
+# if [ "${OSNAME}" == "ubuntu" ] && [ "${VERSION_ID}" == "22.04" ];then
+# pip3 install -U --force-reinstall --no-binary :all: gevent
+# fi
##### common start #####
diff --git a/scripts/quick/app.sh b/scripts/quick/app.sh
index f411bab40..d8310683c 100755
--- a/scripts/quick/app.sh
+++ b/scripts/quick/app.sh
@@ -14,7 +14,6 @@ fi
# openresty
if [ ! -d /www/server/openresty ];then
cd /www/server/mdserver-web/plugins/openresty && bash install.sh install 1.21.4.1
- cd /www/server/mdserver-web && python3 /www/server/mdserver-web/plugins/openresty/index.py start
else
echo "openresty alreay exist!"
fi
@@ -23,19 +22,32 @@ fi
# php
if [ ! -d /www/server/php/71 ];then
cd /www/server/mdserver-web/plugins/php && bash install.sh install 71
- cd /www/server/mdserver-web && python3 /www/server/mdserver-web/plugins/php/index.py start 71
else
echo "php71 alreay exist!"
fi
+
+# php
+if [ ! -d /www/server/php/74 ];then
+ cd /www/server/mdserver-web/plugins/php && bash install.sh install 74
+else
+ echo "php74 alreay exist!"
+fi
+
# mysql
if [ ! -d /www/server/mysql ];then
- cd /www/server/mdserver-web/plugins/mysql && bash install.sh install 5.5
- cd /www/server/mdserver-web && python3 /www/server/mdserver-web/plugins/mysql/index.py start 5.5
+ cd /www/server/mdserver-web/plugins/mysql && bash install.sh install 5.6
else
echo "mysql alreay exist!"
fi
+# phpmyadmin
+if [ ! -d /www/server/phpmyadmin ];then
+ cd /www/server/mdserver-web/plugins/phpmyadmin && bash install.sh install 4.4.15
+else
+ echo "phpmyadmin alreay exist!"
+fi
+
endTime=`date +%s`
((outTime=(${endTime}-${startTime})/60))
echo -e "Time consumed:\033[32m $outTime \033[0mMinute!"
diff --git a/scripts/quick/debug.sh b/scripts/quick/debug.sh
index 27347444f..a23015b50 100755
--- a/scripts/quick/debug.sh
+++ b/scripts/quick/debug.sh
@@ -14,24 +14,23 @@ fi
# openresty
if [ ! -d /www/server/openresty ];then
cd /www/server/mdserver-web/plugins/openresty && bash install.sh install 1.21.4.1
- cd /www/server/mdserver-web && python3 /www/server/mdserver-web/plugins/openresty/index.py start
fi
# php
-if [ ! -d /www/server/php/71 ];then
- cd /www/server/mdserver-web/plugins/php && bash install.sh install 71
- cd /www/server/mdserver-web && python3 /www/server/mdserver-web/plugins/php/index.py start 71
-fi
+# if [ ! -d /www/server/php/71 ];then
+# cd /www/server/mdserver-web/plugins/php && bash install.sh install 71
+# fi
-PHP_VER_LIST=(53 54 55 56 71 72 73 74 80 81)
+PHP_VER_LIST=(52 53 54 55 56 70 71 72 73 74 80 81)
# PHP_VER_LIST=(81)
for PHP_VER in ${PHP_VER_LIST[@]}; do
echo "php${PHP_VER} -- start"
- cd /www/server/mdserver-web/plugins/php && bash install.sh install ${PHP_VER}
- cd /www/server/mdserver-web && python3 /www/server/mdserver-web/plugins/php/index.py start ${PHP_VER}
+ if [ ! -d /www/server/php/${PHP_VER} ];then
+ cd /www/server/mdserver-web/plugins/php && bash install.sh install ${PHP_VER}
+ fi
echo "php${PHP_VER} -- end"
done
@@ -39,13 +38,10 @@ done
# mysql
if [ ! -d /www/server/mysql ];then
# cd /www/server/mdserver-web/plugins/mysql && bash install.sh install 5.7
- # cd /www/server/mdserver-web && python3 /www/server/mdserver-web/plugins/mysql/index.py start 5.7
# cd /www/server/mdserver-web/plugins/mysql && bash install.sh install 5.6
- # cd /www/server/mdserver-web && python3 /www/server/mdserver-web/plugins/mysql/index.py start 5.6
cd /www/server/mdserver-web/plugins/mysql && bash install.sh install 8.0
- cd /www/server/mdserver-web && python3 /www/server/mdserver-web/plugins/mysql/index.py start 8.0
fi
endTime=`date +%s`
diff --git a/task.py b/task.py
index 67f486cd6..24b0dc10c 100755
--- a/task.py
+++ b/task.py
@@ -388,6 +388,15 @@ def check502():
def startPHPVersion(version):
sdir = mw.getServerDir()
try:
+
+ # system
+ phpService = '/lib/systemd/system/php' + version + '.service'
+ if os.path.exists(phpService):
+ mw.execShell("systemctl restart php" + version)
+ if checkPHPVersion(version):
+ return True
+
+ # initd
fpm = sdir + '/php/init.d/php' + version
php_path = sdir + '/php/' + version + '/sbin/php-fpm'
if not os.path.exists(php_path):
@@ -432,34 +441,40 @@ def startPHPVersion(version):
def checkPHPVersion(version):
try:
url = 'http://127.0.0.1/phpfpm_status_' + version
- result = mw.httpGet(url)
- # print(version,result)
- # 检查openresty
- if result.find('Bad Gateway') != -1:
- return False
- if result.find('HTTP Error 404: Not Found') != -1:
- return False
+ result = mw.httpGet(url, 1)
+ if result.find('timed out'):
+ raise
+ except Exception as e:
+ url = 'http://' + mw.getLocalIp() + '/phpfpm_status_' + version
+ result = mw.httpGet(url, 1)
+ else:
+ result = 'Bad Gateway'
- # 检查Web服务是否启动
- if result.find('Connection refused') != -1:
- global isTask
- if os.path.exists(isTask):
- isStatus = mw.readFile(isTask)
- if isStatus == 'True':
- return True
+ # print(version,result)
+ # 检查openresty
+ if result.find('Bad Gateway') != -1:
+ return False
+ if result.find('HTTP Error 404: Not Found') != -1:
+ return False
- # systemd
- systemd = '/lib/systemd/system/openresty.service'
- if os.path.exists(systemd):
- execShell('systemctl reload openresty')
+ # 检查Web服务是否启动
+ if result.find('Connection refused') != -1:
+ global isTask
+ if os.path.exists(isTask):
+ isStatus = mw.readFile(isTask)
+ if isStatus == 'True':
return True
- # initd
- initd = '/etc/init.d/openresty'
- if os.path.exists(initd):
- os.system(initd + ' reload')
- return True
- except:
- return True
+
+ # systemd
+ systemd = '/lib/systemd/system/openresty.service'
+ if os.path.exists(systemd):
+ execShell('systemctl reload openresty')
+ return True
+ # initd
+ initd = '/etc/init.d/openresty'
+ if os.path.exists(initd):
+ os.system(initd + ' reload')
+ return True
# --------------------------------------PHP监控 end--------------------------------------------- #