mirror of
https://github.com/midoks/mdserver-web.git
synced 2026-10-10 01:29:26 +08:00
Merge remote-tracking branch 'mikods/dev' into dev
This commit is contained in:
@@ -142,3 +142,4 @@ data/edate.pl
|
||||
plugins/l2tp
|
||||
plugins/openlitespeed
|
||||
plugins/gdrive
|
||||
debug.out
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ class config_api:
|
||||
# 本版解决自启动问题
|
||||
# 文件管理重命名
|
||||
# 优化计划任务管理
|
||||
__version = '0.8.6.1'
|
||||
__version = '0.8.6.2'
|
||||
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
@@ -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()
|
||||
|
||||
+21
-12
@@ -89,8 +89,8 @@ def setBackupDir(bdir):
|
||||
|
||||
|
||||
def triggerTask():
|
||||
isTask = mw.getRunDir() + '/tmp/panelTask.pl'
|
||||
mw.writeFile(isTask, 'True')
|
||||
isTask = getRunDir() + '/tmp/panelTask.pl'
|
||||
writeFile(isTask, 'True')
|
||||
|
||||
|
||||
def getOs():
|
||||
@@ -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):
|
||||
|
||||
@@ -794,7 +794,7 @@ class plugins_api:
|
||||
return mw.returnJson(True, '删除成功!')
|
||||
|
||||
# shell 调用
|
||||
def run(self, name, func, version, args='', script='index'):
|
||||
def run(self, name, func, version='', args='', script='index'):
|
||||
path = mw.getRunDir() + '/' + self.__plugin_dir + \
|
||||
'/' + name + '/' + script + '.py'
|
||||
py = 'python3 ' + path
|
||||
|
||||
+26
-2
@@ -293,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)
|
||||
|
||||
@@ -829,6 +829,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:
|
||||
@@ -1081,7 +1105,7 @@ class site_api:
|
||||
|
||||
# self.closeHasPwd(get)
|
||||
filename = self.passPath + '/' + siteName + '.pass'
|
||||
print(filename)
|
||||
# print(filename)
|
||||
passconf = username + ':' + mw.hasPwd(password)
|
||||
|
||||
if siteName == 'phpmyadmin':
|
||||
|
||||
@@ -18,7 +18,6 @@ mw_start(){
|
||||
|
||||
|
||||
mw_start_debug(){
|
||||
|
||||
python3 task.py >> $DIR/logs/task.log 2>&1 &
|
||||
gunicorn -b :7200 -k gevent -w 1 app:app
|
||||
}
|
||||
@@ -36,7 +35,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
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
@@ -32,6 +32,11 @@ else
|
||||
OSNAME='unknow'
|
||||
fi
|
||||
|
||||
|
||||
SYS_VERSION_ID=`cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | awk -F "\"" '{print $2}'`
|
||||
|
||||
|
||||
|
||||
Install_app_mac()
|
||||
{
|
||||
|
||||
@@ -45,13 +50,59 @@ Install_app_mac()
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Install_Linux_Ubuntu()
|
||||
{
|
||||
##################### Ubuntu start #####################
|
||||
if [ "$SYS_VERSION_ID" == "22" ]; then
|
||||
echo "Not yet supported"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add -
|
||||
sudo apt install gnupg
|
||||
touch /etc/apt/sources.list.d/mongodb-org-4.4.list
|
||||
lsb_release -dc
|
||||
|
||||
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list
|
||||
##################### Ubuntu end #####################
|
||||
}
|
||||
|
||||
Install_Linux_Debian()
|
||||
{
|
||||
##################### debian start #####################
|
||||
|
||||
##################### debian end #####################
|
||||
}
|
||||
|
||||
|
||||
# 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(){
|
||||
Install_Linux_CentOS()
|
||||
{
|
||||
##################### centos start #####################
|
||||
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
|
||||
fi
|
||||
|
||||
|
||||
rpm -ivh $serverPath/source/mongodb-org-server-${VERSION}-1.el7.x86_64.rpm
|
||||
##################### centos end #####################
|
||||
}
|
||||
|
||||
|
||||
Install_app_linux()
|
||||
{
|
||||
if [ "$OSNAME" == "ubuntu" ];then
|
||||
Install_Linux_Ubuntu
|
||||
elif [ "$OSNAME" == "debian" ];then
|
||||
Install_Linux_Debian
|
||||
elif [ "$OSNAME" == "centos" ];then
|
||||
Install_Linux_CentOS
|
||||
else
|
||||
echo "Not yet supported"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
@@ -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/
|
||||
|
||||
@@ -59,6 +59,15 @@ Install_mysql()
|
||||
cd ${mysqlDir} && tar -zxvf ${mysqlDir}/mysql-boost-8.0.25.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-8.0.25 && ${INSTALL_CMD} \
|
||||
@@ -76,6 +85,7 @@ Install_mysql()
|
||||
-DDEFAULT_COLLATION=utf8mb4_general_ci \
|
||||
-DDOWNLOAD_BOOST=1 \
|
||||
-DFORCE_INSOURCE_BUILD=1 \
|
||||
$OPTIONS \
|
||||
-DCMAKE_C_COMPILER=/usr/bin/gcc \
|
||||
-DCMAKE_CXX_COMPILER=/usr/bin/g++ \
|
||||
-DWITH_BOOST=${mysqlDir}/mysql-8.0.25/boost/
|
||||
|
||||
@@ -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"]
|
||||
}
|
||||
+35
-129
@@ -3,139 +3,45 @@ export PATH=$PATH:/opt/local/bin:/opt/local/sbin:/opt/local/share/man:/usr/local
|
||||
DIR=$(cd "$(dirname "$0")"; pwd)
|
||||
|
||||
|
||||
PHP_VER=53
|
||||
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
|
||||
for ii in $cmd_ext
|
||||
do
|
||||
if [ "install.sh" == "$ii" ];then
|
||||
echo '' > /tmp/t.log
|
||||
else
|
||||
cd $DIR/versions/$PHP_VER && /bin/bash $ii install $PHP_VER
|
||||
fi
|
||||
done
|
||||
echo "php${PHP_VER} -- end"
|
||||
# cd /www/server/mdserver-web/plugins/php && bash all_test.sh
|
||||
|
||||
# cd /www/server/mdserver-web/plugins/php/versions/74/ && bash openssl.sh install 74
|
||||
# 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
|
||||
# for ii in $cmd_ext
|
||||
# do
|
||||
# if [ "install.sh" == "$ii" ];then
|
||||
# echo '' > /tmp/t.log
|
||||
# else
|
||||
# cd $DIR/versions/$PHP_VER && /bin/bash $ii install $PHP_VER
|
||||
# fi
|
||||
# done
|
||||
# echo "php${PHP_VER} -- end"
|
||||
|
||||
|
||||
|
||||
PHP_VER=54
|
||||
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
|
||||
for ii in $cmd_ext
|
||||
do
|
||||
if [ "install.sh" == "$ii" ];then
|
||||
echo '' > /tmp/t.log
|
||||
else
|
||||
cd $DIR/versions/$PHP_VER && /bin/bash $ii install $PHP_VER
|
||||
fi
|
||||
done
|
||||
echo "php${PHP_VER} -- end"
|
||||
|
||||
|
||||
PHP_VER=55
|
||||
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
|
||||
for ii in $cmd_ext
|
||||
do
|
||||
if [ "install.sh" == "$ii" ];then
|
||||
echo '' > /tmp/t.log
|
||||
else
|
||||
cd $DIR/versions/$PHP_VER && /bin/bash $ii install $PHP_VER
|
||||
fi
|
||||
done
|
||||
echo "php${PHP_VER} -- end"
|
||||
|
||||
|
||||
PHP_VER=56
|
||||
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
|
||||
for ii in $cmd_ext
|
||||
do
|
||||
if [ "install.sh" == "$ii" ];then
|
||||
echo '' > /tmp/t.log
|
||||
else
|
||||
cd $DIR/versions/$PHP_VER && /bin/bash $ii install $PHP_VER
|
||||
fi
|
||||
done
|
||||
echo "php${PHP_VER} -- end"
|
||||
|
||||
|
||||
|
||||
PHP_VER=70
|
||||
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
|
||||
for ii in $cmd_ext
|
||||
do
|
||||
if [ "install.sh" == "$ii" ];then
|
||||
echo '' > /tmp/t.log
|
||||
else
|
||||
cd $DIR/versions/$PHP_VER && /bin/bash $ii install $PHP_VER
|
||||
fi
|
||||
done
|
||||
echo "php${PHP_VER} -- end"
|
||||
|
||||
|
||||
PHP_VER=71
|
||||
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
|
||||
for ii in $cmd_ext
|
||||
do
|
||||
if [ "install.sh" == "$ii" ];then
|
||||
echo '' > /tmp/t.log
|
||||
else
|
||||
cd $DIR/versions/$PHP_VER && /bin/bash $ii install $PHP_VER
|
||||
fi
|
||||
done
|
||||
echo "php${PHP_VER} -- end"
|
||||
|
||||
|
||||
PHP_VER=72
|
||||
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
|
||||
for ii in $cmd_ext
|
||||
do
|
||||
if [ "install.sh" == "$ii" ];then
|
||||
echo '' > /tmp/t.log
|
||||
else
|
||||
cd $DIR/versions/$PHP_VER && /bin/bash $ii install $PHP_VER
|
||||
fi
|
||||
done
|
||||
echo "php${PHP_VER} -- end"
|
||||
|
||||
PHP_VER=73
|
||||
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
|
||||
for ii in $cmd_ext
|
||||
do
|
||||
if [ "install.sh" == "$ii" ];then
|
||||
echo '' > /tmp/t.log
|
||||
else
|
||||
cd $DIR/versions/$PHP_VER && /bin/bash $ii install $PHP_VER
|
||||
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
|
||||
do
|
||||
echo "${ii}"
|
||||
if [ "install.sh" == "$ii" ];then
|
||||
echo '' > /tmp/t.log
|
||||
else
|
||||
cd $DIR/versions/$PHP_VER/ && bash $ii install ${PHP_VER}
|
||||
fi
|
||||
done
|
||||
fi
|
||||
echo "php${PHP_VER} -- end"
|
||||
done
|
||||
echo "php${PHP_VER} -- end"
|
||||
|
||||
|
||||
PHP_VER=74
|
||||
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
|
||||
for ii in $cmd_ext
|
||||
do
|
||||
if [ "install.sh" == "$ii" ];then
|
||||
echo '' > /tmp/t.log
|
||||
else
|
||||
cd $DIR/versions/$PHP_VER && /bin/bash $ii install $PHP_VER
|
||||
fi
|
||||
done
|
||||
echo "php${PHP_VER} -- end"
|
||||
|
||||
rm -rf /tmp/t.log
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
+12
-10
@@ -605,20 +605,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', '<?php phpinfo(); ?>')
|
||||
@@ -629,6 +629,8 @@ def getPhpinfo(v):
|
||||
|
||||
|
||||
def get_php_info(args):
|
||||
if not mw.isInstalledWeb():
|
||||
return "openresty is not running!!!"
|
||||
return getPhpinfo(args['version'])
|
||||
|
||||
|
||||
@@ -675,7 +677,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)
|
||||
|
||||
|
||||
@@ -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 -------------------------#
|
||||
@@ -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
|
||||
|
||||
Executable
+96
@@ -0,0 +1,96 @@
|
||||
#!/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
|
||||
|
||||
LIBNAME=ioncube
|
||||
LIBV=0
|
||||
sysName=`uname`
|
||||
actionType=$1
|
||||
version=$2
|
||||
IC_VERSION=${version:0:1}.${version:1:2}
|
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts`
|
||||
extDir=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}
|
||||
extFile=${extDir}/${LIBNAME}.so
|
||||
|
||||
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
|
||||
|
||||
php_lib=$sourcePath/php_lib
|
||||
mkdir -p $php_lib
|
||||
if [ ! -f $php_lib/ioncube_loaders_lin.tar.gz ];then
|
||||
wget -O $php_lib/ioncube_loaders_lin.tar.gz https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
|
||||
cd $php_lib && tar -zxvf ioncube_loaders_lin.tar.gz
|
||||
fi
|
||||
cd $php_lib/ioncube
|
||||
|
||||
cp -rf $php_lib/ioncube/ioncube_loader_lin_${IC_VERSION}.so $extFile
|
||||
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 "zend_extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
|
||||
|
||||
$serverPath/php/init.d/php$version reload
|
||||
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},请选择其它版本!"
|
||||
echo "php-$vphp not install ${LIBNAME}, Plese select other version!"
|
||||
return
|
||||
fi
|
||||
|
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini
|
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
|
||||
|
||||
rm -f $extFile
|
||||
$serverPath/php/init.d/php$version reload
|
||||
echo '==============================================='
|
||||
echo 'successful!'
|
||||
}
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then
|
||||
Install_lib
|
||||
elif [ "$actionType" == 'uninstall' ];then
|
||||
Uninstall_lib
|
||||
fi
|
||||
Executable
+104
@@ -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
|
||||
|
||||
$serverPath/php/init.d/php$version reload
|
||||
echo '==========================================================='
|
||||
echo 'successful!'
|
||||
}
|
||||
|
||||
|
||||
Uninstall_lib()
|
||||
{
|
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then
|
||||
echo "php-$version 未安装,请选择其它版本!"
|
||||
return
|
||||
fi
|
||||
|
||||
if [ ! -f "$extFile" ];then
|
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!"
|
||||
return
|
||||
fi
|
||||
|
||||
echo $serverPath/php/$version/etc/php.ini
|
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini
|
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
|
||||
|
||||
rm -f $extFile
|
||||
$serverPath/php/init.d/php$version reload
|
||||
echo '==============================================='
|
||||
echo 'successful!'
|
||||
}
|
||||
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then
|
||||
Install_lib
|
||||
elif [ "$actionType" == 'uninstall' ];then
|
||||
Uninstall_lib
|
||||
fi
|
||||
Executable
+105
@@ -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
|
||||
|
||||
$serverPath/php/init.d/php$version reload
|
||||
echo '==========================================================='
|
||||
echo 'successful!'
|
||||
}
|
||||
|
||||
|
||||
Uninstall_lib()
|
||||
{
|
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then
|
||||
echo "php-$version 未安装,请选择其它版本!"
|
||||
return
|
||||
fi
|
||||
|
||||
if [ ! -f "$extFile" ];then
|
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!"
|
||||
return
|
||||
fi
|
||||
|
||||
echo $serverPath/php/$version/etc/php.ini
|
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini
|
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
|
||||
|
||||
rm -f $extFile
|
||||
$serverPath/php/init.d/php$version reload
|
||||
echo '==============================================='
|
||||
echo 'successful!'
|
||||
}
|
||||
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then
|
||||
Install_lib
|
||||
elif [ "$actionType" == 'uninstall' ];then
|
||||
Uninstall_lib
|
||||
fi
|
||||
Executable
+96
@@ -0,0 +1,96 @@
|
||||
#!/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
|
||||
|
||||
LIBNAME=ioncube
|
||||
LIBV=0
|
||||
sysName=`uname`
|
||||
actionType=$1
|
||||
version=$2
|
||||
IC_VERSION=${version:0:1}.${version:1:2}
|
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts`
|
||||
extDir=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}
|
||||
extFile=${extDir}/${LIBNAME}.so
|
||||
|
||||
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
|
||||
|
||||
php_lib=$sourcePath/php_lib
|
||||
mkdir -p $php_lib
|
||||
if [ ! -f $php_lib/ioncube_loaders_lin.tar.gz ];then
|
||||
wget -O $php_lib/ioncube_loaders_lin.tar.gz https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
|
||||
cd $php_lib && tar -zxvf ioncube_loaders_lin.tar.gz
|
||||
fi
|
||||
cd $php_lib/ioncube
|
||||
|
||||
cp -rf $php_lib/ioncube/ioncube_loader_lin_${IC_VERSION}.so $extFile
|
||||
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 "zend_extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
|
||||
|
||||
$serverPath/php/init.d/php$version reload
|
||||
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},请选择其它版本!"
|
||||
echo "php-$vphp not install ${LIBNAME}, Plese select other version!"
|
||||
return
|
||||
fi
|
||||
|
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini
|
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
|
||||
|
||||
rm -f $extFile
|
||||
$serverPath/php/init.d/php$version reload
|
||||
echo '==============================================='
|
||||
echo 'successful!'
|
||||
}
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then
|
||||
Install_lib
|
||||
elif [ "$actionType" == 'uninstall' ];then
|
||||
Uninstall_lib
|
||||
fi
|
||||
Executable
+104
@@ -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
|
||||
|
||||
$serverPath/php/init.d/php$version reload
|
||||
echo '==========================================================='
|
||||
echo 'successful!'
|
||||
}
|
||||
|
||||
|
||||
Uninstall_lib()
|
||||
{
|
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then
|
||||
echo "php-$version 未安装,请选择其它版本!"
|
||||
return
|
||||
fi
|
||||
|
||||
if [ ! -f "$extFile" ];then
|
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!"
|
||||
return
|
||||
fi
|
||||
|
||||
echo $serverPath/php/$version/etc/php.ini
|
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini
|
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
|
||||
|
||||
rm -f $extFile
|
||||
$serverPath/php/init.d/php$version reload
|
||||
echo '==============================================='
|
||||
echo 'successful!'
|
||||
}
|
||||
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then
|
||||
Install_lib
|
||||
elif [ "$actionType" == 'uninstall' ];then
|
||||
Uninstall_lib
|
||||
fi
|
||||
@@ -60,7 +60,7 @@ 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
|
||||
echo '==========================================================='
|
||||
|
||||
Executable
+96
@@ -0,0 +1,96 @@
|
||||
#!/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
|
||||
|
||||
LIBNAME=ioncube
|
||||
LIBV=0
|
||||
sysName=`uname`
|
||||
actionType=$1
|
||||
version=$2
|
||||
IC_VERSION=${version:0:1}.${version:1:2}
|
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts`
|
||||
extDir=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}
|
||||
extFile=${extDir}/${LIBNAME}.so
|
||||
|
||||
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
|
||||
|
||||
php_lib=$sourcePath/php_lib
|
||||
mkdir -p $php_lib
|
||||
if [ ! -f $php_lib/ioncube_loaders_lin.tar.gz ];then
|
||||
wget -O $php_lib/ioncube_loaders_lin.tar.gz https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
|
||||
cd $php_lib && tar -zxvf ioncube_loaders_lin.tar.gz
|
||||
fi
|
||||
cd $php_lib/ioncube
|
||||
|
||||
cp -rf $php_lib/ioncube/ioncube_loader_lin_${IC_VERSION}.so $extFile
|
||||
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 "zend_extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
|
||||
|
||||
$serverPath/php/init.d/php$version reload
|
||||
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},请选择其它版本!"
|
||||
echo "php-$vphp not install ${LIBNAME}, Plese select other version!"
|
||||
return
|
||||
fi
|
||||
|
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini
|
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
|
||||
|
||||
rm -f $extFile
|
||||
$serverPath/php/init.d/php$version reload
|
||||
echo '==============================================='
|
||||
echo 'successful!'
|
||||
}
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then
|
||||
Install_lib
|
||||
elif [ "$actionType" == 'uninstall' ];then
|
||||
Uninstall_lib
|
||||
fi
|
||||
Executable
+104
@@ -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
|
||||
|
||||
$serverPath/php/init.d/php$version reload
|
||||
echo '==========================================================='
|
||||
echo 'successful!'
|
||||
}
|
||||
|
||||
|
||||
Uninstall_lib()
|
||||
{
|
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then
|
||||
echo "php-$version 未安装,请选择其它版本!"
|
||||
return
|
||||
fi
|
||||
|
||||
if [ ! -f "$extFile" ];then
|
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!"
|
||||
return
|
||||
fi
|
||||
|
||||
echo $serverPath/php/$version/etc/php.ini
|
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini
|
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
|
||||
|
||||
rm -f $extFile
|
||||
$serverPath/php/init.d/php$version reload
|
||||
echo '==============================================='
|
||||
echo 'successful!'
|
||||
}
|
||||
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then
|
||||
Install_lib
|
||||
elif [ "$actionType" == 'uninstall' ];then
|
||||
Uninstall_lib
|
||||
fi
|
||||
@@ -57,7 +57,7 @@ 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
|
||||
echo '==========================================================='
|
||||
|
||||
@@ -42,7 +42,7 @@ Install_lib()
|
||||
|
||||
php_lib=$sourcePath/php_lib
|
||||
mkdir -p $php_lib
|
||||
if [ ! -d $php_lib/ioncube_loaders_lin.tar.gz ];then
|
||||
if [ ! -f $php_lib/ioncube_loaders_lin.tar.gz ];then
|
||||
wget -O $php_lib/ioncube_loaders_lin.tar.gz https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
|
||||
cd $php_lib && tar -zxvf ioncube_loaders_lin.tar.gz
|
||||
fi
|
||||
@@ -58,7 +58,7 @@ 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
|
||||
echo '==========================================================='
|
||||
|
||||
Executable
+104
@@ -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
|
||||
|
||||
$serverPath/php/init.d/php$version reload
|
||||
echo '==========================================================='
|
||||
echo 'successful!'
|
||||
}
|
||||
|
||||
|
||||
Uninstall_lib()
|
||||
{
|
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then
|
||||
echo "php-$version 未安装,请选择其它版本!"
|
||||
return
|
||||
fi
|
||||
|
||||
if [ ! -f "$extFile" ];then
|
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!"
|
||||
return
|
||||
fi
|
||||
|
||||
echo $serverPath/php/$version/etc/php.ini
|
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini
|
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
|
||||
|
||||
rm -f $extFile
|
||||
$serverPath/php/init.d/php$version reload
|
||||
echo '==============================================='
|
||||
echo 'successful!'
|
||||
}
|
||||
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then
|
||||
Install_lib
|
||||
elif [ "$actionType" == 'uninstall' ];then
|
||||
Uninstall_lib
|
||||
fi
|
||||
@@ -61,7 +61,7 @@ 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
|
||||
echo '==========================================================='
|
||||
|
||||
Executable
+96
@@ -0,0 +1,96 @@
|
||||
#!/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
|
||||
|
||||
LIBNAME=ioncube
|
||||
LIBV=0
|
||||
sysName=`uname`
|
||||
actionType=$1
|
||||
version=$2
|
||||
IC_VERSION=${version:0:1}.${version:1:2}
|
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts`
|
||||
extDir=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}
|
||||
extFile=${extDir}/${LIBNAME}.so
|
||||
|
||||
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
|
||||
|
||||
php_lib=$sourcePath/php_lib
|
||||
mkdir -p $php_lib
|
||||
if [ ! -f $php_lib/ioncube_loaders_lin.tar.gz ];then
|
||||
wget -O $php_lib/ioncube_loaders_lin.tar.gz https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
|
||||
cd $php_lib && tar -zxvf ioncube_loaders_lin.tar.gz
|
||||
fi
|
||||
cd $php_lib/ioncube
|
||||
|
||||
cp -rf $php_lib/ioncube/ioncube_loader_lin_${IC_VERSION}.so $extFile
|
||||
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 "zend_extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
|
||||
|
||||
$serverPath/php/init.d/php$version reload
|
||||
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},请选择其它版本!"
|
||||
echo "php-$vphp not install ${LIBNAME}, Plese select other version!"
|
||||
return
|
||||
fi
|
||||
|
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini
|
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
|
||||
|
||||
rm -f $extFile
|
||||
$serverPath/php/init.d/php$version reload
|
||||
echo '==============================================='
|
||||
echo 'successful!'
|
||||
}
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then
|
||||
Install_lib
|
||||
elif [ "$actionType" == 'uninstall' ];then
|
||||
Uninstall_lib
|
||||
fi
|
||||
@@ -36,20 +36,33 @@ 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
|
||||
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
|
||||
./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
|
||||
|
||||
@@ -59,7 +59,7 @@ 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
|
||||
echo '==========================================================='
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Executable
+96
@@ -0,0 +1,96 @@
|
||||
#!/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
|
||||
|
||||
LIBNAME=ioncube
|
||||
LIBV=0
|
||||
sysName=`uname`
|
||||
actionType=$1
|
||||
version=$2
|
||||
IC_VERSION=${version:0:1}.${version:1:2}
|
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts`
|
||||
extDir=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}
|
||||
extFile=${extDir}/${LIBNAME}.so
|
||||
|
||||
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
|
||||
|
||||
php_lib=$sourcePath/php_lib
|
||||
mkdir -p $php_lib
|
||||
if [ ! -f $php_lib/ioncube_loaders_lin.tar.gz ];then
|
||||
wget -O $php_lib/ioncube_loaders_lin.tar.gz https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
|
||||
cd $php_lib && tar -zxvf ioncube_loaders_lin.tar.gz
|
||||
fi
|
||||
cd $php_lib/ioncube
|
||||
|
||||
cp -rf $php_lib/ioncube/ioncube_loader_lin_${IC_VERSION}.so $extFile
|
||||
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 "zend_extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
|
||||
|
||||
$serverPath/php/init.d/php$version reload
|
||||
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},请选择其它版本!"
|
||||
echo "php-$vphp not install ${LIBNAME}, Plese select other version!"
|
||||
return
|
||||
fi
|
||||
|
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini
|
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
|
||||
|
||||
rm -f $extFile
|
||||
$serverPath/php/init.d/php$version reload
|
||||
echo '==============================================='
|
||||
echo 'successful!'
|
||||
}
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then
|
||||
Install_lib
|
||||
elif [ "$actionType" == 'uninstall' ];then
|
||||
Uninstall_lib
|
||||
fi
|
||||
Executable
+104
@@ -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
|
||||
|
||||
$serverPath/php/init.d/php$version reload
|
||||
echo '==========================================================='
|
||||
echo 'successful!'
|
||||
}
|
||||
|
||||
|
||||
Uninstall_lib()
|
||||
{
|
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then
|
||||
echo "php-$version 未安装,请选择其它版本!"
|
||||
return
|
||||
fi
|
||||
|
||||
if [ ! -f "$extFile" ];then
|
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!"
|
||||
return
|
||||
fi
|
||||
|
||||
echo $serverPath/php/$version/etc/php.ini
|
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini
|
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
|
||||
|
||||
rm -f $extFile
|
||||
$serverPath/php/init.d/php$version reload
|
||||
echo '==============================================='
|
||||
echo 'successful!'
|
||||
}
|
||||
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then
|
||||
Install_lib
|
||||
elif [ "$actionType" == 'uninstall' ];then
|
||||
Uninstall_lib
|
||||
fi
|
||||
@@ -58,7 +58,7 @@ 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
|
||||
echo '==========================================================='
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Executable
+96
@@ -0,0 +1,96 @@
|
||||
#!/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
|
||||
|
||||
LIBNAME=ioncube
|
||||
LIBV=0
|
||||
sysName=`uname`
|
||||
actionType=$1
|
||||
version=$2
|
||||
IC_VERSION=${version:0:1}.${version:1:2}
|
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts`
|
||||
extDir=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}
|
||||
extFile=${extDir}/${LIBNAME}.so
|
||||
|
||||
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
|
||||
|
||||
php_lib=$sourcePath/php_lib
|
||||
mkdir -p $php_lib
|
||||
if [ ! -f $php_lib/ioncube_loaders_lin.tar.gz ];then
|
||||
wget -O $php_lib/ioncube_loaders_lin.tar.gz https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
|
||||
cd $php_lib && tar -zxvf ioncube_loaders_lin.tar.gz
|
||||
fi
|
||||
cd $php_lib/ioncube
|
||||
|
||||
cp -rf $php_lib/ioncube/ioncube_loader_lin_${IC_VERSION}.so $extFile
|
||||
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 "zend_extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
|
||||
|
||||
$serverPath/php/init.d/php$version reload
|
||||
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},请选择其它版本!"
|
||||
echo "php-$vphp not install ${LIBNAME}, Plese select other version!"
|
||||
return
|
||||
fi
|
||||
|
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini
|
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
|
||||
|
||||
rm -f $extFile
|
||||
$serverPath/php/init.d/php$version reload
|
||||
echo '==============================================='
|
||||
echo 'successful!'
|
||||
}
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then
|
||||
Install_lib
|
||||
elif [ "$actionType" == 'uninstall' ];then
|
||||
Uninstall_lib
|
||||
fi
|
||||
@@ -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
|
||||
|
||||
@@ -57,7 +57,7 @@ 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
|
||||
echo '==========================================================='
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Executable
+96
@@ -0,0 +1,96 @@
|
||||
#!/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
|
||||
|
||||
LIBNAME=ioncube
|
||||
LIBV=0
|
||||
sysName=`uname`
|
||||
actionType=$1
|
||||
version=$2
|
||||
IC_VERSION=${version:0:1}.${version:1:2}
|
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts`
|
||||
extDir=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}
|
||||
extFile=${extDir}/${LIBNAME}.so
|
||||
|
||||
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
|
||||
|
||||
php_lib=$sourcePath/php_lib
|
||||
mkdir -p $php_lib
|
||||
if [ ! -f $php_lib/ioncube_loaders_lin.tar.gz ];then
|
||||
wget -O $php_lib/ioncube_loaders_lin.tar.gz https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
|
||||
cd $php_lib && tar -zxvf ioncube_loaders_lin.tar.gz
|
||||
fi
|
||||
cd $php_lib/ioncube
|
||||
|
||||
cp -rf $php_lib/ioncube/ioncube_loader_lin_${IC_VERSION}.so $extFile
|
||||
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 "zend_extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
|
||||
|
||||
$serverPath/php/init.d/php$version reload
|
||||
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},请选择其它版本!"
|
||||
echo "php-$vphp not install ${LIBNAME}, Plese select other version!"
|
||||
return
|
||||
fi
|
||||
|
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini
|
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
|
||||
|
||||
rm -f $extFile
|
||||
$serverPath/php/init.d/php$version reload
|
||||
echo '==============================================='
|
||||
echo 'successful!'
|
||||
}
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then
|
||||
Install_lib
|
||||
elif [ "$actionType" == 'uninstall' ];then
|
||||
Uninstall_lib
|
||||
fi
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -56,7 +56,7 @@ 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
|
||||
echo '==========================================================='
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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`
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Executable
+96
@@ -0,0 +1,96 @@
|
||||
#!/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
|
||||
|
||||
LIBNAME=ioncube
|
||||
LIBV=0
|
||||
sysName=`uname`
|
||||
actionType=$1
|
||||
version=$2
|
||||
IC_VERSION=${version:0:1}.${version:1:2}
|
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts`
|
||||
extDir=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}
|
||||
extFile=${extDir}/${LIBNAME}.so
|
||||
|
||||
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
|
||||
|
||||
php_lib=$sourcePath/php_lib
|
||||
mkdir -p $php_lib
|
||||
if [ ! -f $php_lib/ioncube_loaders_lin.tar.gz ];then
|
||||
wget -O $php_lib/ioncube_loaders_lin.tar.gz https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
|
||||
cd $php_lib && tar -zxvf ioncube_loaders_lin.tar.gz
|
||||
fi
|
||||
cd $php_lib/ioncube
|
||||
|
||||
cp -rf $php_lib/ioncube/ioncube_loader_lin_${IC_VERSION}.so $extFile
|
||||
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 "zend_extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
|
||||
|
||||
$serverPath/php/init.d/php$version reload
|
||||
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},请选择其它版本!"
|
||||
echo "php-$vphp not install ${LIBNAME}, Plese select other version!"
|
||||
return
|
||||
fi
|
||||
|
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini
|
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
|
||||
|
||||
rm -f $extFile
|
||||
$serverPath/php/init.d/php$version reload
|
||||
echo '==============================================='
|
||||
echo 'successful!'
|
||||
}
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then
|
||||
Install_lib
|
||||
elif [ "$actionType" == 'uninstall' ];then
|
||||
Uninstall_lib
|
||||
fi
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -58,7 +58,7 @@ 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
|
||||
echo '==========================================================='
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Executable
+96
@@ -0,0 +1,96 @@
|
||||
#!/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
|
||||
|
||||
LIBNAME=ioncube
|
||||
LIBV=0
|
||||
sysName=`uname`
|
||||
actionType=$1
|
||||
version=$2
|
||||
IC_VERSION=${version:0:1}.${version:1:2}
|
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts`
|
||||
extDir=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}
|
||||
extFile=${extDir}/${LIBNAME}.so
|
||||
|
||||
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
|
||||
|
||||
php_lib=$sourcePath/php_lib
|
||||
mkdir -p $php_lib
|
||||
if [ ! -f $php_lib/ioncube_loaders_lin.tar.gz ];then
|
||||
wget -O $php_lib/ioncube_loaders_lin.tar.gz https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
|
||||
cd $php_lib && tar -zxvf ioncube_loaders_lin.tar.gz
|
||||
fi
|
||||
cd $php_lib/ioncube
|
||||
|
||||
cp -rf $php_lib/ioncube/ioncube_loader_lin_${IC_VERSION}.so $extFile
|
||||
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 "zend_extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
|
||||
|
||||
$serverPath/php/init.d/php$version reload
|
||||
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},请选择其它版本!"
|
||||
echo "php-$vphp not install ${LIBNAME}, Plese select other version!"
|
||||
return
|
||||
fi
|
||||
|
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini
|
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
|
||||
|
||||
rm -f $extFile
|
||||
$serverPath/php/init.d/php$version reload
|
||||
echo '==============================================='
|
||||
echo 'successful!'
|
||||
}
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then
|
||||
Install_lib
|
||||
elif [ "$actionType" == 'uninstall' ];then
|
||||
Uninstall_lib
|
||||
fi
|
||||
@@ -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
|
||||
|
||||
@@ -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`
|
||||
|
||||
@@ -60,7 +60,7 @@ 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
|
||||
echo '==========================================================='
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -59,7 +59,7 @@ 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
|
||||
echo '==========================================================='
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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`
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -59,7 +59,7 @@ 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
|
||||
echo '==========================================================='
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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`
|
||||
|
||||
@@ -24,12 +24,21 @@
|
||||
{
|
||||
"name": "ionCube",
|
||||
"versions": [
|
||||
"55"
|
||||
"52",
|
||||
"53",
|
||||
"54",
|
||||
"55",
|
||||
"56",
|
||||
"70",
|
||||
"71",
|
||||
"72",
|
||||
"73",
|
||||
"74"
|
||||
],
|
||||
"type": "脚本解密",
|
||||
"msg": "用于解密ionCube Encoder加密脚本!",
|
||||
"shell": "ioncube.sh",
|
||||
"check": "ioncube_loader_lin"
|
||||
"check": "ioncube.so"
|
||||
},
|
||||
{
|
||||
"name": "opcache",
|
||||
@@ -54,6 +63,9 @@
|
||||
{
|
||||
"name": "openssl",
|
||||
"versions": [
|
||||
"53",
|
||||
"54",
|
||||
"55",
|
||||
"56",
|
||||
"71",
|
||||
"72",
|
||||
|
||||
+34
-3
@@ -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
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
+2
-2
@@ -131,8 +131,8 @@ def publicObject(toObject, func, action=None, get=None):
|
||||
return mw.getJson(data)
|
||||
|
||||
|
||||
@app.route("/test")
|
||||
def test():
|
||||
@app.route("/debug")
|
||||
def debug():
|
||||
print(sys.version_info)
|
||||
print(session)
|
||||
os = mw.getOs()
|
||||
|
||||
@@ -163,8 +163,23 @@ function setWebPs(b, e, a) {
|
||||
},'json');
|
||||
}
|
||||
|
||||
function checkWebStatus(){
|
||||
data = syncPost('/site/check_web_status')
|
||||
if (data.status){
|
||||
return true
|
||||
}
|
||||
layer.msg(data.msg,{icon:0,time:3000,shade: [0.3, "#000"]})
|
||||
return false
|
||||
}
|
||||
|
||||
//添加站点
|
||||
function webAdd(type) {
|
||||
checkPass = checkWebStatus()
|
||||
//未开启openresty,不能继续
|
||||
if (!checkPass){
|
||||
return
|
||||
}
|
||||
|
||||
if (type == 1) {
|
||||
var array;
|
||||
var str="";
|
||||
|
||||
@@ -146,17 +146,6 @@ function getSList(isdisplay) {
|
||||
'<td>' + indexshow + '</td>' +
|
||||
'<td style="text-align: right;">' + handle + '</td>' +
|
||||
'</tr>';
|
||||
|
||||
// sBody += '<tr>' +
|
||||
// '<td><span ' + titleClick +
|
||||
// '><img onclick="asyncLoadImage(this,\'/plugins/file?name='+plugin.name+'&f=ico.png\')"src="/plugins/file?name=' + plugin.name +
|
||||
// '&f=ico.png' + '">' + plugin_title + '</span></td>' +
|
||||
// '<td>' + plugin.ps + '</td>' +
|
||||
// '<td>' + softPath + '</td>' +
|
||||
// '<td>' + state + '</td>' +
|
||||
// '<td>' + indexshow + '</td>' +
|
||||
// '<td style="text-align: right;">' + handle + '</td>' +
|
||||
// '</tr>';
|
||||
}
|
||||
|
||||
sBody += pBody;
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.4 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 388 B |
Binary file not shown.
|
Before Width: | Height: | Size: 375 B |
Binary file not shown.
|
Before Width: | Height: | Size: 801 B |
+17
-3
@@ -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
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -95,10 +95,22 @@ chmod 755 /www/server/mdserver-web/data
|
||||
|
||||
|
||||
cd /www/server/mdserver-web && ./cli.sh start
|
||||
sleep 5
|
||||
isStart=`ps -ef|grep 'gunicorn -c setting.py app:app' |grep -v grep|awk '{print $2}'`
|
||||
n=0
|
||||
while [[ ! -f /etc/init.d/mw ]];
|
||||
do
|
||||
echo -e ".\c"
|
||||
sleep 1
|
||||
let n+=1
|
||||
if [ $n -gt 20 ];then
|
||||
echo -e "start mw fail"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
cd /www/server/mdserver-web && ./cli.sh stop
|
||||
cd /www/server/mdserver-web && ./scripts/init.d/mw default
|
||||
cd /www/server/mdserver-web && /etc/init.d/mw stop
|
||||
cd /www/server/mdserver-web && /etc/init.d/mw start
|
||||
cd /www/server/mdserver-web && /etc/init.d/mw default
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -104,11 +104,25 @@ chmod 755 /www/server/mdserver-web/data
|
||||
|
||||
|
||||
cd /www/server/mdserver-web && ./cli.sh start
|
||||
sleep 5
|
||||
isStart=`ps -ef|grep 'gunicorn -c setting.py app:app' |grep -v grep|awk '{print $2}'`
|
||||
n=0
|
||||
while [[ ! -f /etc/init.d/mw ]];
|
||||
do
|
||||
echo -e ".\c"
|
||||
sleep 1
|
||||
let n+=1
|
||||
if [ $n -gt 20 ];then
|
||||
echo -e "start mw fail"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
cd /www/server/mdserver-web && ./cli.sh stop
|
||||
cd /www/server/mdserver-web && ./scripts/init.d/mw default
|
||||
cd /www/server/mdserver-web && /etc/init.d/mw stop
|
||||
cd /www/server/mdserver-web && /etc/init.d/mw start
|
||||
cd /www/server/mdserver-web && /etc/init.d/mw default
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user