diff --git a/.github/workflows/python-app-mysql56.yml b/.github/workflows/python-app-mysql56.yml
index 4a3503415..41c8b7171 100644
--- a/.github/workflows/python-app-mysql56.yml
+++ b/.github/workflows/python-app-mysql56.yml
@@ -16,7 +16,7 @@ jobs:
build:
strategy:
matrix:
- os: [ubuntu-latest]
+ os: [ubuntu-20.04, ubuntu-18.04, ubuntu-22.04]
runs-on: ${{ matrix.os }}
#runs-on: ubuntu-latest
diff --git a/.github/workflows/python-app-mysql57.yml b/.github/workflows/python-app-mysql57.yml
index b52612299..45d52ff53 100644
--- a/.github/workflows/python-app-mysql57.yml
+++ b/.github/workflows/python-app-mysql57.yml
@@ -16,7 +16,7 @@ jobs:
build:
strategy:
matrix:
- os: [ubuntu-latest]
+ os: [ubuntu-20.04, ubuntu-18.04, ubuntu-22.04]
runs-on: ${{ matrix.os }}
#runs-on: ubuntu-latest
diff --git a/.github/workflows/python-app-mysql80.yml b/.github/workflows/python-app-mysql80.yml
index ab89330b0..d54ed1d5f 100644
--- a/.github/workflows/python-app-mysql80.yml
+++ b/.github/workflows/python-app-mysql80.yml
@@ -16,7 +16,7 @@ jobs:
build:
strategy:
matrix:
- os: [ubuntu-latest]
+ os: [ubuntu-20.04, ubuntu-18.04, ubuntu-22.04]
runs-on: ${{ matrix.os }}
#runs-on: ubuntu-latest
diff --git a/.gitignore b/.gitignore
index 11beb38ba..9b03b43d9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -142,3 +142,4 @@ data/edate.pl
plugins/l2tp
plugins/openlitespeed
plugins/gdrive
+debug.out
diff --git a/README.md b/README.md
index f3d928237..4df5d417c 100644
--- a/README.md
+++ b/README.md
@@ -20,7 +20,7 @@
基本上可以使用,后续会继续优化!欢迎提供意见!
- 吹水组 - https://t.me/mdserver_web
-
+- [兼容性测试报告](/compatibility.md)
### 主要插件介绍
* OpenResty - 轻量级,占有内存少,并发能力强。
@@ -30,7 +30,6 @@
* phpMyAdmin - 著名Web端MySQL管理工具。
* Memcached - 一个高性能的分布式内存对象缓存系统。
* Redis - 一个高性能的KV数据库。
-* CSVN - 最流行的SVN代码共享管理软件。
* PureFtpd - 一款专注于程序健壮和软件安全的免费FTP服务器软件。
* Gogs - 一款极易搭建的自助Git服务。
* Rsyncd - 通用同步服务。
@@ -106,6 +105,7 @@ curl -fsSL https://raw.githubusercontent.com/midoks/mdserver-web/dev/scripts/up
### 微信赞助
[](/route/static/img/weixin_zz.jpg)
+
### 无图不真相
[](/route/static/mdw.jpg)
diff --git a/app.py b/app.py
index 13e12f3be..8e63dbc9b 100644
--- a/app.py
+++ b/app.py
@@ -1,5 +1,10 @@
# coding:utf-8
+# pip install profiler_online
+# 性能测试
+# from profiler_online import run_profiler
+# run_profiler()
+
from gevent import monkey
monkey.patch_all()
diff --git a/class/core/config_api.py b/class/core/config_api.py
index 71f991acc..3f676819a 100755
--- a/class/core/config_api.py
+++ b/class/core/config_api.py
@@ -15,10 +15,9 @@ from flask import request
class config_api:
- # 本版解决自启动问题
- # 文件管理重命名
- # 优化计划任务管理
- __version = '0.8.6.1'
+ # 进行中.
+ # 兼容主流Linux系统
+ __version = '0.8.6.3'
def __init__(self):
pass
diff --git a/class/core/files_api.py b/class/core/files_api.py
index 8f7974d8f..6ffd23be0 100755
--- a/class/core/files_api.py
+++ b/class/core/files_api.py
@@ -210,7 +210,6 @@ class files_api:
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':
task_pid = mw.execShell(
@@ -220,8 +219,7 @@ class files_api:
for i in range(len(task_list)):
self.removeTaskRecursion(task_list[i])
- isTask = mw.getRootDir() + '/tmp/panelTask.pl'
- mw.writeFile(isTask, 'True')
+ mw.triggerTask()
system_api.system_api().restartTask()
except:
system_api.system_api().restartTask()
diff --git a/class/core/mw.py b/class/core/mw.py
index 57bf3a9c4..80530088c 100755
--- a/class/core/mw.py
+++ b/class/core/mw.py
@@ -597,20 +597,29 @@ def getLocalIpBack():
def getLocalIp():
- # 取本地外网IP
+ filename = 'data/iplist.txt'
try:
- import re
- filename = 'data/iplist.txt'
ipaddress = readFile(filename)
if not ipaddress or ipaddress == '127.0.0.1':
- import urllib
- url = 'https://v6r.ipip.net/?format=text'
- req = urllib.request.urlopen(url, timeout=10)
- ipaddress = req.read().decode('utf-8')
- writeFile(filename, ipaddress)
+ raise
return ipaddress
- except Exception as ex:
- return '127.0.0.1'
+ except Exception as e:
+ cmd = "curl -4 -sS --connect-timeout 5 -m 60 https://v6r.ipip.net/?format=text"
+ ip = execShell(cmd)
+ result = ip[0].strip()
+ if result == '':
+ raise
+ writeFile(filename, result)
+ return result
+ except Exception as e:
+ cmd = "curl -6 -sS --connect-timeout 5 -m 60 https://v6r.ipip.net/?format=text"
+ ip = execShell(cmd)
+ result = ip[0].strip()
+ if result == '':
+ return '127.0.0.1'
+ writeFile(filename, result)
+ return result
+ return '127.0.0.1'
def inArray(arrays, searchStr):
diff --git a/class/core/page.py b/class/core/page.py
index a504494a6..b43ae7a18 100755
--- a/class/core/page.py
+++ b/class/core/page.py
@@ -2,7 +2,6 @@
import math
import string
-import mw
class Page():
@@ -29,7 +28,6 @@ class Page():
__END_NUM = None # 结束行
def __init__(self):
- # tmp = mw.getMsg('PAGE')
if False:
self.__PREV = tmp['PREV']
self.__NEXT = tmp['NEXT']
diff --git a/class/core/plugins_api.py b/class/core/plugins_api.py
index eb99e2124..7b7773783 100755
--- a/class/core/plugins_api.py
+++ b/class/core/plugins_api.py
@@ -43,6 +43,9 @@ class plugins_api:
def __init__(self):
self.setupPath = 'server'
+ self.__plugin_dir = mw.getRunDir() + '/plugins'
+ self.__type = mw.getRunDir() + '/data/json/type.json'
+ self.__index = mw.getRunDir() + '/data/json/index.json'
##### ----- start ----- ###
def listApi(self):
@@ -482,6 +485,7 @@ class plugins_api:
"setup": False,
"setup_version": "",
"status": False,
+ "install_pre_inspection": False,
}
if checks.find('VERSION') > -1:
@@ -504,6 +508,9 @@ class plugins_api:
else:
pInfo['setup_version'] = self.getVersion(pInfo['install_checks'])
# pluginInfo['status'] = self.checkStatus(pluginInfo)
+
+ if 'install_pre_inspection' in info:
+ pInfo['install_pre_inspection'] = info['install_pre_inspection']
pInfo['status'] = False
return pInfo
@@ -794,8 +801,8 @@ class plugins_api:
return mw.returnJson(True, '删除成功!')
# shell 调用
- def run(self, name, func, version, args='', script='index'):
- path = mw.getRunDir() + '/' + self.__plugin_dir + \
+ def run(self, name, func, version='', args='', script='index'):
+ path = self.__plugin_dir + \
'/' + name + '/' + script + '.py'
py = 'python3 ' + path
@@ -817,7 +824,7 @@ class plugins_api:
# 映射包调用
def callback(self, name, func, args='', script='index'):
- package = mw.getRunDir() + '/plugins/' + name
+ package = self.__plugin_dir + '/' + name
if not os.path.exists(package):
return (False, "插件不存在!")
diff --git a/class/core/site_api.py b/class/core/site_api.py
index 1f8c7a7f5..248e20278 100755
--- a/class/core/site_api.py
+++ b/class/core/site_api.py
@@ -3,6 +3,7 @@
import time
import os
import sys
+from urllib.parse import urlparse
import mw
import re
import json
@@ -44,6 +45,11 @@ class site_api:
mw.execShell("mkdir -p " + self.redirectPath +
" && chmod -R 755 " + self.redirectPath)
+ self.proxyPath = self.setupPath + '/nginx/proxy'
+ if not os.path.exists(self.proxyPath):
+ mw.execShell("mkdir -p " + self.proxyPath +
+ " && chmod -R 755 " + self.proxyPath)
+
self.logsPath = mw.getRootDir() + '/wwwlogs'
# ssl conf
if mw.isAppleSystem():
@@ -129,7 +135,7 @@ class site_api:
mid = request.form.get('id', '')
name = request.form.get('name', '')
- return self.stop(self, mid, name)
+ return self.stop(mid, name)
def stop(self, mid, name):
path = self.setupPath + '/stop'
@@ -287,7 +293,7 @@ class site_api:
domains.append(tmp)
data['domains'] = domains
data['email'] = mw.M('users').getField('email')
- if data['email'] == '287962566@qq.com':
+ if data['email'] == 'midoks@163.com':
data['email'] = ''
return mw.returnJson(True, 'OK', data)
@@ -574,9 +580,12 @@ class site_api:
file = self.getHostConf(siteName)
if os.path.exists(file):
siteConf = mw.readFile(file)
- if siteConf.find('301-START') != -1:
+ if siteConf.find('301-END') != -1:
return mw.returnJson(False, '检测到您的站点做了301重定向设置,请先关闭重定向!')
+ if siteConf.find('PROXY-END') != -1:
+ return mw.returnJson(False, '检测到您的站点做了反向代理设置,请先关闭反向代理!')
+
letpath = self.sslDir + siteName
csrpath = letpath + "/fullchain.pem" # 生成证书路径
keypath = letpath + "/privkey.pem" # 密钥文件路径
@@ -780,6 +789,10 @@ class site_api:
siteName = request.form.get('siteName', '')
return self.getLogs(siteName)
+ def getErrorLogsApi(self):
+ siteName = request.form.get('siteName', '')
+ return self.getErrorLogs(siteName)
+
def getSitePhpVersionApi(self):
siteName = request.form.get('siteName', '')
return self.getSitePhpVersion(siteName)
@@ -823,6 +836,30 @@ class site_api:
port = request.form.get('port', '')
return self.add(webname, port, ps, path, version)
+ def checkWebStatusApi(self):
+ '''
+ 创建站点检查web服务
+ '''
+ if not mw.isInstalledWeb():
+ return mw.returnJson(False, '请安装并启动OpenResty服务!')
+
+ # 这个快点
+ pid = mw.getServerDir() + '/openresty/nginx/logs/nginx.pid'
+ if not os.path.exists(pid):
+ return mw.returnJson(False, '请启动OpenResty服务!')
+
+ # path = mw.getServerDir() + '/openresty/init.d/openresty'
+ # data = mw.execShell(path + " status")
+ # if data[0].strip().find('stopped') != -1:
+ # return mw.returnJson(False, '请启动OpenResty服务!')
+
+ # import plugins_api
+ # data = plugins_api.plugins_api().run('openresty', 'status')
+ # if data[0].strip() == 'stop':
+ # return mw.returnJson(False, '请启动OpenResty服务!')
+
+ return mw.returnJson(True, 'OK')
+
def addDomainApi(self):
isError = mw.checkWebConfig()
if isError != True:
@@ -1075,7 +1112,7 @@ class site_api:
# self.closeHasPwd(get)
filename = self.passPath + '/' + siteName + '.pass'
- print(filename)
+ # print(filename)
passconf = username + ':' + mw.hasPwd(password)
if siteName == 'phpmyadmin':
@@ -1176,6 +1213,31 @@ class site_api:
path = request.form.get('path', '0')
return self.delete(sid, webname, path)
+ # 操作 重定向配置
+ def operateRedirectConf(self, siteName, method='start'):
+ vhost_file = self.vhostPath + '/' + siteName + '.conf'
+ content = mw.readFile(vhost_file)
+
+ cnf_301 = '''
+ # 301-START
+ include %s/*.conf;
+ # 301-END
+''' % (self.getRedirectPath( siteName))
+
+ cnf_301_source = '''
+ # 301-START
+'''
+ # print('operateRedirectConf', content.find('#301-END'))
+ if content.find('#301-END') != -1:
+ if method == 'stop':
+ rep = '#301-START(\n|.){1,500}#301-END'
+ content = re.sub(rep, '#301-START', content)
+ else:
+ if method == 'start':
+ content = re.sub(cnf_301_source, cnf_301, content)
+
+ mw.writeFile(vhost_file, content)
+
# get_redirect_status
def getRedirectApi(self):
_siteName = request.form.get("siteName", '')
@@ -1230,8 +1292,9 @@ class site_api:
if rule_test != True:
mw.writeFile("{}/{}/{}.conf".format(self.redirectPath,
_siteName, _id), _old_config)
- return mw.returnJson(False, "Nginx 配置测试不通过, 请重试: {}".format(rule_test))
+ return mw.returnJson(False, "OpenResty 配置测试不通过, 请重试: {}".format(rule_test))
+ self.operateRedirectConf(_siteName, 'start')
mw.restartWeb()
return mw.returnJson(True, "ok")
@@ -1309,6 +1372,8 @@ class site_api:
mw.writeFile(data_path, json.dumps(data))
mw.writeFile(
"{}/{}.conf".format(self.getRedirectPath(_siteName), _id), file_content)
+
+ self.operateRedirectConf(_siteName, 'start')
mw.restartWeb()
return mw.returnJson(True, "ok")
@@ -1330,6 +1395,9 @@ class site_api:
break
# write database
mw.writeFile(data_path, json.dumps(data))
+ # data is empty ,should stop
+ if len(data) == 0:
+ self.operateRedirectConf(_siteName, 'stop')
# remove conf file
mw.execShell(
"rm -rf {}/{}.conf".format(self.getRedirectPath(_siteName), _id))
@@ -1337,21 +1405,234 @@ class site_api:
return mw.returnJson(False, "删除失败!")
return mw.returnJson(True, "删除成功!")
- def getProxyListApi(self):
- siteName = request.form.get('siteName', '')
- conf_path = self.getHostConf(siteName)
- old_conf = mw.readFile(conf_path)
- rep = "(#PROXY-START(\n|.)+#PROXY-END)"
- url_rep = "proxy_pass (.*);|ProxyPass\s/\s(.*)|Host\s(.*);"
- host_rep = "Host\s(.*);"
+ # 操作 反向代理配置
+ def operateProxyConf(self, siteName, method='start'):
+ vhost_file = self.vhostPath + '/' + siteName + '.conf'
+ content = mw.readFile(vhost_file)
- proxyUrl = self.__read_config(self.__proxyfile)
- sitename = sitename
- proxylist = []
- for i in proxyUrl:
- if i["sitename"] == sitename:
- proxylist.append(i)
- return mw.getJson(proxylist)
+ proxy_cnf = '''
+ # PROXY-START
+ include %s/*.conf;
+ # PROXY-END
+''' % (self.getProxyPath(siteName))
+
+ proxy_cnf_source = '''
+ # PROXY-START
+'''
+
+ if content.find('#PROXY-END') != -1:
+ if method == 'stop':
+ rep = '#PROXY-START(\n|.){1,500}#PROXY-END'
+ content = re.sub(rep, '#PROXY-START', content)
+ else:
+ if method == 'start':
+ content = re.sub(proxy_cnf_source, proxy_cnf, content)
+
+ mw.writeFile(vhost_file, content)
+
+ def getProxyConfApi(self):
+ _siteName = request.form.get("siteName", '')
+ _id = request.form.get("id", '')
+ if _id == '' or _siteName == '':
+ return mw.returnJson(False, "必填项不能为空!")
+
+ conf_file = "{}/{}/{}.conf".format(self.proxyPath, _siteName, _id)
+ if not os.path.exists(conf_file):
+ conf_file = "{}/{}/{}.conf.txt".format(
+ self.proxyPath, _siteName, _id)
+
+ data = mw.readFile(conf_file)
+ if data == False:
+ return mw.returnJson(False, "获取失败!")
+ return mw.returnJson(True, "ok", {"result": data})
+
+ def setProxyStatusApi(self):
+ _siteName = request.form.get("siteName", '')
+ _status = request.form.get("status", '')
+ _id = request.form.get("id", '')
+ if _status == '' or _siteName == '' or _id == '':
+ return mw.returnJson(False, "必填项不能为空!")
+
+ conf_file = "{}/{}/{}.conf".format(self.proxyPath, _siteName, _id)
+ conf_txt = "{}/{}/{}.conf.txt".format(self.proxyPath, _siteName, _id)
+
+ if _status == '1':
+ mw.execShell('mv ' + conf_txt + ' ' + conf_file)
+ else:
+ mw.execShell('mv ' + conf_file + ' ' + conf_txt)
+
+ mw.restartWeb()
+ return mw.returnJson(True, "OK")
+
+ def saveProxyConfApi(self):
+ _siteName = request.form.get("siteName", '')
+ _id = request.form.get("id", '')
+ _config = request.form.get("config", "")
+ if _id == '' or _siteName == '':
+ return mw.returnJson(False, "必填项不能为空!")
+
+ _old_config = mw.readFile(
+ "{}/{}/{}.conf".format(self.proxyPath, _siteName, _id))
+ if _old_config == False:
+ return mw.returnJson(False, "非法操作")
+
+ mw.writeFile("{}/{}/{}.conf".format(self.proxyPath,
+ _siteName, _id), _config)
+ rule_test = mw.checkWebConfig()
+ if rule_test != True:
+ mw.writeFile("{}/{}/{}.conf".format(self.proxyPath,
+ _siteName, _id), _old_config)
+ return mw.returnJson(False, "OpenResty 配置测试不通过, 请重试: {}".format(rule_test))
+
+ self.operateRedirectConf(_siteName, 'start')
+ mw.restartWeb()
+ return mw.returnJson(True, "ok")
+
+ # 读取 网站 反向代理列表
+ def getProxyListApi(self):
+ _siteName = request.form.get('siteName', '')
+
+ data_path = self.getProxytDataPath(_siteName)
+ data_content = mw.readFile(data_path)
+
+ # not exists
+ if data_content == False:
+ mw.execShell("mkdir {}/{}".format(self.proxyPath, _siteName))
+ return mw.returnJson(True, "", {"result": [], "count": 0})
+
+ try:
+ data = json.loads(data_content)
+ except:
+ mw.execShell("rm -rf {}/{}".format(self.proxyPath, _siteName))
+ return mw.returnJson(True, "", {"result": [], "count": 0})
+
+ tmp = []
+ for proxy in data:
+ proxy_dir = "{}/{}".format(self.proxyPath, _siteName)
+ proxy_dir_file = proxy_dir + '/' + proxy['id'] + '.conf'
+ if os.path.exists(proxy_dir_file):
+ proxy['status'] = True
+ else:
+ proxy['status'] = False
+ tmp.append(proxy)
+
+ return mw.returnJson(True, "ok", {"result": data, "count": len(data)})
+
+ # 设置 网站 反向代理列表
+ def setProxyApi(self):
+ _siteName = request.form.get('siteName', '')
+ _from = request.form.get('from', '')
+ _to = request.form.get('to', '')
+ _host = request.form.get('host', '')
+ _open_proxy = request.form.get('open_proxy', '')
+
+ if _siteName == "" or _from == "" or _to == "" or _host == "":
+ return mw.returnJson(False, "必填项不能为空")
+
+ data_path = self.getProxytDataPath(_siteName)
+ data_content = mw.readFile(
+ data_path) if os.path.exists(data_path) else ""
+ data = json.loads(data_content) if data_content != "" else []
+
+ rep = "http(s)?\:\/\/([a-zA-Z0-9][-a-zA-Z0-9]{0,62}\.)+([a-zA-Z0-9][a-zA-Z0-9]{0,62})+.?"
+ if not re.match(rep, _to):
+ return mw.returnJson(False, "错误的目标地址!")
+
+ # get host from url
+ try:
+ if _host == "$host":
+ host_tmp = urlparse(_to)
+ _host = host_tmp.netloc
+ except:
+ return mw.returnJson(False, "错误的目标地址")
+
+ tpl = """
+# PROXY-START/
+location ~* \.(gif|png|jpg|css|js|woff|woff2)$
+{
+ proxy_pass {to};
+ proxy_set_header Host {host};
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_set_header REMOTE-HOST $remote_addr;
+ expires 12h;
+}
+location ~* ^{from}(.*)$ {
+ proxy_pass {to};
+ proxy_set_header Host {host};
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_set_header REMOTE-HOST $remote_addr;
+
+ add_header X-Cache $upstream_cache_status;
+ proxy_ignore_headers Set-Cookie Cache-Control expires;
+ add_header Cache-Control no-cache;
+}
+# PROXY-END/
+ """
+
+ # replace
+ if _from[0] != '/':
+ _from = '/' + _from
+ tpl = tpl.replace("{from}", _from, 999)
+ tpl = tpl.replace("{to}", _to)
+ tpl = tpl.replace("{host}", _host, 999)
+
+ _id = mw.md5("{}+{}+{}".format(_from, _to, _siteName))
+ for item in data:
+ if item["id"] == _id:
+ return mw.returnJson(False, "已存在该规则!")
+ if item["from"] == _from:
+ return mw.returnJson(False, "代理目录已存在!")
+ data.append({
+ "from": _from,
+ "to": _to,
+ "host": _host,
+ "id": _id
+ })
+
+ conf_file = "{}/{}.conf".format(self.getProxyPath(_siteName), _id)
+ if _open_proxy != 'on':
+ conf_file = "{}/{}.conf.txt".format(
+ self.getProxyPath(_siteName), _id)
+
+ mw.writeFile(data_path, json.dumps(data))
+ mw.writeFile(conf_file, tpl)
+
+ self.operateProxyConf(_siteName, 'start')
+ mw.restartWeb()
+ return mw.returnJson(True, "ok", {"hash": _id})
+
+ def delProxyApi(self):
+ _siteName = request.form.get("siteName", '')
+ _id = request.form.get("id", '')
+ if _id == '' or _siteName == '':
+ return mw.returnJson(False, "必填项不能为空!")
+
+ try:
+ data_path = self.getProxytDataPath(_siteName)
+ data_content = mw.readFile(
+ data_path) if os.path.exists(data_path) else ""
+ data = json.loads(data_content) if data_content != "" else []
+ for item in data:
+ if item["id"] == _id:
+ data.remove(item)
+ break
+ # write database
+ mw.writeFile(data_path, json.dumps(data))
+
+ # data is empty,should stop
+ if len(data) == 0:
+ self.operateProxyConf(_siteName, 'stop')
+ # remove conf file
+ cmd = "rm -rf {}/{}.conf*".format(
+ self.getProxyPath(_siteName), _id)
+ mw.execShell(cmd)
+ except:
+ return mw.returnJson(False, "删除失败!")
+
+ mw.restartWeb()
+ return mw.returnJson(True, "删除成功!")
def getSiteTypesApi(self):
# 取网站分类
@@ -1508,7 +1789,13 @@ class site_api:
return "{}/{}/data.json".format(self.redirectPath, siteName)
def getRedirectPath(self, siteName):
- return "{}/{}/".format(self.redirectPath, siteName)
+ return "{}/{}".format(self.redirectPath, siteName)
+
+ def getProxytDataPath(self, siteName):
+ return "{}/{}/data.json".format(self.proxyPath, siteName)
+
+ def getProxyPath(self, siteName):
+ return "{}/{}".format(self.proxyPath, siteName)
def getDirBindRewrite(self, siteName, dirname):
return self.rewritePath + '/' + siteName + '_' + dirname + '.conf'
@@ -1527,6 +1814,12 @@ class site_api:
return mw.returnJson(False, '日志为空')
return mw.returnJson(True, mw.getNumLines(logPath, 100))
+ def getErrorLogs(self, siteName):
+ logPath = mw.getLogsDir() + '/' + siteName + '.error.log'
+ if not os.path.exists(logPath):
+ return mw.returnJson(False, '日志为空')
+ return mw.returnJson(True, mw.getNumLines(logPath, 100))
+
# 取日志状态
def getLogsStatus(self, siteName):
filename = self.getHostConf(siteName)
@@ -1716,7 +2009,7 @@ class site_api:
return 404;
}
}
- #SECURITY-END
+ # SECURITY-END
include %s/enable-php-''' % (fix.strip().replace(',', '|'), domains.strip().replace(',', ' '), pre_path)
conf = re.sub(re_path, rconf, conf)
mw.writeLog('网站管理', '站点[' + name + ']已开启防盗链!')
@@ -1766,10 +2059,10 @@ class site_api:
def createRootDir(self, path):
if not os.path.exists(path):
os.makedirs(path)
- if not mw.isAppleSystem():
- mw.execShell('chown -R www:www ' + path)
- mw.writeFile(path + '/index.html', 'Work has started!!!')
- mw.execShell('chmod -R 755 ' + path)
+ if not mw.isAppleSystem():
+ mw.execShell('chown -R www:www ' + path)
+ mw.writeFile(path + '/index.html', 'Work has started!!!')
+ mw.execShell('chmod -R 755 ' + path)
def nginxAddDomain(self, webname, domain, port):
file = self.getHostConf(webname)
@@ -1807,7 +2100,8 @@ class site_api:
content = content.replace('{$PHP_DIR}', self.setupPath + '/php')
content = content.replace('{$PHPVER}', self.phpVersion)
content = content.replace('{$OR_REWRITE}', self.rewritePath)
- content = content.replace('{$OR_REDIRECT}', self.redirectPath)
+ # content = content.replace('{$OR_REDIRECT}', self.redirectPath)
+ # content = content.replace('{$OR_PROXY}', self.proxyPath)
logsPath = mw.getLogsDir()
content = content.replace('{$LOGPATH}', logsPath)
@@ -1815,6 +2109,10 @@ class site_api:
rewrite_content = '''
location /{
+ if ($PHP_ENV != "1"){
+ break;
+ }
+
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php/$1 last;
break;
@@ -1869,18 +2167,28 @@ location /{
errLogPath = mw.getLogsDir() + '/' + webname + '.error.log'
confFile = self.setupPath + '/nginx/vhost/' + webname + '.conf'
rewriteFile = self.setupPath + '/nginx/rewrite/' + webname + '.conf'
- rewriteFile = self.setupPath + '/nginx/pass/' + webname + '.conf'
+ passFile = self.setupPath + '/nginx/pass/' + webname + '.conf'
keyPath = self.sslDir + webname + '/privkey.pem'
certPath = self.sslDir + webname + '/fullchain.pem'
logs = [assLogPath,
errLogPath,
confFile,
rewriteFile,
+ passFile,
keyPath,
certPath]
for i in logs:
mw.deleteFile(i)
+ # 重定向目录
+ redirectDir = self.setupPath + '/nginx/redirect/' + webname
+ if os.path.exists(redirectDir):
+ mw.execShell('rm -rf ' + redirectDir)
+ # 代理目录
+ proxyDir = self.setupPath + '/nginx/proxy/' + webname
+ if os.path.exists(proxyDir):
+ mw.execShell('rm -rf ' + proxyDir)
+
def delete(self, sid, webname, path):
self.deleteWSLogs(webname)
if path == '1':
diff --git a/class/core/system_api.py b/class/core/system_api.py
index f16705521..dc9ea6a4e 100755
--- a/class/core/system_api.py
+++ b/class/core/system_api.py
@@ -243,13 +243,19 @@ class system_api:
mac_version += x.split("\t")[1] + ' '
return mac_version
- version = mw.readFile('/etc/redhat-release')
- if not version:
- version = mw.readFile(
- '/etc/issue').strip().split("\n")[0].replace('\\n', '').replace('\l', '').strip()
- else:
+ redhat_series = '/etc/redhat-release'
+ if os.path.exists(redhat_series):
+ version = mw.readFile('/etc/redhat-release')
version = version.replace('release ', '').strip()
- return version
+ return version
+
+ os_series = '/etc/os-release'
+ if os.path.exists(os_series):
+ version = mw.execShell(
+ "cat /etc/*-release | grep PRETTY_NAME | awk -F = '{print $2}' | awk -F '\"' '{print $2}'")
+ return version[0].strip()
+
+ return '未识别系统信息'
def getBootTime(self):
# 取系统启动时间
@@ -312,8 +318,11 @@ class system_api:
except Exception as ex:
return 1
- def getDiskInfo(self, get=None):
- return self.getDiskInfo2()
+ def getDiskInfo(self):
+ info = self.getDiskInfo2()
+ if len(info) != 0:
+ return info
+
# 取磁盘分区信息
diskIo = psutil.disk_partitions()
diskInfo = []
@@ -325,7 +334,9 @@ class system_api:
continue
tmp = {}
tmp['path'] = disk[1]
- tmp['size'] = psutil.disk_usage(disk[1])
+ size_tmp = psutil.disk_usage(disk[1])
+ tmp['size'] = [mw.toSize(size_tmp[0]), mw.toSize(
+ size_tmp[1]), mw.toSize(size_tmp[2]), str(size_tmp[3]) + '%']
diskInfo.append(tmp)
return diskInfo
@@ -340,7 +351,7 @@ class system_api:
diskInfo = []
n = 0
cuts = ['/mnt/cdrom', '/boot', '/boot/efi', '/dev',
- '/dev/shm', '/run/lock', '/run', '/run/shm', '/run/user']
+ '/dev/shm', '/zroot', '/run/lock', '/run', '/run/shm', '/run/user']
for tmp in temp1:
n += 1
inodes = tempInodes1[n - 1].split()
@@ -360,16 +371,7 @@ class system_api:
tmp1 = [disk[1], disk[2], disk[3], disk[4]]
arr['size'] = tmp1
arr['inodes'] = [inodes[1], inodes[2], inodes[3], inodes[4]]
- if disk[5] == '/':
- bootLog = os.getcwd() + '/tmp/panelBoot.pl'
- if disk[2].find('M') != -1:
- if os.path.exists(bootLog):
- os.system('rm -f ' + bootLog)
- else:
- if not os.path.exists(bootLog):
- pass
- if inodes[2] != '0':
- diskInfo.append(arr)
+ diskInfo.append(arr)
return diskInfo
# 清理系统垃圾
diff --git a/cli.sh b/cli.sh
index abc5d49fc..2ca2de7d8 100755
--- a/cli.sh
+++ b/cli.sh
@@ -11,14 +11,37 @@ fi
# export LC_ALL="en_US.UTF-8"
+
+mw_start_task()
+{
+ isStart=$(ps aux |grep 'task.py'|grep -v grep|awk '{print $2}')
+ if [ "$isStart" == '' ];then
+ echo -e "Starting mw-tasks... \c"
+ cd $DIR && python3 task.py >> ${DIR}/logs/task.log 2>&1 &
+ sleep 0.3
+ isStart=$(ps aux |grep 'task.py'|grep -v grep|awk '{print $2}')
+ if [ "$isStart" == '' ];then
+ echo -e "\033[31mfailed\033[0m"
+ echo '------------------------------------------------------'
+ tail -n 20 $DIR/logs/task.log
+ echo '------------------------------------------------------'
+ echo -e "\033[31mError: mw-tasks service startup failed.\033[0m"
+ return;
+ fi
+ echo -e "\033[32mdone\033[0m"
+ else
+ echo "Starting mw-tasks... mw-tasks (pid $(echo $isStart)) already running"
+ fi
+}
+
mw_start(){
gunicorn -c setting.py app:app
- python3 task.py >> $DIR/logs/task.log 2>&1 &
+ #安全启动
+ mw_start_task
}
mw_start_debug(){
-
python3 task.py >> $DIR/logs/task.log 2>&1 &
gunicorn -b :7200 -k gevent -w 1 app:app
}
@@ -36,7 +59,13 @@ mw_stop()
do
kill -9 $i
done
- ps -ef|grep task.py |grep -v grep|awk '{print $2}'|xargs kill -9
+
+ pids=`ps -ef|grep task.py | grep -v grep |awk '{print $2}'`
+ arr=($pids)
+ for p in ${arr[@]}
+ do
+ kill -9 $p
+ done
}
case "$1" in
diff --git a/compatibility.md b/compatibility.md
new file mode 100644
index 000000000..73e23e398
--- /dev/null
+++ b/compatibility.md
@@ -0,0 +1,65 @@
+### 兼容性测试报告
+
+- 暂时不具有指导意见
+
+
+快速测试命令
+
+```
+cd /www/server/mdserver-web/scripts/quick && bash debug.sh
+cd /www/server/mdserver-web/plugins/php && bash all_test.sh
+```
+
+
+| 系统名称 | 面板 | OpenResty |
+| ----------------- |---------------|---------------|
+| CentOS 7.9 |✅ |✅ |
+| CentOS 8.4 |✅ |✅ |
+| CentOS 8 Stream |✅ |✅ |
+| CentOS 9 Stream |✅ |✅ |
+| Debian 10.3 |✅ |✅ |
+| Debian 11.3 |✅ |✅ |
+| Ubuntu 10.04 |✅ |✅ |
+| Ubuntu 11.3 |✅ |✅ |
+| Fedora 31 |✅ |✅ |
+| Fedora 32 |✅ |✅ |
+| AlmaLinix 9 |✅ |✅ |
+| RockyLinux 8.6 |✅ |✅ |
+| openSUSE 15.4 |:x: |:x: |
+
+
+
+| 系统名称 | PHP52 |PHP53 |PHP54 |PHP55 |PHP56 |PHP70 |PHP71 |PHP72 |PHP73 |PHP74 |PHP80 |PHP81 |
+| ----------------- |-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|
+| CentOS 7.9 |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |
+| CentOS 8.4 |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |
+| CentOS 8 Stream |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |
+| CentOS 9 Stream |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |
+| Debian 10.3 |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |
+| Debian 11.3 |:x: |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |
+| Ubuntu 10.04 |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |
+| Ubuntu 11.3 |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |
+| Fedora 31 |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |
+| Fedora 32 |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |
+| AlmaLinix 9 |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |
+| RockyLinux 8.6 |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |✅ |
+| openSUSE 15.4 |:x: |:x: |:x: |:x: |:x: |:x: |:x: |:x: |:x: |:x: |:x: |:x: |
+
+
+
+| 系统名称 | MySQL55 |MySQL56 |MySQL57 |MySQL80 |
+| ----------------- |-----------|-----------|-----------|-----------|
+| CentOS 7.9 |✅ |✅ |✅ |:x: |
+| CentOS 8.4 |:x: |✅ |✅ |✅ |
+| CentOS 8 Stream |✅ |✅ |✅ |✅ |
+| CentOS 9 Stream |✅ |✅ |✅ |✅ |
+| Debian 10.3 |✅ |✅ |✅ |✅ |
+| Debian 11.3 |✅ |✅ |✅ |✅ |
+| Ubuntu 10.04 |✅ |✅ |✅ |✅ |
+| Ubuntu 11.3 |✅ |✅ |✅ |✅ |
+| Fedora 31 |✅ |✅ |✅ |✅ |
+| Fedora 32 |✅ |✅ |✅ |✅ |
+| AlmaLinix 9 |✅ |✅ |✅ |✅ |
+| RockyLinux 8.6 |✅ |✅ |✅ |✅ |
+| openSUSE 15.4 |:x: |:x: |:x: |:x: |
+
diff --git a/data/tpl/nginx.conf b/data/tpl/nginx.conf
index 504cc6e8b..ab258fc46 100755
--- a/data/tpl/nginx.conf
+++ b/data/tpl/nginx.conf
@@ -8,6 +8,10 @@ server
#SSL-START
#error_page 404/404.html;
#SSL-END
+
+ #301-START
+
+ #PROXY-START
#ERROR-PAGE-START
error_page 404 /404.html;
@@ -21,10 +25,7 @@ server
#REWRITE-START
include {$OR_REWRITE}/{$SERVER_NAME}.conf;
#REWRITE-END
-
- #301-START
- include {$OR_REDIRECT}/{$SERVER_NAME}/*.conf;
- ##301-END
+
#禁止访问的文件或目录
location ~ ^/(\.user.ini|\.htaccess|\.git|\.svn|\.project|LICENSE|README.md)
diff --git a/plugins/csvn/hook/commit.tpl b/plugins/csvn/hook/commit.tpl
deleted file mode 100755
index 886abed28..000000000
--- a/plugins/csvn/hook/commit.tpl
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/bin/bash
-
-export LC_ALL=en_US.UTF-8
-export LC_CTYPE=zh_CN.UTF-8
-
-
-REPOS="$1"
-REV="$2"
-TXN_NAME="$3"
-
-
-if [ ! -d {$PROJECT_DIR}/csvn ]; then
- sudo mkdir -p {$PROJECT_DIR}/csvn
- sudo chown -R csvn:csvn {$PROJECT_DIR}/csvn
-fi
-
-SAVE_PATH={$PROJECT_DIR}/csvn/$REPOS
-SVN_PATH=http://127.0.0.1:{$PORT}/svn/$REPOS
-
-if [ ! -d $SAVE_PATH ]; then
- svn co $SVN_PATH $SAVE_PATH \
- --username={$CSVN_USER} \
- --password={$CSVN_PWD} \
- --no-auth-cache \
- --non-interactive
-fi
-
-cd $SAVE_PATH && svn update --username={$CSVN_USER} --password={$CSVN_PWD} --no-auth-cache --non-interactive
-
-WEB_PATH={$PROJECT_DIR}/wwwroot/$REPOS
-sudo mkdir -p $WEB_PATH
-
-sudo rsync -vauP --delete --exclude=".*" $SAVE_PATH/ $WEB_PATH
-sudo chown -R www:www $WEB_PATH
\ No newline at end of file
diff --git a/plugins/csvn/hook/post-commit.tpl b/plugins/csvn/hook/post-commit.tpl
deleted file mode 100755
index 2e52d3f19..000000000
--- a/plugins/csvn/hook/post-commit.tpl
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/bash
-
-
-
-REPOS="$1"
-REV="$2"
-TXN_NAME="$3"
-
-REPOS_NAME=${REPOS##*/}
-
-sh -x $REPOS/hooks/commit $REPOS_NAME $REV $TXN_NAME 2>$REPOS/sh.log
diff --git a/plugins/csvn/ico.png b/plugins/csvn/ico.png
deleted file mode 100644
index b84c97def..000000000
Binary files a/plugins/csvn/ico.png and /dev/null differ
diff --git a/plugins/csvn/index.html b/plugins/csvn/index.html
deleted file mode 100755
index 711177eae..000000000
--- a/plugins/csvn/index.html
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-
diff --git a/plugins/csvn/index.py b/plugins/csvn/index.py
deleted file mode 100755
index 3689b70b8..000000000
--- a/plugins/csvn/index.py
+++ /dev/null
@@ -1,711 +0,0 @@
-# coding: utf-8
-
-import time
-import random
-import os
-import urllib
-import binascii
-import json
-import re
-import sys
-import subprocess
-
-sys.path.append(os.getcwd() + "/class/core")
-import mw
-
-
-app_debug = False
-if mw.isAppleSystem():
- app_debug = True
-
-
-def getPluginName():
- return 'csvn'
-
-
-def getPluginDir():
- return mw.getPluginDir() + '/' + getPluginName()
-
-
-def getServerDir():
- return mw.getServerDir() + '/' + getPluginName()
-
-
-def getInitDFile():
- if app_debug:
- return '/tmp/' + getPluginName()
- return '/etc/init.d/' + getPluginName()
-
-
-def getArgs():
- args = sys.argv[2:]
- tmp = {}
- args_len = len(args)
-
- if args_len == 1:
- t = args[0].strip('{').strip('}')
- t = t.split(':')
- tmp[t[0]] = t[1]
- elif args_len > 1:
- for i in range(len(args)):
- t = args[i].split(':')
- tmp[t[0]] = t[1]
-
- return tmp
-
-
-def initDreplace():
- initd_file = getInitDFile()
-
- if not os.path.exists(initd_file):
- return getServerDir()
-
- return initd_file
-
-
-def status():
- data = mw.execShell(
- "ps -ef|grep " + getPluginName() + " |grep -v grep | grep -v python | awk '{print $2}'")
- if data[0] == '':
- return 'stop'
- return 'start'
-
-
-def csvnOp(method):
-
- if app_debug:
- os_name = mw.getOs()
- if os_name == 'darwin':
- return "Apple Computer does not support"
-
- _initd_csvn = '/etc/init.d/csvn'
- _initd_csvn_httpd = '/etc/init.d/csvn-httpd'
- #_csvn = getServerDir() + '/bin/csvn'
- #_csvn_httpd = getServerDir() + '/bin/csvn-httpd'
-
- ret_csvn_httpd = mw.execShell(_initd_csvn_httpd + ' ' + method)
- # ret_csvn = mw.execShell(_initd_csvn + ' ' + method)
- subprocess.Popen(_initd_csvn + ' ' + method,
- stdout=subprocess.PIPE, shell=True)
- if ret_csvn_httpd[1] == '':
- return 'ok'
- return 'fail'
-
-
-def start():
- if not os.path.exists("/etc/init.d/csvn"):
- return "先在自启动安装!"
- return csvnOp('start')
-
-
-def stop():
- return csvnOp('stop')
-
-
-def restart():
- return csvnOp('restart')
-
-
-def reload():
- return csvnOp('reload')
-
-
-def initdStatus():
- if not app_debug:
- if mw.isAppleSystem():
- return "Apple Computer does not support"
-
- _initd_csvn = '/etc/init.d/csvn'
- _initd_csvn_httpd = '/etc/init.d/csvn-httpd'
-
- if os.path.exists(_initd_csvn) and os.path.exists(_initd_csvn_httpd):
- return 'ok'
- return 'fail'
-
-
-def initdInstall():
- import shutil
- if not app_debug:
- if mw.isAppleSystem():
- return "Apple Computer does not support"
-
- _csvn = getServerDir() + '/bin/csvn'
- _csvn_httpd = getServerDir() + '/bin/csvn-httpd'
-
- ret_csvn = mw.execShell(_csvn + ' install')
- ret_csvn_httpd = mw.execShell(_csvn_httpd + ' install')
- if ret_csvn[1] == '' and ret_csvn_httpd[1] == '':
- return 'ok'
- return 'fail'
-
-
-def initdUinstall():
- if not app_debug:
- if mw.isAppleSystem():
- return "Apple Computer does not support"
-
- _csvn = getServerDir() + '/bin/csvn'
- _csvn_httpd = getServerDir() + '/bin/csvn-httpd'
-
- ret_csvn = mw.execShell(_csvn + ' remove')
- ret_csvn_httpd = mw.execShell(_csvn_httpd + ' remove')
- return 'ok'
-
-
-def csvnEdit():
- data = {}
- data['svn_access_file'] = getServerDir() + '/data/conf/svn_access_file'
- data['commit_tpl'] = getPluginDir() + '/hook/commit.tpl'
- data['post_commit_tpl'] = getPluginDir() + '/hook/post-commit.tpl'
- return mw.getJson(data)
-
-
-def userAdd():
- args = getArgs()
- if not 'username' in args:
- return 'name missing'
-
- if not 'password' in args:
- return 'password missing'
-
- htpasswd = getServerDir() + "/bin/htpasswd"
- svn_auth_file = getServerDir() + "/data/conf/svn_auth_file"
- cmd = htpasswd + ' -b ' + svn_auth_file + ' ' + \
- args['username'] + ' ' + args['password']
- data = mw.execShell(cmd)
- # print data
- if data[0] == '':
- return 'ok'
- return 'fail'
-
-
-def userDel():
- args = getArgs()
- if not 'username' in args:
- return 'name missing'
-
- htpasswd = getServerDir() + "/bin/htpasswd"
- svn_auth_file = getServerDir() + "/data/conf/svn_auth_file"
- cmd = htpasswd + ' -D ' + svn_auth_file + ' ' + args['username']
- data = mw.execShell(cmd)
- if data[0] == '':
- return 'ok'
- return 'fail'
-
-
-def getAllUser(search=''):
- svn_auth_file = getServerDir() + '/data/conf/svn_auth_file'
- if not os.path.exists(svn_auth_file):
- return mw.getJson([])
- auth = mw.readFile(svn_auth_file)
- auth = auth.strip()
- auth_list = auth.split("\n")
-
- ulist = []
- for x in range(len(auth_list)):
- tmp = auth_list[x].split(':')
- if search != '':
- if tmp[0].find(search) != -1:
- ulist.append(tmp[0])
- else:
- ulist.append(tmp[0])
- return ulist
-
-
-def userList():
- import math
- args = getArgs()
-
- page = 1
- page_size = 10
- search = ''
- if 'page' in args:
- page = int(args['page'])
-
- if 'page_size' in args:
- page_size = int(args['page_size'])
-
- if 'search' in args:
- search = args['search']
-
- ulist = getAllUser(search)
- ulist_sum = len(ulist)
-
- page_info = {'count': ulist_sum, 'p': page,
- 'row': 10, 'tojs': 'csvnUserList'}
- data = {}
- data['list'] = mw.getPage(page_info)
- data['page'] = page
- data['page_size'] = page_size
- data['page_count'] = int(math.ceil(ulist_sum / page_size))
- start = (page - 1) * page_size
-
- data['data'] = ulist[start:start + page_size]
- return mw.getJson(data)
-
-
-def projectAdd():
- args = getArgs()
- if not 'name' in args:
- return 'project name missing'
- path = getServerDir() + '/bin/svnadmin'
- dest = getServerDir() + '/data/repositories/' + args['name']
- cmd = path + ' create ' + dest
- data = mw.execShell(cmd)
- if data[1] == '':
- mw.execShell('chown -R csvn:csvn ' + dest)
- return 'ok'
- return 'fail'
-
-
-def projectDel():
- args = getArgs()
- if not 'name' in args:
- return 'project name missing'
-
- dest = getServerDir() + '/data/repositories/' + args['name']
- cmd = 'rm -rf ' + dest
- data = mw.execShell(cmd)
- if data[0] == '':
- return 'ok'
- return 'fail'
-
-
-def getHttpPort():
- http_main_conf = getServerDir() + '/data/conf/csvn_main_httpd.conf'
- try:
- if os.path.exists(http_main_conf):
- content = mw.readFile(http_main_conf)
- return re.search('Listen\s(\d+)', content).groups()[0]
- except Exception as e:
- pass # print e
- return '80'
-
-
-def getCsvnPort():
- http_main_conf = getServerDir() + '/data/conf/csvn-wrapper.conf'
- try:
- if os.path.exists(http_main_conf):
- content = mw.readFile(http_main_conf)
- return re.search('wrapper.java.additional.3=-Djetty.port=(\d+)', content).groups()[0]
- except Exception as e:
- pass # print e
- return '3343'
-
-
-def getALlProjectList(search=''):
- path = getServerDir() + '/data/repositories'
- dlist = []
- if os.path.exists(path):
- for filename in os.listdir(path):
- tmp = {}
- filePath = path + '/' + filename
- if os.path.isdir(filePath):
- if search == '':
- tmp['name'] = filename
- dlist.append(tmp)
- else:
- if filename.find(search) != -1:
- tmp['name'] = filename
- dlist.append(tmp)
- return dlist
-
-
-def checkProjectListIsHasScript(data):
- dlen = len(data)
- for x in range(dlen):
- path = getServerDir() + '/data/repositories/' + \
- data[x]['name'] + '/hooks/post-commit'
- if os.path.exists(path):
- data[x]['has_hook'] = True
- else:
- data[x]['has_hook'] = False
-
- return data
-
-
-def projectList():
- import math
- args = getArgs()
-
- page = 1
- page_size = 10
- search = ''
- if 'page' in args:
- page = int(args['page'])
-
- if 'page_size' in args:
- page_size = int(args['page_size'])
-
- if 'search' in args:
- search = args['search']
-
- dlist = getALlProjectList(search)
- dlist_sum = len(dlist)
-
- start = (page - 1) * page_size
- ret_data = dlist[start:start + page_size]
- ret_data = checkProjectListIsHasScript(ret_data)
-
- data = {}
- data['data'] = ret_data
- data['list'] = mw.getPage(
- {'count': dlist_sum, 'p': page, 'row': 10, 'tojs': 'csvnProjectList'})
- data['ip'] = mw.getLocalIp()
- data['port'] = getHttpPort()
- data['csvn_port'] = getCsvnPort()
-
- return mw.getJson(data)
-
-
-def getAllAclList():
- svn_access_file = getServerDir() + '/data/conf/svn_access_file'
- aData = mw.readFile(svn_access_file)
- aData = re.sub('#.*', '', aData)
- aData = aData.strip().split('[')[1:]
- allAcl = {}
- for i in range(len(aData)):
- oData = aData[i].strip().split(']')
- name = oData[0].strip('/').strip(':')
- if oData[1] == '':
- allAcl[name] = []
- else:
- user = oData[1].strip().split('\n')
- userAll = []
- for iu in range(len(user)):
- ulist = user[iu].split('=')
- utmp = {}
- utmp['user'] = ulist[0].strip()
- utmp['acl'] = ulist[1].strip()
- userAll.append(utmp)
- allAcl[name] = userAll
- return allAcl
-
-
-def makeAclFile(content):
- # print content
- svn_access_file = getServerDir() + '/data/conf/svn_access_file'
- tmp = "\n"
- for k, v in content.items():
- if k == '':
- tmp += "[/]\n"
- else:
- tmp += "[" + k + ":/]\n"
-
- for iv in range(len(v)):
- tmp += v[iv]['user'] + ' = ' + v[iv]['acl'] + "\n"
- tmp += "\n"
- # svn_tmp_path = getServerDir() + '/data/conf/svn_access_file.log'
- return mw.writeFile(svn_access_file, tmp)
-
-
-def projectAclList():
- args = getArgs()
- if not 'name' in args:
- return 'name missing!'
- name = args['name']
- acl = getAllAclList()
-
- if name in acl:
- return mw.getJson(acl[name])
- else:
- return 'fail'
-
-
-def projectAclAdd():
- args = getArgs()
- if not 'uname' in args:
- return 'username missing'
- if not 'pname' in args:
- return 'project name missing'
- uname = args['uname']
- pname = args['pname']
-
- ulist = getAllUser()
- if not uname in ulist:
- return uname + " user not exists!"
-
- acl = getAllAclList()
-
- tmp_acl = {'user': uname, 'acl': 'rw'}
- if not pname in acl:
- acl[pname] = [tmp_acl]
- makeAclFile(acl)
- return 'ok'
-
- tmp = acl[pname]
- tmp_len = len(tmp)
-
- if tmp_len == 0:
- acl[pname] = [tmp_acl]
- else:
- is_have = False
- for x in range(tmp_len):
- if tmp[x]['user'] == uname:
- is_have = True
- return uname + ' users already exist!'
- if not is_have:
- tmp.append(tmp_acl)
- acl[pname] = tmp
-
- makeAclFile(acl)
- return 'ok'
-
-
-def projectAclDel():
- args = getArgs()
- if not 'uname' in args:
- return 'username missing'
- if not 'pname' in args:
- return 'project name missing'
-
- uname = args['uname']
- pname = args['pname']
-
- ulist = getAllUser()
- if not uname in ulist:
- return uname + " user not exists!"
-
- acl = getAllAclList()
-
- if not pname in acl:
- return 'project not exists!'
-
- tmp = acl[pname]
- tmp_len = len(tmp)
- if tmp_len == 0:
- return 'project no have user:' + uname
- else:
- is_have = False
- rtmp = []
- for x in range(tmp_len):
- if tmp[x]['user'] != uname:
- rtmp.append(tmp[x])
- acl[pname] = rtmp
- makeAclFile(acl)
- return 'ok'
-
-
-def projectAclSet():
- args = getArgs()
- if not 'uname' in args:
- return 'username missing'
- if not 'pname' in args:
- return 'project name missing'
- if not 'acl' in args:
- return 'acl missing'
-
- uname = args['uname']
- pname = args['pname']
- up_acl = args['acl']
-
- ulist = getAllUser()
- if not uname in ulist:
- return uname + " user not exists!"
-
- acl = getAllAclList()
-
- if not pname in acl:
- return 'project not exists!'
-
- tmp = acl[pname]
- tmp_len = len(tmp)
- if tmp_len == 0:
- return 'project no have user:' + uname
- else:
- is_have = False
- for x in range(tmp_len):
- if tmp[x]['user'] == uname:
- tmp[x]['acl'] = up_acl
- acl[pname] = tmp
- makeAclFile(acl)
- return 'ok'
-
-
-def getCsvnUser():
- user = 'admin_sync'
-
- acl = getAllAclList()
- if '' in acl:
- tmp = acl['']
- is_has = False
- for data in tmp:
- if data['user'] == user:
- is_has = True
- if not is_has:
- tmp.append({'user': user, 'acl': 'r'})
- acl[''] = tmp
- makeAclFile(acl)
- return user
-
-
-def getCsvnPwd(user):
- if app_debug:
- return user + '123'
- pwd_file = 'data/csvn_sync.pl'
-
- if os.path.exists(pwd_file):
- return mw.readFile(pwd_file).strip()
-
- import time
- cur_time = time.time()
- rand_pwd = mw.md5(str(cur_time))
- pwd = user + rand_pwd[:5]
-
- htpasswd = getServerDir() + "/bin/htpasswd"
- svn_auth_file = getServerDir() + "/data/conf/svn_auth_file"
- cmd = htpasswd + ' -b ' + svn_auth_file + ' ' + user + ' ' + pwd
- data = mw.execShell(cmd)
-
- mw.writeFile(pwd_file, pwd)
- return pwd
-
-
-def projectScriptLoad():
-
- args = getArgs()
- if not 'pname' in args:
- return 'project name missing'
-
- post_commit_tpl = getPluginDir() + '/hook/post-commit.tpl'
- hook_path = getServerDir() + '/data/repositories/' + \
- args['pname'] + '/hooks'
- post_commit_file = hook_path + '/post-commit'
-
- pct_content = mw.readFile(post_commit_tpl)
- mw.writeFile(post_commit_file, pct_content)
- mw.execShell('chmod 777 ' + post_commit_file)
-
- commit_tpl = getPluginDir() + '/hook/commit.tpl'
- commit_file = hook_path + '/commit'
-
- ct_content = mw.readFile(commit_tpl)
- ct_content = ct_content.replace('{$PROJECT_DIR}', mw.getRootDir())
- ct_content = ct_content.replace('{$PORT}', getHttpPort())
- ct_content = ct_content.replace('{$CSVN_USER}', getCsvnUser())
- ct_content = ct_content.replace('{$CSVN_PWD}', getCsvnPwd(getCsvnUser()))
-
- mw.writeFile(commit_file, ct_content)
- mw.execShell('chmod 777 ' + commit_file)
-
- return 'ok'
-
-
-def projectScriptUnload():
- args = getArgs()
- if not 'pname' in args:
- return 'project name missing'
-
- post_commit_file = getServerDir() + '/data/repositories/' + '/' + \
- args['pname'] + '/hooks/post-commit'
- mw.execShell('rm -f ' + post_commit_file)
-
- commit_file = getServerDir() + '/data/repositories/' + '/' + \
- args['pname'] + '/hooks/commit'
- mw.execShell('rm -f ' + commit_file)
- return 'ok'
-
-
-def projectScriptEdit():
- args = getArgs()
- if not 'pname' in args:
- return 'project name missing'
-
- data = {}
- commit_file = getServerDir() + '/data/repositories/' + \
- args['pname'] + '/hooks/commit'
- if os.path.exists(commit_file):
- data['status'] = True
- data['path'] = commit_file
- else:
- data['status'] = False
- data['msg'] = 'file does not exist'
-
- return mw.getJson(data)
-
-
-def projectScriptDebug():
- args = getArgs()
- if not 'pname' in args:
- return 'project name missing'
-
- data = {}
- commit_log = getServerDir() + '/data/repositories/' + \
- args['pname'] + '/sh.log'
- if os.path.exists(commit_log):
- data['status'] = True
- data['path'] = commit_log
- else:
- data['status'] = False
- data['msg'] = 'file does not exist'
-
- return mw.getJson(data)
-
-
-def getTotalStatistics():
- st = status()
- data = {}
- if st == 'start':
- svn_path = getServerDir() + '/data/repositories'
- data['status'] = True
- data['count'] = len(os.listdir(svn_path))
- data['ver'] = mw.readFile(getServerDir() + '/version.pl').strip()
- return mw.returnJson(True, 'ok', data)
- else:
- data['status'] = False
- data['count'] = 0
- return mw.returnJson(False, 'fail', data)
-
-
-if __name__ == "__main__":
- func = sys.argv[1]
- if func == 'status':
- print(status())
- elif func == 'start':
- print(start())
- elif func == 'stop':
- print(stop())
- elif func == 'restart':
- print(restart())
- elif func == 'reload':
- print(reload())
- elif func == 'initd_status':
- print(initdStatus())
- elif func == 'initd_install':
- print(initdInstall())
- elif func == 'initd_uninstall':
- print(initdUinstall())
- elif func == 'csvn_edit':
- print(csvnEdit())
- elif func == 'user_list':
- print(userList())
- elif func == 'user_add':
- print(userAdd())
- elif func == 'user_del':
- print(userDel())
- elif func == 'project_list':
- print(projectList())
- elif func == 'project_del':
- print(projectDel())
- elif func == 'project_add':
- print(projectAdd())
- elif func == 'project_acl_list':
- print(projectAclList())
- elif func == 'project_acl_add':
- print(projectAclAdd())
- elif func == 'project_acl_del':
- print(projectAclDel())
- elif func == 'project_acl_set':
- print(projectAclSet())
- elif func == 'project_script_load':
- print(projectScriptLoad())
- elif func == 'project_script_unload':
- print(projectScriptUnload())
- elif func == 'project_script_edit':
- print(projectScriptEdit())
- elif func == 'project_script_debug':
- print(projectScriptDebug())
- elif func == 'get_total_statistics':
- print(getTotalStatistics())
- else:
- print('fail')
diff --git a/plugins/csvn/info.json b/plugins/csvn/info.json
deleted file mode 100755
index 422ec52b6..000000000
--- a/plugins/csvn/info.json
+++ /dev/null
@@ -1,17 +0,0 @@
-{
- "sort": 7,
- "ps": "最流行的SVN代码共享管理软件",
- "shell": "install.sh",
- "name": "csvn",
- "title": "CSVN",
- "versions": "5.1",
- "updates":"5.1.4",
- "tip": "soft",
- "checks": "server/csvn",
- "path":"server/csvn",
- "author": "midoks",
- "date": "2017-04-01",
- "home": "https://www.collab.net",
- "type": "SVN代码共享管理软件",
- "pid": "3"
-}
\ No newline at end of file
diff --git a/plugins/csvn/install.sh b/plugins/csvn/install.sh
deleted file mode 100755
index 763e3e771..000000000
--- a/plugins/csvn/install.sh
+++ /dev/null
@@ -1,107 +0,0 @@
-#!/bin/bash
-PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
-export PATH
-
-# https://blog.csdn.net/akipa11/article/details/103455298
-# https://blog.csdn.net/bbj12345678/article/details/122941395
-
-curPath=`pwd`
-rootPath=$(dirname "$curPath")
-rootPath=$(dirname "$rootPath")
-serverPath=$(dirname "$rootPath")
-
-install_tmp=${rootPath}/tmp/mw_install.pl
-
-
-sysName=`uname`
-echo "use system: ${sysName}"
-
-if [ ${sysName} == "Darwin" ]; then
- OSNAME='macos'
-elif grep -Eqi "CentOS" /etc/issue || grep -Eq "CentOS" /etc/*-release; then
- OSNAME='centos'
-elif grep -Eqi "Fedora" /etc/issue || grep -Eq "Fedora" /etc/*-release; then
- OSNAME='fedora'
-elif grep -Eqi "Debian" /etc/issue || grep -Eq "Debian" /etc/*-release; then
- OSNAME='debian'
-elif grep -Eqi "Ubuntu" /etc/issue || grep -Eq "Ubuntu" /etc/*-release; then
- OSNAME='ubuntu'
-elif grep -Eqi "Raspbian" /etc/issue || grep -Eq "Raspbian" /etc/*-release; then
- OSNAME='raspbian'
-else
- OSNAME='unknow'
-fi
-
-
-CheckJAVA()
-{
- which "java" > /dev/null
- if [ $? -eq 0 ]
- then
- echo 'java is exist'
- elif [ "ubuntu" == "$OSNAME" ] || [ "debian" == "$OSNAME" ] ;then
- echo 'java install...'
- apt install -y default-jdk
-
- export JAVA_HOME=/usr/lib/jvm/default-java
- else
- echo 'java install...'
- yum install -y java
- fi
-}
-
-# export JAVA_HOME=/usr/lib/jvm/default-java
-#JAVA_BIN=/usr/lib/jvm/default-java/bin
-#JRE_HOME=/usr/lib/jvm/default-java/jre
-#PATH=$PATH:/usr/lib/jvm/default-java/bin:/usr/lib/jvm/default-java/jre/bin
-#CLASSPATH=/usr/lib/jvm/default-java/jre/lib:/usr/lib/jvm/default-java/lib:/usr/lib/jvm/default-java/jre/lib/charsets.jar
-
-
-Install_csvn()
-{
- CheckJAVA
- mkdir -p $serverPath/source
-
- echo '正在安装脚本文件...' > $install_tmp
-
- CSVN_SOURCE='https://github.com/midoks/mdserver-web/releases/download/init/CollabNetSubversionEdge-5.1.4_linux-x86_64.tar.xz'
-
- if [ ! -f $serverPath/source/csvn.tar.xz ];then
- wget -O $serverPath/source/csvn.tar.xz ${CSVN_SOURCE}
- fi
-
- cd $serverPath/source && tar -Jxf $serverPath/source/csvn.tar.xz
- mv $serverPath/source/csvn $serverPath/csvn
- echo '5.1' > $serverPath/csvn/version.pl
-
-
- if id -u csvn > /dev/null 2>&1; then
- echo "csvn user exists"
- else
- groupadd csvn
- useradd -g csvn csvn
- cp /etc/sudoers{,.`date +"%Y-%m-%d_%H-%M-%S"`}
- echo "csvn ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
- fi
-
- chown -R csvn:csvn $serverPath/csvn
-
- $serverPath/csvn/bin/csvn install
- $serverPath/csvn/bin/csvn-httpd install
-
- echo '安装完成' > $install_tmp
-}
-
-Uninstall_csvn()
-{
- rm -rf $serverPath/csvn
-}
-
-
-action=$1
-host=$2
-if [ "${1}" == 'install' ];then
- Install_csvn
-else
- Uninstall_csvn
-fi
diff --git a/plugins/csvn/js/csvn.js b/plugins/csvn/js/csvn.js
deleted file mode 100755
index 5df2d6d41..000000000
--- a/plugins/csvn/js/csvn.js
+++ /dev/null
@@ -1,500 +0,0 @@
-pluginService('csvn');
-
-function csvnPost(method,args,callback){
- var loadT = layer.msg('正在获取...', { icon: 16, time: 0, shade: 0.3 });
- $.post('/plugins/run', {name:'csvn', func:method, args:JSON.stringify(args)}, function(data) {
- layer.close(loadT);
- if (!data.status){
- layer.msg(data.msg,{icon:0,time:2000,shade: [0.3, '#000']});
- return;
- }
-
- if(typeof(callback) == 'function'){
- callback(data);
- }
- },'json');
-}
-
-
-
-function csvnEdit(){
-
- csvnPost('csvn_edit',{} , function(data){
- // console.log(data);
- var rdata = $.parseJSON(data.data);
- var edit = '通用的手动编辑:
';
- edit +='\
- \
- \
- \
-
';
- $(".soft-man-con").html(edit);
- });
-
-}
-
-
-function csvnUserFind(){
- var search = $('#csvn_find_user').val();
- if (search==''){
- layer.msg('搜索字符不能为空!',{icon:0,time:2000,shade: [0.3, '#000']});
- return;
- }
- csvnUserList(1, search);
-}
-
-function csvnUserList(page, search) {
-
- var _data = {};
- if (typeof(page) =='undefined'){
- var page = 1;
- }
-
- _data['page'] = page;
- _data['page_size'] = 10;
- if(typeof(search) != 'undefined'){
- _data['search'] = search;
- }
-
- csvnPost('user_list', _data, function(data){
-
- var rdata = $.parseJSON(data.data);
- // console.log(rdata);
- content = '';
- content += '
';
-
- content += '';
- content += '';
- content += '| 用户名 | ';
- content += '操作(添加) | ';
- content += '
';
-
- content += '';
-
- ulist = rdata.data;
- for (i in ulist){
- content += '| '+ulist[i]+' | '+
- '删除 | ' +
- '改密 |
';
- }
-
- content += '';
- content += '
';
-
- page = '';
-
- content += page;
-
- $(".soft-man-con").html(content);
- });
-}
-
-function csvnDelUser(name){
- var loadOpen = layer.open({
- type: 1,
- title: '删除用户',
- area: '350px',
- content:""
- });
-
- $('#csvn_del_close').click(function(){
- layer.close(loadOpen);
- });
-
- $('#csvn_del_ok').click(function(){
- _data = {};
- _data['username'] = name;
- var loadT = layer.msg('正在获取...', { icon: 16, time: 0, shade: 0.3 });
- $.post('/plugins/run', {name:'csvn', func:'user_del', args:JSON.stringify(_data)}, function(data) {
- layer.close(loadT);
- if (!data.status){
- layer.msg(data.data,{icon:0,time:2000,shade: [0.3, '#000']});
- return;
- }
-
- if (data.data !='ok'){
- layer.msg(data.data,{icon:2,time:2000,shade: [0.3, '#000']});
- }
-
- layer.close(loadOpen);
- layer.msg("删除成功!",{icon:1,time:3000,shade: [0.3, '#000']});
-
- },'json');
- });
-}
-
-function csvnAddUser(username){
-
- user_input = ''
- if (typeof(username) == 'undefined'){
- user_input = "";
- } else {
- user_input = "";
- }
-
- var loadOpen = layer.open({
- type: 1,
- title: '添加用户',
- area: '240px',
- content:""
- });
-
- $('#csvn_add_close').click(function(){
- layer.close(loadOpen);
- });
-
- $('#csvn_add_ok').click(function(){
- _data = {};
-
- _data['username'] = $('#csvn_username').val();
- _data['password'] = $('#csvn_password').val();
-
- var loadT = layer.msg('正在获取...', { icon: 16, time: 0, shade: 0.3 });
- $.post('/plugins/run', {name:'csvn', func:'user_add', args:JSON.stringify(_data)}, function(data) {
- layer.close(loadT);
- if (!data.status){
- layer.msg(data.data,{icon:0,time:2000,shade: [0.3, '#000']});
- return;
- }
-
- if (data.data !='ok'){
- layer.msg(data.data,{icon:2,time:2000,shade: [0.3, '#000']});
- }
-
- csvnUserList();
- layer.close(loadOpen);
- layer.msg("操作成功!",{icon:1,time:3000,shade: [0.3, '#000']});
- },'json');
- });
-}
-
-function csvnModPwdUser(name){
- csvnAddUser(name);
-}
-
-function csvnProjectFind(){
- var search = $('#csvn_project_find').val();
- if (search == ''){
- layer.msg('查找字符不能为空!',{icon:0,time:2000,shade: [0.3, '#000']});
- return;
- }
-
- csvnProjectList(1, search);
-}
-
-function csvnProjectList(page, search){
- var _data = {};
- _data['page_size'] = 10;
- if (typeof(search) != 'undefined'){
- _data['search'] = search;
- }
-
- if (typeof(page) != 'undefined'){
- _data['page'] = page;
- setCookie('csvnProjectListPage',page);
- } else {
- _data['page'] = 1;
- cookie_page = getCookie('csvnProjectListPage')
- if (cookie_page >0){
- _data['page'] = cookie_page;
- }
- }
-
- csvnPost('project_list', _data, function(data){
-
- var rdata = $.parseJSON($.trim(data.data));
- var csvn_mg = project_url = 'http://' +rdata['ip'] +(rdata['csvn_port'] == '80' ? '': ':'+rdata['csvn_port']);
-
- content = '';
- content += '
';
-
- content += '';
- content += '';
- content += '| 项目名 | ';
- content += '地址 | ';
- content += '操作(添加) | 后台管理 | ';
- content += '
';
- content += '';
-
- // console.log(rdata);
- ulist = rdata.data;
- for (i in ulist){
- var project_url = 'http://' +rdata['ip'] +(rdata['port'] == '80' ? '': ':'+rdata['port'])+ '/svn/'+ulist[i]['name'];
- var code_url = 'http://' +rdata['ip'] +(rdata['port'] == '80' ? '': ':'+rdata['port'])+ '/viewvc/'+ulist[i]['name'];
- content += '| '+ulist[i]['name']+' | '+
- ''+project_url+' | '+
- '删除 | ' +
- '权限 | ' +
- '源码 | ' +
- '脚本' +
- ' |
';
- }
-
- content += '';
- content += '
';
-
- page = '';
-
- content += page;
- $(".soft-man-con").html(content);
- });
-}
-
-function csvnDelProject(name){
- var loadOpen = layer.open({
- type: 1,
- title: '删除用户',
- area: '350px',
- content:""
- });
-
- $('#csvn_del_close').click(function(){
- layer.close(loadOpen);
- });
-
- $('#csvn_del_ok').click(function(){
- var _data = {};
- _data['name'] = name;
- var loadT = layer.msg('正在获取...', { icon: 16, time: 0, shade: 0.3 });
- $.post('/plugins/run', {name:'csvn', func:'project_del', args:JSON.stringify(_data)}, function(data) {
- layer.close(loadT);
- if (!data.status){
- layer.msg(data.data,{icon:0,time:2000,shade: [0.3, '#000']});
- return;
- }
-
- if (data.data !='ok'){
- layer.msg(data.data,{icon:2,time:2000,shade: [0.3, '#000']});
- return;
- }
-
- csvnProjectList();
- layer.close(loadOpen);
- layer.msg("删除成功!",{icon:1,time:3000,shade: [0.3, '#000']});
- },'json');
- });
-}
-
-function csvnAddProject(){
-
- var loadOpen = layer.open({
- type: 1,
- title: '添加项目',
- area: '240px',
- content:""
- });
-
- $('#csvn_project_close').click(function(){
- layer.close(loadOpen);
- });
-
- $('#csvn_project_ok').click(function(){
- var _data = {};
- _data['name'] = $('#csvn_name').val();
-
- csvnPost('project_add', _data, function(data){
-
- if (data.data !='ok'){
- layer.msg(data.data,{icon:2,time:2000,shade: [0.3, '#000']});
- return;
- }
-
- csvnProjectList();
- layer.close(loadOpen);
- layer.msg("操作成功!",{icon:1,time:3000,shade: [0.3, '#000']});
- });
- });
-}
-
-
-function csvnProjectScript(pname, has_hook){
-
- var html = '';
- if (has_hook){
- html += '';
- html += '';
- html += '';
- html += '';
- } else {
- html += '';
- }
-
- var loadOpen = layer.open({
- type: 1,
- title: '脚本设置',
- area: '240px',
- content:''+html+'
'
- });
-}
-
-function csvnProjectScriptLoad(pname){
- csvnPost('project_script_load', {'pname':pname}, function(data){
- if (data.data != 'ok'){
- layer.msg(data.data,{icon:0,time:2000,shade: [0.3, '#000']});
- return;
- }
-
- layer.msg('加载成功!',{icon:1,time:2000,shade: [0.3, '#000']});
- setTimeout(function(){
- csvnProjectList();
- },2000);
- });
-}
-
-function csvnProjectScriptUnload(pname){
- csvnPost('project_script_unload', {'pname':pname}, function(data){
- if (data.data != 'ok'){
- layer.msg(data.data,{icon:0,time:2000,shade: [0.3, '#000']});
- return;
- }
-
- layer.msg('卸载成功!',{icon:1,time:2000,shade: [0.3, '#000']});
- setTimeout(function(){
- csvnProjectList();
- },2000);
- });
-}
-
-function csvnProjectScriptEdit(pname){
- csvnPost('project_script_edit', {'pname':pname}, function(data){
- var rdata = $.parseJSON(data.data);
- if (rdata['status']){
- onlineEditFile(0, rdata['path']);
- csvnProjectList();
- } else {
- layer.msg(rdata.msg,{icon:1,time:2000,shade: [0.3, '#000']});
- }
- });
-}
-
-function csvnProjectScriptDebug(pname){
- csvnPost('project_script_debug', {'pname':pname}, function(data){
- var rdata = $.parseJSON(data.data);
- if (rdata['status']){
- onlineEditFile(0, rdata['path']);
- csvnProjectList();
- } else {
- layer.msg(rdata.msg,{icon:1,time:2000,shade: [0.3, '#000']});
- }
- });
-}
-
-
-function csvnAclAdd(pname){
- var uname = $('#csvn_username').val();
- if (uname == ''){
- layer.msg('添加用户名不能为空!',{icon:0,time:2000,shade: [0.3, '#000']});
- return;
- }
-
- csvnPost('project_acl_add', {'pname':pname,'uname':uname}, function(data){
- if (data.data != 'ok'){
- layer.msg(data.data,{icon:0,time:2000,shade: [0.3, '#000']});
- return;
- }
- $('.layui-layer-close1').click();
- csvnAclProject(pname);
- });
-}
-
-function csvnAclDel(pname, uname){
- csvnPost('project_acl_del', {'pname':pname,'uname':uname}, function(data){
- if (data.data != 'ok'){
- layer.msg(data.data,{icon:0,time:2000,shade: [0.3, '#000']});
- return;
- }
- $('.layui-layer-close1').click();
- csvnAclProject(pname);
- });
-}
-
-function csvnAclSet(obj, pname, uname, acl, selected){
-
- if (selected){
- $(obj).prop('checked',true);
- layer.msg('权限没有变化!',{icon:0,time:2000,shade: [0.3, '#000']});
- return;
- }
-
- csvnPost('project_acl_set', {'pname':pname,'uname':uname, 'acl':acl}, function(data){
- if (data.data != 'ok'){
- layer.msg(data.data,{icon:0,time:2000,shade: [0.3, '#000']});
- return;
- }
-
- $('.layui-layer-close1').click();
- csvnAclProject(pname);
- });
-}
-
-function csvnAclProject(pname){
- csvnPost('project_acl_list', {'name':pname}, function(data){
-
- var rdata = [];
- try {
- rdata = $.parseJSON(data.data);
- } catch(e){}
-
- var list = '';
- for (i in rdata) {
- var user = rdata[i]['user'];
- var acl = '';
- if (rdata[i]['acl'] == 'r'){
- acl += ' 只读 | 读写';
- } else {
- acl += ' 只读 | 读写';
- }
-
- list += '| '+user+' | ' + acl +' | '+
- '删除 | '+'
';
- }
-
- var loadOpen = layer.open({
- type: 1,
- title: '项目('+pname+')权限设置',
- area: '300px',
- content:""
- });
- });
-}
\ No newline at end of file
diff --git a/plugins/gogs/index.py b/plugins/gogs/index.py
index f909297f2..1340a8d57 100755
--- a/plugins/gogs/index.py
+++ b/plugins/gogs/index.py
@@ -157,7 +157,7 @@ def initDreplace():
# mw.writeFile(conf_bin, content)
# systemd
- systemDir = '/lib/systemd/system'
+ systemDir = '/usr/lib/systemd/system'
systemService = systemDir + '/gogs.service'
systemServiceTpl = getPluginDir() + '/init.d/gogs.service.tpl'
if os.path.exists(systemDir) and not os.path.exists(systemService):
diff --git a/plugins/gogs/install.sh b/plugins/gogs/install.sh
index f06e8f857..acaf61078 100755
--- a/plugins/gogs/install.sh
+++ b/plugins/gogs/install.sh
@@ -79,10 +79,10 @@ Install_gogs()
Uninstall_gogs()
{
- if [ -f /lib/systemd/system/gogs.service ];then
+ if [ -f /usr/lib/systemd/system/gogs.service ];then
systemctl stop gogs
systemctl disable gogs
- rm -rf /lib/systemd/system/gogs.service
+ rm -rf /usr/lib/systemd/system/gogs.service
systemctl daemon-reload
fi
diff --git a/plugins/memcached/index.py b/plugins/memcached/index.py
index b3bf5fbaa..3680952d7 100755
--- a/plugins/memcached/index.py
+++ b/plugins/memcached/index.py
@@ -104,7 +104,7 @@ def initDreplace():
mw.execShell('chmod +x ' + file_bin)
# systemd
- systemDir = '/lib/systemd/system'
+ systemDir = '/usr/lib/systemd/system'
systemService = systemDir + '/memcached.service'
systemServiceTpl = getPluginDir() + '/init.d/memcached.service.tpl'
if os.path.exists(systemDir) and not os.path.exists(systemService):
diff --git a/plugins/memcached/install.sh b/plugins/memcached/install.sh
index fad5f22cc..79e12d40d 100755
--- a/plugins/memcached/install.sh
+++ b/plugins/memcached/install.sh
@@ -14,6 +14,7 @@ VERSION=1.6.15
Install_mem(){
mkdir -p $serverPath/source
+ # mkdir -p $serverPath/memcached
echo '正在安装脚本文件...' > $install_tmp
if [ ! -f $serverPath/source/memcached.tar.gz ];then
@@ -22,7 +23,7 @@ Install_mem(){
cd $serverPath/source && tar -zxvf memcached.tar.gz
- mkdir -p $serverPath/memcached
+
echo "./configure --prefix=${serverPath}/memcached && make && make install"
cd $serverPath/source/memcached-${VERSION} && ./configure --prefix=$serverPath/memcached && make && make install
@@ -38,10 +39,10 @@ Install_mem(){
Uninstall_mem()
{
- if [ -f /lib/systemd/system/memcached.service ];then
+ if [ -f /usr/lib/systemd/system/memcached.service ];then
systemctl stop memcached
systemctl disable memcached
- rm -rf /lib/systemd/system/memcached.service
+ rm -rf /usr/lib/systemd/system/memcached.service
systemctl daemon-reload
fi
@@ -52,6 +53,8 @@ Uninstall_mem()
}
+# /www/server/memcached/bin/memcached -d -p 11211 -u root -m 100 -c 100
+
action=$1
if [ "${1}" == 'install' ];then
Install_mem
diff --git a/plugins/mongodb/index.py b/plugins/mongodb/index.py
index 0305e1157..26fc280c7 100755
--- a/plugins/mongodb/index.py
+++ b/plugins/mongodb/index.py
@@ -104,80 +104,41 @@ def initDreplace():
return file_bin
-def start():
+def mgOp(method):
+ file = initDreplace()
if mw.isAppleSystem():
- file = initDreplace()
- data = mw.execShell(file + ' start')
+ data = mw.execShell(file + ' ' + method)
if data[1] == '':
return 'ok'
- return 'fail'
+ return data[1]
- cmd = 'systemctl start mongod'
+ cmd = 'systemctl ' + method + ' mongod'
if os.path.exists("/usr/lib/systemd/system/mongodb.service"):
- cmd = 'systemctl start mongodb'
+ cmd = 'systemctl ' + start + ' mongodb'
data = mw.execShell(cmd)
if data[1] == '':
return 'ok'
- return 'fail'
+ return data[1]
+
+
+def start():
+ return mgOp('start')
def stop():
- if mw.isAppleSystem():
- file = initDreplace()
- data = mw.execShell(file + ' stop')
- if data[1] == '':
- return 'ok'
- return 'fail'
-
- cmd = 'systemctl stop mongod'
- if os.path.exists("/usr/lib/systemd/system/mongodb.service"):
- cmd = 'systemctl stop mongodb'
-
- data = mw.execShell(cmd)
- if data[1] == '':
- return 'ok'
- return 'fail'
+ return mgOp('stop')
def reload():
- if os.path.exists("/tmp/mongodb-27017.sock"):
- mw.execShell('rm -rf ' + "/tmp/mongodb-27017.sock")
- if mw.isAppleSystem():
- file = initDreplace()
- data = mw.execShell(file + ' reload')
- if data[1] == '':
- return 'ok'
- return 'fail'
-
- cmd = 'systemctl reload mongod'
- if os.path.exists("/usr/lib/systemd/system/mongodb.service"):
- cmd = 'systemctl reload mongodb'
-
- data = mw.execShell(cmd)
- if data[1] == '':
- return 'ok'
- return 'fail'
+ return mgOp('reload')
def restart():
if os.path.exists("/tmp/mongodb-27017.sock"):
mw.execShell('rm -rf ' + "/tmp/mongodb-27017.sock")
- if mw.isAppleSystem():
- file = initDreplace()
- data = mw.execShell(file + ' reload')
- if data[1] == '':
- return 'ok'
- return 'fail'
- cmd = 'systemctl reload mongod'
- if os.path.exists("/usr/lib/systemd/system/mongodb.service"):
- cmd = 'systemctl reload mongodb'
-
- data = mw.execShell(cmd)
- if data[1] == '':
- return 'ok'
- return 'fail'
+ return mgOp('restart')
def runInfo():
@@ -218,15 +179,8 @@ def runInfo():
def initdStatus():
- if not app_debug:
- if mw.isAppleSystem():
- return "Apple Computer does not support"
-
if mw.isAppleSystem():
- initd_bin = getInitDFile()
- if os.path.exists(initd_bin):
- return 'ok'
- return 'fail'
+ return "Apple Computer does not support"
shell_cmd = 'systemctl status mongod | grep loaded | grep "enabled;"'
@@ -240,17 +194,8 @@ def initdStatus():
def initdInstall():
- import shutil
- if not app_debug:
- if mw.isAppleSystem():
- return "Apple Computer does not support"
-
if mw.isAppleSystem():
- source_bin = initDreplace()
- initd_bin = getInitDFile()
- shutil.copyfile(source_bin, initd_bin)
- mw.execShell('chmod +x ' + initd_bin)
- mw.execShell('chkconfig --add ' + getPluginName())
+ return "Apple Computer does not support"
if os.path.exists("/usr/lib/systemd/system/mongodb.service"):
mw.execShell('systemctl enable mongodb')
@@ -260,13 +205,8 @@ def initdInstall():
def initdUinstall():
- if not app_debug:
- if mw.isAppleSystem():
- return "Apple Computer does not support"
if mw.isAppleSystem():
- mw.execShell('chkconfig --del ' + getPluginName())
- initd_bin = getInitDFile()
- os.remove(initd_bin)
+ return "Apple Computer does not support"
if os.path.exists("/usr/lib/systemd/system/mongodb.service"):
mw.execShell('systemctl disable mongodb')
diff --git a/plugins/mongodb/info.json b/plugins/mongodb/info.json
index 6172e4ac6..3f3550329 100755
--- a/plugins/mongodb/info.json
+++ b/plugins/mongodb/info.json
@@ -4,15 +4,15 @@
"name": "mongodb",
"title": "Mongodb",
"shell": "install.sh",
- "versions":["4.4.14","5.0.4"],
- "updates":["4.4.14","5.0.4"],
+ "versions":["4.4","5.0"],
+ "updates":["4.4","5.0"],
"tip": "soft",
"checks": "server/mongodb",
"path": "server/mongodb",
"display": 1,
"author": "mongodb",
"date": "2021-11-23",
- "home": "https://www.mongodb.com/",
+ "home": "https://www.mongodb.com/docs/v4.4/installation/",
"type": 0,
"pid": "2"
}
\ No newline at end of file
diff --git a/plugins/mongodb/install.sh b/plugins/mongodb/install.sh
index 646d1dc48..f14261131 100755
--- a/plugins/mongodb/install.sh
+++ b/plugins/mongodb/install.sh
@@ -18,6 +18,8 @@ echo "use system: ${sysName}"
if [ ${sysName} == "Darwin" ]; then
OSNAME='macos'
+elif grep -Eq "openSUSE" /etc/*-release; then
+ OSNAME='opensuse'
elif grep -Eqi "CentOS" /etc/issue || grep -Eq "CentOS" /etc/*-release; then
OSNAME='centos'
elif grep -Eqi "Fedora" /etc/issue || grep -Eq "Fedora" /etc/*-release; then
@@ -26,58 +28,239 @@ elif grep -Eqi "Debian" /etc/issue || grep -Eq "Debian" /etc/*-release; then
OSNAME='debian'
elif grep -Eqi "Ubuntu" /etc/issue || grep -Eq "Ubuntu" /etc/*-release; then
OSNAME='ubuntu'
-elif grep -Eqi "Raspbian" /etc/issue || grep -Eq "Raspbian" /etc/*-release; then
- OSNAME='raspbian'
else
OSNAME='unknow'
fi
+
+SYS_VERSION_ID=`cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | awk -F "\"" '{print $2}'`
+
+
+
Install_app_mac()
{
-
if [ ! -f $serverPath/source/mongodb-macos-x86_64-${VERSION}.tgz ];then
wget -O $serverPath/source/mongodb-macos-x86_64-${VERSION}.tgz https://fastdl.mongodb.org/osx/mongodb-macos-x86_64-${VERSION}.tgz
fi
cd $serverPath/source && tar -zxvf mongodb-macos-x86_64-${VERSION}.tgz
-
cd mongodb-macos-x86_64-${VERSION} && mv ./* $serverPath/mongodb
}
+Install_Linux_Ubuntu()
+{
+##################### Ubuntu start #####################
+if [ "$SYS_VERSION_ID" == "22" ]; then
+ echo "Not yet supported"
+ exit 1
+fi
+
+
+if [ -f /usr/lib/systemd/system/mongod.service ];then
+ echo 'alreay exist!'
+ exit 0
+fi
+
+wget -qO - https://www.mongodb.org/static/pgp/server-${VERSION}.asc | sudo apt-key add -
+sudo apt install gnupg
+touch /etc/apt/sources.list.d/mongodb-org-${VERSION}.list
+lsb_release -dc
+
+echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/${VERSION} multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-${VERSION}.list
+
+apt update -y
+apt install -y mongodb-org
+##################### Ubuntu end #####################
+}
+
+
+Uninstall_Linux_Ubuntu()
+{
+systemctl stop mongod
+apt purge -y mongodb-org*
+apt autoremove -y
+rm -r /var/log/mongodb
+rm -r /var/lib/mongodb
+}
+
+
+Install_Linux_Debian()
+{
+##################### debian start #####################
+if [ "$SYS_VERSION_ID" -ge "11" ]; then
+ echo "Not yet supported"
+ exit 1
+fi
+
+
+if [ -f /usr/lib/systemd/system/mongod.service ];then
+ echo 'alreay exist!'
+ exit 0
+fi
+
+wget -qO - https://www.mongodb.org/static/pgp/server-${VERSION}.asc | sudo apt-key add -
+apt install -y gnupg
+wget -qO - https://www.mongodb.org/static/pgp/server-${VERSION}.asc | sudo apt-key add -
+
+echo "deb http://repo.mongodb.org/apt/debian buster/mongodb-org/${VERSION} main" | sudo tee /etc/apt/sources.list.d/mongodb-org-${VERSION}.list
+
+apt update -y
+apt install -y mongodb-org
+
+
+echo "mongodb-org hold" | sudo dpkg --set-selections
+echo "mongodb-org-server hold" | sudo dpkg --set-selections
+echo "mongodb-org-shell hold" | sudo dpkg --set-selections
+echo "mongodb-org-mongos hold" | sudo dpkg --set-selections
+echo "mongodb-org-tools hold" | sudo dpkg --set-selections
+
+##################### debian end #####################
+}
+
+
+
+Uninstall_Linux_Debian()
+{
+systemctl stop mongod
+apt purge -y mongodb-org*
+apt autoremove -y
+rm -r /var/log/mongodb
+rm -r /var/lib/mongodb
+}
+
+
+Install_Linux_Opensuse()
+{
+##################### opensuse start #####################
+if [ "$SYS_VERSION_ID" -gt "15" ]; then
+ echo "Not yet supported"
+ exit 1
+fi
+
+
+if [ -f /usr/lib/systemd/system/mongod.service ];then
+ echo 'alreay exist!'
+ exit 0
+fi
+
+rpm --import https://www.mongodb.org/static/pgp/server-${VERSION}.asc
+zypper addrepo --gpgcheck "https://repo.mongodb.org/zypper/suse/15/mongodb-org/${VERSION}/x86_64/" mongodb
+zypper -n install mongodb-org
+# zypper install mongodb-org-4.4.15 mongodb-org-server-4.4.15 mongodb-org-shell-4.4.15 mongodb-org-mongos-4.4.15 mongodb-org-tools-4.4.15
+
+
+##################### opensuse end #####################
+}
+
+
+Uninstall_Linux_Opensuse()
+{
+systemctl stop mongod
+zypper remove -y $(rpm -qa | grep mongodb-org)
+rm -r /var/log/mongodb
+rm -r /var/lib/mongo
+}
+
+
+
+
# https://repo.mongodb.org/yum/redhat/7/mongodb-org/5.0/x86_64/RPMS/mongodb-org-server-5.0.4-1.el7.x86_64.rpm
-Install_app_linux(){
- if [ ! -f $serverPath/source/mongodb-org-server-${VERSION}-1.el7.x86_64.rpm ];then
- wget -O $serverPath/source/mongodb-org-server-${VERSION}-1.el7.x86_64.rpm https://repo.mongodb.org/yum/redhat/7/mongodb-org/5.0/x86_64/RPMS/mongodb-org-server-${VERSION}-1.el7.x86_64.rpm
+Install_Linux_CentOS()
+{
+if [ -f /usr/lib/systemd/system/mongod.service ];then
+ echo 'alreay exist!'
+ exit 0
+fi
+#清空mongo的repo源
+rm -rf /etc/yum.repos.d/mongodb-org-*
+##################### centos start #####################
+echo "
+[mongodb-org-${VERSION}]
+name=MongoDB Repository
+baseurl=https://repo.mongodb.org/yum/redhat/\$releasever/mongodb-org/${VERSION}/x86_64/
+gpgcheck=1
+enabled=1
+gpgkey=https://www.mongodb.org/static/pgp/server-${VERSION}.asc
+" > /etc/yum.repos.d/mongodb-org-${VERSION}.repo
+
+yum install -y mongodb-org
+##################### centos end #####################
+}
+
+Uninstall_Linux_CentOS()
+{
+systemctl stop mongod
+yum erase -y $(rpm -qa | grep mongodb-org)
+rm -r /var/log/mongodb
+rm -r /var/lib/mongo
+}
+
+
+Install_app_linux()
+{
+ if [ "$OSNAME" == "ubuntu" ];then
+ Install_Linux_Ubuntu
+ elif [ "$OSNAME" == "debian" ];then
+ Install_Linux_Debian
+ elif [ "$OSNAME" == "centos" ];then
+ Install_Linux_CentOS
+ elif [ "$OSNAME" == "opensuse" ];then
+ Install_Linux_Opensuse
+ else
+ echo "Not yet supported"
+ exit 1
fi
-
- rpm -ivh $serverPath/source/mongodb-org-server-${VERSION}-1.el7.x86_64.rpm
}
Install_app()
{
- pip3 install pymongo
-
echo '正在安装脚本文件...' > $install_tmp
mkdir -p $serverPath/source
mkdir -p $serverPath/mongodb
if [ "macos" == "$OSNAME" ];then
Install_app_mac
- elif [ "ubuntu" == "$OSNAME" ] || [ "debian" == "$OSNAME" ] ;then
- apt install -y mongodb
else
Install_app_linux
fi
echo "${VERSION}" > $serverPath/mongodb/version.pl
echo '安装完成' > $install_tmp
+
+ #初始化
+ cd ${rootPath} && python3 ${rootPath}/plugins/mongodb/index.py start
+ cd ${rootPath} && python3 ${rootPath}/plugins/mongodb/index.py initd_install
+}
+
+
+
+Uninstall_app_linux()
+{
+##################
+if [ "$OSNAME" == "ubuntu" ];then
+ Uninstall_Linux_Ubuntu
+elif [ "$OSNAME" == "debian" ];then
+ Uninstall_Linux_Debian
+elif [ "$OSNAME" == "centos" ];then
+ Uninstall_Linux_CentOS
+elif [ "$OSNAME" == "opensuse" ];then
+ Uninstall_Linux_Opensuse
+else
+ echo "ok"
+fi
+##################
}
Uninstall_app()
{
- # apt remove mongodb -y
+ if [ "macos" == "$OSNAME" ];then
+ echo 'mac'
+ else
+ Uninstall_app_linux
+ fi
+
rm -rf $serverPath/mongodb
echo "Uninstall_mongodb" > $install_tmp
}
diff --git a/plugins/mysql/index.html b/plugins/mysql/index.html
index fe590a41e..0dc255328 100755
--- a/plugins/mysql/index.html
+++ b/plugins/mysql/index.html
@@ -52,7 +52,10 @@
\ No newline at end of file
diff --git a/plugins/mysql/index.py b/plugins/mysql/index.py
index d13d6e5db..c066298a4 100755
--- a/plugins/mysql/index.py
+++ b/plugins/mysql/index.py
@@ -176,7 +176,7 @@ def initDreplace(version=''):
mw.writeFile(mysql_conf, content)
# systemd
- systemDir = '/lib/systemd/system'
+ systemDir = '/usr/lib/systemd/system'
systemService = systemDir + '/mysql.service'
systemServiceTpl = getPluginDir() + '/init.d/mysql.service.tpl'
if os.path.exists(systemDir) and not os.path.exists(systemService):
@@ -572,7 +572,7 @@ def setMyPort():
def runInfo():
if status(version) == 'stop':
- return mw.returnJson(false, 'MySQL未启动', [])
+ return mw.returnJson(False, 'MySQL未启动', [])
db = pMysqlDb()
data = db.query('show global status')
@@ -1470,7 +1470,7 @@ def setDbSlave(version):
def getMasterStatus(version=''):
if status(version) == 'stop':
- return mw.returnJson(false, 'MySQL未启动,或正在启动中...!', [])
+ return mw.returnJson(False, 'MySQL未启动,或正在启动中...!', [])
conf = getConf()
con = mw.readFile(conf)
diff --git a/plugins/mysql/install.sh b/plugins/mysql/install.sh
index aa36df47e..69d99bcb0 100755
--- a/plugins/mysql/install.sh
+++ b/plugins/mysql/install.sh
@@ -26,10 +26,10 @@ fi
if [ "${action}" == "uninstall" ];then
- if [ -f /lib/systemd/system/mysql.service ];then
+ if [ -f /usr/lib/systemd/system/mysql.service ];then
systemctl stop mysql
systemctl disable mysql
- rm -rf /lib/systemd/system/mysql.service
+ rm -rf /usr/lib/systemd/system/mysql.service
systemctl daemon-reload
fi
fi
diff --git a/plugins/mysql/versions/5.5/install.sh b/plugins/mysql/versions/5.5/install.sh
index b7d0a257d..214caad21 100755
--- a/plugins/mysql/versions/5.5/install.sh
+++ b/plugins/mysql/versions/5.5/install.sh
@@ -34,7 +34,7 @@ Install_mysql()
fi
if [ ! -f ${mysqlDir}/mysql-5.5.62.tar.gz ];then
- wget -O ${mysqlDir}/mysql-5.5.62.tar.gz https://dev.mysql.com/get/Downloads/MySQL-5.5/mysql-5.5.62.tar.gz
+ wget -O ${mysqlDir}/mysql-5.5.62.tar.gz --tries=3 https://dev.mysql.com/get/Downloads/MySQL-5.5/mysql-5.5.62.tar.gz
fi
if [ ! -d ${mysqlDir}/mysql-5.5.62 ];then
@@ -66,6 +66,7 @@ Install_mysql()
else
rm -rf ${mysqlDir}/mysql-5.5.62
echo '安装失败' > $install_tmp
+ exit 1
fi
fi
}
diff --git a/plugins/mysql/versions/5.6/install.sh b/plugins/mysql/versions/5.6/install.sh
index 4937df5aa..85e594d51 100755
--- a/plugins/mysql/versions/5.6/install.sh
+++ b/plugins/mysql/versions/5.6/install.sh
@@ -38,13 +38,23 @@ Install_mysql()
if [ ! -f ${mysqlDir}/mysql-5.6.50.tar.gz ];then
- wget -O ${mysqlDir}/mysql-5.6.50.tar.gz https://cdn.mysql.com/Downloads/MySQL-5.6/mysql-5.6.50.tar.gz
+ wget -O ${mysqlDir}/mysql-5.6.50.tar.gz --tries=3 https://cdn.mysql.com/Downloads/MySQL-5.6/mysql-5.6.50.tar.gz
fi
if [ ! -d ${mysqlDir}/mysql-5.6.50 ];then
cd ${mysqlDir} && tar -zxvf ${mysqlDir}/mysql-5.6.50.tar.gz
fi
-
+
+
+ OPTIONS=''
+ ##check openssl version
+ OPENSSL_VERSION=`openssl version|awk '{print $2}'|awk -F '.' '{print $1}'`
+ if [ "${OPENSSL_VERSION}" -ge "3" ];then
+ #openssl version to high
+ cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash openssl.sh
+ export PKG_CONFIG_PATH=$serverPath/lib/openssl/lib/pkgconfig
+ OPTIONS="-DWITH_SSL=${serverPath}/lib/openssl"
+ fi
if [ ! -d $serverPath/mysql ];then
cd ${mysqlDir}/mysql-5.6.50 && cmake \
@@ -59,9 +69,11 @@ Install_mysql()
-DWITH_PARTITION_STORAGE_ENGINE=1 \
-DEXTRA_CHARSETS=all \
-DDEFAULT_CHARSET=utf8mb4 \
+ -DDEFAULT_COLLATION=utf8mb4_general_ci \
+ $OPTIONS \
-DCMAKE_C_COMPILER=/usr/bin/gcc \
- -DCMAKE_CXX_COMPILER=/usr/bin/g++ \
- -DDEFAULT_COLLATION=utf8mb4_general_ci
+ -DCMAKE_CXX_COMPILER=/usr/bin/g++
+
make clean && make && make install && make clean
@@ -71,6 +83,7 @@ Install_mysql()
else
rm -rf ${mysqlDir}/mysql-5.6.50
echo '安装失败' > $install_tmp
+ exit 1
fi
fi
}
diff --git a/plugins/mysql/versions/5.7/install.sh b/plugins/mysql/versions/5.7/install.sh
index b95f7a311..928b504d5 100755
--- a/plugins/mysql/versions/5.7/install.sh
+++ b/plugins/mysql/versions/5.7/install.sh
@@ -40,7 +40,7 @@ Install_mysql()
if [ ! -f ${mysqlDir}/mysql-boost-${VERSION}.tar.gz ];then
- wget -O ${mysqlDir}/mysql-boost-${VERSION}.tar.gz https://cdn.mysql.com/Downloads/MySQL-5.7/mysql-boost-${VERSION}.tar.gz
+ wget -O ${mysqlDir}/mysql-boost-${VERSION}.tar.gz --tries=3 https://cdn.mysql.com/Downloads/MySQL-5.7/mysql-boost-${VERSION}.tar.gz
fi
#检测文件是否损坏.
@@ -52,7 +52,7 @@ Install_mysql()
else
# 重新下载
rm -rf ${mysqlDir}/mysql-${VERSION}
- wget -O ${mysqlDir}/mysql-boost-${VERSION}.tar.gz https://cdn.mysql.com/Downloads/MySQL-5.7/mysql-boost-${VERSION}.tar.gz
+ wget -O ${mysqlDir}/mysql-boost-${VERSION}.tar.gz --tries=3 https://cdn.mysql.com/Downloads/MySQL-5.7/mysql-boost-${VERSION}.tar.gz
fi
fi
@@ -60,6 +60,16 @@ Install_mysql()
cd ${mysqlDir} && tar -zxvf ${mysqlDir}/mysql-boost-${VERSION}.tar.gz
fi
+ OPTIONS=''
+ ##check openssl version
+ OPENSSL_VERSION=`openssl version|awk '{print $2}'|awk -F '.' '{print $1}'`
+ if [ "${OPENSSL_VERSION}" -ge "3" ];then
+ #openssl version to high
+ cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash openssl.sh
+ export PKG_CONFIG_PATH=$serverPath/lib/openssl/lib/pkgconfig
+ OPTIONS="-DWITH_SSL=${serverPath}/lib/openssl"
+ fi
+
if [ ! -d $serverPath/mysql ];then
cd ${mysqlDir}/mysql-${VERSION} && cmake \
-DCMAKE_INSTALL_PREFIX=$serverPath/mysql \
@@ -75,6 +85,7 @@ Install_mysql()
-DDEFAULT_CHARSET=utf8mb4 \
-DDEFAULT_COLLATION=utf8mb4_general_ci \
-DDOWNLOAD_BOOST=1 \
+ $OPTIONS \
-DCMAKE_C_COMPILER=/usr/bin/gcc \
-DCMAKE_CXX_COMPILER=/usr/bin/g++ \
-DWITH_BOOST=${mysqlDir}/mysql-${VERSION}/boost/
@@ -86,6 +97,7 @@ Install_mysql()
else
rm -rf ${mysqlDir}/mysql-${VERSION}
echo '安装失败' > $install_tmp
+ exit 1
fi
fi
}
diff --git a/plugins/mysql/versions/8.0/install.sh b/plugins/mysql/versions/8.0/install.sh
index 9603b6d4b..bbf86e3ea 100755
--- a/plugins/mysql/versions/8.0/install.sh
+++ b/plugins/mysql/versions/8.0/install.sh
@@ -17,6 +17,50 @@ sysName=`uname`
install_tmp=${rootPath}/tmp/mw_install.pl
mysqlDir=${serverPath}/source/mysql
+_os=`uname`
+echo "use system: ${_os}"
+if [ ${_os} == "Darwin" ]; then
+ OSNAME='macos'
+elif grep -Eq "openSUSE" /etc/*-release; then
+ OSNAME='opensuse'
+ zypper refresh
+elif grep -Eq "FreeBSD" /etc/*-release; then
+ OSNAME='freebsd'
+ pkg install -y wget unzip
+elif grep -Eqi "Arch" /etc/issue || grep -Eq "Arch" /etc/*-release; then
+ OSNAME='arch'
+ echo y | pacman -Sy unzip
+elif grep -Eqi "CentOS" /etc/issue || grep -Eq "CentOS" /etc/*-release; then
+ OSNAME='centos'
+ yum install -y wget zip unzip
+elif grep -Eqi "Fedora" /etc/issue || grep -Eq "Fedora" /etc/*-release; then
+ OSNAME='fedora'
+ yum install -y wget zip unzip
+elif grep -Eqi "Rocky" /etc/issue || grep -Eq "Rocky" /etc/*-release; then
+ OSNAME='rocky'
+ yum install -y wget zip unzip
+elif grep -Eqi "AlmaLinux" /etc/issue || grep -Eq "AlmaLinux" /etc/*-release; then
+ OSNAME='alma'
+ yum install -y wget zip unzip
+elif grep -Eqi "Debian" /etc/issue || grep -Eq "Debian" /etc/*-release; then
+ OSNAME='debian'
+ apt update -y
+ apt install -y devscripts
+ apt install -y wget zip unzip
+elif grep -Eqi "Ubuntu" /etc/issue || grep -Eq "Ubuntu" /etc/*-release; then
+ OSNAME='ubuntu'
+ apt install -y wget zip unzip
+else
+ OSNAME='unknow'
+fi
+
+VERSION_ID=`cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | awk -F "\"" '{print $2}'`
+
+
+
+VERSION=8.0.29
+
+
Install_mysql()
{
mkdir -p ${mysqlDir}
@@ -32,36 +76,60 @@ Install_mysql()
fi
INSTALL_CMD=cmake
- if [ "$sysName" != "Darwin" ];then
+ # check cmake version
+ CMAKE_VERSION=`cmake -version | grep version | awk '{print $3}' | awk -F '.' '{print $1}'`
+ if [ "$CMAKE_VERSION" -eq "2" ];then
mkdir -p /var/log/mariadb
touch /var/log/mariadb/mariadb.log
- INSTALL_CMD=cmake
- fi
+ INSTALL_CMD=cmake3
+ fi
- if [ ! -f ${mysqlDir}/mysql-boost-8.0.25.tar.gz ];then
- wget -O ${mysqlDir}/mysql-boost-8.0.25.tar.gz --tries=3 https://cdn.mysql.com/archives/mysql-8.0/mysql-boost-8.0.25.tar.gz
+ if [ ! -f ${mysqlDir}/mysql-boost-${VERSION}.tar.gz ];then
+ wget -O ${mysqlDir}/mysql-boost-${VERSION}.tar.gz --tries=3 https://cdn.mysql.com/Downloads/MySQL-8.0/mysql-boost-${VERSION}.tar.gz
fi
#检测文件是否损坏.
- md5_mysql_ok=e142c2058313b4646c36fa9bb1b38493
- if [ -f ${mysqlDir}/mysql-boost-8.0.25.tar.gz ];then
- md5_mysql=`md5sum ${mysqlDir}/mysql-boost-8.0.25.tar.gz | awk '{print $1}'`
+ md5_mysql_ok=42fbfe0569089c20f9aa457b3f367d50
+ if [ -f ${mysqlDir}/mysql-boost-${VERSION}.tar.gz ];then
+ md5_mysql=`md5sum ${mysqlDir}/mysql-boost-${VERSION}.tar.gz | awk '{print $1}'`
if [ "${md5_mysql_ok}" == "${md5_mysql}" ]; then
echo "mysql8.0 file check ok"
else
# 重新下载
- rm -rf ${mysqlDir}/mysql-8.0.25
- wget -O ${mysqlDir}/mysql-boost-8.0.25.tar.gz --tries=3 https://cdn.mysql.com/archives/mysql-8.0/mysql-boost-8.0.25.tar.gz
+ rm -rf ${mysqlDir}/mysql-${VERSION}
+ wget -O ${mysqlDir}/mysql-boost-${VERSION}.tar.gz --tries=3 https://cdn.mysql.com/Downloads/MySQL-8.0/mysql-boost-${VERSION}.tar.gz
fi
fi
- if [ ! -d ${mysqlDir}/mysql-8.0.25 ];then
- cd ${mysqlDir} && tar -zxvf ${mysqlDir}/mysql-boost-8.0.25.tar.gz
+ if [ ! -d ${mysqlDir}/mysql-${VERSION} ];then
+ cd ${mysqlDir} && tar -zxvf ${mysqlDir}/mysql-boost-${VERSION}.tar.gz
fi
+ OPTIONS=''
+ ##check openssl version
+ OPENSSL_VERSION=`openssl version|awk '{print $2}'|awk -F '.' '{print $1}'`
+ if [ "${OPENSSL_VERSION}" -ge "3" ];then
+ #openssl version to high
+ cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash openssl.sh
+ export PKG_CONFIG_PATH=$serverPath/lib/openssl/lib/pkgconfig
+ OPTIONS="-DWITH_SSL=${serverPath}/lib/openssl"
+ fi
+
+ WHERE_DIR_GCC=/usr/bin/gcc
+ WHERE_DIR_GPP=/usr/bin/g++
+ if [ "$OSNAME" == "centos" ] && [ "$VERSION_ID" == "7" ];then
+ yum install centos-release-scl -y
+ yum install devtoolset-7 -y
+ # scl enable devtoolset-7 bash
+ gcc --version
+ WHERE_DIR_GCC=/opt/rh/devtoolset-7/root/usr/bin/gcc
+ WHERE_DIR_GPP=/opt/rh/devtoolset-7/root/usr/bin/g++
+ echo $WHERE_DIR_GCC
+ echo $WHERE_DIR_GPP
+ fi
if [ ! -d $serverPath/mysql ];then
- cd ${mysqlDir}/mysql-8.0.25 && ${INSTALL_CMD} \
+ cd ${mysqlDir}/mysql-${VERSION} && ${INSTALL_CMD} \
-DCMAKE_INSTALL_PREFIX=$serverPath/mysql \
-DMYSQL_USER=mysql \
-DMYSQL_TCP_PORT=3306 \
@@ -76,17 +144,19 @@ Install_mysql()
-DDEFAULT_COLLATION=utf8mb4_general_ci \
-DDOWNLOAD_BOOST=1 \
-DFORCE_INSOURCE_BUILD=1 \
- -DCMAKE_C_COMPILER=/usr/bin/gcc \
- -DCMAKE_CXX_COMPILER=/usr/bin/g++ \
- -DWITH_BOOST=${mysqlDir}/mysql-8.0.25/boost/
+ $OPTIONS \
+ -DCMAKE_C_COMPILER=$WHERE_DIR_GCC \
+ -DCMAKE_CXX_COMPILER=$WHERE_DIR_GPP \
+ -DWITH_BOOST=${mysqlDir}/mysql-${VERSION}/boost/
make clean && make && make install && make clean
if [ -d $serverPath/mysql ];then
echo '8.0' > $serverPath/mysql/version.pl
echo '安装完成' > $install_tmp
else
- rm -rf ${mysqlDir}/mysql-8.0.25
+ rm -rf ${mysqlDir}/mysql-${VERSION}
echo '安装失败' > $install_tmp
+ exit 1
fi
fi
}
diff --git a/plugins/openresty/index.py b/plugins/openresty/index.py
index 5958f2c47..bc5f71de6 100755
--- a/plugins/openresty/index.py
+++ b/plugins/openresty/index.py
@@ -132,7 +132,7 @@ def confReplace():
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, '')
+ mw.writeFile(static_conf, 'set $PHP_ENV 0;')
# give nginx root permission
ng_exe_bin = getServerDir() + "/nginx/sbin/nginx"
@@ -174,7 +174,7 @@ def initDreplace():
confReplace()
# systemd
- systemDir = '/lib/systemd/system'
+ systemDir = '/usr/lib/systemd/system'
systemService = systemDir + '/openresty.service'
systemServiceTpl = getPluginDir() + '/init.d/openresty.service.tpl'
if os.path.exists(systemDir) and not os.path.exists(systemService):
@@ -188,7 +188,7 @@ def initDreplace():
def status():
data = mw.execShell(
- "ps -ef|grep nginx |grep -v grep | grep -v python | awk '{print $2}'")
+ "ps -ef|grep openresty |grep -v grep | grep -v python | awk '{print $2}'")
if data[0] == '':
return 'stop'
return 'start'
diff --git a/plugins/openresty/info.json b/plugins/openresty/info.json
index 29d2f0e54..606fdc769 100755
--- a/plugins/openresty/info.json
+++ b/plugins/openresty/info.json
@@ -11,6 +11,6 @@
"home":"http://openresty.org",
"date":"2017-11-24",
"pid": "1",
- "versions": ["1.11.2.5", "1.13.6.2","1.15.8.3","1.19.3.1","1.21.4.1"],
- "updates": ["1.11.2.5", "1.13.6.2","1.15.8.3","1.19.3.1","1.21.4.1"]
+ "versions": ["1.15.8.3","1.17.8.2","1.19.3.1","1.21.4.1"],
+ "updates": ["1.15.8.3","1.17.8.2","1.19.3.1","1.21.4.1"]
}
\ No newline at end of file
diff --git a/plugins/openresty/install.sh b/plugins/openresty/install.sh
index ffa8670c4..a769b4a3b 100755
--- a/plugins/openresty/install.sh
+++ b/plugins/openresty/install.sh
@@ -51,7 +51,7 @@ Install_openresty()
echo "${VERSION}" > $serverPath/openresty/version.pl
mkdir -p $serverPath/web_conf/php/conf
- echo "" > $serverPath/web_conf/php/conf/enable-php-00.conf
+ echo 'set $PHP_ENV 0;' > $serverPath/web_conf/php/conf/enable-php-00.conf
#初始化
cd ${rootPath} && python3 ${rootPath}/plugins/openresty/index.py start
@@ -63,9 +63,9 @@ Install_openresty()
Uninstall_openresty()
{
- if [ -f /lib/systemd/system/openresty.service ];then
+ if [ -f /usr/lib/systemd/system/openresty.service ];then
systemctl stop openresty
- rm -rf /lib/systemd/system/openresty.service
+ rm -rf /usr/systemd/system/openresty.service
systemctl daemon-reload
fi
diff --git a/plugins/php/all_test.sh b/plugins/php/all_test.sh
index 3a38e8553..bde6af8ee 100644
--- a/plugins/php/all_test.sh
+++ b/plugins/php/all_test.sh
@@ -3,9 +3,19 @@ export PATH=$PATH:/opt/local/bin:/opt/local/sbin:/opt/local/share/man:/usr/local
DIR=$(cd "$(dirname "$0")"; pwd)
+
+# cd /www/server/mdserver-web/scripts/quick && bash debug.sh
# cd /www/server/mdserver-web/plugins/php && bash all_test.sh
-PHP_VER=53
+
+# cd /www/server/mdserver-web/plugins/php && bash install.sh install 71
+# cd /www/server/mdserver-web/plugins/php/versions/52/ && bash gd.sh install 52
+
+# cd /www/server/mdserver-web/plugins/php/versions/52/ && bash openssl.sh install 52
+# cd /www/server/mdserver-web/plugins/php/versions/81/ && bash imagemagick.sh install 81
+# cd /www/server/mdserver-web/plugins/php/versions/70/ && bash imagemagick.sh install 70
+
+PHP_VER=52
echo "php${PHP_VER} -- start"
cmd_ext=$(ls -l $DIR/versions/$PHP_VER/ |awk '{print $9}')
cd $DIR && /bin/bash install.sh install $PHP_VER
@@ -20,19 +30,19 @@ done
echo "php${PHP_VER} -- end"
-
-PHP_VER_LIST=(54 55 56 71 72 73 74 80 81)
+PHP_VER_LIST=(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"
if [ -d /www/server/php/${PHP_VER} ];then
cmd_ext=$(ls -l $DIR/versions/$PHP_VER/ |awk '{print $9}')
- for ii in cmd_ext
+ for ii in $cmd_ext
do
+ echo "${ii}"
if [ "install.sh" == "$ii" ];then
echo '' > /tmp/t.log
else
- cd $DIR/versions/$PHP_VER && bash $ii install ${PHP_VER}
+ cd $DIR/versions/$PHP_VER/ && bash $ii install ${PHP_VER}
fi
done
fi
diff --git a/plugins/php/conf/enable-php.conf b/plugins/php/conf/enable-php.conf
index d9712e0e3..2046ac2cb 100644
--- a/plugins/php/conf/enable-php.conf
+++ b/plugins/php/conf/enable-php.conf
@@ -1,3 +1,4 @@
+set $PHP_ENV 1;
location ~ [^/]\.php(/|$)
{
try_files $uri =404;
diff --git a/plugins/php/conf/php-fpm-52.conf b/plugins/php/conf/php-fpm-52.conf
index ffc418981..444c2c816 100644
--- a/plugins/php/conf/php-fpm-52.conf
+++ b/plugins/php/conf/php-fpm-52.conf
@@ -6,10 +6,10 @@
Pid file
- /www/server/php/52/logs/php-fpm.pid
+ /www/server/php/52/var/run/php-fpm.pid
Error log file
- /www/server/php/52/logs/php-fpm.log
+ /www/server/php/52/var/log/php-fpm.log
Log level
notice
@@ -107,7 +107,7 @@
0s
The log file for slow requests
- logs/slow.log
+ var/log/www-slow.log
Set open file desc rlimit
1024
diff --git a/plugins/php/conf/php5.ini b/plugins/php/conf/php5.ini
index 1b1729452..465dcff82 100644
--- a/plugins/php/conf/php5.ini
+++ b/plugins/php/conf/php5.ini
@@ -12,7 +12,7 @@ zend.enable_gc = On
expose_php = On
max_execution_time = 30
max_input_time = 60
-max_input_var = 1000
+max_input_vars = 1000
memory_limit = 128M
error_reporting = E_ALL
display_errors = On
diff --git a/plugins/php/conf/php7.ini b/plugins/php/conf/php7.ini
index 0f3de82dd..5b5885e21 100644
--- a/plugins/php/conf/php7.ini
+++ b/plugins/php/conf/php7.ini
@@ -12,7 +12,7 @@ zend.enable_gc = On
expose_php = On
max_execution_time = 30
max_input_time = 60
-max_input_var = 1000
+max_input_vars = 1000
memory_limit = 128M
error_reporting = E_ALL
display_errors = On
diff --git a/plugins/php/conf/php8.ini b/plugins/php/conf/php8.ini
index ef23fb53f..33a3d9f2d 100644
--- a/plugins/php/conf/php8.ini
+++ b/plugins/php/conf/php8.ini
@@ -12,7 +12,7 @@ zend.enable_gc = On
expose_php = On
max_execution_time = 30
max_input_time = 60
-max_input_var = 1000
+max_input_vars = 1000
memory_limit = 128M
error_reporting = E_ALL
display_errors = On
diff --git a/plugins/php/conf/phpinfo.conf b/plugins/php/conf/phpinfo.conf
index 223441d3f..577a70ec0 100644
--- a/plugins/php/conf/phpinfo.conf
+++ b/plugins/php/conf/phpinfo.conf
@@ -1,4 +1,4 @@
location /{$PHP_VERSION} {
root {$ROOT_PATH}/phpinfo;
- include enable-php-{$PHP_VERSION}.conf;
+ include {$SERVER_PATH}/web_conf/php/conf/enable-php-{$PHP_VERSION}.conf;
}
\ No newline at end of file
diff --git a/plugins/php/index.py b/plugins/php/index.py
index 6db5faba6..1c062e83b 100755
--- a/plugins/php/index.py
+++ b/plugins/php/index.py
@@ -152,7 +152,7 @@ def makeOpenrestyConf():
dfile = sdir + '/web_conf/php/conf/enable-php-' + x + '.conf'
if not os.path.exists(dfile):
if x == '00':
- mw.writeFile(dfile, '')
+ mw.writeFile(dfile, 'set $PHP_ENV 0;')
else:
w_content = contentReplace(tpl_content, x)
mw.writeFile(dfile, w_content)
@@ -253,7 +253,7 @@ def initReplace(version):
mw.execShell('chown -R www:www ' + upload_path)
# systemd
- systemDir = '/lib/systemd/system'
+ systemDir = '/usr/lib/systemd/system'
systemService = systemDir + '/php' + version + '.service'
systemServiceTpl = getPluginDir() + '/init.d/php.service.tpl'
if os.path.exists(systemDir) and not os.path.exists(systemService):
@@ -274,7 +274,7 @@ def phpOp(version, method):
data = mw.execShell('systemctl ' + method + ' php' + version)
if data[1] == '':
return 'ok'
- return 'fail'
+ return data[1]
data = mw.execShell(file + ' ' + method)
if data[1] == '':
@@ -287,7 +287,14 @@ def start(version):
def stop(version):
- return phpOp(version, 'stop')
+ status = phpOp(version, 'stop')
+
+ if version == '52':
+ file = initReplace(version)
+ data = mw.execShell(file + ' ' + 'stop')
+ if data[1] == '':
+ return 'ok'
+ return status
def restart(version):
@@ -295,7 +302,7 @@ def restart(version):
def reload(version):
- return phpOp(version, 'reload')
+ return phpOp(version, 'restart')
def initdStatus(version):
@@ -339,7 +346,7 @@ def getPhpConf(version):
{'name': 'asp_tags', 'type': 1, 'ps': 'ASP标签支持'},
{'name': 'max_execution_time', 'type': 2, 'ps': '最大脚本运行时间'},
{'name': 'max_input_time', 'type': 2, 'ps': '最大输入时间'},
- {'name': 'max_input_var', 'type': 2, 'ps': '最大输入数量'},
+ {'name': 'max_input_vars', 'type': 2, 'ps': '最大输入数量'},
{'name': 'memory_limit', 'type': 2, 'ps': '脚本内存限制'},
{'name': 'post_max_size', 'type': 2, 'ps': 'POST数据最大尺寸'},
{'name': 'file_uploads', 'type': 1, 'ps': '是否允许上传文件'},
@@ -365,7 +372,7 @@ def getPhpConf(version):
def submitPhpConf(version):
gets = ['display_errors', 'cgi.fix_pathinfo', 'date.timezone', 'short_open_tag',
- 'asp_tags', 'max_execution_time', 'max_input_time', 'memory_limit',
+ 'asp_tags', 'max_execution_time', 'max_input_time', 'max_input_vars', 'memory_limit',
'post_max_size', 'file_uploads', 'upload_max_filesize', 'max_file_uploads',
'default_socket_timeout', 'error_reporting']
args = getArgs()
@@ -377,7 +384,8 @@ def submitPhpConf(version):
val = g + ' = ' + args[g] + '\n'
phpini = re.sub(rep, val, phpini)
mw.writeFile(filename, phpini)
- mw.execShell(getServerDir() + '/init.d/php' + version + ' reload')
+ # mw.execShell(getServerDir() + '/init.d/php' + version + ' reload')
+ reload(version)
return mw.returnJson(True, '设置成功')
@@ -445,21 +453,23 @@ def setMaxTime(version):
def setMaxSize(version):
args = getArgs()
- if not 'max' in args:
- return 'missing time args!'
- max = args['max']
- if int(max) < 2:
+ data = checkArgs(args, ['max'])
+ if not data[0]:
+ return data[1]
+
+ maxVal = args['max']
+ if int(maxVal) < 2:
return mw.returnJson(False, '上传大小限制不能小于2MB!')
path = getServerDir() + '/' + version + '/etc/php.ini'
conf = mw.readFile(path)
rep = u"\nupload_max_filesize\s*=\s*[0-9]+M"
- conf = re.sub(rep, u'\nupload_max_filesize = ' + max + 'M', conf)
+ conf = re.sub(rep, u'\nupload_max_filesize = ' + maxVal + 'M', conf)
rep = u"\npost_max_size\s*=\s*[0-9]+M"
- conf = re.sub(rep, u'\npost_max_size = ' + max + 'M', conf)
+ conf = re.sub(rep, u'\npost_max_size = ' + maxVal + 'M', conf)
mw.writeFile(path, conf)
- msg = mw.getInfo('设置PHP-{1}最大上传大小为[{2}MB]!', (version, max,))
+ msg = mw.getInfo('设置PHP-{1}最大上传大小为[{2}MB]!', (version, maxVal,))
mw.writeLog('插件管理[PHP]', msg)
return mw.returnJson(True, '设置成功!')
@@ -547,21 +557,23 @@ def checkFpmStatusFile(version):
def getFpmStatus(version):
- checkFpmStatusFile(version)
+ if version == '52':
+ return mw.returnJson(False, 'PHP[' + 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)
+ result = mw.httpGet(url, 1)
data = json.loads(result)
fTime = time.localtime(int(data['start time']))
data['start time'] = time.strftime('%Y-%m-%d %H:%M:%S', fTime)
except Exception as e:
url = 'http://127.0.0.1/phpfpm_status_' + version + '?json'
- result = mw.httpGet(url)
+ result = mw.httpGet(url, 1)
data = json.loads(result)
fTime = time.localtime(int(data['start time']))
data['start time'] = time.strftime('%Y-%m-%d %H:%M:%S', fTime)
@@ -605,20 +617,20 @@ def setDisableFunc(version):
def checkPhpinfoFile(v):
- if mw.isInstalledWeb():
- sdir = mw.getServerDir()
- dfile = sdir + '/openresty/nginx/conf/php_status/phpinfo_' + v + '.conf'
- if not os.path.exists(dfile):
- tpl = getPluginDir() + '/conf/phpinfo.conf'
- content = mw.readFile(tpl)
- content = contentReplace(content, v)
- mw.writeFile(dfile, content)
- mw.restartWeb()
+ sdir = mw.getServerDir()
+ dfile = sdir + '/web_conf/php/status/phpinfo_' + v + '.conf'
+ if not os.path.exists(dfile):
+ tpl = getPluginDir() + '/conf/phpinfo.conf'
+ content = mw.readFile(tpl)
+ content = contentReplace(content, v)
+ mw.writeFile(dfile, content)
+ mw.restartWeb()
def getPhpinfo(v):
checkPhpinfoFile(v)
sPath = mw.getRootDir() + '/phpinfo/' + v
+
mw.execShell("rm -rf " + mw.getRootDir() + '/phpinfo')
mw.execShell("mkdir -p " + sPath)
mw.writeFile(sPath + '/phpinfo.php', '')
@@ -629,6 +641,8 @@ def getPhpinfo(v):
def get_php_info(args):
+ if not mw.isInstalledWeb():
+ return "openresty is not running!!!"
return getPhpinfo(args['version'])
@@ -675,7 +689,7 @@ def installLib(version):
name + '.sh' + ' install ' + version
rettime = time.strftime('%Y-%m-%d %H:%M:%S')
- insert_info = (None, '安装[' + name + '-' + version + ']',
+ insert_info = (None, '安装[' + name + '-PHP' + version + ']',
'execshell', '0', rettime, execstr)
mw.M('tasks').add('id,name,type,status,addtime,execstr', insert_info)
@@ -694,7 +708,8 @@ def uninstallLib(version):
name + '.sh' + ' uninstall ' + version
data = mw.execShell(execstr)
- if data[0] == '' and data[1] == '':
+ # data[0] == '' and
+ if data[1] == '':
return mw.returnJson(True, '已经卸载成功!')
else:
return mw.returnJson(False, '卸载信息![通道0]:' + data[0] + "[通道0]:" + data[1])
diff --git a/plugins/php/init.d/php52.tpl b/plugins/php/init.d/php52.tpl
index 2daa4a78d..73f96406b 100644
--- a/plugins/php/init.d/php52.tpl
+++ b/plugins/php/init.d/php52.tpl
@@ -2,7 +2,7 @@
php_fpm_BIN=/www/server/php/52/bin/php-cgi
php_fpm_CONF=/www/server/php/52/etc/php-fpm.conf
-php_fpm_PID=/www/server/php/52/logs/php-fpm.pid
+php_fpm_PID=/www/server/php/52/var/run/php-fpm.pid
php_opts="--fpm-config $php_fpm_CONF"
diff --git a/plugins/php/install.sh b/plugins/php/install.sh
index 9393f0e31..07538d6ed 100755
--- a/plugins/php/install.sh
+++ b/plugins/php/install.sh
@@ -33,10 +33,10 @@ fi
if [ "${action}" == "uninstall" ];then
- if [ -f /lib/systemd/system/php${type}.service ];then
+ if [ -f /usr/lib/systemd/system/php${type}.service ];then
systemctl stop php${type}
systemctl disable php${type}
- rm -rf /lib/systemd/system/php${type}.service
+ rm -rf /usr/lib/systemd/system/php${type}.service
systemctl daemon-reload
fi
fi
diff --git a/plugins/php/js/php.js b/plugins/php/js/php.js
index 692cbdabe..56fdb5c5b 100755
--- a/plugins/php/js/php.js
+++ b/plugins/php/js/php.js
@@ -111,6 +111,7 @@ function submitConf(version) {
safe_mode: $("select[name='safe_mode']").val(),
max_execution_time: $("input[name='max_execution_time']").val(),
max_input_time: $("input[name='max_input_time']").val(),
+ max_input_vars: $("input[name='max_input_vars']").val(),
memory_limit: $("input[name='memory_limit']").val(),
post_max_size: $("input[name='post_max_size']").val(),
file_uploads: $("select[name='file_uploads']").val(),
@@ -501,6 +502,7 @@ function phpLibConfig(version){
请按实际需求安装扩展,不要安装不必要的PHP扩展,这会影响PHP执行效率,甚至出现异常\
Redis扩展只允许在1个PHP版本中使用,安装到其它PHP版本请在[软件管理]重装Redis\
opcache/xcache/apc等脚本缓存扩展,请只安装其中1个,否则可能导致您的站点程序异常\
+ ioncube要在ZendGuardLoader/opcache前安装,否则可能导致您的站点程序异常\
';
$('.soft-man-con').html(con);
});
diff --git a/plugins/php/lib/libmemcached.sh b/plugins/php/lib/libmemcached.sh
new file mode 100644
index 000000000..76297d853
--- /dev/null
+++ b/plugins/php/lib/libmemcached.sh
@@ -0,0 +1,28 @@
+#!/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")
+
+# echo $rootPath
+
+# cd /www/server/mdserver-web/plugins/php/lib && /bin/bash libmemcached.sh
+
+SERVER_ROOT=$rootPath/lib
+SOURCE_ROOT=$rootPath/source/lib
+
+#----------------------------- libmemcached start -------------------------#
+if [ ! -d ${SERVER_ROOT}/libmemcached ];then
+ cd ${SOURCE_ROOT}
+ if [ ! -f ${SOURCE_ROOT}/libmemcached-1.0.4.tar.gz ];then
+ wget -O libmemcached-1.0.4.tar.gz https://launchpad.net/libmemcached/1.0/1.0.4/+download/libmemcached-1.0.4.tar.gz -T 20
+ fi
+ tar -zxf libmemcached-1.0.4.tar.gz
+ cd libmemcached-1.0.4
+ ./configure --prefix=${SERVER_ROOT}/libmemcached -with-memcached && make && make install
+fi
+#----------------------------- libmemcached end -------------------------#
\ No newline at end of file
diff --git a/plugins/php/lib/openssl.sh b/plugins/php/lib/openssl.sh
new file mode 100644
index 000000000..4d6294eac
--- /dev/null
+++ b/plugins/php/lib/openssl.sh
@@ -0,0 +1,38 @@
+#!/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")
+
+# echo $rootPath
+
+SERVER_ROOT=$rootPath/lib
+SOURCE_ROOT=$rootPath/source/lib
+
+# if [ ! -d ${SERVER_ROOT}/openssl ];then
+# cd ${SOURCE_ROOT}
+# if [ ! -f ${SOURCE_ROOT}/openssl-1.0.2q.tar.gz ];then
+# wget https://github.com/midoks/mdserver-web/releases/download/init/openssl-1.0.2q.tar.gz -T 20
+# fi
+# tar -zxf openssl-1.0.2q.tar.gz
+# cd openssl-1.0.2q
+# ./config --openssldir=${SERVER_ROOT}/openssl zlib-dynamic shared
+# make && make install
+# fi
+
+
+if [ ! -d ${SERVER_ROOT}/openssl ];then
+ cd ${SOURCE_ROOT}
+ if [ ! -f ${SOURCE_ROOT}/openssl-1.1.1p.tar.gz ];then
+ wget -O ${SOURCE_ROOT}/openssl-1.1.1p.tar.gz https://www.openssl.org/source/openssl-1.1.1p.tar.gz
+ fi
+ tar -zxvf openssl-1.1.1p.tar.gz
+ cd openssl-1.1.1p
+ ./config --prefix=${SERVER_ROOT}/openssl zlib-dynamic shared
+ make && make install
+fi
+
diff --git a/plugins/php/lib/openssl_10.sh b/plugins/php/lib/openssl_10.sh
new file mode 100644
index 000000000..90c1155e3
--- /dev/null
+++ b/plugins/php/lib/openssl_10.sh
@@ -0,0 +1,27 @@
+#!/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")
+
+# echo $rootPath
+
+SERVER_ROOT=$rootPath/lib
+SOURCE_ROOT=$rootPath/source/lib
+
+if [ ! -d ${SERVER_ROOT}/openssl10 ];then
+ cd ${SOURCE_ROOT}
+ if [ ! -f ${SOURCE_ROOT}/openssl-1.0.2q.tar.gz ];then
+ wget https://github.com/midoks/mdserver-web/releases/download/init/openssl-1.0.2q.tar.gz -T 20
+ fi
+ tar -zxf openssl-1.0.2q.tar.gz
+ cd openssl-1.0.2q
+ ./config --openssldir=${SERVER_ROOT}/openssl10 zlib-dynamic shared
+ make && make install
+fi
+
+
diff --git a/plugins/php/versions/52/eaccelerator.sh b/plugins/php/versions/52/eaccelerator.sh
index 06ef44f52..bd50e9d95 100755
--- a/plugins/php/versions/52/eaccelerator.sh
+++ b/plugins/php/versions/52/eaccelerator.sh
@@ -77,7 +77,8 @@ Install_lib()
echo "${LIBNAME}.allowed_admin_path=/www/wwwroot/you_project_dir" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -100,7 +101,8 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/52/exif.sh b/plugins/php/versions/52/exif.sh
index f52c194c5..bd2120f7a 100755
--- a/plugins/php/versions/52/exif.sh
+++ b/plugins/php/versions/52/exif.sh
@@ -68,7 +68,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -91,7 +91,8 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/52/gd.sh b/plugins/php/versions/52/gd.sh
index 4a05b6046..56564ca6a 100755
--- a/plugins/php/versions/52/gd.sh
+++ b/plugins/php/versions/52/gd.sh
@@ -27,6 +27,26 @@ else
BAK=''
fi
+
+sysName=`uname`
+echo "use system: ${sysName}"
+
+if [ ${sysName} == "Darwin" ]; then
+ OSNAME='macos'
+elif grep -Eqi "CentOS" /etc/issue || grep -Eq "CentOS" /etc/*-release; then
+ OSNAME='centos'
+elif grep -Eqi "Fedora" /etc/issue || grep -Eq "Fedora" /etc/*-release; then
+ OSNAME='fedora'
+elif grep -Eqi "Debian" /etc/issue || grep -Eq "Debian" /etc/*-release; then
+ OSNAME='debian'
+elif grep -Eqi "Ubuntu" /etc/issue || grep -Eq "Ubuntu" /etc/*-release; then
+ OSNAME='ubuntu'
+elif grep -Eqi "Raspbian" /etc/issue || grep -Eq "Raspbian" /etc/*-release; then
+ OSNAME='raspbian'
+else
+ OSNAME='unknow'
+fi
+
Install_lib()
{
@@ -36,9 +56,12 @@ Install_lib()
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 [ "$OSNAME" == "debian" ] && [ "$OSNAME" == "ubuntu" ];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/
+ fi
if [ ! -f "$extFile" ];then
@@ -54,8 +77,7 @@ Install_lib()
--with-gd \
--with-jpeg-dir=/usr/lib \
--with-freetype-dir=${serverPath}/lib/freetype_old \
- --enable-gd-native-ttf \
- --enable-gd-jis-conv
+ --enable-gd-native-ttf
make clean && make && make install && make clean
@@ -70,7 +92,7 @@ Install_lib()
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
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -93,7 +115,8 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/52/install.sh b/plugins/php/versions/52/install.sh
index c130e43e9..ad227d789 100755
--- a/plugins/php/versions/52/install.sh
+++ b/plugins/php/versions/52/install.sh
@@ -161,6 +161,13 @@ if [ ! -d $serverPath/php/${PHP_VER}/lib/php/extensions/no-debug-non-zts-2006061
mkdir -p $serverPath/php/${PHP_VER}/lib/php/extensions/no-debug-non-zts-20060613
fi
+# ps -ef|grep php/52 |grep -v grep |awk '{print $2}'|xargs kill
+# /www/server/php/init.d/php52 start
+# /www/server/php/52/sbin/php-fpm start
+# cd /www/server/mdserver-web && python3 /www/server/mdserver-web/plugins/php/index.py start 52
+mkdir -p $serverPath/php/${PHP_VER}/var/log
+mkdir -p $serverPath/php/${PHP_VER}/var/run
+
#------------------------ install end ------------------------------------#
}
diff --git a/plugins/php/versions/52/intl.sh b/plugins/php/versions/52/intl.sh
index d45267fd6..156677458 100755
--- a/plugins/php/versions/52/intl.sh
+++ b/plugins/php/versions/52/intl.sh
@@ -35,19 +35,21 @@ Install_lib()
return
fi
-
+ cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash icu.sh
+
if [ ! -f "$extFile" ];then
php_lib=$sourcePath/php_lib
mkdir -p $php_lib
-
+
wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz
cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz
cd ${LIBNAME}-${LIBV}
$serverPath/php/$version/bin/phpize
- ./configure --with-php-config=$serverPath/php/$version/bin/php-config
- make && make install && make clean
+ ./configure --with-php-config=$serverPath/php/$version/bin/php-config \
+ --with-icu-dir=${serverPath}/lib/icu
+ make clean && make && make install && make clean
fi
@@ -60,7 +62,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -83,7 +85,8 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/52/ioncube.sh b/plugins/php/versions/52/ioncube.sh
index bcd8729ef..40a8f5810 100755
--- a/plugins/php/versions/52/ioncube.sh
+++ b/plugins/php/versions/52/ioncube.sh
@@ -60,7 +60,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "zend_extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -83,7 +83,8 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/52/memcache.sh b/plugins/php/versions/52/memcache.sh
index 8a465313d..d5f77addd 100755
--- a/plugins/php/versions/52/memcache.sh
+++ b/plugins/php/versions/52/memcache.sh
@@ -58,7 +58,7 @@ Install_lib()
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -81,7 +81,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/52/openssl.sh b/plugins/php/versions/52/openssl.sh
new file mode 100755
index 000000000..f36f459d7
--- /dev/null
+++ b/plugins/php/versions/52/openssl.sh
@@ -0,0 +1,105 @@
+#!/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=openssl
+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
+
+ cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash openssl_10.sh
+
+ 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}
+
+ if [ ! -f "config.m4" ];then
+ mv config0.m4 config.m4
+ fi
+
+ export PKG_CONFIG_PATH=$serverPath/lib/openssl10/lib/pkgconfig
+ $serverPath/php/$version/bin/phpize
+ ./configure --with-php-config=$serverPath/php/$version/bin/php-config \
+ --with-openssl
+ 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
+
+ bash ${rootPath}/plugins/php/versions/lib.sh $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
+
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
+ 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/pcntl.sh b/plugins/php/versions/52/pcntl.sh
index 4a458ef2a..d0e628ec4 100755
--- a/plugins/php/versions/52/pcntl.sh
+++ b/plugins/php/versions/52/pcntl.sh
@@ -59,7 +59,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -82,7 +82,8 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/52/redis.sh b/plugins/php/versions/52/redis.sh
index 8aa23aee9..df5e93651 100755
--- a/plugins/php/versions/52/redis.sh
+++ b/plugins/php/versions/52/redis.sh
@@ -61,7 +61,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -85,7 +85,8 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/52/xhprof.sh b/plugins/php/versions/52/xhprof.sh
index 7ee22f604..c80b5dbe2 100755
--- a/plugins/php/versions/52/xhprof.sh
+++ b/plugins/php/versions/52/xhprof.sh
@@ -66,7 +66,7 @@ Install_lib()
echo "${LIBNAME}.output_dir=/tmp/xhprof" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -90,7 +90,7 @@ Uninstall_lib()
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/52/zendoptimizer.sh b/plugins/php/versions/52/zendoptimizer.sh
index 5e11bcb53..338c8923f 100755
--- a/plugins/php/versions/52/zendoptimizer.sh
+++ b/plugins/php/versions/52/zendoptimizer.sh
@@ -67,7 +67,7 @@ Install_lib()
echo "zend_loader.obfuscation_level_support=3" >> $serverPath/php/$version/etc/php.ini
echo "zend_loader.license_path=" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -90,7 +90,7 @@ Uninstall_lib()
sed -i $BAK "/\[Zend ZendGuard Loader\]/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/53/apc.sh b/plugins/php/versions/53/apc.sh
index 9db484777..0bff3a54a 100755
--- a/plugins/php/versions/53/apc.sh
+++ b/plugins/php/versions/53/apc.sh
@@ -61,7 +61,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -85,7 +85,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/53/eaccelerator.sh b/plugins/php/versions/53/eaccelerator.sh
index 42db42fdf..d8df39bb6 100755
--- a/plugins/php/versions/53/eaccelerator.sh
+++ b/plugins/php/versions/53/eaccelerator.sh
@@ -67,7 +67,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -90,7 +90,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/53/exif.sh b/plugins/php/versions/53/exif.sh
new file mode 100755
index 000000000..7f02ce13b
--- /dev/null
+++ b/plugins/php/versions/53/exif.sh
@@ -0,0 +1,105 @@
+#!/bin/bash
+PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
+export PATH
+
+curPath=`pwd`
+
+appPath=$(dirname "$curPath")
+
+rootPath=$(dirname "$curPath")
+rootPath=$(dirname "$rootPath")
+rootPath=$(dirname "$rootPath")
+rootPath=$(dirname "$rootPath")
+serverPath=$(dirname "$rootPath")
+sourcePath=${serverPath}/source/php
+
+actionType=$1
+version=$2
+
+LIBNAME=exif
+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
+
+ FIND_C99=`cat Makefile|grep c99`
+ if [ "$FIND_C99" == "" ];then
+ sed -i $BAK 's/CFLAGS \=/CFLAGS \= -std=c99/g' Makefile
+ fi
+
+
+ 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
+
+ bash ${rootPath}/plugins/php/versions/lib.sh $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
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
+ 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/53/fileinfo.sh b/plugins/php/versions/53/fileinfo.sh
index 6966d6aaa..042a24f54 100755
--- a/plugins/php/versions/53/fileinfo.sh
+++ b/plugins/php/versions/53/fileinfo.sh
@@ -66,7 +66,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -89,7 +89,9 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+
+
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/53/intl.sh b/plugins/php/versions/53/intl.sh
index 2e5c53f88..2279d47cc 100755
--- a/plugins/php/versions/53/intl.sh
+++ b/plugins/php/versions/53/intl.sh
@@ -63,7 +63,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -86,7 +86,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/53/ioncube.sh b/plugins/php/versions/53/ioncube.sh
index bcd8729ef..ef5440382 100755
--- a/plugins/php/versions/53/ioncube.sh
+++ b/plugins/php/versions/53/ioncube.sh
@@ -60,7 +60,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "zend_extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -83,7 +83,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/53/memcache.sh b/plugins/php/versions/53/memcache.sh
index f9869ae91..c212170a8 100755
--- a/plugins/php/versions/53/memcache.sh
+++ b/plugins/php/versions/53/memcache.sh
@@ -57,7 +57,7 @@ Install_lib()
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -80,7 +80,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/53/memcached.sh b/plugins/php/versions/53/memcached.sh
index ef3afa830..984f03d24 100755
--- a/plugins/php/versions/53/memcached.sh
+++ b/plugins/php/versions/53/memcached.sh
@@ -61,7 +61,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -84,7 +84,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/53/mongo.sh b/plugins/php/versions/53/mongo.sh
index 6902cf15f..03cb90e53 100755
--- a/plugins/php/versions/53/mongo.sh
+++ b/plugins/php/versions/53/mongo.sh
@@ -68,7 +68,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -91,7 +91,8 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/53/opcache.sh b/plugins/php/versions/53/opcache.sh
index e72eeef9e..f849d9285 100755
--- a/plugins/php/versions/53/opcache.sh
+++ b/plugins/php/versions/53/opcache.sh
@@ -72,7 +72,7 @@ Install_lib()
echo "opcache.fast_shutdown=1" >> $serverPath/php/$version/etc/php.ini
echo "opcache.enable_cli=1" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -96,7 +96,7 @@ Uninstall_lib()
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/53/openssl.sh b/plugins/php/versions/53/openssl.sh
new file mode 100755
index 000000000..4e353d132
--- /dev/null
+++ b/plugins/php/versions/53/openssl.sh
@@ -0,0 +1,104 @@
+#!/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=openssl
+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
+
+ cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash openssl_10.sh
+
+ 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}
+
+ if [ ! -f "config.m4" ];then
+ mv config0.m4 config.m4
+ fi
+
+ export PKG_CONFIG_PATH=$serverPath/lib/openssl10/lib/pkgconfig
+ $serverPath/php/$version/bin/phpize
+ ./configure --with-php-config=$serverPath/php/$version/bin/php-config \
+ --with-openssl
+ 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
+
+ bash ${rootPath}/plugins/php/versions/lib.sh $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
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
+ 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/53/pcntl.sh b/plugins/php/versions/53/pcntl.sh
index 4a458ef2a..796b84897 100755
--- a/plugins/php/versions/53/pcntl.sh
+++ b/plugins/php/versions/53/pcntl.sh
@@ -59,7 +59,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -82,7 +82,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/53/redis.sh b/plugins/php/versions/53/redis.sh
index 8539cbcfe..d3e0ab9ae 100755
--- a/plugins/php/versions/53/redis.sh
+++ b/plugins/php/versions/53/redis.sh
@@ -62,7 +62,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -86,7 +86,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/53/seaslog.sh b/plugins/php/versions/53/seaslog.sh
index bb5d03010..0c5c01176 100755
--- a/plugins/php/versions/53/seaslog.sh
+++ b/plugins/php/versions/53/seaslog.sh
@@ -69,7 +69,7 @@ Install_lib()
echo "[${_LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${_LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -93,7 +93,7 @@ Uninstall_lib()
sed -i $BAK "/${_LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/53/solr.sh b/plugins/php/versions/53/solr.sh
index a748eee86..930a48cd8 100755
--- a/plugins/php/versions/53/solr.sh
+++ b/plugins/php/versions/53/solr.sh
@@ -67,7 +67,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -91,7 +91,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/53/swoole.sh b/plugins/php/versions/53/swoole.sh
index c561bfb75..e7d9ca249 100755
--- a/plugins/php/versions/53/swoole.sh
+++ b/plugins/php/versions/53/swoole.sh
@@ -79,7 +79,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -103,7 +103,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/53/xdebug.sh b/plugins/php/versions/53/xdebug.sh
index aa1ae0d1c..34c0b80a1 100755
--- a/plugins/php/versions/53/xdebug.sh
+++ b/plugins/php/versions/53/xdebug.sh
@@ -60,9 +60,9 @@ Install_lib()
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
+ echo "zend_extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -85,7 +85,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/53/xhprof.sh b/plugins/php/versions/53/xhprof.sh
index 7ee22f604..c80b5dbe2 100755
--- a/plugins/php/versions/53/xhprof.sh
+++ b/plugins/php/versions/53/xhprof.sh
@@ -66,7 +66,7 @@ Install_lib()
echo "${LIBNAME}.output_dir=/tmp/xhprof" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -90,7 +90,7 @@ Uninstall_lib()
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/53/yaf.sh b/plugins/php/versions/53/yaf.sh
index b11323744..f65771c44 100755
--- a/plugins/php/versions/53/yaf.sh
+++ b/plugins/php/versions/53/yaf.sh
@@ -67,7 +67,7 @@ Install_lib()
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
echo "yaf.use_namespace=1" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -92,7 +92,7 @@ Uninstall_lib()
sed -i $BAK "/\[yaf\]/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/53/yar.sh b/plugins/php/versions/53/yar.sh
index 49851c47a..505954e24 100755
--- a/plugins/php/versions/53/yar.sh
+++ b/plugins/php/versions/53/yar.sh
@@ -69,7 +69,7 @@ Install_lib()
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
echo "${LIBNAME}.expose_info=false" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -94,7 +94,7 @@ Uninstall_lib()
sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/53/zendguardloader.sh b/plugins/php/versions/53/zendguardloader.sh
index f86c82c57..8670e1296 100755
--- a/plugins/php/versions/53/zendguardloader.sh
+++ b/plugins/php/versions/53/zendguardloader.sh
@@ -66,7 +66,7 @@ Install_lib()
echo "zend_loader.obfuscation_level_support=3" >> $serverPath/php/$version/etc/php.ini
echo "zend_loader.license_path=" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -89,7 +89,7 @@ Uninstall_lib()
sed -i $BAK "/\[Zend ZendGuard Loader\]/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/54/apc.sh b/plugins/php/versions/54/apc.sh
index 1c04d366a..156e46a98 100755
--- a/plugins/php/versions/54/apc.sh
+++ b/plugins/php/versions/54/apc.sh
@@ -59,7 +59,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -83,7 +83,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/54/exif.sh b/plugins/php/versions/54/exif.sh
index f52c194c5..bd2120f7a 100755
--- a/plugins/php/versions/54/exif.sh
+++ b/plugins/php/versions/54/exif.sh
@@ -68,7 +68,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -91,7 +91,8 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/54/fileinfo.sh b/plugins/php/versions/54/fileinfo.sh
index 6966d6aaa..193f44b2e 100755
--- a/plugins/php/versions/54/fileinfo.sh
+++ b/plugins/php/versions/54/fileinfo.sh
@@ -66,7 +66,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -89,7 +89,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/54/imagemagick.sh b/plugins/php/versions/54/imagemagick.sh
index 2ecfc7e92..da023947c 100755
--- a/plugins/php/versions/54/imagemagick.sh
+++ b/plugins/php/versions/54/imagemagick.sh
@@ -60,7 +60,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -83,7 +83,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/54/intl.sh b/plugins/php/versions/54/intl.sh
index a0374a4f0..480e003ba 100755
--- a/plugins/php/versions/54/intl.sh
+++ b/plugins/php/versions/54/intl.sh
@@ -64,7 +64,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -87,7 +87,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/54/ioncube.sh b/plugins/php/versions/54/ioncube.sh
index bcd8729ef..ef5440382 100755
--- a/plugins/php/versions/54/ioncube.sh
+++ b/plugins/php/versions/54/ioncube.sh
@@ -60,7 +60,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "zend_extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -83,7 +83,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/54/memcache.sh b/plugins/php/versions/54/memcache.sh
index 20727b72d..1f9410b79 100755
--- a/plugins/php/versions/54/memcache.sh
+++ b/plugins/php/versions/54/memcache.sh
@@ -61,7 +61,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -84,7 +84,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/54/memcached.sh b/plugins/php/versions/54/memcached.sh
index f353ec37c..07ddb8ba0 100755
--- a/plugins/php/versions/54/memcached.sh
+++ b/plugins/php/versions/54/memcached.sh
@@ -61,7 +61,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -84,7 +84,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/54/mongo.sh b/plugins/php/versions/54/mongo.sh
index 236822dfd..dba6f254f 100755
--- a/plugins/php/versions/54/mongo.sh
+++ b/plugins/php/versions/54/mongo.sh
@@ -67,7 +67,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -90,7 +90,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/54/opcache.sh b/plugins/php/versions/54/opcache.sh
index 125edecf8..901d90422 100755
--- a/plugins/php/versions/54/opcache.sh
+++ b/plugins/php/versions/54/opcache.sh
@@ -71,7 +71,7 @@ Install_lib()
echo "opcache.fast_shutdown=1" >> $serverPath/php/$version/etc/php.ini
echo "opcache.enable_cli=1" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -95,7 +95,7 @@ Uninstall_lib()
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/54/openssl.sh b/plugins/php/versions/54/openssl.sh
new file mode 100755
index 000000000..4e353d132
--- /dev/null
+++ b/plugins/php/versions/54/openssl.sh
@@ -0,0 +1,104 @@
+#!/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=openssl
+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
+
+ cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash openssl_10.sh
+
+ 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}
+
+ if [ ! -f "config.m4" ];then
+ mv config0.m4 config.m4
+ fi
+
+ export PKG_CONFIG_PATH=$serverPath/lib/openssl10/lib/pkgconfig
+ $serverPath/php/$version/bin/phpize
+ ./configure --with-php-config=$serverPath/php/$version/bin/php-config \
+ --with-openssl
+ 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
+
+ bash ${rootPath}/plugins/php/versions/lib.sh $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
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
+ 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/54/pcntl.sh b/plugins/php/versions/54/pcntl.sh
index 4a458ef2a..796b84897 100755
--- a/plugins/php/versions/54/pcntl.sh
+++ b/plugins/php/versions/54/pcntl.sh
@@ -59,7 +59,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -82,7 +82,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/54/redis.sh b/plugins/php/versions/54/redis.sh
index 34821d450..565e18c21 100755
--- a/plugins/php/versions/54/redis.sh
+++ b/plugins/php/versions/54/redis.sh
@@ -60,7 +60,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -84,7 +84,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/54/seaslog.sh b/plugins/php/versions/54/seaslog.sh
index 039f8497e..8ec22536d 100755
--- a/plugins/php/versions/54/seaslog.sh
+++ b/plugins/php/versions/54/seaslog.sh
@@ -69,7 +69,7 @@ Install_lib()
echo "[${_LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${_LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -93,7 +93,7 @@ Uninstall_lib()
sed -i $BAK "/${_LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/54/solr.sh b/plugins/php/versions/54/solr.sh
index df91c3dad..e8cbd5f88 100755
--- a/plugins/php/versions/54/solr.sh
+++ b/plugins/php/versions/54/solr.sh
@@ -66,7 +66,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -90,7 +90,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/54/swoole.sh b/plugins/php/versions/54/swoole.sh
index 5ccbe3d13..f0af7ff2f 100755
--- a/plugins/php/versions/54/swoole.sh
+++ b/plugins/php/versions/54/swoole.sh
@@ -76,7 +76,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -99,7 +99,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/54/xdebug.sh b/plugins/php/versions/54/xdebug.sh
index 7aaf482e3..0fda414d9 100755
--- a/plugins/php/versions/54/xdebug.sh
+++ b/plugins/php/versions/54/xdebug.sh
@@ -57,9 +57,9 @@ Install_lib()
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
+ echo "zend_extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -82,7 +82,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/54/xhprof.sh b/plugins/php/versions/54/xhprof.sh
index 6a82bced9..5738efb1d 100755
--- a/plugins/php/versions/54/xhprof.sh
+++ b/plugins/php/versions/54/xhprof.sh
@@ -64,7 +64,7 @@ Install_lib()
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
echo "${LIBNAME}.output_dir=/tmp/xhprof" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -88,7 +88,7 @@ Uninstall_lib()
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/54/yaf.sh b/plugins/php/versions/54/yaf.sh
index a34398c74..5140d10e9 100755
--- a/plugins/php/versions/54/yaf.sh
+++ b/plugins/php/versions/54/yaf.sh
@@ -69,7 +69,7 @@ Install_lib()
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
echo "${LIBNAME}.use_namespace=1" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -93,7 +93,7 @@ Uninstall_lib()
sed -i '_bak' "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/54/yar.sh b/plugins/php/versions/54/yar.sh
index 853b1817d..a8be8e9f6 100755
--- a/plugins/php/versions/54/yar.sh
+++ b/plugins/php/versions/54/yar.sh
@@ -71,7 +71,7 @@ Install_lib()
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
echo "${LIBNAME}.expose_info=false" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -96,7 +96,7 @@ Uninstall_lib()
sed -i '_bak' "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/54/zendguardloader.sh b/plugins/php/versions/54/zendguardloader.sh
index 11a00e57e..dff1474dd 100755
--- a/plugins/php/versions/54/zendguardloader.sh
+++ b/plugins/php/versions/54/zendguardloader.sh
@@ -57,7 +57,7 @@ Install_lib()
echo "" >> $serverPath/php/$version/etc/php.ini
echo -e "[Zend ZendGuard Loader]\nzend_extension=ZendGuardLoader.so\nzend_loader.enable=1\nzend_loader.disable_licensing=0\nzend_loader.obfuscation_level_support=3\nzend_loader.license_path=" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -81,7 +81,7 @@ Uninstall_lib()
sed -i $BAK '/\[Zend ZendGuard Loader\]/d' $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/55/exif.sh b/plugins/php/versions/55/exif.sh
index f52c194c5..7f02ce13b 100755
--- a/plugins/php/versions/55/exif.sh
+++ b/plugins/php/versions/55/exif.sh
@@ -68,7 +68,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -91,7 +91,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/55/fileinfo.sh b/plugins/php/versions/55/fileinfo.sh
index 6966d6aaa..193f44b2e 100755
--- a/plugins/php/versions/55/fileinfo.sh
+++ b/plugins/php/versions/55/fileinfo.sh
@@ -66,7 +66,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -89,7 +89,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/55/imagemagick.sh b/plugins/php/versions/55/imagemagick.sh
index 2ecfc7e92..da023947c 100755
--- a/plugins/php/versions/55/imagemagick.sh
+++ b/plugins/php/versions/55/imagemagick.sh
@@ -60,7 +60,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -83,7 +83,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/55/intl.sh b/plugins/php/versions/55/intl.sh
index a0374a4f0..480e003ba 100755
--- a/plugins/php/versions/55/intl.sh
+++ b/plugins/php/versions/55/intl.sh
@@ -64,7 +64,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -87,7 +87,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/55/ioncube.sh b/plugins/php/versions/55/ioncube.sh
index bcd8729ef..ef5440382 100755
--- a/plugins/php/versions/55/ioncube.sh
+++ b/plugins/php/versions/55/ioncube.sh
@@ -60,7 +60,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "zend_extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -83,7 +83,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/55/memcache.sh b/plugins/php/versions/55/memcache.sh
index d7f88dcde..9a40e291a 100755
--- a/plugins/php/versions/55/memcache.sh
+++ b/plugins/php/versions/55/memcache.sh
@@ -59,7 +59,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -82,7 +82,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/55/memcached.sh b/plugins/php/versions/55/memcached.sh
index e04597bfc..5113c6b34 100755
--- a/plugins/php/versions/55/memcached.sh
+++ b/plugins/php/versions/55/memcached.sh
@@ -61,7 +61,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -84,7 +84,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/55/mongo.sh b/plugins/php/versions/55/mongo.sh
index e06cccd04..798f24867 100755
--- a/plugins/php/versions/55/mongo.sh
+++ b/plugins/php/versions/55/mongo.sh
@@ -68,7 +68,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -91,7 +91,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/55/mongodb.sh b/plugins/php/versions/55/mongodb.sh
index 7147a7d28..10da08429 100755
--- a/plugins/php/versions/55/mongodb.sh
+++ b/plugins/php/versions/55/mongodb.sh
@@ -61,7 +61,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -84,7 +84,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/55/opcache.sh b/plugins/php/versions/55/opcache.sh
index bf85a54e0..500a12334 100755
--- a/plugins/php/versions/55/opcache.sh
+++ b/plugins/php/versions/55/opcache.sh
@@ -45,7 +45,7 @@ Install_lib()
echo "opcache.fast_shutdown=1" >> $serverPath/php/$version/etc/php.ini
echo "opcache.enable_cli=1" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -56,7 +56,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/55/openssl.sh b/plugins/php/versions/55/openssl.sh
new file mode 100755
index 000000000..4e353d132
--- /dev/null
+++ b/plugins/php/versions/55/openssl.sh
@@ -0,0 +1,104 @@
+#!/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=openssl
+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
+
+ cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash openssl_10.sh
+
+ 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}
+
+ if [ ! -f "config.m4" ];then
+ mv config0.m4 config.m4
+ fi
+
+ export PKG_CONFIG_PATH=$serverPath/lib/openssl10/lib/pkgconfig
+ $serverPath/php/$version/bin/phpize
+ ./configure --with-php-config=$serverPath/php/$version/bin/php-config \
+ --with-openssl
+ 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
+
+ bash ${rootPath}/plugins/php/versions/lib.sh $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
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
+ 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/55/pcntl.sh b/plugins/php/versions/55/pcntl.sh
index 4a458ef2a..796b84897 100755
--- a/plugins/php/versions/55/pcntl.sh
+++ b/plugins/php/versions/55/pcntl.sh
@@ -59,7 +59,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -82,7 +82,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/55/redis.sh b/plugins/php/versions/55/redis.sh
index 53be55e29..b82d6bc8a 100755
--- a/plugins/php/versions/55/redis.sh
+++ b/plugins/php/versions/55/redis.sh
@@ -60,7 +60,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -84,7 +84,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/55/seaslog.sh b/plugins/php/versions/55/seaslog.sh
index 3cde227ef..7add41d9d 100755
--- a/plugins/php/versions/55/seaslog.sh
+++ b/plugins/php/versions/55/seaslog.sh
@@ -68,7 +68,7 @@ Install_lib()
echo "[${_LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${_LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -92,7 +92,7 @@ Uninstall_lib()
sed -i $BAK "/${_LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/55/solr.sh b/plugins/php/versions/55/solr.sh
index a0acfcd84..8279e12fe 100755
--- a/plugins/php/versions/55/solr.sh
+++ b/plugins/php/versions/55/solr.sh
@@ -67,7 +67,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -91,7 +91,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/55/swoole.sh b/plugins/php/versions/55/swoole.sh
index 94f34d62b..999124ef3 100755
--- a/plugins/php/versions/55/swoole.sh
+++ b/plugins/php/versions/55/swoole.sh
@@ -75,7 +75,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -98,7 +98,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/55/xdebug.sh b/plugins/php/versions/55/xdebug.sh
index b57ee4885..846b921db 100755
--- a/plugins/php/versions/55/xdebug.sh
+++ b/plugins/php/versions/55/xdebug.sh
@@ -61,9 +61,9 @@ Install_lib()
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
+ echo "zend_extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -86,7 +86,7 @@ Uninstall_lib()
sed -i $BAK '/${LIBNAME}/d' $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/55/xhprof.sh b/plugins/php/versions/55/xhprof.sh
index 0efd5765a..9f6fec1d5 100755
--- a/plugins/php/versions/55/xhprof.sh
+++ b/plugins/php/versions/55/xhprof.sh
@@ -67,7 +67,7 @@ Install_lib()
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
echo "${LIBNAME}.output_dir=/tmp/xhprof" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -91,7 +91,7 @@ Uninstall_lib()
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/55/yaf.sh b/plugins/php/versions/55/yaf.sh
index 6ed74e16f..63c32817a 100755
--- a/plugins/php/versions/55/yaf.sh
+++ b/plugins/php/versions/55/yaf.sh
@@ -69,7 +69,7 @@ Install_lib()
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
echo "yaf.use_namespace=1" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -93,7 +93,7 @@ Uninstall_lib()
sed -i $BAK "/\[yaf\]/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/55/yar.sh b/plugins/php/versions/55/yar.sh
index 7d6d99565..620c105b4 100755
--- a/plugins/php/versions/55/yar.sh
+++ b/plugins/php/versions/55/yar.sh
@@ -72,7 +72,7 @@ Install_lib()
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
echo "${LIBNAME}.expose_info=false" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -97,7 +97,7 @@ Uninstall_lib()
sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/56/exif.sh b/plugins/php/versions/56/exif.sh
index f52c194c5..7f02ce13b 100755
--- a/plugins/php/versions/56/exif.sh
+++ b/plugins/php/versions/56/exif.sh
@@ -68,7 +68,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -91,7 +91,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/56/fileinfo.sh b/plugins/php/versions/56/fileinfo.sh
index 6966d6aaa..193f44b2e 100755
--- a/plugins/php/versions/56/fileinfo.sh
+++ b/plugins/php/versions/56/fileinfo.sh
@@ -66,7 +66,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -89,7 +89,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/56/imagemagick.sh b/plugins/php/versions/56/imagemagick.sh
index 2ecfc7e92..da023947c 100755
--- a/plugins/php/versions/56/imagemagick.sh
+++ b/plugins/php/versions/56/imagemagick.sh
@@ -60,7 +60,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -83,7 +83,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/56/intl.sh b/plugins/php/versions/56/intl.sh
index a0374a4f0..480e003ba 100755
--- a/plugins/php/versions/56/intl.sh
+++ b/plugins/php/versions/56/intl.sh
@@ -64,7 +64,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -87,7 +87,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/56/ioncube.sh b/plugins/php/versions/56/ioncube.sh
index bcd8729ef..ef5440382 100755
--- a/plugins/php/versions/56/ioncube.sh
+++ b/plugins/php/versions/56/ioncube.sh
@@ -60,7 +60,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "zend_extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -83,7 +83,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/56/memcache.sh b/plugins/php/versions/56/memcache.sh
index d7f88dcde..9a40e291a 100755
--- a/plugins/php/versions/56/memcache.sh
+++ b/plugins/php/versions/56/memcache.sh
@@ -59,7 +59,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -82,7 +82,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/56/memcached.sh b/plugins/php/versions/56/memcached.sh
index 23a8b2c19..85405d907 100755
--- a/plugins/php/versions/56/memcached.sh
+++ b/plugins/php/versions/56/memcached.sh
@@ -64,7 +64,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -87,7 +87,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/56/mongo.sh b/plugins/php/versions/56/mongo.sh
index 4ca876300..8ff77f0c8 100755
--- a/plugins/php/versions/56/mongo.sh
+++ b/plugins/php/versions/56/mongo.sh
@@ -66,7 +66,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -89,7 +89,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/56/mongodb.sh b/plugins/php/versions/56/mongodb.sh
index ef60a8600..bce5ea932 100755
--- a/plugins/php/versions/56/mongodb.sh
+++ b/plugins/php/versions/56/mongodb.sh
@@ -61,7 +61,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -84,7 +84,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/56/opcache.sh b/plugins/php/versions/56/opcache.sh
index 0380d8c90..a4227c20e 100755
--- a/plugins/php/versions/56/opcache.sh
+++ b/plugins/php/versions/56/opcache.sh
@@ -44,7 +44,7 @@ Install_lib()
echo "opcache.fast_shutdown=1" >> $serverPath/php/$version/etc/php.ini
echo "opcache.enable_cli=1" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -55,7 +55,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/56/openssl.sh b/plugins/php/versions/56/openssl.sh
index d93233b72..4e353d132 100755
--- a/plugins/php/versions/56/openssl.sh
+++ b/plugins/php/versions/56/openssl.sh
@@ -36,25 +36,38 @@ Install_lib()
return
fi
+ cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash openssl_10.sh
+
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}
if [ ! -f "config.m4" ];then
mv config0.m4 config.m4
fi
+ export PKG_CONFIG_PATH=$serverPath/lib/openssl10/lib/pkgconfig
$serverPath/php/$version/bin/phpize
- ./configure --with-php-config=$serverPath/php/$version/bin/php-config
+ ./configure --with-php-config=$serverPath/php/$version/bin/php-config \
+ --with-openssl
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 reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -77,7 +90,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/56/pcntl.sh b/plugins/php/versions/56/pcntl.sh
index 4a458ef2a..796b84897 100755
--- a/plugins/php/versions/56/pcntl.sh
+++ b/plugins/php/versions/56/pcntl.sh
@@ -59,7 +59,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -82,7 +82,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/56/redis.sh b/plugins/php/versions/56/redis.sh
index 18952c19d..252c7e942 100755
--- a/plugins/php/versions/56/redis.sh
+++ b/plugins/php/versions/56/redis.sh
@@ -59,7 +59,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -83,7 +83,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/56/seaslog.sh b/plugins/php/versions/56/seaslog.sh
index f50fffecd..190e266e4 100755
--- a/plugins/php/versions/56/seaslog.sh
+++ b/plugins/php/versions/56/seaslog.sh
@@ -66,7 +66,7 @@ Install_lib()
echo "[${_LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${_LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -90,7 +90,7 @@ Uninstall_lib()
sed -i $BAK "/${_LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/56/solr.sh b/plugins/php/versions/56/solr.sh
index 8e9382ff5..5a1d3b159 100755
--- a/plugins/php/versions/56/solr.sh
+++ b/plugins/php/versions/56/solr.sh
@@ -65,7 +65,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -89,7 +89,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/56/swoole.sh b/plugins/php/versions/56/swoole.sh
index 4d9bf30e9..cb3907c1d 100755
--- a/plugins/php/versions/56/swoole.sh
+++ b/plugins/php/versions/56/swoole.sh
@@ -77,7 +77,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -100,7 +100,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/56/xdebug.sh b/plugins/php/versions/56/xdebug.sh
index 5a1c06c54..681ee3495 100755
--- a/plugins/php/versions/56/xdebug.sh
+++ b/plugins/php/versions/56/xdebug.sh
@@ -59,9 +59,9 @@ Install_lib()
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
+ echo "zend_extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -84,7 +84,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/56/xhprof.sh b/plugins/php/versions/56/xhprof.sh
index 928ea569e..43c9fac63 100755
--- a/plugins/php/versions/56/xhprof.sh
+++ b/plugins/php/versions/56/xhprof.sh
@@ -67,7 +67,7 @@ Install_lib()
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
echo "${LIBNAME}.output_dir=/tmp/xhprof" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -90,7 +90,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/56/yaf.sh b/plugins/php/versions/56/yaf.sh
index 7ef1f7715..87f953439 100755
--- a/plugins/php/versions/56/yaf.sh
+++ b/plugins/php/versions/56/yaf.sh
@@ -56,7 +56,7 @@ Install_lib()
echo -e "[yaf]\nextension=yaf.so\nyaf.use_namespace=1" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -81,7 +81,7 @@ Uninstall_lib()
sed -i $BAK '/\[yaf\]/d' $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/56/yar.sh b/plugins/php/versions/56/yar.sh
index 911563896..202208c33 100755
--- a/plugins/php/versions/56/yar.sh
+++ b/plugins/php/versions/56/yar.sh
@@ -69,7 +69,7 @@ Install_lib()
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
echo "${LIBNAME}.expose_info=false" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -94,7 +94,7 @@ Uninstall_lib()
sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/56/zendguardloader.sh b/plugins/php/versions/56/zendguardloader.sh
index c746acd9f..431b5ef75 100755
--- a/plugins/php/versions/56/zendguardloader.sh
+++ b/plugins/php/versions/56/zendguardloader.sh
@@ -31,7 +31,8 @@ Install_lib()
fi
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
+ extDir=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}
+ extFile=${extDir}/${LIBNAME}.so
if [ ! -f "$extFile" ];then
@@ -45,8 +46,8 @@ Install_lib()
fi
cd $php_lib && tar xvf zend-loader-php5.6.tar.gz
- cd zend-loader-php5.6*
- cp ZendGuardLoader.so $serverPath/php/$version/lib/php/extensions/no-debug-non-zts-20131226/
+ cd zend-loader-php5.6-*
+ cp ZendGuardLoader.so ${extDir}
fi
@@ -57,7 +58,7 @@ Install_lib()
echo -e "[Zend ZendGuard Loader]\nzend_extension=ZendGuardLoader.so\nzend_loader.enable=1\nzend_loader.disable_licensing=0\nzend_loader.obfuscation_level_support=3\nzend_loader.license_path=" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -81,7 +82,7 @@ Uninstall_lib()
sed -i $BAK '/\[Zend ZendGuard Loader\]/d' $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/70/exif.sh b/plugins/php/versions/70/exif.sh
index f52c194c5..7f02ce13b 100755
--- a/plugins/php/versions/70/exif.sh
+++ b/plugins/php/versions/70/exif.sh
@@ -68,7 +68,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -91,7 +91,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/70/fileinfo.sh b/plugins/php/versions/70/fileinfo.sh
index 6966d6aaa..193f44b2e 100755
--- a/plugins/php/versions/70/fileinfo.sh
+++ b/plugins/php/versions/70/fileinfo.sh
@@ -66,7 +66,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -89,7 +89,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/70/imagemagick.sh b/plugins/php/versions/70/imagemagick.sh
index fde729fad..6c9688423 100755
--- a/plugins/php/versions/70/imagemagick.sh
+++ b/plugins/php/versions/70/imagemagick.sh
@@ -12,7 +12,7 @@ serverPath=$(dirname "$rootPath")
sourcePath=${serverPath}/source/php
LIBNAME=imagick
-LIBV=3.6.0
+LIBV=3.7.0
sysName=`uname`
actionType=$1
version=$2
@@ -60,7 +60,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -83,7 +83,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/70/intl.sh b/plugins/php/versions/70/intl.sh
index a0374a4f0..480e003ba 100755
--- a/plugins/php/versions/70/intl.sh
+++ b/plugins/php/versions/70/intl.sh
@@ -64,7 +64,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -87,7 +87,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/70/ioncube.sh b/plugins/php/versions/70/ioncube.sh
index bcd8729ef..ef5440382 100755
--- a/plugins/php/versions/70/ioncube.sh
+++ b/plugins/php/versions/70/ioncube.sh
@@ -60,7 +60,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "zend_extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -83,7 +83,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/70/memcached.sh b/plugins/php/versions/70/memcached.sh
index 83b8315e8..264d9dbcd 100755
--- a/plugins/php/versions/70/memcached.sh
+++ b/plugins/php/versions/70/memcached.sh
@@ -61,7 +61,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -84,7 +84,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/70/mongodb.sh b/plugins/php/versions/70/mongodb.sh
index 870b4aeeb..cfb2e8c11 100755
--- a/plugins/php/versions/70/mongodb.sh
+++ b/plugins/php/versions/70/mongodb.sh
@@ -60,7 +60,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -83,7 +83,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/70/opcache.sh b/plugins/php/versions/70/opcache.sh
index 2d3b4a759..0547b1b76 100755
--- a/plugins/php/versions/70/opcache.sh
+++ b/plugins/php/versions/70/opcache.sh
@@ -44,7 +44,7 @@ Install_lib()
echo "opcache.fast_shutdown=1" >> $serverPath/php/$version/etc/php.ini
echo "opcache.enable_cli=1" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -55,7 +55,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/70/openssl.sh b/plugins/php/versions/70/openssl.sh
new file mode 100755
index 000000000..bdd1323e5
--- /dev/null
+++ b/plugins/php/versions/70/openssl.sh
@@ -0,0 +1,104 @@
+#!/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=openssl
+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
+
+ cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash openssl.sh
+
+ 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}
+
+ if [ ! -f "config.m4" ];then
+ mv config0.m4 config.m4
+ fi
+
+ export PKG_CONFIG_PATH=$serverPath/lib/openssl/lib/pkgconfig
+ $serverPath/php/$version/bin/phpize
+ ./configure --with-php-config=$serverPath/php/$version/bin/php-config \
+ --with-openssl
+ 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
+
+ bash ${rootPath}/plugins/php/versions/lib.sh $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
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
+ 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/70/pcntl.sh b/plugins/php/versions/70/pcntl.sh
index 4a458ef2a..796b84897 100755
--- a/plugins/php/versions/70/pcntl.sh
+++ b/plugins/php/versions/70/pcntl.sh
@@ -59,7 +59,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -82,7 +82,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/70/redis.sh b/plugins/php/versions/70/redis.sh
index d9ef39853..2afdbe684 100755
--- a/plugins/php/versions/70/redis.sh
+++ b/plugins/php/versions/70/redis.sh
@@ -60,7 +60,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -84,7 +84,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/70/seaslog.sh b/plugins/php/versions/70/seaslog.sh
index 84aa5d6e4..aa04d92d2 100755
--- a/plugins/php/versions/70/seaslog.sh
+++ b/plugins/php/versions/70/seaslog.sh
@@ -67,7 +67,7 @@ Install_lib()
echo "[${_LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${_LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -91,7 +91,7 @@ Uninstall_lib()
sed -i $BAK "/${_LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/70/solr.sh b/plugins/php/versions/70/solr.sh
index 2c9172224..9d34a2760 100755
--- a/plugins/php/versions/70/solr.sh
+++ b/plugins/php/versions/70/solr.sh
@@ -65,7 +65,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -89,7 +89,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/70/swoole.sh b/plugins/php/versions/70/swoole.sh
index 5de04a617..7a197da2b 100755
--- a/plugins/php/versions/70/swoole.sh
+++ b/plugins/php/versions/70/swoole.sh
@@ -75,7 +75,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -98,7 +98,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/70/xdebug.sh b/plugins/php/versions/70/xdebug.sh
index 98de7fdcf..ea188200b 100755
--- a/plugins/php/versions/70/xdebug.sh
+++ b/plugins/php/versions/70/xdebug.sh
@@ -58,9 +58,9 @@ Install_lib()
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
+ echo "zend_extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -83,7 +83,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/70/xhprof.sh b/plugins/php/versions/70/xhprof.sh
index 759081253..6c0f5eeb4 100755
--- a/plugins/php/versions/70/xhprof.sh
+++ b/plugins/php/versions/70/xhprof.sh
@@ -12,7 +12,7 @@ serverPath=$(dirname "$rootPath")
sourcePath=${serverPath}/source/php
LIBNAME=xhprof
-LIBV=2.3.5
+LIBV=2.1.2
sysName=`uname`
actionType=$1
version=$2
@@ -66,7 +66,7 @@ Install_lib()
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
echo "${LIBNAME}.output_dir=/tmp/xhprof" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -89,7 +89,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/70/yac.sh b/plugins/php/versions/70/yac.sh
index 46292d91d..3ff9d3bff 100755
--- a/plugins/php/versions/70/yac.sh
+++ b/plugins/php/versions/70/yac.sh
@@ -17,7 +17,7 @@ version=$2
sysName=`uname`
LIBNAME=yac
-LIBV=2.3.0
+LIBV=2.3.1
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
@@ -64,7 +64,7 @@ Install_lib()
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
echo "${LIBNAME}.use_namespace=1" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -86,7 +86,7 @@ Uninstall_lib()
sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/70/yaf.sh b/plugins/php/versions/70/yaf.sh
index c82c102a0..b5713edeb 100755
--- a/plugins/php/versions/70/yaf.sh
+++ b/plugins/php/versions/70/yaf.sh
@@ -18,7 +18,7 @@ version=$2
sysName=`uname`
LIBNAME=yaf
-LIBV=3.2.5
+LIBV=3.2.2
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
@@ -64,7 +64,7 @@ Install_lib()
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
echo "${LIBNAME}.use_namespace=1" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -88,7 +88,7 @@ Uninstall_lib()
sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/70/yar.sh b/plugins/php/versions/70/yar.sh
index 336050648..f75185834 100755
--- a/plugins/php/versions/70/yar.sh
+++ b/plugins/php/versions/70/yar.sh
@@ -68,7 +68,7 @@ Install_lib()
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
echo "${LIBNAME}.expose_info=false" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -93,7 +93,7 @@ Uninstall_lib()
sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/70/zip.sh b/plugins/php/versions/70/zip.sh
index ab58ab823..4606559ba 100755
--- a/plugins/php/versions/70/zip.sh
+++ b/plugins/php/versions/70/zip.sh
@@ -63,7 +63,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -86,7 +86,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/70/zlib.sh b/plugins/php/versions/70/zlib.sh
index 030733cb3..becdb182d 100755
--- a/plugins/php/versions/70/zlib.sh
+++ b/plugins/php/versions/70/zlib.sh
@@ -65,7 +65,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -88,7 +88,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/71/exif.sh b/plugins/php/versions/71/exif.sh
index f52c194c5..7f02ce13b 100755
--- a/plugins/php/versions/71/exif.sh
+++ b/plugins/php/versions/71/exif.sh
@@ -68,7 +68,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -91,7 +91,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/71/fileinfo.sh b/plugins/php/versions/71/fileinfo.sh
index 6966d6aaa..193f44b2e 100755
--- a/plugins/php/versions/71/fileinfo.sh
+++ b/plugins/php/versions/71/fileinfo.sh
@@ -66,7 +66,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -89,7 +89,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/71/imagemagick.sh b/plugins/php/versions/71/imagemagick.sh
index fde729fad..6c9688423 100755
--- a/plugins/php/versions/71/imagemagick.sh
+++ b/plugins/php/versions/71/imagemagick.sh
@@ -12,7 +12,7 @@ serverPath=$(dirname "$rootPath")
sourcePath=${serverPath}/source/php
LIBNAME=imagick
-LIBV=3.6.0
+LIBV=3.7.0
sysName=`uname`
actionType=$1
version=$2
@@ -60,7 +60,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -83,7 +83,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/71/intl.sh b/plugins/php/versions/71/intl.sh
index c58d8741c..480e003ba 100755
--- a/plugins/php/versions/71/intl.sh
+++ b/plugins/php/versions/71/intl.sh
@@ -42,10 +42,13 @@ Install_lib()
cd $serverPath/mdserver-web/plugins/php && /bin/bash install.sh install ${version}
fi
+ cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash icu.sh
+
cd $sourcePath/php${version}/ext/${LIBNAME}
$serverPath/php/$version/bin/phpize
- ./configure --with-php-config=$serverPath/php/$version/bin/php-config
+ ./configure --with-php-config=$serverPath/php/$version/bin/php-config \
+ --with-icu-dir=${serverPath}/lib/icu
make && make install && make clean
@@ -61,7 +64,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -84,7 +87,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/71/ioncube.sh b/plugins/php/versions/71/ioncube.sh
index bcd8729ef..ef5440382 100755
--- a/plugins/php/versions/71/ioncube.sh
+++ b/plugins/php/versions/71/ioncube.sh
@@ -60,7 +60,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "zend_extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -83,7 +83,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/71/mcrypt.sh b/plugins/php/versions/71/mcrypt.sh
index 73a1fcbf9..93a5b4aa7 100755
--- a/plugins/php/versions/71/mcrypt.sh
+++ b/plugins/php/versions/71/mcrypt.sh
@@ -60,7 +60,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -83,7 +83,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/71/memcached.sh b/plugins/php/versions/71/memcached.sh
index ecd1ee770..cd31d0110 100755
--- a/plugins/php/versions/71/memcached.sh
+++ b/plugins/php/versions/71/memcached.sh
@@ -62,7 +62,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -85,7 +85,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/71/mongodb.sh b/plugins/php/versions/71/mongodb.sh
index b66a44b96..ec61dcc33 100755
--- a/plugins/php/versions/71/mongodb.sh
+++ b/plugins/php/versions/71/mongodb.sh
@@ -60,7 +60,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -83,7 +83,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/71/opcache.sh b/plugins/php/versions/71/opcache.sh
index 0380d8c90..a4227c20e 100755
--- a/plugins/php/versions/71/opcache.sh
+++ b/plugins/php/versions/71/opcache.sh
@@ -44,7 +44,7 @@ Install_lib()
echo "opcache.fast_shutdown=1" >> $serverPath/php/$version/etc/php.ini
echo "opcache.enable_cli=1" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -55,7 +55,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/71/openssl.sh b/plugins/php/versions/71/openssl.sh
index 165e01bd2..bdd1323e5 100755
--- a/plugins/php/versions/71/openssl.sh
+++ b/plugins/php/versions/71/openssl.sh
@@ -36,6 +36,8 @@ Install_lib()
return
fi
+ cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash openssl.sh
+
if [ ! -f "$extFile" ];then
if [ ! -d $sourcePath/php${version}/ext ];then
@@ -48,8 +50,10 @@ Install_lib()
mv config0.m4 config.m4
fi
+ export PKG_CONFIG_PATH=$serverPath/lib/openssl/lib/pkgconfig
$serverPath/php/$version/bin/phpize
- ./configure --with-php-config=$serverPath/php/$version/bin/php-config
+ ./configure --with-php-config=$serverPath/php/$version/bin/php-config \
+ --with-openssl
make clean && make && make install && make clean
fi
@@ -63,7 +67,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -86,7 +90,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/71/pcntl.sh b/plugins/php/versions/71/pcntl.sh
index 4a458ef2a..796b84897 100755
--- a/plugins/php/versions/71/pcntl.sh
+++ b/plugins/php/versions/71/pcntl.sh
@@ -59,7 +59,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -82,7 +82,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/71/redis.sh b/plugins/php/versions/71/redis.sh
index d9a188a7d..17485ef91 100755
--- a/plugins/php/versions/71/redis.sh
+++ b/plugins/php/versions/71/redis.sh
@@ -59,7 +59,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -83,7 +83,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/71/seaslog.sh b/plugins/php/versions/71/seaslog.sh
index 7e6671abd..4ce5de4b2 100755
--- a/plugins/php/versions/71/seaslog.sh
+++ b/plugins/php/versions/71/seaslog.sh
@@ -68,7 +68,7 @@ Install_lib()
echo "[${_LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${_LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -92,7 +92,7 @@ Uninstall_lib()
sed -i $BAK "/${_LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/71/solr.sh b/plugins/php/versions/71/solr.sh
index f24d1cebf..3acb559de 100755
--- a/plugins/php/versions/71/solr.sh
+++ b/plugins/php/versions/71/solr.sh
@@ -65,7 +65,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -89,7 +89,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/71/swoole.sh b/plugins/php/versions/71/swoole.sh
index fc44a2b07..94a409fcd 100755
--- a/plugins/php/versions/71/swoole.sh
+++ b/plugins/php/versions/71/swoole.sh
@@ -73,7 +73,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -96,7 +96,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/71/xdebug.sh b/plugins/php/versions/71/xdebug.sh
index 0c9fa0c18..267a79d80 100755
--- a/plugins/php/versions/71/xdebug.sh
+++ b/plugins/php/versions/71/xdebug.sh
@@ -57,9 +57,9 @@ Install_lib()
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
+ echo "zend_extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -82,7 +82,7 @@ Uninstall_lib()
sed -i $BAK '/${LIBNAME}/d' $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/71/xhprof.sh b/plugins/php/versions/71/xhprof.sh
index bd684f2ed..f56547b75 100755
--- a/plugins/php/versions/71/xhprof.sh
+++ b/plugins/php/versions/71/xhprof.sh
@@ -67,7 +67,7 @@ Install_lib()
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
echo "${LIBNAME}.output_dir=/tmp/xhprof" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -90,7 +90,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/71/yac.sh b/plugins/php/versions/71/yac.sh
index 9107616af..d3001a111 100755
--- a/plugins/php/versions/71/yac.sh
+++ b/plugins/php/versions/71/yac.sh
@@ -16,7 +16,7 @@ actionType=$1
version=$2
LIBNAME=yac
-LIBV=2.3.0
+LIBV=2.3.1
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
@@ -67,7 +67,7 @@ Install_lib()
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
echo "${LIBNAME}.use_namespace=1" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -89,7 +89,7 @@ Uninstall_lib()
sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/71/yaf.sh b/plugins/php/versions/71/yaf.sh
index f5d2c9a88..d0425d0bc 100755
--- a/plugins/php/versions/71/yaf.sh
+++ b/plugins/php/versions/71/yaf.sh
@@ -15,7 +15,7 @@ actionType=$1
version=$2
LIBNAME=yaf
-LIBV=3.2.5
+LIBV=3.3.5
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
@@ -63,7 +63,7 @@ Install_lib()
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
echo "${LIBNAME}.use_namespace=1" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -87,7 +87,7 @@ Uninstall_lib()
sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/71/yar.sh b/plugins/php/versions/71/yar.sh
index 04e912a30..21ccf3142 100755
--- a/plugins/php/versions/71/yar.sh
+++ b/plugins/php/versions/71/yar.sh
@@ -71,7 +71,7 @@ Install_lib()
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
echo "${LIBNAME}.expose_info=false" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -96,7 +96,7 @@ Uninstall_lib()
sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/71/zip.sh b/plugins/php/versions/71/zip.sh
index ab58ab823..4606559ba 100755
--- a/plugins/php/versions/71/zip.sh
+++ b/plugins/php/versions/71/zip.sh
@@ -63,7 +63,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -86,7 +86,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/71/zlib.sh b/plugins/php/versions/71/zlib.sh
index 030733cb3..becdb182d 100755
--- a/plugins/php/versions/71/zlib.sh
+++ b/plugins/php/versions/71/zlib.sh
@@ -65,7 +65,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -88,7 +88,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/72/exif.sh b/plugins/php/versions/72/exif.sh
index f52c194c5..7f02ce13b 100755
--- a/plugins/php/versions/72/exif.sh
+++ b/plugins/php/versions/72/exif.sh
@@ -68,7 +68,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -91,7 +91,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/72/fileinfo.sh b/plugins/php/versions/72/fileinfo.sh
index 6966d6aaa..193f44b2e 100755
--- a/plugins/php/versions/72/fileinfo.sh
+++ b/plugins/php/versions/72/fileinfo.sh
@@ -66,7 +66,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -89,7 +89,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/72/imagemagick.sh b/plugins/php/versions/72/imagemagick.sh
index fde729fad..6c9688423 100755
--- a/plugins/php/versions/72/imagemagick.sh
+++ b/plugins/php/versions/72/imagemagick.sh
@@ -12,7 +12,7 @@ serverPath=$(dirname "$rootPath")
sourcePath=${serverPath}/source/php
LIBNAME=imagick
-LIBV=3.6.0
+LIBV=3.7.0
sysName=`uname`
actionType=$1
version=$2
@@ -60,7 +60,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -83,7 +83,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/72/intl.sh b/plugins/php/versions/72/intl.sh
index c58d8741c..480e003ba 100755
--- a/plugins/php/versions/72/intl.sh
+++ b/plugins/php/versions/72/intl.sh
@@ -42,10 +42,13 @@ Install_lib()
cd $serverPath/mdserver-web/plugins/php && /bin/bash install.sh install ${version}
fi
+ cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash icu.sh
+
cd $sourcePath/php${version}/ext/${LIBNAME}
$serverPath/php/$version/bin/phpize
- ./configure --with-php-config=$serverPath/php/$version/bin/php-config
+ ./configure --with-php-config=$serverPath/php/$version/bin/php-config \
+ --with-icu-dir=${serverPath}/lib/icu
make && make install && make clean
@@ -61,7 +64,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -84,7 +87,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/72/ioncube.sh b/plugins/php/versions/72/ioncube.sh
index bcd8729ef..ef5440382 100755
--- a/plugins/php/versions/72/ioncube.sh
+++ b/plugins/php/versions/72/ioncube.sh
@@ -60,7 +60,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "zend_extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -83,7 +83,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/72/mcrypt.sh b/plugins/php/versions/72/mcrypt.sh
index c65df5a28..d37a096b5 100755
--- a/plugins/php/versions/72/mcrypt.sh
+++ b/plugins/php/versions/72/mcrypt.sh
@@ -63,7 +63,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -87,7 +87,7 @@ Uninstall_lib()
sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/72/memcached.sh b/plugins/php/versions/72/memcached.sh
index 22f7871fb..9b8a4e815 100755
--- a/plugins/php/versions/72/memcached.sh
+++ b/plugins/php/versions/72/memcached.sh
@@ -63,7 +63,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -86,7 +86,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/72/mongodb.sh b/plugins/php/versions/72/mongodb.sh
index ba92f1267..f8ab90551 100755
--- a/plugins/php/versions/72/mongodb.sh
+++ b/plugins/php/versions/72/mongodb.sh
@@ -61,7 +61,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -84,7 +84,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/72/opcache.sh b/plugins/php/versions/72/opcache.sh
index 2d3b4a759..0547b1b76 100755
--- a/plugins/php/versions/72/opcache.sh
+++ b/plugins/php/versions/72/opcache.sh
@@ -44,7 +44,7 @@ Install_lib()
echo "opcache.fast_shutdown=1" >> $serverPath/php/$version/etc/php.ini
echo "opcache.enable_cli=1" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -55,7 +55,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/72/openssl.sh b/plugins/php/versions/72/openssl.sh
index 165e01bd2..bdd1323e5 100755
--- a/plugins/php/versions/72/openssl.sh
+++ b/plugins/php/versions/72/openssl.sh
@@ -36,6 +36,8 @@ Install_lib()
return
fi
+ cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash openssl.sh
+
if [ ! -f "$extFile" ];then
if [ ! -d $sourcePath/php${version}/ext ];then
@@ -48,8 +50,10 @@ Install_lib()
mv config0.m4 config.m4
fi
+ export PKG_CONFIG_PATH=$serverPath/lib/openssl/lib/pkgconfig
$serverPath/php/$version/bin/phpize
- ./configure --with-php-config=$serverPath/php/$version/bin/php-config
+ ./configure --with-php-config=$serverPath/php/$version/bin/php-config \
+ --with-openssl
make clean && make && make install && make clean
fi
@@ -63,7 +67,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -86,7 +90,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/72/pcntl.sh b/plugins/php/versions/72/pcntl.sh
index 4a458ef2a..796b84897 100755
--- a/plugins/php/versions/72/pcntl.sh
+++ b/plugins/php/versions/72/pcntl.sh
@@ -59,7 +59,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -82,7 +82,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/72/redis.sh b/plugins/php/versions/72/redis.sh
index 774119a76..fe782a92c 100755
--- a/plugins/php/versions/72/redis.sh
+++ b/plugins/php/versions/72/redis.sh
@@ -59,7 +59,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -83,7 +83,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/72/seaslog.sh b/plugins/php/versions/72/seaslog.sh
index ad0746fda..dde11a1a1 100755
--- a/plugins/php/versions/72/seaslog.sh
+++ b/plugins/php/versions/72/seaslog.sh
@@ -67,7 +67,7 @@ Install_lib()
echo "[${_LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${_LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -91,7 +91,7 @@ Uninstall_lib()
sed -i $BAK "/${_LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/72/solr.sh b/plugins/php/versions/72/solr.sh
index e1c70fe07..2e6f508d4 100755
--- a/plugins/php/versions/72/solr.sh
+++ b/plugins/php/versions/72/solr.sh
@@ -65,7 +65,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -89,7 +89,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/72/swoole.sh b/plugins/php/versions/72/swoole.sh
index 333707bbd..dae2f8eaf 100755
--- a/plugins/php/versions/72/swoole.sh
+++ b/plugins/php/versions/72/swoole.sh
@@ -16,7 +16,7 @@ version=$2
LIBNAME=swoole
-LIBV=4.5.2
+LIBV=4.8.10
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
@@ -74,7 +74,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -97,7 +97,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/72/xdebug.sh b/plugins/php/versions/72/xdebug.sh
index c08c3dfa9..6e46ded96 100755
--- a/plugins/php/versions/72/xdebug.sh
+++ b/plugins/php/versions/72/xdebug.sh
@@ -56,9 +56,9 @@ Install_lib()
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
+ echo "zend_extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -81,7 +81,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/72/xhprof.sh b/plugins/php/versions/72/xhprof.sh
index 759081253..6c64c6d5f 100755
--- a/plugins/php/versions/72/xhprof.sh
+++ b/plugins/php/versions/72/xhprof.sh
@@ -66,7 +66,7 @@ Install_lib()
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
echo "${LIBNAME}.output_dir=/tmp/xhprof" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -89,7 +89,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/72/yac.sh b/plugins/php/versions/72/yac.sh
index b97b6c742..d1fb22520 100755
--- a/plugins/php/versions/72/yac.sh
+++ b/plugins/php/versions/72/yac.sh
@@ -15,7 +15,7 @@ actionType=$1
version=$2
LIBNAME=yac
-LIBV=2.3.0
+LIBV=2.3.1
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
@@ -64,7 +64,7 @@ Install_lib()
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
echo "${LIBNAME}.use_namespace=1" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -86,7 +86,7 @@ Uninstall_lib()
sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/72/yaf.sh b/plugins/php/versions/72/yaf.sh
index e10fcef0c..2e0683075 100755
--- a/plugins/php/versions/72/yaf.sh
+++ b/plugins/php/versions/72/yaf.sh
@@ -15,7 +15,7 @@ actionType=$1
version=$2
LIBNAME=yaf
-LIBV=3.2.5
+LIBV=3.3.5
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts`
@@ -64,7 +64,7 @@ Install_lib()
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
echo "${LIBNAME}.use_namespace=1" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -88,7 +88,7 @@ Uninstall_lib()
sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/72/yar.sh b/plugins/php/versions/72/yar.sh
index fdfea8970..0f0aa9c65 100755
--- a/plugins/php/versions/72/yar.sh
+++ b/plugins/php/versions/72/yar.sh
@@ -72,7 +72,7 @@ Install_lib()
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
echo "${LIBNAME}.expose_info=false" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -97,7 +97,7 @@ Uninstall_lib()
sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/72/zip.sh b/plugins/php/versions/72/zip.sh
index ab58ab823..4606559ba 100755
--- a/plugins/php/versions/72/zip.sh
+++ b/plugins/php/versions/72/zip.sh
@@ -63,7 +63,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -86,7 +86,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/72/zlib.sh b/plugins/php/versions/72/zlib.sh
index 030733cb3..becdb182d 100755
--- a/plugins/php/versions/72/zlib.sh
+++ b/plugins/php/versions/72/zlib.sh
@@ -65,7 +65,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -88,7 +88,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/73/exif.sh b/plugins/php/versions/73/exif.sh
index f52c194c5..7f02ce13b 100755
--- a/plugins/php/versions/73/exif.sh
+++ b/plugins/php/versions/73/exif.sh
@@ -68,7 +68,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -91,7 +91,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/73/fileinfo.sh b/plugins/php/versions/73/fileinfo.sh
index 6966d6aaa..193f44b2e 100755
--- a/plugins/php/versions/73/fileinfo.sh
+++ b/plugins/php/versions/73/fileinfo.sh
@@ -66,7 +66,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -89,7 +89,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/73/imagemagick.sh b/plugins/php/versions/73/imagemagick.sh
index fde729fad..6c9688423 100755
--- a/plugins/php/versions/73/imagemagick.sh
+++ b/plugins/php/versions/73/imagemagick.sh
@@ -12,7 +12,7 @@ serverPath=$(dirname "$rootPath")
sourcePath=${serverPath}/source/php
LIBNAME=imagick
-LIBV=3.6.0
+LIBV=3.7.0
sysName=`uname`
actionType=$1
version=$2
@@ -60,7 +60,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -83,7 +83,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/73/intl.sh b/plugins/php/versions/73/intl.sh
index c58d8741c..480e003ba 100755
--- a/plugins/php/versions/73/intl.sh
+++ b/plugins/php/versions/73/intl.sh
@@ -42,10 +42,13 @@ Install_lib()
cd $serverPath/mdserver-web/plugins/php && /bin/bash install.sh install ${version}
fi
+ cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash icu.sh
+
cd $sourcePath/php${version}/ext/${LIBNAME}
$serverPath/php/$version/bin/phpize
- ./configure --with-php-config=$serverPath/php/$version/bin/php-config
+ ./configure --with-php-config=$serverPath/php/$version/bin/php-config \
+ --with-icu-dir=${serverPath}/lib/icu
make && make install && make clean
@@ -61,7 +64,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -84,7 +87,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/73/ioncube.sh b/plugins/php/versions/73/ioncube.sh
index bcd8729ef..ef5440382 100755
--- a/plugins/php/versions/73/ioncube.sh
+++ b/plugins/php/versions/73/ioncube.sh
@@ -60,7 +60,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "zend_extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -83,7 +83,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/73/mcrypt.sh b/plugins/php/versions/73/mcrypt.sh
index c65df5a28..d37a096b5 100755
--- a/plugins/php/versions/73/mcrypt.sh
+++ b/plugins/php/versions/73/mcrypt.sh
@@ -63,7 +63,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -87,7 +87,7 @@ Uninstall_lib()
sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/73/memcached.sh b/plugins/php/versions/73/memcached.sh
index d55d6da30..7867c851d 100755
--- a/plugins/php/versions/73/memcached.sh
+++ b/plugins/php/versions/73/memcached.sh
@@ -61,7 +61,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -84,7 +84,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/73/mongodb.sh b/plugins/php/versions/73/mongodb.sh
index d7dd61db4..9a9c3180b 100755
--- a/plugins/php/versions/73/mongodb.sh
+++ b/plugins/php/versions/73/mongodb.sh
@@ -58,7 +58,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -81,7 +81,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/73/opcache.sh b/plugins/php/versions/73/opcache.sh
index 1da2f3ee5..73d59f1ed 100755
--- a/plugins/php/versions/73/opcache.sh
+++ b/plugins/php/versions/73/opcache.sh
@@ -45,7 +45,7 @@ Install_lib()
echo "opcache.fast_shutdown=1" >> $serverPath/php/$version/etc/php.ini
echo "opcache.enable_cli=1" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -56,7 +56,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/73/openssl.sh b/plugins/php/versions/73/openssl.sh
index 165e01bd2..bdd1323e5 100755
--- a/plugins/php/versions/73/openssl.sh
+++ b/plugins/php/versions/73/openssl.sh
@@ -36,6 +36,8 @@ Install_lib()
return
fi
+ cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash openssl.sh
+
if [ ! -f "$extFile" ];then
if [ ! -d $sourcePath/php${version}/ext ];then
@@ -48,8 +50,10 @@ Install_lib()
mv config0.m4 config.m4
fi
+ export PKG_CONFIG_PATH=$serverPath/lib/openssl/lib/pkgconfig
$serverPath/php/$version/bin/phpize
- ./configure --with-php-config=$serverPath/php/$version/bin/php-config
+ ./configure --with-php-config=$serverPath/php/$version/bin/php-config \
+ --with-openssl
make clean && make && make install && make clean
fi
@@ -63,7 +67,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -86,7 +90,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/73/pcntl.sh b/plugins/php/versions/73/pcntl.sh
index 4a458ef2a..796b84897 100755
--- a/plugins/php/versions/73/pcntl.sh
+++ b/plugins/php/versions/73/pcntl.sh
@@ -59,7 +59,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -82,7 +82,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/73/redis.sh b/plugins/php/versions/73/redis.sh
index e96b0eed9..723f604f2 100755
--- a/plugins/php/versions/73/redis.sh
+++ b/plugins/php/versions/73/redis.sh
@@ -58,7 +58,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -82,7 +82,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/73/seaslog.sh b/plugins/php/versions/73/seaslog.sh
index 07e8f3dd0..bd0ad3c7e 100755
--- a/plugins/php/versions/73/seaslog.sh
+++ b/plugins/php/versions/73/seaslog.sh
@@ -67,7 +67,7 @@ Install_lib()
echo "[${_LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${_LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -91,7 +91,7 @@ Uninstall_lib()
sed -i $BAK "/${_LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/73/solr.sh b/plugins/php/versions/73/solr.sh
index 636f1094d..7a9186002 100755
--- a/plugins/php/versions/73/solr.sh
+++ b/plugins/php/versions/73/solr.sh
@@ -66,7 +66,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -90,7 +90,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/73/swoole.sh b/plugins/php/versions/73/swoole.sh
index 5db5d34b2..9d86a1171 100755
--- a/plugins/php/versions/73/swoole.sh
+++ b/plugins/php/versions/73/swoole.sh
@@ -15,7 +15,7 @@ actionType=$1
version=$2
LIBNAME=swoole
-LIBV=4.5.2
+LIBV=4.8.10
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
@@ -73,7 +73,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -96,7 +96,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/73/xdebug.sh b/plugins/php/versions/73/xdebug.sh
index a28100421..7355cf3d3 100755
--- a/plugins/php/versions/73/xdebug.sh
+++ b/plugins/php/versions/73/xdebug.sh
@@ -58,9 +58,9 @@ Install_lib()
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
+ echo "zend_extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -82,7 +82,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/73/xhprof.sh b/plugins/php/versions/73/xhprof.sh
index 759081253..6c64c6d5f 100755
--- a/plugins/php/versions/73/xhprof.sh
+++ b/plugins/php/versions/73/xhprof.sh
@@ -66,7 +66,7 @@ Install_lib()
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
echo "${LIBNAME}.output_dir=/tmp/xhprof" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -89,7 +89,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/73/yac.sh b/plugins/php/versions/73/yac.sh
index b97b6c742..d1fb22520 100755
--- a/plugins/php/versions/73/yac.sh
+++ b/plugins/php/versions/73/yac.sh
@@ -15,7 +15,7 @@ actionType=$1
version=$2
LIBNAME=yac
-LIBV=2.3.0
+LIBV=2.3.1
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
@@ -64,7 +64,7 @@ Install_lib()
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
echo "${LIBNAME}.use_namespace=1" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -86,7 +86,7 @@ Uninstall_lib()
sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/73/yaf.sh b/plugins/php/versions/73/yaf.sh
index 071ecaa34..72ab38df2 100755
--- a/plugins/php/versions/73/yaf.sh
+++ b/plugins/php/versions/73/yaf.sh
@@ -15,7 +15,7 @@ actionType=$1
version=$2
LIBNAME=yaf
-LIBV=3.2.5
+LIBV=3.3.5
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
@@ -61,7 +61,7 @@ Install_lib()
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
echo "${LIBNAME}.use_namespace=1" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -85,7 +85,7 @@ Uninstall_lib()
sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/73/yar.sh b/plugins/php/versions/73/yar.sh
index 02fc1d2f6..7e48bea34 100755
--- a/plugins/php/versions/73/yar.sh
+++ b/plugins/php/versions/73/yar.sh
@@ -65,7 +65,7 @@ Install_lib()
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
echo "${LIBNAME}.expose_info=false" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -90,7 +90,7 @@ Uninstall_lib()
sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/73/zip.sh b/plugins/php/versions/73/zip.sh
index ab58ab823..4606559ba 100755
--- a/plugins/php/versions/73/zip.sh
+++ b/plugins/php/versions/73/zip.sh
@@ -63,7 +63,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -86,7 +86,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/73/zlib.sh b/plugins/php/versions/73/zlib.sh
index 030733cb3..becdb182d 100755
--- a/plugins/php/versions/73/zlib.sh
+++ b/plugins/php/versions/73/zlib.sh
@@ -65,7 +65,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -88,7 +88,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/74/exif.sh b/plugins/php/versions/74/exif.sh
index f52c194c5..7f02ce13b 100755
--- a/plugins/php/versions/74/exif.sh
+++ b/plugins/php/versions/74/exif.sh
@@ -68,7 +68,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -91,7 +91,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/74/fileinfo.sh b/plugins/php/versions/74/fileinfo.sh
index 6966d6aaa..193f44b2e 100755
--- a/plugins/php/versions/74/fileinfo.sh
+++ b/plugins/php/versions/74/fileinfo.sh
@@ -66,7 +66,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -89,7 +89,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/74/gd.sh b/plugins/php/versions/74/gd.sh
index b20f69ba2..f4939fe7e 100755
--- a/plugins/php/versions/74/gd.sh
+++ b/plugins/php/versions/74/gd.sh
@@ -89,7 +89,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/74/imagemagick.sh b/plugins/php/versions/74/imagemagick.sh
index fde729fad..6c9688423 100755
--- a/plugins/php/versions/74/imagemagick.sh
+++ b/plugins/php/versions/74/imagemagick.sh
@@ -12,7 +12,7 @@ serverPath=$(dirname "$rootPath")
sourcePath=${serverPath}/source/php
LIBNAME=imagick
-LIBV=3.6.0
+LIBV=3.7.0
sysName=`uname`
actionType=$1
version=$2
@@ -60,7 +60,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -83,7 +83,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/74/intl.sh b/plugins/php/versions/74/intl.sh
index c58d8741c..480e003ba 100755
--- a/plugins/php/versions/74/intl.sh
+++ b/plugins/php/versions/74/intl.sh
@@ -42,10 +42,13 @@ Install_lib()
cd $serverPath/mdserver-web/plugins/php && /bin/bash install.sh install ${version}
fi
+ cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash icu.sh
+
cd $sourcePath/php${version}/ext/${LIBNAME}
$serverPath/php/$version/bin/phpize
- ./configure --with-php-config=$serverPath/php/$version/bin/php-config
+ ./configure --with-php-config=$serverPath/php/$version/bin/php-config \
+ --with-icu-dir=${serverPath}/lib/icu
make && make install && make clean
@@ -61,7 +64,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -84,7 +87,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/74/ioncube.sh b/plugins/php/versions/74/ioncube.sh
index bcd8729ef..ef5440382 100755
--- a/plugins/php/versions/74/ioncube.sh
+++ b/plugins/php/versions/74/ioncube.sh
@@ -60,7 +60,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "zend_extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -83,7 +83,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/74/mcrypt.sh b/plugins/php/versions/74/mcrypt.sh
index c65df5a28..d37a096b5 100755
--- a/plugins/php/versions/74/mcrypt.sh
+++ b/plugins/php/versions/74/mcrypt.sh
@@ -63,7 +63,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -87,7 +87,7 @@ Uninstall_lib()
sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/74/memcached.sh b/plugins/php/versions/74/memcached.sh
index d58333bbf..7a31cee78 100755
--- a/plugins/php/versions/74/memcached.sh
+++ b/plugins/php/versions/74/memcached.sh
@@ -65,7 +65,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -88,7 +88,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/74/mongodb.sh b/plugins/php/versions/74/mongodb.sh
index d0f8c1a54..1441e172f 100755
--- a/plugins/php/versions/74/mongodb.sh
+++ b/plugins/php/versions/74/mongodb.sh
@@ -60,7 +60,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -83,7 +83,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/74/opcache.sh b/plugins/php/versions/74/opcache.sh
index a8fe50112..d0994e3c7 100755
--- a/plugins/php/versions/74/opcache.sh
+++ b/plugins/php/versions/74/opcache.sh
@@ -44,7 +44,7 @@ Install_lib()
echo "opcache.fast_shutdown=1" >> $serverPath/php/$version/etc/php.ini
echo "opcache.enable_cli=1" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -55,7 +55,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/74/openssl.sh b/plugins/php/versions/74/openssl.sh
index 165e01bd2..bdd1323e5 100755
--- a/plugins/php/versions/74/openssl.sh
+++ b/plugins/php/versions/74/openssl.sh
@@ -36,6 +36,8 @@ Install_lib()
return
fi
+ cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash openssl.sh
+
if [ ! -f "$extFile" ];then
if [ ! -d $sourcePath/php${version}/ext ];then
@@ -48,8 +50,10 @@ Install_lib()
mv config0.m4 config.m4
fi
+ export PKG_CONFIG_PATH=$serverPath/lib/openssl/lib/pkgconfig
$serverPath/php/$version/bin/phpize
- ./configure --with-php-config=$serverPath/php/$version/bin/php-config
+ ./configure --with-php-config=$serverPath/php/$version/bin/php-config \
+ --with-openssl
make clean && make && make install && make clean
fi
@@ -63,7 +67,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -86,7 +90,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/74/pcntl.sh b/plugins/php/versions/74/pcntl.sh
index 4a458ef2a..796b84897 100755
--- a/plugins/php/versions/74/pcntl.sh
+++ b/plugins/php/versions/74/pcntl.sh
@@ -59,7 +59,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -82,7 +82,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/74/redis.sh b/plugins/php/versions/74/redis.sh
index 2133fd31f..5e7616828 100755
--- a/plugins/php/versions/74/redis.sh
+++ b/plugins/php/versions/74/redis.sh
@@ -60,7 +60,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -84,7 +84,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/74/seaslog.sh b/plugins/php/versions/74/seaslog.sh
index 7146787e9..51a6e43c6 100755
--- a/plugins/php/versions/74/seaslog.sh
+++ b/plugins/php/versions/74/seaslog.sh
@@ -67,7 +67,7 @@ Install_lib()
echo "[${_LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${_LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -91,7 +91,7 @@ Uninstall_lib()
sed -i $BAK "/${_LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/74/solr.sh b/plugins/php/versions/74/solr.sh
index f53e2c54f..b6fcb1250 100755
--- a/plugins/php/versions/74/solr.sh
+++ b/plugins/php/versions/74/solr.sh
@@ -65,7 +65,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -89,7 +89,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/74/swoole.sh b/plugins/php/versions/74/swoole.sh
index 1ca2c0d7f..abd4a3676 100755
--- a/plugins/php/versions/74/swoole.sh
+++ b/plugins/php/versions/74/swoole.sh
@@ -15,7 +15,7 @@ actionType=$1
version=$2
LIBNAME=swoole
-LIBV=4.5.2
+LIBV=4.8.10
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts`
@@ -75,7 +75,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -98,7 +98,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/74/xdebug.sh b/plugins/php/versions/74/xdebug.sh
index bb2aac870..92545ce59 100755
--- a/plugins/php/versions/74/xdebug.sh
+++ b/plugins/php/versions/74/xdebug.sh
@@ -60,9 +60,9 @@ Install_lib()
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
+ echo "zend_extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -85,7 +85,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/74/xhprof.sh b/plugins/php/versions/74/xhprof.sh
index e371ddc36..8751501bd 100755
--- a/plugins/php/versions/74/xhprof.sh
+++ b/plugins/php/versions/74/xhprof.sh
@@ -67,7 +67,7 @@ Install_lib()
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
echo "${LIBNAME}.output_dir=/tmp/xhprof" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -90,7 +90,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/74/yac.sh b/plugins/php/versions/74/yac.sh
index b97b6c742..d1fb22520 100755
--- a/plugins/php/versions/74/yac.sh
+++ b/plugins/php/versions/74/yac.sh
@@ -15,7 +15,7 @@ actionType=$1
version=$2
LIBNAME=yac
-LIBV=2.3.0
+LIBV=2.3.1
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
@@ -64,7 +64,7 @@ Install_lib()
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
echo "${LIBNAME}.use_namespace=1" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -86,7 +86,7 @@ Uninstall_lib()
sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/74/yaf.sh b/plugins/php/versions/74/yaf.sh
index 071ecaa34..72ab38df2 100755
--- a/plugins/php/versions/74/yaf.sh
+++ b/plugins/php/versions/74/yaf.sh
@@ -15,7 +15,7 @@ actionType=$1
version=$2
LIBNAME=yaf
-LIBV=3.2.5
+LIBV=3.3.5
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
@@ -61,7 +61,7 @@ Install_lib()
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
echo "${LIBNAME}.use_namespace=1" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -85,7 +85,7 @@ Uninstall_lib()
sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/74/yar.sh b/plugins/php/versions/74/yar.sh
index fcf7118b3..bd7adc8b8 100755
--- a/plugins/php/versions/74/yar.sh
+++ b/plugins/php/versions/74/yar.sh
@@ -65,7 +65,7 @@ Install_lib()
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
echo "${LIBNAME}.expose_info=false" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -90,7 +90,7 @@ Uninstall_lib()
sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/74/zip.sh b/plugins/php/versions/74/zip.sh
index ab58ab823..4606559ba 100755
--- a/plugins/php/versions/74/zip.sh
+++ b/plugins/php/versions/74/zip.sh
@@ -63,7 +63,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -86,7 +86,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/74/zlib.sh b/plugins/php/versions/74/zlib.sh
index 030733cb3..becdb182d 100755
--- a/plugins/php/versions/74/zlib.sh
+++ b/plugins/php/versions/74/zlib.sh
@@ -65,7 +65,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -88,7 +88,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/80/exif.sh b/plugins/php/versions/80/exif.sh
index f52c194c5..7f02ce13b 100755
--- a/plugins/php/versions/80/exif.sh
+++ b/plugins/php/versions/80/exif.sh
@@ -68,7 +68,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -91,7 +91,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/80/fileinfo.sh b/plugins/php/versions/80/fileinfo.sh
index 6966d6aaa..193f44b2e 100755
--- a/plugins/php/versions/80/fileinfo.sh
+++ b/plugins/php/versions/80/fileinfo.sh
@@ -66,7 +66,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -89,7 +89,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/80/gd.sh b/plugins/php/versions/80/gd.sh
index b20f69ba2..f4939fe7e 100755
--- a/plugins/php/versions/80/gd.sh
+++ b/plugins/php/versions/80/gd.sh
@@ -89,7 +89,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/80/imagemagick.sh b/plugins/php/versions/80/imagemagick.sh
index fde729fad..6c9688423 100755
--- a/plugins/php/versions/80/imagemagick.sh
+++ b/plugins/php/versions/80/imagemagick.sh
@@ -12,7 +12,7 @@ serverPath=$(dirname "$rootPath")
sourcePath=${serverPath}/source/php
LIBNAME=imagick
-LIBV=3.6.0
+LIBV=3.7.0
sysName=`uname`
actionType=$1
version=$2
@@ -60,7 +60,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -83,7 +83,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/80/intl.sh b/plugins/php/versions/80/intl.sh
index c58d8741c..480e003ba 100755
--- a/plugins/php/versions/80/intl.sh
+++ b/plugins/php/versions/80/intl.sh
@@ -42,10 +42,13 @@ Install_lib()
cd $serverPath/mdserver-web/plugins/php && /bin/bash install.sh install ${version}
fi
+ cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash icu.sh
+
cd $sourcePath/php${version}/ext/${LIBNAME}
$serverPath/php/$version/bin/phpize
- ./configure --with-php-config=$serverPath/php/$version/bin/php-config
+ ./configure --with-php-config=$serverPath/php/$version/bin/php-config \
+ --with-icu-dir=${serverPath}/lib/icu
make && make install && make clean
@@ -61,7 +64,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -84,7 +87,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/80/mcrypt.sh b/plugins/php/versions/80/mcrypt.sh
index c65df5a28..d37a096b5 100755
--- a/plugins/php/versions/80/mcrypt.sh
+++ b/plugins/php/versions/80/mcrypt.sh
@@ -63,7 +63,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -87,7 +87,7 @@ Uninstall_lib()
sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/80/memcached.sh b/plugins/php/versions/80/memcached.sh
index 09085fb13..071742fae 100755
--- a/plugins/php/versions/80/memcached.sh
+++ b/plugins/php/versions/80/memcached.sh
@@ -65,7 +65,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -88,7 +88,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/80/mongodb.sh b/plugins/php/versions/80/mongodb.sh
index d0f8c1a54..1441e172f 100755
--- a/plugins/php/versions/80/mongodb.sh
+++ b/plugins/php/versions/80/mongodb.sh
@@ -60,7 +60,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -83,7 +83,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/80/opcache.sh b/plugins/php/versions/80/opcache.sh
index 13b915da4..2836741a6 100755
--- a/plugins/php/versions/80/opcache.sh
+++ b/plugins/php/versions/80/opcache.sh
@@ -47,7 +47,7 @@ Install_lib()
echo "opcache.jit_buffer_size=64M" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -58,7 +58,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/80/openssl.sh b/plugins/php/versions/80/openssl.sh
index 165e01bd2..bdd1323e5 100755
--- a/plugins/php/versions/80/openssl.sh
+++ b/plugins/php/versions/80/openssl.sh
@@ -36,6 +36,8 @@ Install_lib()
return
fi
+ cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash openssl.sh
+
if [ ! -f "$extFile" ];then
if [ ! -d $sourcePath/php${version}/ext ];then
@@ -48,8 +50,10 @@ Install_lib()
mv config0.m4 config.m4
fi
+ export PKG_CONFIG_PATH=$serverPath/lib/openssl/lib/pkgconfig
$serverPath/php/$version/bin/phpize
- ./configure --with-php-config=$serverPath/php/$version/bin/php-config
+ ./configure --with-php-config=$serverPath/php/$version/bin/php-config \
+ --with-openssl
make clean && make && make install && make clean
fi
@@ -63,7 +67,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -86,7 +90,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/80/pcntl.sh b/plugins/php/versions/80/pcntl.sh
index 4a458ef2a..796b84897 100755
--- a/plugins/php/versions/80/pcntl.sh
+++ b/plugins/php/versions/80/pcntl.sh
@@ -59,7 +59,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -82,7 +82,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/80/redis.sh b/plugins/php/versions/80/redis.sh
index 6a30255ea..cb1eb9ac6 100755
--- a/plugins/php/versions/80/redis.sh
+++ b/plugins/php/versions/80/redis.sh
@@ -60,7 +60,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -84,7 +84,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/80/seaslog.sh b/plugins/php/versions/80/seaslog.sh
index 0998a8385..5a685f1e3 100755
--- a/plugins/php/versions/80/seaslog.sh
+++ b/plugins/php/versions/80/seaslog.sh
@@ -67,7 +67,7 @@ Install_lib()
echo "[${_LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${_LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -91,7 +91,7 @@ Uninstall_lib()
sed -i $BAK "/${_LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/80/solr.sh b/plugins/php/versions/80/solr.sh
index f53e2c54f..b6fcb1250 100755
--- a/plugins/php/versions/80/solr.sh
+++ b/plugins/php/versions/80/solr.sh
@@ -65,7 +65,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -89,7 +89,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/80/swoole.sh b/plugins/php/versions/80/swoole.sh
index f599d070e..10085eced 100755
--- a/plugins/php/versions/80/swoole.sh
+++ b/plugins/php/versions/80/swoole.sh
@@ -16,7 +16,7 @@ version=$2
LIBNAME=swoole
-LIBV=4.6.3
+LIBV=4.8.10
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
@@ -74,7 +74,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -97,7 +97,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/80/xdebug.sh b/plugins/php/versions/80/xdebug.sh
index 8c31817f5..902e1727b 100755
--- a/plugins/php/versions/80/xdebug.sh
+++ b/plugins/php/versions/80/xdebug.sh
@@ -59,9 +59,9 @@ Install_lib()
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
+ echo "zend_extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -84,7 +84,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/80/xhprof.sh b/plugins/php/versions/80/xhprof.sh
index 759081253..6c64c6d5f 100755
--- a/plugins/php/versions/80/xhprof.sh
+++ b/plugins/php/versions/80/xhprof.sh
@@ -66,7 +66,7 @@ Install_lib()
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
echo "${LIBNAME}.output_dir=/tmp/xhprof" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -89,7 +89,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/80/yac.sh b/plugins/php/versions/80/yac.sh
index b97b6c742..d1fb22520 100755
--- a/plugins/php/versions/80/yac.sh
+++ b/plugins/php/versions/80/yac.sh
@@ -15,7 +15,7 @@ actionType=$1
version=$2
LIBNAME=yac
-LIBV=2.3.0
+LIBV=2.3.1
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
@@ -64,7 +64,7 @@ Install_lib()
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
echo "${LIBNAME}.use_namespace=1" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -86,7 +86,7 @@ Uninstall_lib()
sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/80/yaf.sh b/plugins/php/versions/80/yaf.sh
index a74c212ac..ef2a6b047 100755
--- a/plugins/php/versions/80/yaf.sh
+++ b/plugins/php/versions/80/yaf.sh
@@ -15,7 +15,7 @@ actionType=$1
version=$2
LIBNAME=yaf
-LIBV=3.3.0
+LIBV=3.3.5
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts`
@@ -62,7 +62,7 @@ Install_lib()
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
echo "${LIBNAME}.use_namespace=1" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -86,7 +86,7 @@ Uninstall_lib()
sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/80/yar.sh b/plugins/php/versions/80/yar.sh
index 77ee0fa9f..b697cc354 100755
--- a/plugins/php/versions/80/yar.sh
+++ b/plugins/php/versions/80/yar.sh
@@ -65,7 +65,7 @@ Install_lib()
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
echo "${LIBNAME}.expose_info=false" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -90,7 +90,7 @@ Uninstall_lib()
sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/80/zip.sh b/plugins/php/versions/80/zip.sh
index 172a42fd5..dc877acbe 100755
--- a/plugins/php/versions/80/zip.sh
+++ b/plugins/php/versions/80/zip.sh
@@ -65,7 +65,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -88,7 +88,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/80/zlib.sh b/plugins/php/versions/80/zlib.sh
index 030733cb3..becdb182d 100755
--- a/plugins/php/versions/80/zlib.sh
+++ b/plugins/php/versions/80/zlib.sh
@@ -65,7 +65,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -88,7 +88,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/81/exif.sh b/plugins/php/versions/81/exif.sh
index f52c194c5..7f02ce13b 100755
--- a/plugins/php/versions/81/exif.sh
+++ b/plugins/php/versions/81/exif.sh
@@ -68,7 +68,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -91,7 +91,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/81/fileinfo.sh b/plugins/php/versions/81/fileinfo.sh
index 6d1b09453..7b23e1913 100755
--- a/plugins/php/versions/81/fileinfo.sh
+++ b/plugins/php/versions/81/fileinfo.sh
@@ -73,7 +73,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -96,7 +96,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/81/gd.sh b/plugins/php/versions/81/gd.sh
index b20f69ba2..f4939fe7e 100755
--- a/plugins/php/versions/81/gd.sh
+++ b/plugins/php/versions/81/gd.sh
@@ -89,7 +89,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/81/imagemagick.sh b/plugins/php/versions/81/imagemagick.sh
index fde729fad..6c9688423 100755
--- a/plugins/php/versions/81/imagemagick.sh
+++ b/plugins/php/versions/81/imagemagick.sh
@@ -12,7 +12,7 @@ serverPath=$(dirname "$rootPath")
sourcePath=${serverPath}/source/php
LIBNAME=imagick
-LIBV=3.6.0
+LIBV=3.7.0
sysName=`uname`
actionType=$1
version=$2
@@ -60,7 +60,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -83,7 +83,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/81/intl.sh b/plugins/php/versions/81/intl.sh
index c58d8741c..0450ac269 100755
--- a/plugins/php/versions/81/intl.sh
+++ b/plugins/php/versions/81/intl.sh
@@ -61,7 +61,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -84,7 +84,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/81/mcrypt.sh b/plugins/php/versions/81/mcrypt.sh
index c65df5a28..d37a096b5 100755
--- a/plugins/php/versions/81/mcrypt.sh
+++ b/plugins/php/versions/81/mcrypt.sh
@@ -63,7 +63,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -87,7 +87,7 @@ Uninstall_lib()
sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/81/memcached.sh b/plugins/php/versions/81/memcached.sh
index 63bfc33ac..2d5962c37 100755
--- a/plugins/php/versions/81/memcached.sh
+++ b/plugins/php/versions/81/memcached.sh
@@ -12,7 +12,7 @@ serverPath=$(dirname "$rootPath")
sourcePath=${serverPath}/source/php
LIBNAME=memcached
-LIBV=3.1.5
+LIBV=3.2.0
sysName=`uname`
actionType=$1
version=$2
@@ -63,7 +63,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -86,7 +86,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/81/mongodb.sh b/plugins/php/versions/81/mongodb.sh
index d0f8c1a54..1441e172f 100755
--- a/plugins/php/versions/81/mongodb.sh
+++ b/plugins/php/versions/81/mongodb.sh
@@ -60,7 +60,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -83,7 +83,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/81/opcache.sh b/plugins/php/versions/81/opcache.sh
index ab0e20653..c4cf9df40 100755
--- a/plugins/php/versions/81/opcache.sh
+++ b/plugins/php/versions/81/opcache.sh
@@ -48,7 +48,7 @@ Install_lib()
echo "opcache.jit_buffer_size=64M" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -59,7 +59,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/81/openssl.sh b/plugins/php/versions/81/openssl.sh
index 165e01bd2..6b91a36ea 100755
--- a/plugins/php/versions/81/openssl.sh
+++ b/plugins/php/versions/81/openssl.sh
@@ -63,7 +63,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -86,7 +86,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/81/pcntl.sh b/plugins/php/versions/81/pcntl.sh
index 4a458ef2a..796b84897 100755
--- a/plugins/php/versions/81/pcntl.sh
+++ b/plugins/php/versions/81/pcntl.sh
@@ -59,7 +59,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -82,7 +82,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/81/redis.sh b/plugins/php/versions/81/redis.sh
index 6c9359249..33d1147fb 100755
--- a/plugins/php/versions/81/redis.sh
+++ b/plugins/php/versions/81/redis.sh
@@ -61,7 +61,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -85,7 +85,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/81/seaslog.sh b/plugins/php/versions/81/seaslog.sh
index 0998a8385..5a685f1e3 100755
--- a/plugins/php/versions/81/seaslog.sh
+++ b/plugins/php/versions/81/seaslog.sh
@@ -67,7 +67,7 @@ Install_lib()
echo "[${_LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${_LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -91,7 +91,7 @@ Uninstall_lib()
sed -i $BAK "/${_LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/81/solr.sh b/plugins/php/versions/81/solr.sh
index f53e2c54f..b6fcb1250 100755
--- a/plugins/php/versions/81/solr.sh
+++ b/plugins/php/versions/81/solr.sh
@@ -65,7 +65,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -89,7 +89,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/81/swoole.sh b/plugins/php/versions/81/swoole.sh
index f599d070e..10085eced 100755
--- a/plugins/php/versions/81/swoole.sh
+++ b/plugins/php/versions/81/swoole.sh
@@ -16,7 +16,7 @@ version=$2
LIBNAME=swoole
-LIBV=4.6.3
+LIBV=4.8.10
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
@@ -74,7 +74,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -97,7 +97,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/81/xdebug.sh b/plugins/php/versions/81/xdebug.sh
index 8c31817f5..902e1727b 100755
--- a/plugins/php/versions/81/xdebug.sh
+++ b/plugins/php/versions/81/xdebug.sh
@@ -59,9 +59,9 @@ Install_lib()
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
+ echo "zend_extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -84,7 +84,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/81/xhprof.sh b/plugins/php/versions/81/xhprof.sh
index 759081253..6c64c6d5f 100755
--- a/plugins/php/versions/81/xhprof.sh
+++ b/plugins/php/versions/81/xhprof.sh
@@ -66,7 +66,7 @@ Install_lib()
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
echo "${LIBNAME}.output_dir=/tmp/xhprof" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -89,7 +89,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/81/yac.sh b/plugins/php/versions/81/yac.sh
index b97b6c742..d1fb22520 100755
--- a/plugins/php/versions/81/yac.sh
+++ b/plugins/php/versions/81/yac.sh
@@ -15,7 +15,7 @@ actionType=$1
version=$2
LIBNAME=yac
-LIBV=2.3.0
+LIBV=2.3.1
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
@@ -64,7 +64,7 @@ Install_lib()
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
echo "${LIBNAME}.use_namespace=1" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -86,7 +86,7 @@ Uninstall_lib()
sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/81/yaf.sh b/plugins/php/versions/81/yaf.sh
index 0eebee9fd..ef2a6b047 100755
--- a/plugins/php/versions/81/yaf.sh
+++ b/plugins/php/versions/81/yaf.sh
@@ -15,7 +15,7 @@ actionType=$1
version=$2
LIBNAME=yaf
-LIBV=3.2.5
+LIBV=3.3.5
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts`
@@ -62,7 +62,7 @@ Install_lib()
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
echo "${LIBNAME}.use_namespace=1" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -86,7 +86,7 @@ Uninstall_lib()
sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/81/yar.sh b/plugins/php/versions/81/yar.sh
index 77ee0fa9f..b697cc354 100755
--- a/plugins/php/versions/81/yar.sh
+++ b/plugins/php/versions/81/yar.sh
@@ -65,7 +65,7 @@ Install_lib()
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
echo "${LIBNAME}.expose_info=false" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -90,7 +90,7 @@ Uninstall_lib()
sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/81/zip.sh b/plugins/php/versions/81/zip.sh
index 172a42fd5..dc877acbe 100755
--- a/plugins/php/versions/81/zip.sh
+++ b/plugins/php/versions/81/zip.sh
@@ -65,7 +65,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -88,7 +88,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/81/zlib.sh b/plugins/php/versions/81/zlib.sh
index 030733cb3..becdb182d 100755
--- a/plugins/php/versions/81/zlib.sh
+++ b/plugins/php/versions/81/zlib.sh
@@ -65,7 +65,7 @@ Install_lib()
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==========================================================='
echo 'successful!'
}
@@ -88,7 +88,7 @@ Uninstall_lib()
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
- $serverPath/php/init.d/php$version reload
+ bash ${rootPath}/plugins/php/versions/lib.sh $version restart
echo '==============================================='
echo 'successful!'
}
diff --git a/plugins/php/versions/lib.sh b/plugins/php/versions/lib.sh
new file mode 100644
index 000000000..5702d47ed
--- /dev/null
+++ b/plugins/php/versions/lib.sh
@@ -0,0 +1,20 @@
+#!/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")
+serverPath=$(dirname "$rootPath")
+
+version=$1
+action=$2
+
+if [ -f /lib/systemd/system/php${version}.service ];then
+ systemctl ${action} php${version}
+elif [[ -f /usr/lib/systemd/system/php${version}.service ]]; then
+ systemctl ${action} php${version}
+else
+ $serverPath/php/init.d/php${version} ${action}
+fi
\ No newline at end of file
diff --git a/plugins/php/versions/phplib.conf b/plugins/php/versions/phplib.conf
index 4fd4f3050..d1c903c96 100755
--- a/plugins/php/versions/phplib.conf
+++ b/plugins/php/versions/phplib.conf
@@ -63,6 +63,9 @@
{
"name": "openssl",
"versions": [
+ "53",
+ "54",
+ "55",
"56",
"71",
"72",
diff --git a/plugins/pm2/install.sh b/plugins/pm2/install.sh
index eb543160f..9e96542ad 100755
--- a/plugins/pm2/install.sh
+++ b/plugins/pm2/install.sh
@@ -8,15 +8,46 @@ rootPath=$(dirname "$curPath")
rootPath=$(dirname "$rootPath")
serverPath=$(dirname "$rootPath")
-
install_tmp=${rootPath}/tmp/mw_install.pl
+_os=`uname`
+echo "use system: ${_os}"
+if [ ${_os} == "Darwin" ]; then
+ OSNAME='macos'
+elif grep -Eqi "CentOS" /etc/issue || grep -Eq "CentOS" /etc/*-release; then
+ OSNAME='centos'
+elif grep -Eqi "Fedora" /etc/issue || grep -Eq "Fedora" /etc/*-release; then
+ OSNAME='fedora'
+elif grep -Eqi "Rocky" /etc/issue || grep -Eq "Rocky" /etc/*-release; then
+ OSNAME='rocky'
+elif grep -Eqi "AlmaLinux" /etc/issue || grep -Eq "AlmaLinux" /etc/*-release; then
+ OSNAME='alma'
+elif grep -Eqi "Debian" /etc/issue || grep -Eq "Debian" /etc/*-release; then
+ OSNAME='debian'
+elif grep -Eqi "Ubuntu" /etc/issue || grep -Eq "Ubuntu" /etc/*-release; then
+ OSNAME='ubuntu'
+elif grep -Eqi "Raspbian" /etc/issue || grep -Eq "Raspbian" /etc/*-release; then
+ OSNAME='raspbian'
+else
+ OSNAME='unknow'
+fi
+
+
Install_pm2()
{
echo '正在安装脚本文件...' > $install_tmp
- yum install -y nodejs
+
+
curl -o- http://npmjs.org/install.sh | bash
- npm install pm2 -g
+
+ if [ "$OSNAME" == 'debian' ] && [ "$OSNAME" == 'ubuntu' ];then
+ apt install -y nodejs
+ apt install -y pm2
+ else
+ yum install -y nodejs
+ npm install pm2 -g
+ fi
+
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash
mkdir -p $serverPath/pm2
diff --git a/plugins/pureftp/index.py b/plugins/pureftp/index.py
index ab53099dc..e82704bd6 100755
--- a/plugins/pureftp/index.py
+++ b/plugins/pureftp/index.py
@@ -59,6 +59,13 @@ def getArgs():
return tmp
+def checkArgs(data, ck=[]):
+ for i in range(len(ck)):
+ if not ck[i] in data:
+ return (False, mw.returnJson(False, '参数:(' + ck[i] + ')没有!'))
+ return (True, mw.returnJson(True, 'ok'))
+
+
def status():
cmd = "ps -ef|grep pure-ftpd |grep -v grep | grep -v python | awk '{print $2}'"
data = mw.execShell(cmd)
@@ -110,10 +117,12 @@ def initDreplace():
mw.writeFile(pureFtpdConfig, content)
# systemd
- systemDir = '/lib/systemd/system'
+ systemDir = '/usr/lib/systemd/system'
systemService = systemDir + '/pureftp.service'
systemServiceTpl = getPluginDir() + '/init.d/pureftp.service.tpl'
- if os.path.exists(systemDir) and not os.path.exists(systemService):
+
+ if os.path.exists(systemDir):
+ # and not os.path.exists(systemService)
se_content = mw.readFile(systemServiceTpl)
se_content = se_content.replace('{$SERVER_PATH}', service_path)
mw.writeFile(systemService, se_content)
@@ -122,72 +131,61 @@ def initDreplace():
return file_bin
-def start():
+def pfOp(method):
file = initDreplace()
- data = mw.execShell(file + ' start')
+
+ if not mw.isAppleSystem():
+ data = mw.execShell('systemctl ' + method + ' pureftp')
+ if data[1] == '':
+ return 'ok'
+ return 'fail'
+
+ data = mw.execShell(file + ' ' + method)
if data[1] == '':
return 'ok'
return data[1]
+def start():
+ return pfOp('start')
+
+
def stop():
- file = initDreplace()
- data = mw.execShell(file + ' stop')
- if data[1] == '':
- return 'ok'
- return data[1]
+ return pfOp('stop')
def restart():
- file = initDreplace()
- data = mw.execShell(file + ' restart')
- if data[1] == '':
- return 'ok'
- return 'fail'
+ return pfOp('restart')
def reload():
- file = initDreplace()
- data = mw.execShell(file + ' reload')
- if data[1] == '':
- return 'ok'
- return data[1]
+ return pfOp('reload')
def initdStatus():
- if not app_debug:
- os_name = mw.getOs()
- if os_name == 'darwin':
- return "Apple Computer does not support"
- initd_bin = getInitDFile()
- if os.path.exists(initd_bin):
- return 'ok'
- return 'fail'
+ if mw.isAppleSystem():
+ return "Apple Computer does not support"
+
+ shell_cmd = 'systemctl status pureftp | grep loaded | grep "enabled;"'
+ data = mw.execShell(shell_cmd)
+ if data[0] == '':
+ return 'fail'
+ return 'ok'
def initdInstall():
- import shutil
- if not app_debug:
- os_name = mw.getOs()
- if os_name == 'darwin':
- return "Apple Computer does not support"
+ if mw.isAppleSystem():
+ return "Apple Computer does not support"
- source_bin = initDreplace()
- initd_bin = getInitDFile()
- shutil.copyfile(source_bin, initd_bin)
- mw.execShell('chmod +x ' + initd_bin)
- mw.execShell('chkconfig --add ' + getPluginName())
+ mw.execShell('systemctl enable pureftp')
return 'ok'
def initdUinstall():
- if not app_debug:
- os_name = mw.getOs()
- if os_name == 'darwin':
- return "Apple Computer does not support"
- initd_bin = getInitDFile()
- os.remove(initd_bin)
- mw.execShell('chkconfig --del ' + getPluginName())
+ if mw.isAppleSystem():
+ return "Apple Computer does not support"
+
+ mw.execShell('systemctl disable pureftp')
return 'ok'
@@ -218,6 +216,7 @@ def pftpAdd(username, password, path):
if not os.path.exists(path):
os.makedirs(path)
if mw.isAppleSystem():
+ # pass
os.system('chown ' + user + '.staff ' + path)
else:
os.system('chown www.www ' + path)
@@ -245,8 +244,9 @@ def pftpStart(username):
def pftpReload():
- mw.execShell(getServerDir() + '/bin/pure-pw mkdb ' +
- getServerDir() + '/etc/pureftpd.pdb')
+ cmd = getServerDir() + '/bin/pure-pw mkdb ' + \
+ getServerDir() + '/etc/pureftpd.pdb'
+ mw.execShell(cmd)
def getWwwDir():
@@ -309,21 +309,13 @@ def getFtpList():
def addFtp():
- import urllib
+ import urllib.parse
args = getArgs()
- if not 'ftp_username' in args:
- return 'ftp_username missing'
+ data = checkArgs(args, ['ftp_username', 'ftp_password', 'path', 'ps'])
+ if not data[0]:
+ return data[1]
- if not 'ftp_password' in args:
- return 'ftp_password missing'
-
- if not 'path' in args:
- return 'path missing'
-
- if not 'ps' in args:
- return 'ps missing'
-
- path = urllib.unquote(args['path'])
+ path = urllib.parse.unquote(args['path'])
user = args['ftp_username']
pwd = args['ftp_password']
ps = args['ps']
@@ -342,11 +334,9 @@ def addFtp():
def delFtp():
args = getArgs()
- if not 'id' in args:
- return 'ftp_username missing'
-
- if not 'username' in args:
- return 'username missing'
+ data = checkArgs(args, ['id', 'username'])
+ if not data[0]:
+ return data[1]
mw.execShell(getServerDir() +
'/bin/pure-pw userdel ' + args['username'])
@@ -359,14 +349,9 @@ def delFtp():
def modFtp():
args = getArgs()
- if not 'id' in args:
- return 'id missing'
-
- if not 'name' in args:
- return 'name missing'
-
- if not 'password' in args:
- return 'password missing'
+ data = checkArgs(args, ['id', 'name', 'password'])
+ if not data[0]:
+ return data[1]
conn = pftpDB()
data = pftpMod(args['name'], args['password'])
diff --git a/plugins/pureftp/init.d/pureftp.service.tpl b/plugins/pureftp/init.d/pureftp.service.tpl
index 227ccc451..7d632eae8 100644
--- a/plugins/pureftp/init.d/pureftp.service.tpl
+++ b/plugins/pureftp/init.d/pureftp.service.tpl
@@ -2,9 +2,11 @@
Description=Pure-FTPd is a fast, production-quality, standard-conformant FTP server
After=network.target
+
+
[Service]
Type=forking
-ExecStart={$SERVER_PATH}/pureftp/sbin/pure-ftpd {$SERVER_PATH}/pureftp/etc/pure-ftpd.conf --daemonize
+ExecStart={$SERVER_PATH}/pureftp/sbin/pure-ftpd {$SERVER_PATH}/pureftp/etc/pure-ftpd.conf
ExecStop=/bin/kill -HUP $MAINPID
ExecReload=/bin/kill -USR2 $MAINPID
Restart=on-failure
diff --git a/plugins/pureftp/install.sh b/plugins/pureftp/install.sh
index 4c87fc1b4..83860e62c 100755
--- a/plugins/pureftp/install.sh
+++ b/plugins/pureftp/install.sh
@@ -28,8 +28,19 @@ else
OSNAME='unknow'
fi
+
+
+
Install_pureftp()
{
+ if id ftp &> /dev/null ;then
+ echo "ftp UID is `id -u ftp`"
+ echo "ftp Shell is `grep "^ftp:" /etc/passwd |cut -d':' -f7 `"
+ else
+ groupadd ftp
+ useradd -g ftp -s /sbin/nologin ftp
+ fi
+
# mkdir -p ${serverPath}/pureftp
mkdir -p ${serverPath}/source/pureftp
@@ -40,13 +51,10 @@ Install_pureftp()
VER=$1
DOWNLOAD=https://download.pureftpd.org/pub/pure-ftpd/releases/pure-ftpd-${VER}.tar.gz
-
if [ ! -f $serverPath/source/pureftp/pure-ftpd-${VER}.tar.gz ];then
wget --no-check-certificate -O $serverPath/source/pureftp/pure-ftpd-${VER}.tar.gz $DOWNLOAD
fi
-
-
#检测文件是否损坏.
md5_ok=451879495ba61c1d7dcfca8dd231119f
if [ -f $serverPath/source/pureftp/pure-ftpd-${VER}.tar.gz ];then
@@ -80,10 +88,10 @@ Install_pureftp()
Uninstall_pureftp()
{
- if [ -f /lib/systemd/system/pureftp.service ];then
+ if [ -f /usr/lib/systemd/system/pureftp.service ];then
systemctl stop pureftp
systemctl disable pureftp
- rm -rf /lib/systemd/system/pureftp.service
+ rm -rf /usr/lib/systemd/system/pureftp.service
systemctl daemon-reload
fi
@@ -92,6 +100,8 @@ Uninstall_pureftp()
fi
rm -rf ${serverPath}/pureftp
+ userdel ftp
+ groupdel ftp
echo '卸载完成' > $install_tmp
}
diff --git a/plugins/pureftp/js/ftp.js b/plugins/pureftp/js/ftp.js
index 3dc20ab1f..42afdfc6e 100755
--- a/plugins/pureftp/js/ftp.js
+++ b/plugins/pureftp/js/ftp.js
@@ -24,7 +24,6 @@ function ftpPost(method,args,callback){
layer.msg(data.msg,{icon:0,time:2000,shade: [0.3, '#000']});
return;
}
-
if(typeof(callback) == 'function'){
callback(data);
}
@@ -74,7 +73,7 @@ function ftpList(page, search){
content += '状态 | ';
content += '根目录 | ';
content += '备注 | ';
- content += '操作(添加|端口) | ';
+ content += '操作(添加|端口) | ';
content += '';
content += '';
@@ -111,35 +110,20 @@ function ftpList(page, search){
/**
*添加FTP帐户
- * @param {Number} type 添加类型
*/
-function addFtp(type) {
- if (type == 1) {
- var loadT = layer.load({shade: true,shadeClose: false});
- var data = $("#ftpAdd").serialize();
- ftpPost('add_ftp', data, function(data){
- if (data.data == 'ok'){
- layer.msg('添加成功!', {icon: 1});
- } else {
- layer.msg(rdata.data, {icon: 5});
- }
- ftpList();
- layer.close(loadT);
- });
- return true;
- }
+function addFtp() {
var data = ftpAsyncPost('get_www_dir');
var defaultPath = data.data;
- var index = layer.open({
+ var indexFtp = layer.open({
type: 1,
- skin: 'demo-class',
area: '500px',
title: '添加FTP帐户',
closeBtn: 2,
shift: 5,
shadeClose: false,
- content: "",
+ yes:function(index,layero){
+ var loadT = layer.load({shade: true,shadeClose: false});
+ var data = $("#ftpAdd").serialize();
+ ftpPost('add_ftp', data, function(rdata){
+ layer.close(loadT);
+ layer.close(indexFtp);
+ if (rdata.data == 'ok'){
+ layer.msg('添加成功!', {icon: 1,time:3000});
+ } else {
+ layer.msg(rdata.data, {icon: 5,time:3000});
+ }
+
+ setTimeout(function(){ftpList();},2000);
+ });
+ return true;
+ },
});
$("#ftpUser").keyup(function(){
diff --git a/plugins/redis/index.py b/plugins/redis/index.py
index 5c57d2fef..4c9faf5d4 100755
--- a/plugins/redis/index.py
+++ b/plugins/redis/index.py
@@ -104,7 +104,7 @@ def initDreplace():
mw.writeFile(dst_conf_init, 'ok')
# systemd
- systemDir = '/lib/systemd/system'
+ systemDir = '/usr/lib/systemd/system'
systemService = systemDir + '/redis.service'
systemServiceTpl = getPluginDir() + '/init.d/redis.service.tpl'
if os.path.exists(systemDir) and not os.path.exists(systemService):
diff --git a/plugins/redis/install.sh b/plugins/redis/install.sh
index d19ffd750..69fc64b3a 100755
--- a/plugins/redis/install.sh
+++ b/plugins/redis/install.sh
@@ -40,10 +40,10 @@ Install_redis()
Uninstall_redis()
{
- if [ -f /lib/systemd/system/redis.service ];then
+ if [ -f /usr/lib/systemd/system/redis.service ];then
systemctl stop redis
systemctl disable redis
- rm -rf /lib/systemd/system/redis.service
+ rm -rf /usr/lib/systemd/system/redis.service
systemctl daemon-reload
fi
diff --git a/plugins/rsyncd/index.py b/plugins/rsyncd/index.py
index b19a570c9..f0f791177 100755
--- a/plugins/rsyncd/index.py
+++ b/plugins/rsyncd/index.py
@@ -126,7 +126,7 @@ def initDreplace():
mw.execShell('chmod +x ' + file_bin)
# systemd
- systemDir = '/lib/systemd/system'
+ systemDir = '/usr/lib/systemd/system'
systemService = systemDir + '/rsyncd.service'
systemServiceTpl = getPluginDir() + '/init.d/rsyncd.service.tpl'
if os.path.exists(systemDir) and not os.path.exists(systemService):
diff --git a/plugins/rsyncd/install.sh b/plugins/rsyncd/install.sh
index a686ab695..f771a3514 100755
--- a/plugins/rsyncd/install.sh
+++ b/plugins/rsyncd/install.sh
@@ -24,10 +24,10 @@ Install_rsyncd()
Uninstall_rsyncd()
{
- if [ -f /lib/systemd/system/rsyncd.service ];then
+ if [ -f /usr/lib/systemd/system/rsyncd.service ];then
systemctl stop rsyncd
systemctl disable rsyncd
- rm -rf /lib/systemd/system/rsyncd.service
+ rm -rf /usr/lib/systemd/system/rsyncd.service
systemctl daemon-reload
fi
diff --git a/plugins/sphinx/index.py b/plugins/sphinx/index.py
index 676c97a06..2c88586ef 100755
--- a/plugins/sphinx/index.py
+++ b/plugins/sphinx/index.py
@@ -147,7 +147,7 @@ def initDreplace():
mw.writeFile(getServerDir() + '/sphinx.conf', conf_content)
# systemd
- systemDir = '/lib/systemd/system'
+ systemDir = '/usr/lib/systemd/system'
systemService = systemDir + '/sphinx.service'
systemServiceTpl = getPluginDir() + '/init.d/sphinx.service.tpl'
if os.path.exists(systemDir) and not os.path.exists(systemService):
diff --git a/plugins/sphinx/install.sh b/plugins/sphinx/install.sh
index faa104dc3..49ca46742 100755
--- a/plugins/sphinx/install.sh
+++ b/plugins/sphinx/install.sh
@@ -66,10 +66,10 @@ Install_sphinx()
Uninstall_sphinx()
{
- if [ -f /lib/systemd/system/sphinx.service ];then
+ if [ -f /usr/lib/systemd/system/sphinx.service ];then
systemctl stop sphinx
systemctl disable sphinx
- rm -rf /lib/systemd/system/sphinx.service
+ rm -rf /usr/lib/systemd/system/sphinx.service
systemctl daemon-reload
fi
diff --git a/plugins/supervisor/index.py b/plugins/supervisor/index.py
index cad9ca9dc..47ebd6128 100755
--- a/plugins/supervisor/index.py
+++ b/plugins/supervisor/index.py
@@ -171,7 +171,7 @@ def restart():
def reload():
- systemDir = '/lib/systemd/system'
+ systemDir = '/usr/lib/systemd/system'
systemService = systemDir + '/supervisor.service'
if os.path.exists(systemService):
data = mw.execShell('systemctl reload supervisor')
diff --git a/plugins/supervisor/install.sh b/plugins/supervisor/install.sh
index b67b3f273..ce9f2d240 100755
--- a/plugins/supervisor/install.sh
+++ b/plugins/supervisor/install.sh
@@ -61,10 +61,10 @@ Uninstall_app()
{
- if [ -f /lib/systemd/system/supervisor.service ];then
+ if [ -f /usr/lib/systemd/system/supervisor.service ];then
systemctl stop supervisor
systemctl disable supervisor
- rm -rf /lib/systemd/system/supervisor.service
+ rm -rf /usr/lib/systemd/system/supervisor.service
systemctl daemon-reload
fi
diff --git a/plugins/swap/index.py b/plugins/swap/index.py
index df5dc599f..efb1a207f 100755
--- a/plugins/swap/index.py
+++ b/plugins/swap/index.py
@@ -84,7 +84,7 @@ def initDreplace():
mw.execShell('chmod +x ' + file_bin)
# systemd
- systemDir = '/lib/systemd/system'
+ systemDir = '/usr/lib/systemd/system'
systemService = systemDir + '/swap.service'
systemServiceTpl = getPluginDir() + '/init.d/swap.service.tpl'
if os.path.exists(systemDir) and not os.path.exists(systemService):
diff --git a/plugins/swap/install.sh b/plugins/swap/install.sh
index bdc5f06d6..321c69bf5 100755
--- a/plugins/swap/install.sh
+++ b/plugins/swap/install.sh
@@ -38,11 +38,11 @@ Uninstall_swap()
{
swapoff $serverPath/swap/swapfile
- if [ -f /lib/systemd/system/swap.service ];then
+ if [ -f /usr/lib/systemd/system/swap.service ];then
rm -rf /lib/systemd/system/swap.service
fi
- if [ -f /lib/systemd/system/swap.service ];then
+ if [ -f /usr/lib/systemd/system/swap.service ];then
systemctl stop swap
systemctl disable swap
rm -rf /lib/systemd/system/swap.service
diff --git a/plugins/varnish/install.sh b/plugins/varnish/install.sh
index 0d8a80c42..58426eaed 100755
--- a/plugins/varnish/install.sh
+++ b/plugins/varnish/install.sh
@@ -15,16 +15,16 @@ VERSION=$2
_os=`uname`
if [ ${_os} == "Darwin" ]; then
OSNAME='macos'
-elif grep -Eqi "CentOS" /etc/issue || grep -Eq "CentOS" /etc/*-release; then
+elif grep -Eq "openSUSE" /etc/*-release; then
+ OSNAME='opensuse'
+elif grep -Eq "CentOS" /etc/*-release; then
OSNAME='centos'
-elif grep -Eqi "Fedora" /etc/issue || grep -Eq "Fedora" /etc/*-release; then
+elif grep -Eq "Fedora" /etc/*-release; then
OSNAME='fedora'
-elif grep -Eqi "Debian" /etc/issue || grep -Eq "Debian" /etc/*-release; then
+elif grep -Eq "Debian" /etc/*-release; then
OSNAME='debian'
-elif grep -Eqi "Ubuntu" /etc/issue || grep -Eq "Ubuntu" /etc/*-release; then
+elif grep -Eq "Ubuntu" /etc/*-release; then
OSNAME='ubuntu'
-elif grep -Eqi "Raspbian" /etc/issue || grep -Eq "Raspbian" /etc/*-release; then
- OSNAME='raspbian'
else
OSNAME='unknow'
fi
@@ -39,7 +39,9 @@ Install_varnish()
elif [ ${OSNAME} == "centos" ]; then
yum install varnish -y
elif [ ${OSNAME} == "debian" ] || [ ${OSNAME} == "ubuntu" ]; then
- apt-get install varnish -y
+ apt install varnish -y
+ elif [ ${OSNAME} == "opensuse" ];then
+ zypper install -y varnish
else
echo "I won't support it"
fi
diff --git a/requirements.txt b/requirements.txt
index 706e50d8e..193e8ef94 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -7,7 +7,7 @@ flask==2.0.3
flask-session==0.3.2
flask-helper==0.19
cache==1.0.3
-gevent==21.1.2
+gevent==21.12.0
gevent-websocket==0.10.1
psutil==5.9.1
chardet==3.0.4
diff --git a/route/__init__.py b/route/__init__.py
index a8e374c0c..4df89dee4 100755
--- a/route/__init__.py
+++ b/route/__init__.py
@@ -6,6 +6,7 @@ import os
import time
import shutil
import uuid
+import traceback
# reload(sys)
# sys.setdefaultencoding('utf-8')
@@ -127,12 +128,14 @@ def publicObject(toObject, func, action=None, get=None):
data = {'msg': '404,not find api[' + name + ']', "status": False}
return mw.getJson(data)
except Exception as e:
+ # API发生错误记录
+ print(traceback.print_exc())
data = {'msg': '访问异常:' + str(e) + '!', "status": False}
return mw.getJson(data)
-@app.route("/test")
-def test():
+@app.route("/debug")
+def debug():
print(sys.version_info)
print(session)
os = mw.getOs()
diff --git a/route/static/app/index.js b/route/static/app/index.js
index 9ebe17ec1..34fabea40 100755
--- a/route/static/app/index.js
+++ b/route/static/app/index.js
@@ -124,11 +124,13 @@ function getDiskInfo() {
$.get('/system/disk_info', function(rdata) {
var dBody;
for (var i = 0; i < rdata.length; i++) {
- if (rdata[i].path == '/' || rdata[i].path == '/www') {
- if (rdata[i].size[2].indexOf('M') != -1) {
- $("#messageError").show();
- $("#messageError").append(' ' + lan.get('diskinfo_span_1', [rdata[i].path]) + '[清理垃圾]
');
- }
+ var LoadColor = setcolor(parseInt(rdata[i].size[3].replace('%', '')), false, 75, 90, 95);
+
+ //判断inode信息是否存在
+ var inodes = '';
+ if ( typeof(rdata[i]['inodes']) !=='undefined' ){
+ inodes = '' + rdata[i].size[3].replace('%', '') + '%
';
+
var ipre = parseInt(rdata[i].inodes[3].replace('%', ''));
if (ipre > 95) {
$("#messageError").show();
@@ -136,7 +138,13 @@ function getDiskInfo() {
}
}
- var LoadColor = setcolor(parseInt(rdata[i].size[3].replace('%', '')), false, 75, 90, 95);
+ if (rdata[i].path == '/' || rdata[i].path == '/www') {
+ if (rdata[i].size[2].indexOf('M') != -1) {
+ $("#messageError").show();
+ $("#messageError").append(' ' + lan.get('diskinfo_span_1', [rdata[i].path]) + '[清理垃圾]
');
+ }
+ }
+
dBody = '' +
'' + rdata[i].path + '
' +
'' +
@@ -145,9 +153,7 @@ function getDiskInfo() {
'
' +
'' +
- '' + rdata[i].size[3].replace('%', '') + '%
' +
- '' +
+ ''+ inodes +'' +
'' + rdata[i].size[1] + '/' + rdata[i].size[0] + '
' +
''
$("#systemInfoList").append(dBody);
diff --git a/route/static/app/public.js b/route/static/app/public.js
index e0b87726b..824562716 100755
--- a/route/static/app/public.js
+++ b/route/static/app/public.js
@@ -821,9 +821,7 @@ function fly(a) {
},
onEnd: function() {
layer.closeAll();
- layer.msg(lan.bt.task_add, {
- icon: 1
- });
+ layer.msg(lan.bt.task_add, {icon: 1});
getTaskCount();
}
});
@@ -1350,7 +1348,7 @@ function webShell() {
term.open();
term.setOption('cursorBlink', true);
term.setOption('fontSize', 14);
- gterm = term
+ gterm = term;
socket.on('server_response', function (data) {
term.write(data.data);
diff --git a/route/static/app/site.js b/route/static/app/site.js
index 02e7866b8..e1c634609 100755
--- a/route/static/app/site.js
+++ b/route/static/app/site.js
@@ -163,8 +163,22 @@ function setWebPs(b, e, a) {
},'json');
}
+//创建站点前,检查服务是否开启
+function webAdd(type){
+ loading = layer.msg('正在检查是否开启OpenResty服务!',{icon:16,time:0,shade: [0.3, "#000"]})
+ $.post('/site/check_web_status', function(data){
+ layer.close(loading);
+ if (data.status){
+ webAddPage(type)
+ } else {
+ layer.msg(data.msg,{icon:0,time:3000,shade: [0.3, "#000"]})
+ }
+ },'json');
+}
+
//添加站点
-function webAdd(type) {
+function webAddPage(type) {
+
if (type == 1) {
var array;
var str="";
@@ -994,9 +1008,11 @@ function webEdit(id,website,endTime,addtime){
+"SSL
"
+"PHP版本
"
+"重定向
"
- +"反向代理
"
+ +"反向代理
"
+"防盗链
"
- +"响应日志
";
+ +"响应日志
"
+ +"错误日志
";
+
layer.open({
type: 1,
area: '640px',
@@ -1039,7 +1055,24 @@ function webEdit(id,website,endTime,addtime){
function getSiteLogs(siteName){
var loadT = layer.msg('正在处理,请稍候...',{icon:16,time:0,shade: [0.3, '#000']});
$.post('/site/get_logs',{siteName:siteName},function(logs){
- console.log(logs);
+ // console.log(logs);
+ layer.close(loadT);
+ if(logs.status !== true){
+ logs.msg = '';
+ }
+ if (logs.msg == '') logs.msg = '当前没有日志.';
+ var phpCon = '';
+ $("#webedit-con").html(phpCon);
+ var ob = document.getElementById('error_log');
+ ob.scrollTop = ob.scrollHeight;
+ },'json');
+}
+
+//取网站错误日志
+function getSiteErrorLogs(siteName){
+ var loadT = layer.msg('正在处理,请稍候...',{icon:16,time:0,shade: [0.3, '#000']});
+ $.post('/site/get_error_logs',{siteName:siteName},function(logs){
+ // console.log(logs);
layer.close(loadT);
if(logs.status !== true){
logs.msg = '';
@@ -1366,51 +1399,6 @@ function delDirBind(id,siteId){
});
}
-//反向代理
-function proxyList(siteName,type){
- if(type == 1){
- type = $("input[name='status']").attr('checked')?'0':'1';
- toUrl = encodeURIComponent($("input[name='toUrl']").val());
- toDomain = encodeURIComponent($("input[name='toDomain']").val());
- var sub1 = encodeURIComponent($("input[name='sub1']").val());
- var sub2 = encodeURIComponent($("input[name='sub2']").val());
- var data = 'name='+siteName+'&type='+type+'&proxyUrl='+toUrl+'&toDomain=' + toDomain + '&sub1=' + sub1 + '&sub2=' + sub2;
- var loadT = layer.msg(lan.public.the,{icon:16,time:0,shade: [0.3, '#000']});
- $.post('/site?action=SetProxy',data,function(rdata){
- layer.close(loadT);
- if(rdata.status) {
- Proxy(siteName);
- }else{
- $("input[name='status']").attr('checked',false)
- }
- layer.msg(rdata.msg,{icon:rdata.status?1:2});
- });
- return;
- }
- var loadT = layer.msg(lan.site.the_msg,{icon:16,time:0,shade: [0.3, '#000']});
- $.post('/site?action=GetProxy','name='+siteName,function(rdata){
- layer.close(loadT);
- if(rdata.proxyUrl == null) rdata.proxyUrl = '';
- var status_selected = rdata.status?'checked':'';
- var disabled = rdata.status?'disabled':'';
- var body = "";
- $("#webedit-con").html(body);
- });
-}
-
//开启缓存
function openCache(siteName){
var loadT = layer.msg(lan.site.the_msg,{icon:16,time:0,shade: [0.3, '#000']});
@@ -1507,16 +1495,10 @@ function to301(siteName, type, obj){
}, function(res) {
res = JSON.parse(res);
if (res.status == true) {
- layer.msg('删除成功', {
- time: 1000,
- icon: 1
- });
- to301(siteName)
+ layer.msg('删除成功', {time: 1000,icon: 1});
+ to301(siteName);
} else {
- layer.msg(res.msg, {
- time: 1000,
- icon: 2
- });
+ layer.msg(res.msg, {time: 1000,icon: 2});
}
});
return
@@ -1524,64 +1506,61 @@ function to301(siteName, type, obj){
if (type == 3) {
var laoding = layer.load();
- $.post('/site/get_redirect_conf', {
- siteName: siteName,
- id: obj,
- }, function(res) {
+ var data = {siteName: siteName,id: obj};
+ $.post('/site/get_redirect_conf', data, function(res) {
layer.close(laoding);
res = JSON.parse(res);
if (res.status == true) {
var mBody = "\
-
\
+
\
\
-
\
\
- 此处为重定向配置文件,若您不了解配置规则,请勿随意修改.
\
\
\
";
+ var editor;
var index = layer.open({
type: 1,
title: '编辑配置文件',
closeBtn: 1,
- shadeClose: false,
+ shadeClose: true,
area: ['500px', '500px'],
+ btn: ['提交','关闭'],
content: mBody,
success: function () {
- $("#SaveRedirectConfigFileBtn").click(function(){
- $("#configBody").empty();
- $("#configBody").text(editor.getValue());
- var load = layer.load()
- $.post('/site/save_redirect_conf', {
- siteName: siteName,
- id: obj,
- config: editor.getValue()
- }, function(res) {
- layer.close(load)
- var res = JSON.parse(res);
- if (res.status == true) {
- layer.msg('保存成功', {
- icon: 1
- });
- layer.close(index);
- } else {
- layer.msg(res.msg, {
- time: 1000,
- icon: 2
- });
- }
- });
- })
- }
+ editor = CodeMirror.fromTextArea(document.getElementById("configRedirectBody"), {
+ extraKeys: {"Ctrl-Space": "autocomplete"},
+ lineNumbers: true,
+ matchBrackets:true,
+ });
+ editor.focus();
+ $(".CodeMirror-scroll").css({"height":"300px","margin":0,"padding":0});
+ $("#onlineEditFileBtn").unbind('click');
+ },
+ yes:function(index,layero){
+ $("#configRedirectBody").empty().text(editor.getValue());
+ var load = layer.load();
+ var data = {
+ siteName: siteName,
+ id: obj,
+ config: editor.getValue(),
+ };
+ $.post('/site/save_redirect_conf', data, function(res) {
+ layer.close(load)
+ if (res.status == true) {
+ layer.msg('保存成功', {icon: 1});
+ layer.close(index);
+ } else {
+ layer.msg(res.msg, {time: 3000,icon: 2});
+ }
+ },'json');
+ return true;
+ },
});
- var editor = CodeMirror.fromTextArea(document.getElementById("configBody"), {
- extraKeys: {"Ctrl-Space": "autocomplete"},
- lineNumbers: true,
- matchBrackets:true,
- });
- $(".CodeMirror-scroll").css({"height":"300px","margin":0,"padding":0});
- } else {
+ } else {
+ layer.msg('请求错误!!', {time: 3000,icon: 2});
}
});
return
@@ -1609,11 +1588,9 @@ function to301(siteName, type, obj){
$("#webedit-con").html(body);
var loadT = layer.msg(lan.site.the_msg,{icon:16,time:0,shade: [0.3, '#000']});
-
- $.post('/site/get_redirect','siteName='+siteName, function(response) {
+ $.post('/site/get_redirect','siteName='+siteName, function(res) {
layer.close(loadT);
$("#md-301-loading").remove();
- let res = JSON.parse(response);
if (res.status === true) {
let data = res.data.result;
data.forEach(function(item){
@@ -1630,20 +1607,220 @@ function to301(siteName, type, obj){
} else {
layer.msg(res.msg, {icon:2});
}
- });
+ },'json');
}
-//文件验证
-// function file_check(){
-// $(".check_message").html('\
-// \
-// \
-//
');
-// $("#lets_help").html('申请之前,请确保域名已解析,如未解析会导致审核失败\
-// Let\'s Encrypt免费证书,有效期3个月,支持多域名。默认会自动续签\
-// 若您的站点使用了CDN或301重定向会导致续签失败\
-// 在未指定SSL默认站点时,未开启SSL的站点使用HTTPS会直接访问到已开启SSL的站点');
-// }
+
+function toProxySwitch(){
+ var status = $("input[name='open_proxy']").prop("checked")==true?1:0;
+ if(status==1){
+ $("input[name='open_proxy']").prop("checked",false);
+ }else{
+ $("input[name='open_proxy']").prop("checked",true);
+ }
+}
+
+//反向代理
+function toProxy(siteName, type, obj) {
+ // 设置 页面展示
+ if(type == 1) {
+ var proxy_form = layer.open({
+ type: 1,
+ area: '650px',
+ title: "创建反向代理",
+ closeBtn: 2,
+ shift: 5,
+ shadeClose: false,
+ btn: ['提交','关闭'],
+ content: "",
+ yes:function(){
+ var data = $('#form_redirect').serializeArray();
+ var t = {};
+ t['name'] = 'siteName';
+ t['value'] = siteName;
+ data.push(t);
+
+ var loading = layer.msg('添加中...',{icon:16,time:0,shade: [0.3, '#000']});
+ $.post('/site/set_proxy',data, function(res) {
+ layer.close(loading);
+ if (res.status) {
+ layer.close(proxy_form);
+ toProxy(siteName)
+ } else {
+ layer.msg(res.msg, {icon: 2});
+ }
+ },'json');
+
+ }
+ });
+ }
+
+ if (type == 2) {
+ $.post('/site/del_proxy', {siteName: siteName,id: obj,}, function(res) {
+ if (res.status == true) {
+ layer.msg('删除成功', {time: 1000,icon: 1});
+ toProxy(siteName)
+ } else {
+ layer.msg(res.msg, {time: 1000,icon: 2});
+ }
+ },'json');
+ return
+ }
+
+
+ if (type == 3) {
+ var laoding = layer.load();
+ var data = {siteName: siteName,id: obj};
+ $.post('/site/get_proxy_conf', data, function(res) {
+ layer.close(laoding);
+ if (res.status == true) {
+ var mBody = "\
+
\
+
\
+
\
+ - 此处为反向代理配置文件,若您不了解配置规则,请勿随意修改.
\
+
\
+
\
+
";
+ var editor;
+ var index = layer.open({
+ type: 1,
+ title: '编辑配置文件',
+ closeBtn: 1,
+ shadeClose: true,
+ area: ['500px', '500px'],
+ btn: ['提交','关闭'],
+ content: mBody,
+ success: function () {
+ editor = CodeMirror.fromTextArea(document.getElementById("configProxyBody"), {
+ extraKeys: {"Ctrl-Space": "autocomplete"},
+ lineNumbers: true,
+ matchBrackets:true,
+ });
+ editor.focus();
+ $(".CodeMirror-scroll").css({"height":"300px","margin":0,"padding":0});
+ $("#onlineEditFileBtn").unbind('click');
+ },
+ yes:function(index,layero){
+ $("#configProxyBody").empty().text(editor.getValue());
+ var load = layer.load();
+ var data = {
+ siteName: siteName,
+ id: obj,
+ config: editor.getValue(),
+ };
+
+ $.post('/site/save_proxy_conf', data, function(res) {
+ layer.close(load)
+ if (res.status == true) {
+ layer.msg('保存成功', {icon: 1});
+ layer.close(index);
+ } else {
+ layer.msg(res.msg, {time: 3000,icon: 2});
+ }
+ },'json');
+ return true;
+ },
+ });
+ } else {
+ layer.msg('请求错误!!', {time: 3000,icon: 2});
+ }
+ },'json');
+ return
+ }
+
+ if (type == 10 || type == 11) {
+ //[11]启动 或 停止[10]
+ status = type==10 ? '0' : '1';
+ var loading = layer.msg(lan.site.the_msg,{icon:16,time:0,shade: [0.3, '#000']});
+ $.post('/site/set_proxy_status', {siteName: siteName,'status':status,'id':obj}, function(res) {
+ layer.close(loading);
+ if (res.status == true) {
+ layer.msg('设置成功', {icon: 1});
+ toProxy(siteName);
+ } else {
+ layer.msg(res.msg, {time: 3000,icon: 2});
+ }
+ },'json');
+ return;
+ }
+
+ var body = '\
+
\
+ \
+
\
+
\
+
\
+ \
+ \
+ | 代理目录 | \
+ 目标地址 | \
+ 状态 | \
+ 操作 | \
+
\
+ \
+ \
+
\
+
\
+
';
+ $("#webedit-con").html(body);
+
+ var loading = layer.msg(lan.site.the_msg,{icon:16,time:0,shade: [0.3, '#000']});
+ $.post("/site/get_proxy_list", {siteName: siteName},function (res) {
+ layer.close(loading);
+ if (res.status === true) {
+ let data = res.data.result;
+ data.forEach(function(item){
+ var switchProxy = '';
+ if (!item['status']){
+ switchProxy = '';
+ }
+
+ let tmp = '\
+ | '+item.from+' | \
+ '+item.to+' | \
+ '+switchProxy+' | \
+ \
+ 详细 |\
+ 删除\
+ | \
+
';
+ $("#md-301-body").append(tmp);
+ })
+ } else {
+ layer.msg(res.msg, {icon:2});
+ }
+ },'json');
+/////////
+}
//证书夹
function sslAdmin(siteName){
diff --git a/route/static/app/soft.js b/route/static/app/soft.js
index 94bca7e5e..3efd752d3 100755
--- a/route/static/app/soft.js
+++ b/route/static/app/soft.js
@@ -98,12 +98,11 @@ function getSList(isdisplay) {
}
- var handle = '安装';
-
+ var handle = '安装';
if (plugin.setup == true) {
- var mupdate = '';//(plugin.versions[n] == plugin.updates[n]) '' : '更新 | ';
+ var mupdate = '';//(plugin.versions[n] == plugin.updates[n]) '' : '更新 | ';
// if (plugin.versions[n] == '') mupdate = '';
handle = mupdate + '设置 | 卸载';
titleClick = 'onclick="softMain(\'' + plugin.name + '\',\'' + plugin.setup_version + '\')" style="cursor:pointer"';
@@ -146,17 +145,6 @@ function getSList(isdisplay) {
'' + indexshow + ' | ' +
'' + handle + ' | ' +
'';
-
- // sBody += '' +
- // ' ' + plugin_title + ' | ' +
- // '' + plugin.ps + ' | ' +
- // '' + softPath + ' | ' +
- // '' + state + ' | ' +
- // '' + indexshow + ' | ' +
- // '' + handle + ' | ' +
- // '
';
}
sBody += pBody;
@@ -171,7 +159,24 @@ function getSList(isdisplay) {
},'json');
}
-function addVersion(name, ver, type, obj, title) {
+function installPreInspection(name, ver, callback){
+ var loading = layer.msg('正在检查安装环境...', { icon: 16, time: 0, shade: [0.3, '#000'] });
+ $.post("/plugins/run", {'name':name,'version':ver,'func':'install_pre_inspection'}, function(rdata) {
+ layer.close(loading);
+ if (rdata.status){
+ if (rdata.data == 'ok'){
+ callback();
+ } else {
+ layer.msg(rdata.data, { icon: 2 });
+ }
+ } else {
+ layer.msg(rdata.msg, { icon: rdata.status ? 1 : 2 });
+ }
+ },'json');
+
+}
+
+function addVersion(name, ver, type, obj, title, install_pre_inspection) {
var option = '';
var titlename = name;
if (ver.indexOf('|') >= 0){
@@ -214,15 +219,33 @@ function addVersion(name, ver, type, obj, title) {
var type = $('.fangshi input').prop("checked") ? '1' : '0';
var data = "name=" + name + "&version=" + version + "&type=" + type;
+ if (install_pre_inspection){
+ //安装检查
+ installPreInspection(name,version, function(){
+ var loadT = layer.msg('正在添加到安装器...', { icon: 16, time: 0, shade: [0.3, '#000'] });
+ $.post("/plugins/install", data, function(rdata) {
+ layer.closeAll();
+ layer.msg(rdata.msg, { icon: rdata.status ? 1 : 2 });
+ getSList();
+ },'json');
+
+ installTips();
+ fly("bi-btn");
+ });
+ return;
+ }
+
var loadT = layer.msg('正在添加到安装器...', { icon: 16, time: 0, shade: [0.3, '#000'] });
$.post("/plugins/install", data, function(rdata) {
layer.closeAll();
layer.msg(rdata.msg, { icon: rdata.status ? 1 : 2 });
getSList();
},'json');
+
+ installTips();
+ fly("bi-btn");
});
- installTips();
- fly("bi-btn");
+
}
//卸载软件
diff --git a/route/static/css/site.css b/route/static/css/site.css
index 6dd9a7ab2..1d4c6c4f3 100755
--- a/route/static/css/site.css
+++ b/route/static/css/site.css
@@ -398,20 +398,20 @@ html {
}
.cursor {
- cursor: pointer
+ cursor: pointer;
}
.help-info-text {
- margin-top: 15px
+ margin-top: 15px;
}
.help-info-text>li {
list-style: inside disc;
- line-height: 24px
+ line-height: 24px;
}
.relative {
- position: relative
+ position: relative;
}
.ico-copy {
@@ -423,11 +423,11 @@ html {
}
.zclip embed {
- vertical-align: top
+ vertical-align: top;
}
.webDelete .options {
- padding: 20px 0
+ padding: 20px 0;
}
.webDelete .options label {
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/init.d/mw.tpl b/scripts/init.d/mw.tpl
index d105ba1b7..f34cfc9b3 100755
--- a/scripts/init.d/mw.tpl
+++ b/scripts/init.d/mw.tpl
@@ -14,7 +14,7 @@
PATH=/usr/local/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
-# export LC_ALL="en_US.UTF-8"
+export LC_ALL="en_US.UTF-8"
mw_path={$SERVER_PATH}
PATH=$PATH:$mw_path/bin
@@ -77,14 +77,14 @@ mw_start_task()
fi
echo -e "\033[32mdone\033[0m"
else
- echo "Starting mw-tasks... mw-tasks (pid $isStart) already running"
+ echo "Starting mw-tasks... mw-tasks (pid $(echo $isStart)) already running"
fi
}
mw_start()
{
- mw_start_panel
mw_start_task
+ mw_start_panel
}
@@ -92,13 +92,12 @@ mw_stop_task()
{
if [ -f $mw_path/tmp/panelTask.pl ];then
echo -e "\033[32mThe task is running and cannot be stopped\033[0m"
- return
+ exit 0
fi
echo -e "Stopping mw-tasks... \c";
pids=$(ps aux | grep 'task.py'|grep -v grep|awk '{print $2}')
arr=($pids)
-
for p in ${arr[@]}
do
kill -9 $p
@@ -123,8 +122,8 @@ mw_stop_panel()
mw_stop()
{
- mw_stop_panel
mw_stop_task
+ mw_stop_panel
}
mw_status()
diff --git a/scripts/install.sh b/scripts/install.sh
index 0199bf0e8..91e78049e 100755
--- a/scripts/install.sh
+++ b/scripts/install.sh
@@ -18,18 +18,14 @@ if [ "$EUID" -ne 0 ]
exit
fi
-if grep -Eqi "Ubuntu" /etc/issue || grep -Eq "Ubuntu" /etc/*-release; then
- ln -sf /bin/bash /bin/sh
- #sudo dpkg-reconfigure dash
-fi
-
-if grep -Eqi "Debian" /etc/issue || grep -Eq "Debian" /etc/*-release; then
- ln -sf /bin/bash /bin/sh
-fi
-
if [ ${_os} == "Darwin" ]; then
OSNAME='macos'
+elif grep -Eq "openSUSE" /etc/*-release; then
+ OSNAME='opensuse'
+ zypper refresh
+elif grep -Eq "FreeBSD" /etc/*-release; then
+ OSNAME='freebsd'
elif grep -Eqi "CentOS" /etc/issue || grep -Eq "CentOS" /etc/*-release; then
OSNAME='centos'
yum install -y wget zip unzip
@@ -47,12 +43,9 @@ elif grep -Eqi "Debian" /etc/issue || grep -Eq "Debian" /etc/*-release; then
apt update -y
apt install -y devscripts
apt install -y wget zip unzip
- apt install -y wget zip unzip
elif grep -Eqi "Ubuntu" /etc/issue || grep -Eq "Ubuntu" /etc/*-release; then
OSNAME='ubuntu'
apt install -y wget zip unzip
-elif grep -Eqi "Raspbian" /etc/issue || grep -Eq "Raspbian" /etc/*-release; then
- OSNAME='raspbian'
else
OSNAME='unknow'
fi
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/arch.sh b/scripts/install/arch.sh
new file mode 100644
index 000000000..982135683
--- /dev/null
+++ b/scripts/install/arch.sh
@@ -0,0 +1,119 @@
+#!/bin/bash
+PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
+export PATH
+LANG=en_US.UTF-8
+
+
+
+echo y | pacman -Sy yaourt
+
+echo y | pacman -Sy gcc make cmake autoconf
+echo y | pacman -Sy pkg-config
+echo y | pacman -Sy python3
+echo y | pacman -Sy lsof
+echo y | pacman -Sy python-pip
+echo y | pacman -Sy curl
+echo y | pacman -Sy libevent
+echo y | pacman -Sy libjpeg
+echo y | pacman -Sy libpng
+echo y | pacman -Sy libzip
+echo y | pacman -Sy libwebp
+echo y | pacman -Sy libxml2
+echo y | pacman -Sy libtirpc
+echo y | pacman -Sy gd
+echo y | pacman -Sy cronie
+echo y | pacman -Sy vi
+echo y | pacman -Sy openssl
+echo y | pacman -Sy pcre
+echo y | pacman -Sy libmcrypt
+echo y | pacman -Sy oniguruma
+echo y | pacman -Sy libmemcached
+echo y | pacman -Sy bison re2c
+echo y | pacman -Sy graphviz
+echo y | pacman -Sy mhash
+echo y | pacman -Sy ncurses
+echo y | pacman -Sy sqlite
+echo y | pacman -Sy libtool
+echo y | pacman -Sy imagemagick
+echo y | pacman -Sy mariadb-clients
+echo y | pacman -Sy rpcsvc-proto
+echo y | pacman -Sy lemon
+echo y | pacman -Sy which
+
+# echo y | pacman -Sy chkconfig
+
+# zypper install -y freetype freetype-devel
+# zypper install -y libjpeg-devel libpng-devel
+# echo y | pacman -Sy rpcgen
+# ln -s /usr/local/mysql/lib/libmysqlclient.so.18 /usr/lib64
+
+hwclock --systohc
+
+#https need
+if [ ! -d /root/.acme.sh ];then
+ curl https://get.acme.sh | sh
+fi
+
+if [ -f /etc/init.d/iptables ];then
+
+ iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
+ iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT
+ iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 443 -j ACCEPT
+ iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 888 -j ACCEPT
+ iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 7200 -j ACCEPT
+ # iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 3306 -j ACCEPT
+ # iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 30000:40000 -j ACCEPT
+ service iptables save
+
+ iptables_status=`service iptables status | grep 'not running'`
+ if [ "${iptables_status}" == '' ];then
+ service iptables restart
+ fi
+
+ #安装时不开启
+ service iptables stop
+fi
+
+
+if [ ! -f /etc/init.d/iptables ];then
+ echo y | pacman -Sy firewalld
+ systemctl enable firewalld
+ systemctl start firewalld
+
+ firewall-cmd --permanent --zone=public --add-port=22/tcp
+ firewall-cmd --permanent --zone=public --add-port=80/tcp
+ firewall-cmd --permanent --zone=public --add-port=443/tcp
+ firewall-cmd --permanent --zone=public --add-port=888/tcp
+ firewall-cmd --permanent --zone=public --add-port=7200/tcp
+ # firewall-cmd --permanent --zone=public --add-port=3306/tcp
+ # firewall-cmd --permanent --zone=public --add-port=30000-40000/tcp
+
+
+ sed -i 's#AllowZoneDrifting=yes#AllowZoneDrifting=no#g' /etc/firewalld/firewalld.conf
+ firewall-cmd --reload
+ #安装时不开启
+ systemctl stop firewalld
+fi
+
+
+cd /www/server/mdserver-web/scripts && bash lib.sh
+chmod 755 /www/server/mdserver-web/data
+
+
+cd /www/server/mdserver-web && ./cli.sh start
+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 && /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
\ No newline at end of file
diff --git a/scripts/install/centos.sh b/scripts/install/centos.sh
index e2b548a1f..71b06ed81 100755
--- a/scripts/install/centos.sh
+++ b/scripts/install/centos.sh
@@ -14,6 +14,7 @@ sed -i 's#SELINUX=enforcing#SELINUX=disabled#g' /etc/selinux/config
yum install -y wget lsof crontabs
yum install -y python3-devel
+yum install -y python3-pip
yum install -y python-devel
yum install -y vixie-cron
yum install -y curl-devel libmcrypt libmcrypt-devel
@@ -48,6 +49,8 @@ fi
if [ ! -f /etc/init.d/iptables ];then
yum install firewalld -y
systemctl enable firewalld
+ #取消服务锁定
+ systemctl unmask firewalld
systemctl start firewalld
firewall-cmd --permanent --zone=public --add-port=22/tcp
@@ -61,12 +64,10 @@ if [ ! -f /etc/init.d/iptables ];then
sed -i 's#AllowZoneDrifting=yes#AllowZoneDrifting=no#g' /etc/firewalld/firewalld.conf
firewall-cmd --reload
+ #安装时不开启
+ systemctl stop firewalld
fi
-
-#安装时不开启
-systemctl stop firewalld
-
yum groupinstall -y "Development Tools"
yum install -y epel-release
@@ -78,6 +79,7 @@ if [ "$?" != "0" ];then
yum install -y oniguruma oniguruma-devel
fi
+yum install -y libzstd-devel
yum install -y libevent libevent-devel libjpeg* libpng* gd* libxslt* unzip
yum install -y python-imaging libicu-devel zip bzip2-devel gcc libxml2 libxml2-devel pcre pcre-devel
yum install -y libjpeg-devel libpng-devel libwebp libwebp-devel
@@ -95,10 +97,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..3d36c4ef6 100644
--- a/scripts/install/debian.sh
+++ b/scripts/install/debian.sh
@@ -12,6 +12,10 @@ LANG=en_US.UTF-8
# WHITE='\e[1;37m' # 白色
# NC='\e[0m' # 没有颜色
+if grep -Eq "Debian" /etc/*-release; then
+ ln -sf /bin/bash /bin/sh
+fi
+
apt update -y
@@ -104,11 +108,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/freebsd.sh b/scripts/install/freebsd.sh
new file mode 100644
index 000000000..5a6f9fed3
--- /dev/null
+++ b/scripts/install/freebsd.sh
@@ -0,0 +1,112 @@
+#!/bin/bash
+PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
+export PATH
+LANG=en_US.UTF-8
+
+if grep -Eq "FreeBSD" /etc/*-release && [ ! -f /bin/bash ]; then
+ ln -sf /usr/local/bin/bash /bin/bash
+fi
+
+pkg update -y
+pkg install -y python3
+python3 -m ensurepip
+pip3 install --upgrade setuptools
+python3 -m pip install --upgrade pip
+pkg install -y lsof
+pkg install -y sqlite3
+pkg install -y py38-sqlite3
+pkg install -y py38-mysqlclient
+pkg install -y py38-cffi
+
+pkg install -y gcc
+pkg install -y autoconf
+pkg install -y make
+pkg install -y gmake
+pkg install -y cmake
+pkg install -y libxslt
+pkg install -y libunwind
+pkg install -y influxpkg-config
+
+pkg install -y pcre
+pkg install -y webp
+pkg install -y freetype
+pkg install -y oniguruma
+pkg install -y brotli
+pkg install -y harfbuzz
+
+# pkg install -y py38-cffi
+
+
+pkg autoremove -y
+
+#https need
+if [ ! -d /root/.acme.sh ];then
+ curl https://get.acme.sh | sh
+fi
+
+if [ -f /etc/init.d/iptables ];then
+
+ iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
+ iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT
+ iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 443 -j ACCEPT
+ iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 888 -j ACCEPT
+ iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 7200 -j ACCEPT
+ # iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 3306 -j ACCEPT
+ # iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 30000:40000 -j ACCEPT
+ service iptables save
+
+ iptables_status=`service iptables status | grep 'not running'`
+ if [ "${iptables_status}" == '' ];then
+ service iptables restart
+ fi
+
+ #安装时不开启
+ service iptables stop
+fi
+
+
+if [ ! -f /etc/init.d/iptables ];then
+ pkg install -y firewalld
+ systemctl enable firewalld
+ systemctl start firewalld
+
+ firewall-cmd --permanent --zone=public --add-port=22/tcp
+ firewall-cmd --permanent --zone=public --add-port=80/tcp
+ firewall-cmd --permanent --zone=public --add-port=443/tcp
+ firewall-cmd --permanent --zone=public --add-port=888/tcp
+ firewall-cmd --permanent --zone=public --add-port=7200/tcp
+ # firewall-cmd --permanent --zone=public --add-port=3306/tcp
+ # firewall-cmd --permanent --zone=public --add-port=30000-40000/tcp
+
+
+ sed -i 's#AllowZoneDrifting=yes#AllowZoneDrifting=no#g' /etc/firewalld/firewalld.conf
+ firewall-cmd --reload
+ #安装时不开启
+ systemctl stop firewalld
+fi
+
+
+
+
+cd /www/server/mdserver-web/scripts && bash lib.sh
+chmod 755 /www/server/mdserver-web/data
+
+
+cd /www/server/mdserver-web && bash cli.sh start
+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 && bash /etc/init.d/mw stop
+cd /www/server/mdserver-web && bash /etc/init.d/mw start
+cd /www/server/mdserver-web && bash /etc/init.d/mw default
+
diff --git a/scripts/install/opensuse.sh b/scripts/install/opensuse.sh
new file mode 100644
index 000000000..fa1193fe5
--- /dev/null
+++ b/scripts/install/opensuse.sh
@@ -0,0 +1,111 @@
+#!/bin/bash
+PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
+export PATH
+LANG=en_US.UTF-8
+
+# zypper refresh
+
+
+# systemctl stop SuSEfirewall2
+
+# for debug
+zypper install -y htop
+# for debug end
+
+zypper install -y openssl openssl-devel
+zypper install -y bison re2c make cmake gcc
+zypper install -y gcc-c++
+zypper install -y autoconf
+zypper install -y python3-pip
+zypper install -y pcre pcre-devel
+zypper install -y graphviz libxml2 libxml2-devel
+zypper install -y curl curl-devel
+zypper install -y freetype freetype-devel
+zypper install -y mysql-devel
+zypper install -y ImageMagick ImageMagick-devel
+zypper install -y libjpeg-devel libpng-devel
+zypper install -y libevent-devel
+zypper install -y libtirpc-devel
+zypper install -y rpcgen
+
+zypper install -y libmemcached libmemcached-devel
+
+
+# zypper install -y protobuf
+# zypper install -y zlib-devel
+
+zypper install -y python3-devel
+zypper install -y python-devel
+
+
+#https need
+if [ ! -d /root/.acme.sh ];then
+ curl https://get.acme.sh | sh
+fi
+
+if [ -f /etc/init.d/iptables ];then
+
+ iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
+ iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT
+ iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 443 -j ACCEPT
+ iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 888 -j ACCEPT
+ iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 7200 -j ACCEPT
+ # iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 3306 -j ACCEPT
+ # iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 30000:40000 -j ACCEPT
+ service iptables save
+
+ iptables_status=`service iptables status | grep 'not running'`
+ if [ "${iptables_status}" == '' ];then
+ service iptables restart
+ fi
+
+ #安装时不开启
+ service iptables stop
+fi
+
+
+if [ ! -f /etc/init.d/iptables ];then
+ zypper install -y firewalld
+ systemctl enable firewalld
+ systemctl start firewalld
+
+ firewall-cmd --permanent --zone=public --add-port=22/tcp
+ firewall-cmd --permanent --zone=public --add-port=80/tcp
+ firewall-cmd --permanent --zone=public --add-port=443/tcp
+ firewall-cmd --permanent --zone=public --add-port=888/tcp
+ firewall-cmd --permanent --zone=public --add-port=7200/tcp
+ # firewall-cmd --permanent --zone=public --add-port=3306/tcp
+ # firewall-cmd --permanent --zone=public --add-port=30000-40000/tcp
+
+
+ sed -i 's#AllowZoneDrifting=yes#AllowZoneDrifting=no#g' /etc/firewalld/firewalld.conf
+ firewall-cmd --reload
+ #安装时不开启
+ systemctl stop firewalld
+fi
+
+
+
+
+cd /www/server/mdserver-web/scripts && bash lib.sh
+chmod 755 /www/server/mdserver-web/data
+
+
+cd /www/server/mdserver-web && ./cli.sh start
+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 && /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..ff360fc06 100644
--- a/scripts/install/ubuntu.sh
+++ b/scripts/install/ubuntu.sh
@@ -3,6 +3,11 @@ PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
LANG=en_US.UTF-8
+if grep -Eq "Ubuntu" /etc/*-release; then
+ sudo ln -sf /bin/bash /bin/sh
+ #sudo dpkg-reconfigure dash
+fi
+
apt update -y
@@ -65,10 +70,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_cn.sh b/scripts/install_cn.sh
index afb57ab25..f6d1fd9d4 100755
--- a/scripts/install_cn.sh
+++ b/scripts/install_cn.sh
@@ -18,18 +18,15 @@ if [ "$EUID" -ne 0 ]
exit
fi
-if grep -Eqi "Ubuntu" /etc/issue || grep -Eq "Ubuntu" /etc/*-release; then
- ln -sf /bin/bash /bin/sh
- #sudo dpkg-reconfigure dash
-fi
-
-if grep -Eqi "Debian" /etc/issue || grep -Eq "Debian" /etc/*-release; then
- ln -sf /bin/bash /bin/sh
-fi
if [ ${_os} == "Darwin" ]; then
OSNAME='macos'
+elif grep -Eq "openSUSE" /etc/*-release; then
+ OSNAME='opensuse'
+ zypper refresh
+elif grep -Eq "FreeBSD" /etc/*-release; then
+ OSNAME='freebsd'
elif grep -Eqi "CentOS" /etc/issue || grep -Eq "CentOS" /etc/*-release; then
OSNAME='centos'
yum install -y wget zip unzip
@@ -47,12 +44,9 @@ elif grep -Eqi "Debian" /etc/issue || grep -Eq "Debian" /etc/*-release; then
apt update -y
apt install -y devscripts
apt install -y wget zip unzip
- apt install -y wget zip unzip
elif grep -Eqi "Ubuntu" /etc/issue || grep -Eq "Ubuntu" /etc/*-release; then
OSNAME='ubuntu'
apt install -y wget zip unzip
-elif grep -Eqi "Raspbian" /etc/issue || grep -Eq "Raspbian" /etc/*-release; then
- OSNAME='raspbian'
else
OSNAME='unknow'
fi
diff --git a/scripts/install_dev.sh b/scripts/install_dev.sh
index 34a8d63ce..66ea885cd 100755
--- a/scripts/install_dev.sh
+++ b/scripts/install_dev.sh
@@ -18,18 +18,19 @@ if [ "$EUID" -ne 0 ]
exit
fi
-if grep -Eqi "Ubuntu" /etc/issue || grep -Eq "Ubuntu" /etc/*-release; then
- ln -sf /bin/bash /bin/sh
- #sudo dpkg-reconfigure dash
-fi
-
-if grep -Eqi "Debian" /etc/issue || grep -Eq "Debian" /etc/*-release; then
- ln -sf /bin/bash /bin/sh
-fi
if [ ${_os} == "Darwin" ]; then
OSNAME='macos'
+elif grep -Eq "openSUSE" /etc/*-release; then
+ OSNAME='opensuse'
+ zypper refresh
+elif grep -Eq "FreeBSD" /etc/*-release; then
+ OSNAME='freebsd'
+ pkg install -y wget unzip
+elif grep -Eqi "Arch" /etc/issue || grep -Eq "Arch" /etc/*-release; then
+ OSNAME='arch'
+ echo y | pacman -Sy unzip
elif grep -Eqi "CentOS" /etc/issue || grep -Eq "CentOS" /etc/*-release; then
OSNAME='centos'
yum install -y wget zip unzip
@@ -50,8 +51,6 @@ elif grep -Eqi "Debian" /etc/issue || grep -Eq "Debian" /etc/*-release; then
elif grep -Eqi "Ubuntu" /etc/issue || grep -Eq "Ubuntu" /etc/*-release; then
OSNAME='ubuntu'
apt install -y wget zip unzip
-elif grep -Eqi "Raspbian" /etc/issue || grep -Eq "Raspbian" /etc/*-release; then
- OSNAME='raspbian'
else
OSNAME='unknow'
fi
diff --git a/scripts/lib.sh b/scripts/lib.sh
index 2ed03a3ab..9d9524d04 100755
--- a/scripts/lib.sh
+++ b/scripts/lib.sh
@@ -223,14 +223,15 @@ echo -e "Install_Curl" >> ${libPath}/lib.pl
-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 -Eq "openSUSE" /etc/*-release; then
+ OSNAME='opensuse'
+elif grep -Eq "FreeBSD" /etc/*-release; then
+ OSNAME='freebsd'
+elif grep -Eqi "Arch" /etc/issue || grep -Eq "Arch" /etc/*-release; then
+ OSNAME='arch'
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
@@ -266,22 +267,36 @@ if [ "$OSNAME" == "macos" ]; then
brew install freetype
brew install openssl
brew install libzip
-
+elif [ "$OSNAME" == "opensuse" ];then
+ echo "opensuse lib"
+elif [ "$OSNAME" == "arch" ];then
+ echo "arch lib"
+elif [ "$OSNAME" == "freebsd" ];then
+ echo "freebsd lib"
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
@@ -292,14 +307,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
@@ -311,11 +331,12 @@ elif [ "$OSNAME" == "ubuntu" ] || [ "$OSNAME" == "debian" ]; then
apt install -y libmariadb-dev
#apt install -y libmysqlclient-dev
apt install -y libmariadb-dev-compat
- #apt install -y libmariadbclient-dev
+ #apt install -y libmariadbclient-dev
else
yum install -y openldap openldap-devel libtirpc libtirpc-devel rpcgen
yum install -y bison re2c cmake
+ yum install -y cmake3
yum install -y libmemcached libmemcached-devel
yum install -y curl curl-devel
@@ -348,7 +369,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-websocket==0.10.1
pip3 install requests==2.20.0
pip3 install flask-caching==1.10.1
@@ -358,9 +378,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
+# 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 .
@@ -373,7 +393,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-websocket==0.10.1
pip3 install requests==2.20.0
pip3 install flask-caching==1.10.1
@@ -383,9 +402,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
+# 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/debug.sh b/scripts/quick/debug.sh
index b6a2fa87b..d8855d5ec 100755
--- a/scripts/quick/debug.sh
+++ b/scripts/quick/debug.sh
@@ -24,7 +24,7 @@ fi
-PHP_VER_LIST=(53 54 55 56 71 72 73 74 80 81)
+PHP_VER_LIST=(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"
diff --git a/scripts/update.sh b/scripts/update.sh
index 016ad88a8..dd13727bb 100755
--- a/scripts/update.sh
+++ b/scripts/update.sh
@@ -14,17 +14,14 @@ if [ "$EUID" -ne 0 ]
exit
fi
-if grep -Eqi "Ubuntu" /etc/issue || grep -Eq "Ubuntu" /etc/*-release; then
- ln -sf /bin/bash /bin/sh
- #sudo dpkg-reconfigure dash
-fi
-
-if grep -Eqi "Debian" /etc/issue || grep -Eq "Debian" /etc/*-release; then
- ln -sf /bin/bash /bin/sh
-fi
if [ ${_os} == "Darwin" ]; then
OSNAME='macos'
+elif grep -Eq "openSUSE" /etc/*-release; then
+ OSNAME='opensuse'
+ zypper refresh
+elif grep -Eq "FreeBSD" /etc/*-release; then
+ OSNAME='freebsd'
elif grep -Eqi "CentOS" /etc/issue || grep -Eq "CentOS" /etc/*-release; then
OSNAME='centos'
yum install -y wget zip unzip
diff --git a/scripts/update/arch.sh b/scripts/update/arch.sh
new file mode 100644
index 000000000..a7fda8afe
--- /dev/null
+++ b/scripts/update/arch.sh
@@ -0,0 +1,34 @@
+#!/bin/bash
+PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
+export PATH
+LANG=en_US.UTF-8
+
+
+
+# echo y | pacman -Sy yaourt
+# echo y | pacman -Sy python3
+
+
+
+
+cd /www/server/mdserver-web/scripts && bash lib.sh
+chmod 755 /www/server/mdserver-web/data
+
+
+cd /www/server/mdserver-web && ./cli.sh start
+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 && /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
\ No newline at end of file
diff --git a/scripts/update/debian.sh b/scripts/update/debian.sh
index f82fc8db5..a5a13992a 100644
--- a/scripts/update/debian.sh
+++ b/scripts/update/debian.sh
@@ -3,6 +3,11 @@ PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
LANG=en_US.UTF-8
+if grep -Eq "Ubuntu" /etc/*-release; then
+ sudo ln -sf /bin/bash /bin/sh
+ #sudo dpkg-reconfigure dash
+fi
+
cd /www/server/mdserver-web/scripts && bash lib.sh
chmod 755 /www/server/mdserver-web/data
diff --git a/scripts/update/freebsd.sh b/scripts/update/freebsd.sh
new file mode 100644
index 000000000..a6e47c77d
--- /dev/null
+++ b/scripts/update/freebsd.sh
@@ -0,0 +1,32 @@
+#!/bin/bash
+PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
+export PATH
+LANG=en_US.UTF-8
+
+
+cd /www/server/mdserver-web/scripts && bash lib.sh
+chmod 755 /www/server/mdserver-web/data
+
+if [ -f /etc/init.d/mw ];then
+ sh /etc/init.d/mw stop && rm -rf /www/server/mdserver-web/scripts/init.d/mw && rm -rf /etc/init.d/mw
+fi
+
+
+cd /www/server/mdserver-web && bash cli.sh start
+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 && bash /etc/init.d/mw stop
+cd /www/server/mdserver-web && bash /etc/init.d/mw start
+cd /www/server/mdserver-web && bash /etc/init.d/mw default
+
diff --git a/scripts/update/opensuse.sh b/scripts/update/opensuse.sh
new file mode 100644
index 000000000..1f0f017d9
--- /dev/null
+++ b/scripts/update/opensuse.sh
@@ -0,0 +1,34 @@
+#!/bin/bash
+PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
+export PATH
+LANG=en_US.UTF-8
+
+# zypper refresh
+
+
+# systemctl stop SuSEfirewall2
+
+
+
+cd /www/server/mdserver-web/scripts && bash lib.sh
+chmod 755 /www/server/mdserver-web/data
+
+
+cd /www/server/mdserver-web && ./cli.sh start
+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 && /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/update/ubuntu.sh b/scripts/update/ubuntu.sh
index f53954315..827009782 100644
--- a/scripts/update/ubuntu.sh
+++ b/scripts/update/ubuntu.sh
@@ -3,6 +3,10 @@ PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
LANG=en_US.UTF-8
+if grep -Eq "Ubuntu" /etc/*-release; then
+ sudo ln -sf /bin/bash /bin/sh
+ #sudo dpkg-reconfigure dash
+fi
cd /www/server/mdserver-web/scripts && bash lib.sh
diff --git a/scripts/update_cn.sh b/scripts/update_cn.sh
index 8e20424d0..f7392d136 100755
--- a/scripts/update_cn.sh
+++ b/scripts/update_cn.sh
@@ -14,17 +14,15 @@ if [ "$EUID" -ne 0 ]
exit
fi
-if grep -Eqi "Ubuntu" /etc/issue || grep -Eq "Ubuntu" /etc/*-release; then
- ln -sf /bin/bash /bin/sh
- #sudo dpkg-reconfigure dash
-fi
-if grep -Eqi "Debian" /etc/issue || grep -Eq "Debian" /etc/*-release; then
- ln -sf /bin/bash /bin/sh
-fi
if [ ${_os} == "Darwin" ]; then
OSNAME='macos'
+elif grep -Eq "openSUSE" /etc/*-release; then
+ OSNAME='opensuse'
+ zypper refresh
+elif grep -Eq "FreeBSD" /etc/*-release; then
+ OSNAME='freebsd'
elif grep -Eqi "CentOS" /etc/issue || grep -Eq "CentOS" /etc/*-release; then
OSNAME='centos'
yum install -y wget zip unzip
diff --git a/scripts/update_dev.sh b/scripts/update_dev.sh
index 6dd33232f..fd9d14b94 100755
--- a/scripts/update_dev.sh
+++ b/scripts/update_dev.sh
@@ -14,17 +14,16 @@ if [ "$EUID" -ne 0 ]
exit
fi
-if grep -Eqi "Ubuntu" /etc/issue || grep -Eq "Ubuntu" /etc/*-release; then
- ln -sf /bin/bash /bin/sh
- #sudo dpkg-reconfigure dash
-fi
-
-if grep -Eqi "Debian" /etc/issue || grep -Eq "Debian" /etc/*-release; then
- ln -sf /bin/bash /bin/sh
-fi
if [ ${_os} == "Darwin" ]; then
OSNAME='macos'
+elif grep -Eq "openSUSE" /etc/*-release; then
+ OSNAME='opensuse'
+ zypper refresh
+elif grep -Eq "FreeBSD" /etc/*-release; then
+ OSNAME='freebsd'
+elif grep -Eqi "Arch" /etc/issue || grep -Eq "Arch" /etc/*-release; then
+ OSNAME='arch'
elif grep -Eqi "CentOS" /etc/issue || grep -Eq "CentOS" /etc/*-release; then
OSNAME='centos'
yum install -y wget zip unzip
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--------------------------------------------- #