diff --git a/.github/workflows/python-app-mysql8.yml b/.github/workflows/python-app-mysql8.yml
index eae53b1c4..ab89330b0 100644
--- a/.github/workflows/python-app-mysql8.yml
+++ b/.github/workflows/python-app-mysql8.yml
@@ -5,9 +5,9 @@ name: MW APP MySQL80
on:
push:
- branches: [ "master","dev" ]
+ branches: [ "master" ]
pull_request:
- branches: [ "master","dev" ]
+ branches: [ "master" ]
permissions:
contents: read
@@ -31,13 +31,6 @@ jobs:
sudo bash scripts/install_dev.sh
- name: Install MySQL80
run: |
- sudo mkdir -p /tmp
- sudo echo '' > /tmp/t.log
- sudo chmod 777 /www/server/mdserver-web/plugins/mysql/versions/8.0/install.sh
- sudo cat /www/server/mdserver-web/plugins/mysql/versions/8.0/install.sh > /tmp/t.log
- sudo echo "export MAKEJN=-j12\n" >> /www/server/mdserver-web/plugins/mysql/versions/8.0/install.sh
- sudo cat /tmp/t.log >> /www/server/mdserver-web/plugins/mysql/versions/8.0/install.sh
-
cd /www/server/mdserver-web/plugins/mysql && sudo bash install.sh install 8.0
- name: Start DEBUG
run: |
diff --git a/.github/workflows/python-app-op.yml b/.github/workflows/python-app-op.yml
new file mode 100644
index 000000000..53ab5f7fc
--- /dev/null
+++ b/.github/workflows/python-app-op.yml
@@ -0,0 +1,38 @@
+# This workflow will install Python dependencies, run tests and lint with a single version of Python
+# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
+
+name: MW APP OpenResty
+
+on:
+ push:
+ branches: [ "master", "dev" ]
+ pull_request:
+ branches: [ "master", "dev" ]
+
+permissions:
+ contents: read
+
+jobs:
+ build:
+ strategy:
+ matrix:
+ os: [ubuntu-latest]
+ runs-on: ${{ matrix.os }}
+ #runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v3
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v3
+ with:
+ python-version: "3.10"
+ - name: Install MW
+ run: |
+ sudo bash scripts/install_dev.sh
+ - name: Install OpenResty
+ run: |
+ cd /www/server/mdserver-web/plugins/openresty && sudo bash install.sh install 1.21.4.1
+ - name: Start DEBUG
+ run: |
+ gunicorn -c setting.py app:app
+ python3 task.py &
diff --git a/.github/workflows/python-app-php.yml b/.github/workflows/python-app-php.yml
new file mode 100644
index 000000000..e92edc482
--- /dev/null
+++ b/.github/workflows/python-app-php.yml
@@ -0,0 +1,68 @@
+# This workflow will install Python dependencies, run tests and lint with a single version of Python
+# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
+
+name: MW APP PHP
+
+on:
+ push:
+ branches: [ "master" ]
+ pull_request:
+ branches: [ "master" ]
+
+permissions:
+ contents: read
+
+jobs:
+ build:
+ strategy:
+ matrix:
+ os: [ubuntu-latest]
+ runs-on: ${{ matrix.os }}
+ #runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v3
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v3
+ with:
+ python-version: "3.10"
+ - name: Install MW
+ run: |
+ sudo bash scripts/install_dev.sh
+ - name: Install PHP53
+ run: |
+ cd /www/server/mdserver-web/plugins/php && sudo bash install.sh install 53
+ - name: Install PHP54
+ run: |
+ cd /www/server/mdserver-web/plugins/php && sudo bash install.sh install 54
+ - name: Install PHP55
+ run: |
+ cd /www/server/mdserver-web/plugins/php && sudo bash install.sh install 55
+ - name: Install PHP56
+ run: |
+ cd /www/server/mdserver-web/plugins/php && sudo bash install.sh install 56
+ - name: Install PHP70
+ run: |
+ cd /www/server/mdserver-web/plugins/php && sudo bash install.sh install 70
+ - name: Install PHP71
+ run: |
+ cd /www/server/mdserver-web/plugins/php && sudo bash install.sh install 71
+ - name: Install PHP72
+ run: |
+ cd /www/server/mdserver-web/plugins/php && sudo bash install.sh install 72
+ - name: Install PHP73
+ run: |
+ cd /www/server/mdserver-web/plugins/php && sudo bash install.sh install 73
+ - name: Install PHP74
+ run: |
+ cd /www/server/mdserver-web/plugins/php && sudo bash install.sh install 74
+ - name: Install PHP80
+ run: |
+ cd /www/server/mdserver-web/plugins/php && sudo bash install.sh install 80
+ - name: Install PHP81
+ run: |
+ cd /www/server/mdserver-web/plugins/php && sudo bash install.sh install 81
+ - name: Start DEBUG
+ run: |
+ gunicorn -c setting.py app:app
+ python3 task.py &
diff --git a/README.md b/README.md
index 7d742f7f4..fb3397085 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,5 @@
### mdserver-web 0.8.6
+
简单的Linux面板,感谢BT.CN写出如此好的web管理软件。我一看到,就知道这是我一直想要的页面化管理方式。
复制了后台管理界面,按照自己想要的方式写了一版。
@@ -18,7 +19,7 @@
基本上可以使用,后续会继续优化!欢迎提供意见!
-- https://t.me/mdserver_web
+- 吹水组 - https://t.me/mdserver_web
### 主要插件介绍
diff --git a/class/core/files_api.py b/class/core/files_api.py
index d64dc8aca..8f7974d8f 100755
--- a/class/core/files_api.py
+++ b/class/core/files_api.py
@@ -191,34 +191,40 @@ class files_api:
# self.setFileAccept(path + '/' + filename)
return mw.returnJson(True, '已将下载任务添加到队列!')
+ # 删除进程下的所有进程
+ def removeTaskRecursion(self, pid):
+ cmd = "ps -ef|grep " + pid + \
+ " | grep -v grep |sed -n '2,1p' | awk '{print $2}'"
+ sub_pid = mw.execShell(cmd)
+
+ if sub_pid[0].strip() == '':
+ return 'ok'
+
+ self.removeTaskRecursion(sub_pid[0].strip())
+ mw.execShell('kill -9 ' + sub_pid[0].strip())
+ return sub_pid[0].strip()
+
def removeTaskApi(self):
+ import system_api
mid = request.form.get('id', '')
try:
name = mw.M('tasks').where('id=?', (mid,)).getField('name')
status = mw.M('tasks').where('id=?', (mid,)).getField('status')
+ # print(name, status)
mw.M('tasks').delete(mid)
if status == '-1':
- os.system(
- "kill `ps -ef |grep 'python panelSafe.pyc'|grep -v grep|grep -v panelExec|awk '{print $2}'`")
- os.system(
- "kill `ps aux | grep 'python task.pyc$'|awk '{print $2}'`")
- os.system('''
-pids=`ps aux | grep 'sh'|grep -v grep|grep install|awk '{print $2}'`
-arr=($pids)
+ task_pid = mw.execShell(
+ "ps aux | grep 'task.py' | grep -v grep |awk '{print $2}'")
-for p in ${arr[@]}
-do
- kill -9 $p
-done
- ''')
+ task_list = task_pid[0].strip().split("\n")
+ for i in range(len(task_list)):
+ self.removeTaskRecursion(task_list[i])
- os.system(
- 'rm -f ' + name.replace('扫描目录[', '').replace(']', '') + '/scan.pl')
isTask = mw.getRootDir() + '/tmp/panelTask.pl'
mw.writeFile(isTask, 'True')
- os.system('/etc/init.d/mw start')
+ system_api.system_api().restartTask()
except:
- os.system('/etc/init.d/mw start')
+ system_api.system_api().restartTask()
return mw.returnJson(True, '任务已删除!')
# 上传文件
diff --git a/class/core/site_api.py b/class/core/site_api.py
index 109e7a5e9..c2a646885 100755
--- a/class/core/site_api.py
+++ b/class/core/site_api.py
@@ -1660,6 +1660,7 @@ class site_api:
content = content.replace('{$PORT}', self.sitePort)
content = content.replace('{$SERVER_NAME}', self.siteName)
content = content.replace('{$ROOT_DIR}', self.sitePath)
+ content = content.replace('{$PHP_DIR}', self.setupPath + '/php')
content = content.replace('{$PHPVER}', self.phpVersion)
content = content.replace('{$OR_REWRITE}', self.rewritePath)
diff --git a/class/core/system_api.py b/class/core/system_api.py
index 87fb6222f..f16705521 100755
--- a/class/core/system_api.py
+++ b/class/core/system_api.py
@@ -102,6 +102,12 @@ class system_api:
return mw.returnJson(True, '正在重启服务器!')
##### ----- end ----- ###
+ def restartTask(self):
+ initd = mw.getRunDir() + '/scripts/init.d/mw'
+ if os.path.exists(initd):
+ os.system(initd + ' ' + 'restart_task')
+ return True
+
def restartMw(self):
mw.writeFile('data/restart.pl', 'True')
return True
diff --git a/data/tpl/nginx.conf b/data/tpl/nginx.conf
index ac97996bd..246831f69 100755
--- a/data/tpl/nginx.conf
+++ b/data/tpl/nginx.conf
@@ -15,7 +15,7 @@ server
#ERROR-PAGE-END
#PHP-INFO-START
- include enable-php-{$PHPVER}.conf;
+ include {$PHP_DIR}/conf/enable-php-{$PHPVER}.conf;
#PHP-INFO-END
#REWRITE-START
diff --git a/plugins/mysql/versions/8.0/install.sh b/plugins/mysql/versions/8.0/install.sh
index 5bb23a902..6a29558c0 100755
--- a/plugins/mysql/versions/8.0/install.sh
+++ b/plugins/mysql/versions/8.0/install.sh
@@ -1,5 +1,3 @@
-export MAKEJN=-j12
-
# -*- coding: utf-8 -*-
#!/bin/bash
diff --git a/plugins/openresty/conf/nginx.conf b/plugins/openresty/conf/nginx.conf
index 8ed83ed10..c5f539921 100644
--- a/plugins/openresty/conf/nginx.conf
+++ b/plugins/openresty/conf/nginx.conf
@@ -70,7 +70,7 @@ http
stub_status on;
access_log off;
}
- include {$SERVER_PATH}/openresty/nginx/conf/php_status/*.conf;
+ include {$SERVER_PATH}/web_conf/php/status/*.conf;
}
include {$SERVER_PATH}/web_conf/nginx/vhost/*.conf;
}
diff --git a/plugins/openresty/index.py b/plugins/openresty/index.py
index 80bc3e3ea..67d905fc8 100755
--- a/plugins/openresty/index.py
+++ b/plugins/openresty/index.py
@@ -136,7 +136,10 @@ def confReplace():
mw.writeFile(nconf, content)
# 静态配置
- static_conf = getServerDir() + '/nginx/conf/enable-php-00.conf'
+ php_conf = mw.getServerDir() + '/web_conf/php/conf'
+ if not os.path.exists(php_conf):
+ mw.execShell('mkdir -p ' + php_conf)
+ static_conf = mw.getServerDir() + '/web_conf/php/conf/enable-php-00.conf'
if not os.path.exists(static_conf):
mw.writeFile(static_conf, '')
@@ -206,6 +209,12 @@ def status():
def restyOp(method):
file = initDreplace()
+ # 启动时,先检查一下配置文件
+ check = getServerDir() + "/bin/openresty -t"
+ check_data = mw.execShell(check)
+ if check_data[1].find('test failed') != -1:
+ return check_data[1]
+
if not mw.isAppleSystem():
data = mw.execShell('systemctl ' + method + ' openresty')
if data[1] == '':
diff --git a/plugins/openresty/install.sh b/plugins/openresty/install.sh
index 627e70cfb..5b597593d 100755
--- a/plugins/openresty/install.sh
+++ b/plugins/openresty/install.sh
@@ -49,18 +49,29 @@ Install_openresty()
if [ -d $serverPath/openresty ];then
echo "${VERSION}" > $serverPath/openresty/version.pl
- echo "" > $serverPath/openresty/nginx/conf/enable-php-00.conf
+ echo "" > $serverPath/web_conf/php/conf/enable-php-00.conf
+
+ #初始化
+ cd ${rootPath} && python3 ${rootPath}/plugins/openresty/index.py start
+ cd ${rootPath} && python3 ${rootPath}/plugins/openresty/index.py initd_install
fi
echo '安装完成' > $install_tmp
}
Uninstall_openresty()
{
- rm -rf $serverPath/openresty
-
+
if [ -f /lib/systemd/system/openresty.service ];then
+ systemctl stop openresty
rm -rf /lib/systemd/system/openresty.service
+ systemctl daemon-reload
fi
+
+ if [ -f $serverPath/openresty/init.d/openresty ];then
+ $serverPath/openresty/init.d/openresty stop
+ fi
+
+ rm -rf $serverPath/openresty
echo '卸载完成' > $install_tmp
}
diff --git a/plugins/openresty/js/openresty.js b/plugins/openresty/js/openresty.js
index 535e91e9e..051e35963 100755
--- a/plugins/openresty/js/openresty.js
+++ b/plugins/openresty/js/openresty.js
@@ -97,12 +97,12 @@ function orPluginOpServiceOp(a,b,c,d,a,v){
}
if( g.status && g.data != 'ok' ) {
- layer.msg(g.data, {icon: 2,time: 3000,shade: 0.3,shadeClose: true});
+ layer.msg(g.data, {icon: 2,time: 10000,shade: 0.3});
}
- setTimeout(function(){
- location.reload();
- },2000);
+ // setTimeout(function(){
+ // location.reload();
+ // },2000);
},'json').error(function() {
layer.close(e);
layer.msg('操作异常!', {icon: 2});
diff --git a/plugins/php/conf/enable-php.conf b/plugins/php/conf/enable-php.conf
index 9f22fb939..d9712e0e3 100644
--- a/plugins/php/conf/enable-php.conf
+++ b/plugins/php/conf/enable-php.conf
@@ -4,5 +4,5 @@ location ~ [^/]\.php(/|$)
fastcgi_pass unix:/tmp/php-cgi-{$PHP_VERSION}.sock;
fastcgi_index index.php;
include fastcgi.conf;
- include pathinfo.conf;
+ include {$SERVER_PATH}/web_conf/php/pathinfo.conf;
}
\ No newline at end of file
diff --git a/plugins/php/index.py b/plugins/php/index.py
index fe6be8eca..10ab15330 100755
--- a/plugins/php/index.py
+++ b/plugins/php/index.py
@@ -122,37 +122,49 @@ def contentReplace(content, version):
def makeOpenrestyConf():
phpversions = ['00', '52', '53', '54', '55', '56',
'70', '71', '72', '73', '74', '80', '81']
- if mw.isInstalledWeb():
- sdir = mw.getServerDir()
- d_pathinfo = sdir + '/openresty/nginx/conf/pathinfo.conf'
- if not os.path.exists(d_pathinfo):
- s_pathinfo = getPluginDir() + '/conf/pathinfo.conf'
- shutil.copyfile(s_pathinfo, d_pathinfo)
- info = getPluginDir() + '/info.json'
- content = mw.readFile(info)
- content = json.loads(content)
- versions = content['versions']
- tpl = getPluginDir() + '/conf/enable-php.conf'
- tpl_content = mw.readFile(tpl)
- for x in phpversions:
- dfile = sdir + '/openresty/nginx/conf/enable-php-' + x + '.conf'
- if not os.path.exists(dfile):
- if x == '00':
- mw.writeFile(dfile, '')
- else:
- w_content = contentReplace(tpl_content, x)
- mw.writeFile(dfile, w_content)
+ sdir = mw.getServerDir()
- # php-fpm status
- for version in phpversions:
- dfile = sdir + '/openresty/nginx/conf/php_status/phpfpm_status_' + version + '.conf'
- tpl = getPluginDir() + '/conf/phpfpm_status.conf'
- if not os.path.exists(dfile):
- content = mw.readFile(tpl)
- content = contentReplace(content, version)
- mw.writeFile(dfile, content)
- mw.restartWeb()
+ dst_dir = sdir + '/web_conf/php'
+ dst_dir_conf = sdir + '/web_conf/php/conf'
+ dst_dir_status = sdir + '/web_conf/php/status'
+ if not os.path.exists(dst_dir):
+ mw.execShell('mkdir -p ' + dst_dir)
+
+ if not os.path.exists(dst_dir_conf):
+ mw.execShell('mkdir -p ' + dst_dir_conf)
+
+ if not os.path.exists(dst_dir_status):
+ mw.execShell('mkdir -p ' + dst_dir_status)
+
+ d_pathinfo = sdir + '/web_conf/php/pathinfo.conf'
+ if not os.path.exists(d_pathinfo):
+ s_pathinfo = getPluginDir() + '/conf/pathinfo.conf'
+ shutil.copyfile(s_pathinfo, d_pathinfo)
+
+ info = getPluginDir() + '/info.json'
+ content = mw.readFile(info)
+ content = json.loads(content)
+ versions = content['versions']
+ tpl = getPluginDir() + '/conf/enable-php.conf'
+ tpl_content = mw.readFile(tpl)
+ for x in phpversions:
+ dfile = sdir + '/web_conf/php/conf/enable-php-' + x + '.conf'
+ if not os.path.exists(dfile):
+ if x == '00':
+ mw.writeFile(dfile, '')
+ else:
+ w_content = contentReplace(tpl_content, x)
+ mw.writeFile(dfile, w_content)
+
+ # php-fpm status
+ for version in phpversions:
+ dfile = sdir + '/web_conf/php/status/phpfpm_status_' + version + '.conf'
+ tpl = getPluginDir() + '/conf/phpfpm_status.conf'
+ if not os.path.exists(dfile):
+ content = mw.readFile(tpl)
+ content = contentReplace(content, version)
+ mw.writeFile(dfile, content)
def phpPrependFile(version):
@@ -537,6 +549,10 @@ def checkFpmStatusFile(version):
def getFpmStatus(version):
checkFpmStatusFile(version)
+ stat = status(version)
+ if stat == 'stop':
+ return mw.returnJson(False, 'PHP[' + version + ']未启动!!!')
+
try:
url = 'http://' + mw.getHostAddr() + '/phpfpm_status_' + version + '?json'
result = mw.httpGet(url)
@@ -552,7 +568,7 @@ def getFpmStatus(version):
except Exception as e:
data = {}
- return mw.getJson(data)
+ return mw.returnJson(True, "OK", data)
def getDisableFunc(version):
diff --git a/plugins/php/install.sh b/plugins/php/install.sh
index 421755f23..564da5f0d 100755
--- a/plugins/php/install.sh
+++ b/plugins/php/install.sh
@@ -31,4 +31,24 @@ if [ ! -d $curPath/versions/$2 ];then
exit 0
fi
-sh -x $curPath/versions/$2/install.sh $1
+if [ "${action}" == "uninstall" ];then
+ #初始化
+ cd ${rootPath} && python3 ${rootPath}/plugins/php/index.py stop ${type}
+ cd ${rootPath} && python3 ${rootPath}/plugins/php/index.py initd_uninstall ${type}
+
+ if [ -f /lib/systemd/system/php${type}.service ];then
+ systemctl stop php${type}
+ rm -rf /lib/systemd/system/php${type}.service
+ systemctl daemon-reload
+ fi
+fi
+
+cd ${curPath} && sh -x $curPath/versions/$2/install.sh $1
+
+if [ "${action}" == "install" ];then
+ #初始化
+ cd ${rootPath} && python3 ${rootPath}/plugins/php/index.py start ${type}
+ cd ${rootPath} && python3 ${rootPath}/plugins/php/index.py initd_install ${type}
+fi
+
+
diff --git a/plugins/php/js/php.js b/plugins/php/js/php.js
index 6b556ec53..692cbdabe 100755
--- a/plugins/php/js/php.js
+++ b/plugins/php/js/php.js
@@ -312,7 +312,13 @@ function setFpmConfig(version){
function getFpmStatus(version){
phpPost('get_fpm_status', version, '', function(ret_data){
- var rdata = $.parseJSON(ret_data.data);
+ var tmp_data = $.parseJSON(ret_data.data);
+ if(!tmp_data.status){
+ layer.msg(tmp_data.msg, { icon: tmp_data.status ? 1 : 2 });
+ return;
+ }
+
+ var rdata = tmp_data.data;
var con = "
\
| 应用池(pool) | " + rdata.pool + " |
\
| 进程管理方式(process manager) | " + ((rdata['process manager'] == 'dynamic') ? '动态' : '静态') + " |
\
diff --git a/plugins/php/versions/52/gd.sh b/plugins/php/versions/52/gd.sh
new file mode 100755
index 000000000..4a05b6046
--- /dev/null
+++ b/plugins/php/versions/52/gd.sh
@@ -0,0 +1,107 @@
+#!/bin/bash
+PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
+export PATH
+
+curPath=`pwd`
+
+rootPath=$(dirname "$curPath")
+rootPath=$(dirname "$rootPath")
+rootPath=$(dirname "$rootPath")
+rootPath=$(dirname "$rootPath")
+serverPath=$(dirname "$rootPath")
+sourcePath=${serverPath}/source/php
+
+actionType=$1
+version=$2
+
+LIBNAME=gd
+LIBV=0
+
+NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts`
+extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so
+
+sysName=`uname`
+if [ "$sysName" == "Darwin" ];then
+ BAK='_bak'
+else
+ BAK=''
+fi
+
+Install_lib()
+{
+
+ isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"`
+ if [ "${isInstall}" != "" ];then
+ echo "php-$version 已安装${LIBNAME},请选择其它版本!"
+ return
+ fi
+
+ ln -s /usr/lib64/libjpeg.so /usr/lib/libjpeg.so
+ ln -s /usr/lib64/libpng.so /usr/lib/
+ cp -frp /usr/lib64/libldap* /usr/lib/
+
+
+ if [ ! -f "$extFile" ];then
+
+ if [ ! -d $sourcePath/php${version}/ext ];then
+ cd $serverPath/mdserver-web/plugins/php && /bin/bash install.sh install ${version}
+ fi
+
+ cd $sourcePath/php${version}/ext/${LIBNAME}
+
+ $serverPath/php/$version/bin/phpize
+ ./configure --with-php-config=$serverPath/php/$version/bin/php-config \
+ --with-gd \
+ --with-jpeg-dir=/usr/lib \
+ --with-freetype-dir=${serverPath}/lib/freetype_old \
+ --enable-gd-native-ttf \
+ --enable-gd-jis-conv
+
+ make clean && make && make install && make clean
+
+ fi
+
+ if [ ! -f "$extFile" ];then
+ echo "ERROR!"
+ return
+ fi
+
+ echo "" >> $serverPath/php/$version/etc/php.ini
+ echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
+ echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
+
+ $serverPath/php/init.d/php${version} restart
+ echo '==========================================================='
+ echo 'successful!'
+}
+
+
+Uninstall_lib()
+{
+ if [ ! -f "$serverPath/php/$version/bin/php-config" ];then
+ echo "php-$version 未安装,请选择其它版本!"
+ return
+ fi
+
+ if [ ! -f "$extFile" ];then
+ echo "php-$version 未安装${LIBNAME},请选择其它版本!"
+ return
+ fi
+
+ echo $serverPath/php/$version/etc/php.ini
+ sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini
+ sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
+
+ rm -f $extFile
+ $serverPath/php/init.d/php$version reload
+ echo '==============================================='
+ echo 'successful!'
+}
+
+
+
+if [ "$actionType" == 'install' ];then
+ Install_lib
+elif [ "$actionType" == 'uninstall' ];then
+ Uninstall_lib
+fi
\ No newline at end of file
diff --git a/plugins/php/versions/52/install.sh b/plugins/php/versions/52/install.sh
index 5b5032c6d..c130e43e9 100755
--- a/plugins/php/versions/52/install.sh
+++ b/plugins/php/versions/52/install.sh
@@ -36,19 +36,19 @@ else
fi
-if [ "$OSNAME" == 'ubuntu' ] || [ "$OSNAME" == 'debian' ] ;then
- apt install bison=2.4.1
- if [ "$?" != "0" ]; then
- echo 'The system version is too high to install'
- exit 1
- fi
+# if [ "$OSNAME" == 'ubuntu' ] || [ "$OSNAME" == 'debian' ] ;then
+# apt install bison=2.4.1
+# if [ "$?" != "0" ]; then
+# echo 'The system version is too high to install'
+# exit 1
+# fi
- apt install flex=2.5.4
- if [ "$?" != "0" ]; then
- echo 'The system version is too high to install'
- exit 1
- fi
-fi
+# apt install flex=2.5.4
+# if [ "$?" != "0" ]; then
+# echo 'The system version is too high to install'
+# exit 1
+# fi
+# fi
version=5.2.17
@@ -116,32 +116,26 @@ if [ $sysName == 'Darwin' ]; then
OPTIONS="${OPTIONS} --with-curl=${serverPath}/lib/curl"
else
OPTIONS="--with-iconv=${serverPath}/lib/libiconv"
- OPTIONS="${OPTIONS} --with-freetype-dir=${serverPath}/lib/freetype_old"
- OPTIONS="${OPTIONS} --with-gd --enable-gd-native-ttf"
OPTIONS="${OPTIONS} --with-curl"
fi
if [ ! -d $serverPath/php/${PHP_VER} ];then
- ln -s /usr/lib64/libjpeg.so /usr/lib/libjpeg.so
- ln -s /usr/lib64/libpng.so /usr/lib/
- cp -frp /usr/lib64/libldap* /usr/lib/
- export MYSQL_LIB_DIR=/usr/lib64/mysql
+ export MYSQL_LIB_DIR=/usr/lib64/mysql
+
cd $sourcePath/php/php${PHP_VER} && ./configure \
--prefix=$serverPath/php/${PHP_VER} \
--exec-prefix=$serverPath/php/${PHP_VER} \
--with-config-file-path=$serverPath/php/${PHP_VER}/etc \
--with-zlib-dir=$serverPath/lib/zlib \
--enable-xml \
- --enable-mysqlnd \
--enable-shared \
--with-mysql=mysqlnd \
--enable-embedded-mysqli=shared \
--enable-sysvmsg \
--enable-sysvsem \
--enable-sysvshm \
- --disable-fileinfo \
$OPTIONS \
--enable-fastcgi \
--enable-fpm
diff --git a/plugins/php/versions/53/install.sh b/plugins/php/versions/53/install.sh
index a948a1ffa..c67009431 100755
--- a/plugins/php/versions/53/install.sh
+++ b/plugins/php/versions/53/install.sh
@@ -48,6 +48,7 @@ else
OPTIONS="--with-iconv=${serverPath}/lib/libiconv"
OPTIONS="${OPTIONS} --with-freetype-dir=${serverPath}/lib/freetype_old"
OPTIONS="${OPTIONS} --with-gd --enable-gd-native-ttf"
+ OPTIONS="${OPTIONS} --with-jpeg --with-jpeg-dir=/usr/lib"
OPTIONS="${OPTIONS} --with-curl"
fi
@@ -85,7 +86,7 @@ if [ ! -d $serverPath/php/53 ];then
--disable-fileinfo \
$OPTIONS \
--enable-fpm
- make clean && make ${MAKEJN:--j2} && make install && make clean
+ make clean && make && make install && make clean
fi
diff --git a/plugins/php/versions/54/install.sh b/plugins/php/versions/54/install.sh
index c1213fd64..5cff9c5c6 100755
--- a/plugins/php/versions/54/install.sh
+++ b/plugins/php/versions/54/install.sh
@@ -42,6 +42,7 @@ else
OPTIONS="--with-iconv=${serverPath}/lib/libiconv"
OPTIONS="${OPTIONS} --with-freetype-dir=${serverPath}/lib/freetype_old"
OPTIONS="${OPTIONS} --with-gd --enable-gd-native-ttf"
+ OPTIONS="${OPTIONS} --with-jpeg --with-jpeg-dir=/usr/lib"
OPTIONS="${OPTIONS} --with-curl"
fi
@@ -70,7 +71,7 @@ if [ ! -d $serverPath/php/${PHP_VER} ];then
$OPTIONS \
--enable-fpm
- make clean && make ${MAKEJN:--j2}
+ make clean && make
#debian11,没有生成php54 man
if [ ! -f sapi/cli/php.1 ];then
diff --git a/plugins/php/versions/55/install.sh b/plugins/php/versions/55/install.sh
index b03848920..2025cf53c 100755
--- a/plugins/php/versions/55/install.sh
+++ b/plugins/php/versions/55/install.sh
@@ -41,6 +41,7 @@ else
OPTIONS="--with-iconv=${serverPath}/lib/libiconv"
OPTIONS="${OPTIONS} --with-freetype-dir=${serverPath}/lib/freetype_old"
OPTIONS="${OPTIONS} --with-gd --enable-gd-native-ttf"
+ OPTIONS="${OPTIONS} --with-jpeg --with-jpeg-dir=/usr/lib"
OPTIONS="${OPTIONS} --with-curl"
fi
@@ -68,7 +69,7 @@ if [ ! -d $serverPath/php/55 ];then
--disable-fileinfo \
$OPTIONS \
--enable-fpm
- make clean && make ${MAKEJN:--j2} && make install && make clean
+ make clean && make && make install && make clean
fi
#------------------------ install end ------------------------------------#
diff --git a/plugins/php/versions/56/install.sh b/plugins/php/versions/56/install.sh
index 046015744..0a86dd34f 100755
--- a/plugins/php/versions/56/install.sh
+++ b/plugins/php/versions/56/install.sh
@@ -41,6 +41,7 @@ else
OPTIONS="--with-iconv=${serverPath}/lib/libiconv"
OPTIONS="${OPTIONS} --with-freetype-dir=${serverPath}/lib/freetype_old"
OPTIONS="${OPTIONS} --with-gd --enable-gd-native-ttf"
+ OPTIONS="${OPTIONS} --with-jpeg --with-jpeg-dir=/usr/lib"
OPTIONS="${OPTIONS} --with-curl"
fi
@@ -71,7 +72,7 @@ if [ ! -d $serverPath/php/56 ];then
--disable-fileinfo \
$OPTIONS \
--enable-fpm
- make clean && make ${MAKEJN:--j2} && make install && make clean
+ make clean && make && make install && make clean
fi
#------------------------ install end ------------------------------------#
diff --git a/plugins/php/versions/70/install.sh b/plugins/php/versions/70/install.sh
index 75203d880..21a772193 100755
--- a/plugins/php/versions/70/install.sh
+++ b/plugins/php/versions/70/install.sh
@@ -41,6 +41,7 @@ else
OPTIONS="--with-iconv=${serverPath}/lib/libiconv"
OPTIONS="${OPTIONS} --with-freetype-dir=${serverPath}/lib/freetype_old"
OPTIONS="${OPTIONS} --with-gd --enable-gd-native-ttf"
+ OPTIONS="${OPTIONS} --with-jpeg --with-jpeg-dir=/usr/lib"
OPTIONS="${OPTIONS} --with-curl"
fi
@@ -67,7 +68,7 @@ if [ ! -d $serverPath/php/70 ];then
--disable-fileinfo \
$OPTIONS \
--enable-fpm
- make clean && make ${MAKEJN:--j2} && make install && make clean
+ make clean && make && make install && make clean
fi
#------------------------ install end ------------------------------------#
diff --git a/plugins/php/versions/71/install.sh b/plugins/php/versions/71/install.sh
index 60f315b7d..d1d690fa8 100755
--- a/plugins/php/versions/71/install.sh
+++ b/plugins/php/versions/71/install.sh
@@ -40,6 +40,7 @@ else
OPTIONS="--with-iconv=${serverPath}/lib/libiconv"
OPTIONS="${OPTIONS} --with-freetype-dir=${serverPath}/lib/freetype_old"
OPTIONS="${OPTIONS} --with-gd --enable-gd-native-ttf"
+ OPTIONS="${OPTIONS} --with-jpeg --with-jpeg-dir=/usr/lib"
OPTIONS="${OPTIONS} --with-curl"
fi
@@ -67,7 +68,7 @@ if [ ! -d $serverPath/php/71 ];then
--disable-fileinfo \
$OPTIONS \
--enable-fpm
- make clean && make ${MAKEJN:--j2} && make install && make clean
+ make clean && make && make install && make clean
fi
#------------------------ install end ------------------------------------#
diff --git a/plugins/php/versions/72/install.sh b/plugins/php/versions/72/install.sh
index ccde35e98..796eb83a4 100755
--- a/plugins/php/versions/72/install.sh
+++ b/plugins/php/versions/72/install.sh
@@ -41,6 +41,7 @@ else
OPTIONS="--with-iconv=${serverPath}/lib/libiconv"
OPTIONS="${OPTIONS} --with-freetype-dir=${serverPath}/lib/freetype_old"
OPTIONS="${OPTIONS} --with-gd --enable-gd-native-ttf"
+ OPTIONS="${OPTIONS} --with-jpeg --with-jpeg-dir=/usr/lib"
OPTIONS="${OPTIONS} --with-curl"
fi
@@ -68,7 +69,7 @@ if [ ! -d $serverPath/php/72 ];then
--disable-fileinfo \
$OPTIONS \
--enable-fpm
- make clean && make ${MAKEJN:--j2} && make install && make clean
+ make clean && make && make install && make clean
fi
#------------------------ install end ------------------------------------#
diff --git a/plugins/php/versions/73/install.sh b/plugins/php/versions/73/install.sh
index 80a2bf98f..ee80cff87 100755
--- a/plugins/php/versions/73/install.sh
+++ b/plugins/php/versions/73/install.sh
@@ -44,7 +44,8 @@ if [ $sysName == 'Darwin' ]; then
else
OPTIONS="--with-iconv=${serverPath}/lib/libiconv"
OPTIONS="${OPTIONS} --with-freetype-dir=${serverPath}/lib/freetype_old"
- OPTIONS="${OPTIONS} --with-gd"
+ OPTIONS="${OPTIONS} --with-gd --enable-gd-native-ttf"
+ OPTIONS="${OPTIONS} --with-jpeg --with-jpeg-dir=/usr/lib"
OPTIONS="${OPTIONS} --with-curl"
OPTIONS="${OPTIONS} --with-libzip=${serverPath}/lib/libzip"
fi
@@ -72,7 +73,7 @@ if [ ! -d $serverPath/php/73 ];then
--disable-fileinfo \
$OPTIONS \
--enable-fpm
- make clean && make ${MAKEJN:--j2} && make install && make clean
+ make clean && make && make install && make clean
fi
#------------------------ install end ------------------------------------#
diff --git a/plugins/php/versions/74/gd.sh b/plugins/php/versions/74/gd.sh
new file mode 100755
index 000000000..b20f69ba2
--- /dev/null
+++ b/plugins/php/versions/74/gd.sh
@@ -0,0 +1,103 @@
+#!/bin/bash
+PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
+export PATH
+
+curPath=`pwd`
+
+rootPath=$(dirname "$curPath")
+rootPath=$(dirname "$rootPath")
+rootPath=$(dirname "$rootPath")
+rootPath=$(dirname "$rootPath")
+serverPath=$(dirname "$rootPath")
+sourcePath=${serverPath}/source/php
+
+actionType=$1
+version=$2
+
+LIBNAME=gd
+LIBV=0
+
+NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts`
+extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so
+
+sysName=`uname`
+if [ "$sysName" == "Darwin" ];then
+ BAK='_bak'
+else
+ BAK=''
+fi
+
+Install_lib()
+{
+
+ isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"`
+ if [ "${isInstall}" != "" ];then
+ echo "php-$version 已安装${LIBNAME},请选择其它版本!"
+ return
+ fi
+
+ if [ ! -f "$extFile" ];then
+
+ if [ ! -d $sourcePath/php${version}/ext ];then
+ cd $serverPath/mdserver-web/plugins/php && /bin/bash install.sh install ${version}
+ fi
+
+ cd $sourcePath/php${version}/ext/${LIBNAME}
+
+ $serverPath/php/$version/bin/phpize
+ ./configure --with-php-config=$serverPath/php/$version/bin/php-config \
+ --enable-gd \
+ --with-webp \
+ --with-xpm \
+ --with-jpeg \
+ --with-freetype \
+ --enable-gd-jis-conv
+
+ make clean && make && make install && make clean
+
+ fi
+
+ if [ ! -f "$extFile" ];then
+ echo "ERROR!"
+ return
+ fi
+
+ echo "" >> $serverPath/php/$version/etc/php.ini
+ echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
+ echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
+
+ $serverPath/php/init.d/php${version} restart
+ echo '==========================================================='
+ echo 'successful!'
+}
+
+
+Uninstall_lib()
+{
+ if [ ! -f "$serverPath/php/$version/bin/php-config" ];then
+ echo "php-$version 未安装,请选择其它版本!"
+ return
+ fi
+
+ if [ ! -f "$extFile" ];then
+ echo "php-$version 未安装${LIBNAME},请选择其它版本!"
+ return
+ fi
+
+ echo $serverPath/php/$version/etc/php.ini
+ sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini
+ sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
+
+ rm -f $extFile
+ $serverPath/php/init.d/php$version reload
+ echo '==============================================='
+ echo 'successful!'
+}
+
+
+
+if [ "$actionType" == 'install' ];then
+ Install_lib
+elif [ "$actionType" == 'uninstall' ];then
+ Uninstall_lib
+fi
\ No newline at end of file
diff --git a/plugins/php/versions/74/install.sh b/plugins/php/versions/74/install.sh
index 1163b2816..7629e4f74 100755
--- a/plugins/php/versions/74/install.sh
+++ b/plugins/php/versions/74/install.sh
@@ -80,7 +80,7 @@ if [ ! -d $serverPath/php/${PHP_VER} ];then
--disable-fileinfo \
$OPTIONS \
--enable-fpm
- make ${MAKEJN:--j2} && make install && make clean
+ make && make install && make clean
fi
#------------------------ install end ------------------------------------#
}
diff --git a/plugins/php/versions/80/gd.sh b/plugins/php/versions/80/gd.sh
new file mode 100755
index 000000000..b20f69ba2
--- /dev/null
+++ b/plugins/php/versions/80/gd.sh
@@ -0,0 +1,103 @@
+#!/bin/bash
+PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
+export PATH
+
+curPath=`pwd`
+
+rootPath=$(dirname "$curPath")
+rootPath=$(dirname "$rootPath")
+rootPath=$(dirname "$rootPath")
+rootPath=$(dirname "$rootPath")
+serverPath=$(dirname "$rootPath")
+sourcePath=${serverPath}/source/php
+
+actionType=$1
+version=$2
+
+LIBNAME=gd
+LIBV=0
+
+NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts`
+extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so
+
+sysName=`uname`
+if [ "$sysName" == "Darwin" ];then
+ BAK='_bak'
+else
+ BAK=''
+fi
+
+Install_lib()
+{
+
+ isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"`
+ if [ "${isInstall}" != "" ];then
+ echo "php-$version 已安装${LIBNAME},请选择其它版本!"
+ return
+ fi
+
+ if [ ! -f "$extFile" ];then
+
+ if [ ! -d $sourcePath/php${version}/ext ];then
+ cd $serverPath/mdserver-web/plugins/php && /bin/bash install.sh install ${version}
+ fi
+
+ cd $sourcePath/php${version}/ext/${LIBNAME}
+
+ $serverPath/php/$version/bin/phpize
+ ./configure --with-php-config=$serverPath/php/$version/bin/php-config \
+ --enable-gd \
+ --with-webp \
+ --with-xpm \
+ --with-jpeg \
+ --with-freetype \
+ --enable-gd-jis-conv
+
+ make clean && make && make install && make clean
+
+ fi
+
+ if [ ! -f "$extFile" ];then
+ echo "ERROR!"
+ return
+ fi
+
+ echo "" >> $serverPath/php/$version/etc/php.ini
+ echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
+ echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
+
+ $serverPath/php/init.d/php${version} restart
+ echo '==========================================================='
+ echo 'successful!'
+}
+
+
+Uninstall_lib()
+{
+ if [ ! -f "$serverPath/php/$version/bin/php-config" ];then
+ echo "php-$version 未安装,请选择其它版本!"
+ return
+ fi
+
+ if [ ! -f "$extFile" ];then
+ echo "php-$version 未安装${LIBNAME},请选择其它版本!"
+ return
+ fi
+
+ echo $serverPath/php/$version/etc/php.ini
+ sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini
+ sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
+
+ rm -f $extFile
+ $serverPath/php/init.d/php$version reload
+ echo '==============================================='
+ echo 'successful!'
+}
+
+
+
+if [ "$actionType" == 'install' ];then
+ Install_lib
+elif [ "$actionType" == 'uninstall' ];then
+ Uninstall_lib
+fi
\ No newline at end of file
diff --git a/plugins/php/versions/80/install.sh b/plugins/php/versions/80/install.sh
index cae7224d9..5e7b859ed 100755
--- a/plugins/php/versions/80/install.sh
+++ b/plugins/php/versions/80/install.sh
@@ -78,7 +78,7 @@ if [ ! -d $serverPath/php/${PHP_VER} ];then
--disable-fileinfo \
$OPTIONS \
--enable-fpm
- make clean && make ${MAKEJN:--j2} && make install && make clean
+ make clean && make && make install && make clean
fi
#------------------------ install end ------------------------------------#
}
diff --git a/plugins/php/versions/81/gd.sh b/plugins/php/versions/81/gd.sh
new file mode 100755
index 000000000..b20f69ba2
--- /dev/null
+++ b/plugins/php/versions/81/gd.sh
@@ -0,0 +1,103 @@
+#!/bin/bash
+PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
+export PATH
+
+curPath=`pwd`
+
+rootPath=$(dirname "$curPath")
+rootPath=$(dirname "$rootPath")
+rootPath=$(dirname "$rootPath")
+rootPath=$(dirname "$rootPath")
+serverPath=$(dirname "$rootPath")
+sourcePath=${serverPath}/source/php
+
+actionType=$1
+version=$2
+
+LIBNAME=gd
+LIBV=0
+
+NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts`
+extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so
+
+sysName=`uname`
+if [ "$sysName" == "Darwin" ];then
+ BAK='_bak'
+else
+ BAK=''
+fi
+
+Install_lib()
+{
+
+ isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"`
+ if [ "${isInstall}" != "" ];then
+ echo "php-$version 已安装${LIBNAME},请选择其它版本!"
+ return
+ fi
+
+ if [ ! -f "$extFile" ];then
+
+ if [ ! -d $sourcePath/php${version}/ext ];then
+ cd $serverPath/mdserver-web/plugins/php && /bin/bash install.sh install ${version}
+ fi
+
+ cd $sourcePath/php${version}/ext/${LIBNAME}
+
+ $serverPath/php/$version/bin/phpize
+ ./configure --with-php-config=$serverPath/php/$version/bin/php-config \
+ --enable-gd \
+ --with-webp \
+ --with-xpm \
+ --with-jpeg \
+ --with-freetype \
+ --enable-gd-jis-conv
+
+ make clean && make && make install && make clean
+
+ fi
+
+ if [ ! -f "$extFile" ];then
+ echo "ERROR!"
+ return
+ fi
+
+ echo "" >> $serverPath/php/$version/etc/php.ini
+ echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
+ echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
+
+ $serverPath/php/init.d/php${version} restart
+ echo '==========================================================='
+ echo 'successful!'
+}
+
+
+Uninstall_lib()
+{
+ if [ ! -f "$serverPath/php/$version/bin/php-config" ];then
+ echo "php-$version 未安装,请选择其它版本!"
+ return
+ fi
+
+ if [ ! -f "$extFile" ];then
+ echo "php-$version 未安装${LIBNAME},请选择其它版本!"
+ return
+ fi
+
+ echo $serverPath/php/$version/etc/php.ini
+ sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini
+ sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
+
+ rm -f $extFile
+ $serverPath/php/init.d/php$version reload
+ echo '==============================================='
+ echo 'successful!'
+}
+
+
+
+if [ "$actionType" == 'install' ];then
+ Install_lib
+elif [ "$actionType" == 'uninstall' ];then
+ Uninstall_lib
+fi
\ No newline at end of file
diff --git a/plugins/php/versions/81/install.sh b/plugins/php/versions/81/install.sh
index 5da41f15d..177ae1d1f 100755
--- a/plugins/php/versions/81/install.sh
+++ b/plugins/php/versions/81/install.sh
@@ -51,7 +51,6 @@ if [ $sysName == 'Darwin' ]; then
else
OPTIONS="--with-iconv=${serverPath}/lib/libiconv"
OPTIONS="${OPTIONS} --with-freetype-dir=${serverPath}/lib/freetype"
- OPTIONS="${OPTIONS} --with-gd"
OPTIONS="${OPTIONS} --with-curl"
OPTIONS="${OPTIONS} --with-libzip=${serverPath}/lib/libzip"
fi
@@ -83,7 +82,7 @@ if [ ! -d $serverPath/php/${PHP_VER} ];then
--disable-fileinfo \
$OPTIONS \
--enable-fpm
- make clean && make ${MAKEJN:--j2} && make install && make clean
+ make clean && make && make install && make clean
fi
#------------------------ install end ------------------------------------#
}
diff --git a/plugins/php/versions/phplib.conf b/plugins/php/versions/phplib.conf
index d8544effc..55fb68527 100755
--- a/plugins/php/versions/phplib.conf
+++ b/plugins/php/versions/phplib.conf
@@ -140,6 +140,19 @@
"shell": "exif.sh",
"check": "exif.so"
},
+ {
+ "name": "gd",
+ "versions": [
+ "52",
+ "74",
+ "80",
+ "81"
+ ],
+ "type": "通用扩展",
+ "msg": "通用GD库!",
+ "shell": "gd.sh",
+ "check": "gd.so"
+ },
{
"name": "intl",
"versions": [
diff --git a/plugins/phpmyadmin/conf/phpmyadmin.conf b/plugins/phpmyadmin/conf/phpmyadmin.conf
index b1e968337..4f32e6c28 100755
--- a/plugins/phpmyadmin/conf/phpmyadmin.conf
+++ b/plugins/phpmyadmin/conf/phpmyadmin.conf
@@ -6,7 +6,7 @@ server
root {$SERVER_PATH}/phpmyadmin;
#error_page 404 /404.html;
- include enable-php-{$PHP_VER}.conf;
+ include {$PHP_CONF_PATH}/enable-php-{$PHP_VER}.conf;
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
diff --git a/plugins/phpmyadmin/index.py b/plugins/phpmyadmin/index.py
index 9483645f4..43e037b0f 100755
--- a/plugins/phpmyadmin/index.py
+++ b/plugins/phpmyadmin/index.py
@@ -98,8 +98,10 @@ def contentReplace(content):
service_path = mw.getServerDir()
php_ver = getCachePhpVer()
# print php_ver
+ php_conf_dir = mw.getServerDir() + '/web_conf/php/conf'
content = content.replace('{$ROOT_PATH}', mw.getRootDir())
content = content.replace('{$SERVER_PATH}', service_path)
+ content = content.replace('{$PHP_CONF_PATH}', php_conf_dir)
content = content.replace('{$PHP_VER}', php_ver)
return content
diff --git a/scripts/init.d/mw.tpl b/scripts/init.d/mw.tpl
index 016f7af6a..0517c505f 100755
--- a/scripts/init.d/mw.tpl
+++ b/scripts/init.d/mw.tpl
@@ -184,6 +184,9 @@ case "$1" in
'restart_panel')
mw_stop_panel
mw_start_panel;;
+ 'restart_task')
+ mw_stop_task
+ mw_start_task;;
'status') mw_status;;
'logs') error_logs;;
'default')
diff --git a/scripts/install/alma.sh b/scripts/install/alma.sh
index 9433fada6..456a3aedd 100755
--- a/scripts/install/alma.sh
+++ b/scripts/install/alma.sh
@@ -77,6 +77,9 @@ dnf install -y lsof net-tools
dnf install -y ncurses-devel cmake
dnf --enablerepo=crb install mysql-devel
+for yumPack in make cmake gcc gcc-c++ gcc-g77 flex bison file libtool libtool-libs autoconf kernel-devel patch wget libjpeg libjpeg-devel libpng libpng-devel libpng10 libpng10-devel gd gd-devel libxml2 libxml2-devel zlib zlib-devel glib2 glib2-devel tar bzip2 bzip2-devel libevent libevent-devel ncurses ncurses-devel curl curl-devel libcurl libcurl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel libidn libidn-devel vim-minimal gettext gettext-devel ncurses-devel gmp-devel pspell-devel libcap diffutils ca-certificates net-tools libc-client-devel psmisc libXpm-devel git-core c-ares-devel libicu-devel libxslt libxslt-devel zip unzip glibc.i686 libstdc++.so.6 cairo-devel bison-devel ncurses-devel libaio-devel perl perl-devel perl-Data-Dumper lsof vixie-cron crontabs expat-devel readline-devel;
+do yum -y install $yumPack;done
+
cd /www/server/mdserver-web/scripts && bash lib.sh
chmod 755 /www/server/mdserver-web/data
diff --git a/scripts/install/centos.sh b/scripts/install/centos.sh
index 8ff332f97..f89e07879 100755
--- a/scripts/install/centos.sh
+++ b/scripts/install/centos.sh
@@ -83,7 +83,11 @@ yum install -y python-imaging libicu-devel zip bzip2-devel gcc libxml2 libxml2-d
yum install -y libjpeg-devel libpng-devel libwebp libwebp-devel
yum install -y lsof net-tools
yum install -y ncurses-devel cmake
-yum install -y MySQL-python
+yum install -y MySQL-python
+
+
+for yumPack in make cmake gcc gcc-c++ gcc-g77 flex bison file libtool libtool-libs autoconf kernel-devel patch wget libjpeg libjpeg-devel libpng libpng-devel libpng10 libpng10-devel gd gd-devel libxml2 libxml2-devel zlib zlib-devel glib2 glib2-devel tar bzip2 bzip2-devel libevent libevent-devel ncurses ncurses-devel curl curl-devel libcurl libcurl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel libidn libidn-devel vim-minimal gettext gettext-devel ncurses-devel gmp-devel pspell-devel libcap diffutils ca-certificates net-tools libc-client-devel psmisc libXpm-devel git-core c-ares-devel libicu-devel libxslt libxslt-devel zip unzip glibc.i686 libstdc++.so.6 cairo-devel bison-devel ncurses-devel libaio-devel perl perl-devel perl-Data-Dumper lsof vixie-cron crontabs expat-devel readline-devel;
+do yum -y install $yumPack;done
cd /www/server/mdserver-web/scripts && bash lib.sh
diff --git a/scripts/install/fedora.sh b/scripts/install/fedora.sh
index 783138b88..9a17c3479 100644
--- a/scripts/install/fedora.sh
+++ b/scripts/install/fedora.sh
@@ -78,7 +78,8 @@ yum -y install python-devel
yum -y install MySQL-python
yum -y install python3-devel
-
+for yumPack in make cmake gcc gcc-c++ gcc-g77 flex bison file libtool libtool-libs autoconf kernel-devel patch wget libjpeg libjpeg-devel libpng libpng-devel libpng10 libpng10-devel gd gd-devel libxml2 libxml2-devel zlib zlib-devel glib2 glib2-devel tar bzip2 bzip2-devel libevent libevent-devel ncurses ncurses-devel curl curl-devel libcurl libcurl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel libidn libidn-devel vim-minimal gettext gettext-devel ncurses-devel gmp-devel pspell-devel libcap diffutils ca-certificates net-tools libc-client-devel psmisc libXpm-devel git-core c-ares-devel libicu-devel libxslt libxslt-devel zip unzip glibc.i686 libstdc++.so.6 cairo-devel bison-devel ncurses-devel libaio-devel perl perl-devel perl-Data-Dumper lsof vixie-cron crontabs expat-devel readline-devel;
+do yum -y install $yumPack;done
cd /www/server/mdserver-web/scripts && bash lib.sh
chmod 755 /www/server/mdserver-web/data
diff --git a/scripts/install/rocky.sh b/scripts/install/rocky.sh
index b86d48ea2..8355a4d66 100644
--- a/scripts/install/rocky.sh
+++ b/scripts/install/rocky.sh
@@ -76,6 +76,8 @@ yum install -y lsof net-tools
yum install -y ncurses-devel mysql-devel cmake
yum install -y MySQL-python
+for yumPack in make cmake gcc gcc-c++ gcc-g77 flex bison file libtool libtool-libs autoconf kernel-devel patch wget libjpeg libjpeg-devel libpng libpng-devel libpng10 libpng10-devel gd gd-devel libxml2 libxml2-devel zlib zlib-devel glib2 glib2-devel tar bzip2 bzip2-devel libevent libevent-devel ncurses ncurses-devel curl curl-devel libcurl libcurl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel libidn libidn-devel vim-minimal gettext gettext-devel ncurses-devel gmp-devel pspell-devel libcap diffutils ca-certificates net-tools libc-client-devel psmisc libXpm-devel git-core c-ares-devel libicu-devel libxslt libxslt-devel zip unzip glibc.i686 libstdc++.so.6 cairo-devel bison-devel ncurses-devel libaio-devel perl perl-devel perl-Data-Dumper lsof vixie-cron crontabs expat-devel readline-devel;
+do yum -y install $yumPack;done
cd /www/server/mdserver-web/scripts && bash lib.sh
chmod 755 /www/server/mdserver-web/data
diff --git a/scripts/lib.sh b/scripts/lib.sh
index 7f4ef69b0..78e8799f2 100755
--- a/scripts/lib.sh
+++ b/scripts/lib.sh
@@ -202,28 +202,6 @@ Install_OpenSSL()
echo -e "Install_OpenSSL" >> ${libPath}/lib.pl
}
-Install_Lib()
-{
- if [ -f "/www/server/nginx/sbin/nginx" ] || [ -f "/www/server/apache/bin/httpd" ] || [ -f "/www/server/mysql/bin/mysql" ]; then
- return
- fi
- lockFile='${libPath}/data/mw_lib.lock'
- if [ ! -f "${lockFile}" ];then
- sed -i "s#SELINUX=enforcing#SELINUX=disabled#" /etc/selinux/config
- rpm -e --nodeps mariadb-libs-*
-
- mv /etc/yum.repos.d/epel.repo /etc/yum.repos.d/epel.repo.backup
- rm -f /var/run/yum.pid
- for yumPack in make cmake gcc gcc-c++ gcc-g77 flex bison file libtool libtool-libs autoconf kernel-devel patch wget libjpeg libjpeg-devel libpng libpng-devel libpng10 libpng10-devel gd gd-devel libxml2 libxml2-devel zlib zlib-devel glib2 glib2-devel tar bzip2 bzip2-devel libevent libevent-devel ncurses ncurses-devel curl curl-devel libcurl libcurl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel libidn libidn-devel openssl openssl-devel vim-minimal gettext gettext-devel ncurses-devel gmp-devel pspell-devel libcap diffutils ca-certificates net-tools libc-client-devel psmisc libXpm-devel git-core c-ares-devel libicu-devel libxslt libxslt-devel zip unzip glibc.i686 libstdc++.so.6 cairo-devel bison-devel ncurses-devel libaio-devel perl perl-devel perl-Data-Dumper lsof pcre pcre-devel vixie-cron crontabs expat-devel readline-devel;
- do yum -y install $yumPack;done
-
- mv /etc/yum.repos.d/epel.repo.backup /etc/yum.repos.d/epel.repo
- groupadd www
- useradd -s /sbin/nologin -M -g www www
- echo 'true' > $lockFile
- fi
-}
-
Install_Curl()
{
@@ -337,7 +315,7 @@ else
yum install -y bison re2c cmake
yum install -y libmemcached libmemcached-devel
- yum install -y curl-devel
+ yum install -y curl curl-devel
yum install -y zlib zlib-devel
yum install -y libzip libzip-devel
yum install -y pcre pcre-devel