mirror of
https://github.com/midoks/mdserver-web.git
synced 2026-10-10 01:29:26 +08:00
@@ -5,9 +5,9 @@ name: MW APP MySQL80
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "master","dev" ]
|
||||
branches: [ "master" ]
|
||||
pull_request:
|
||||
branches: [ "master","dev" ]
|
||||
branches: [ "master" ]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
@@ -31,11 +31,6 @@ jobs:
|
||||
sudo bash scripts/install_dev.sh
|
||||
- name: Install MySQL80
|
||||
run: |
|
||||
sudo mkdir -p /tmp
|
||||
sudo cat /www/server/mdserver-web/plugins/mysql/versions/8.0/install.sh > /tmp/t.log
|
||||
sudo echo "export MAKEJN=-j12\n" >> /www/server/mdserver-web/plugins/mysql/versions/8.0/install.sh
|
||||
sudo cat /tmp/t.log >> /www/server/mdserver-web/plugins/mysql/versions/8.0/install.sh
|
||||
|
||||
cd /www/server/mdserver-web/plugins/mysql && sudo bash install.sh install 8.0
|
||||
- name: Start DEBUG
|
||||
run: |
|
||||
|
||||
@@ -1 +1,38 @@
|
||||
# This workflow will install Python dependencies, run tests and lint with a single version of Python
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
|
||||
|
||||
name: MW APP OpenResty
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "master", "dev" ]
|
||||
pull_request:
|
||||
branches: [ "master", "dev" ]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest]
|
||||
runs-on: ${{ matrix.os }}
|
||||
#runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set up Python 3.10
|
||||
uses: actions/setup-python@v3
|
||||
with:
|
||||
python-version: "3.10"
|
||||
- name: Install MW
|
||||
run: |
|
||||
sudo bash scripts/install_dev.sh
|
||||
- name: Install OpenResty
|
||||
run: |
|
||||
cd /www/server/mdserver-web/plugins/openresty && sudo bash install.sh install 1.21.4.1
|
||||
- name: Start DEBUG
|
||||
run: |
|
||||
gunicorn -c setting.py app:app
|
||||
python3 task.py &
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
# This workflow will install Python dependencies, run tests and lint with a single version of Python
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
|
||||
|
||||
name: MW APP PHP
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "master" ]
|
||||
pull_request:
|
||||
branches: [ "master" ]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest]
|
||||
runs-on: ${{ matrix.os }}
|
||||
#runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set up Python 3.10
|
||||
uses: actions/setup-python@v3
|
||||
with:
|
||||
python-version: "3.10"
|
||||
- name: Install MW
|
||||
run: |
|
||||
sudo bash scripts/install_dev.sh
|
||||
- name: Install PHP53
|
||||
run: |
|
||||
cd /www/server/mdserver-web/plugins/php && sudo bash install.sh install 53
|
||||
- name: Install PHP54
|
||||
run: |
|
||||
cd /www/server/mdserver-web/plugins/php && sudo bash install.sh install 54
|
||||
- name: Install PHP55
|
||||
run: |
|
||||
cd /www/server/mdserver-web/plugins/php && sudo bash install.sh install 55
|
||||
- name: Install PHP56
|
||||
run: |
|
||||
cd /www/server/mdserver-web/plugins/php && sudo bash install.sh install 56
|
||||
- name: Install PHP70
|
||||
run: |
|
||||
cd /www/server/mdserver-web/plugins/php && sudo bash install.sh install 70
|
||||
- name: Install PHP71
|
||||
run: |
|
||||
cd /www/server/mdserver-web/plugins/php && sudo bash install.sh install 71
|
||||
- name: Install PHP72
|
||||
run: |
|
||||
cd /www/server/mdserver-web/plugins/php && sudo bash install.sh install 72
|
||||
- name: Install PHP73
|
||||
run: |
|
||||
cd /www/server/mdserver-web/plugins/php && sudo bash install.sh install 73
|
||||
- name: Install PHP74
|
||||
run: |
|
||||
cd /www/server/mdserver-web/plugins/php && sudo bash install.sh install 74
|
||||
- name: Install PHP80
|
||||
run: |
|
||||
cd /www/server/mdserver-web/plugins/php && sudo bash install.sh install 80
|
||||
- name: Install PHP81
|
||||
run: |
|
||||
cd /www/server/mdserver-web/plugins/php && sudo bash install.sh install 81
|
||||
- name: Start DEBUG
|
||||
run: |
|
||||
gunicorn -c setting.py app:app
|
||||
python3 task.py &
|
||||
+3
-1
@@ -135,4 +135,6 @@ plugins/openlitespeed
|
||||
plugins/gdrive/
|
||||
data/ipv6.pl
|
||||
data/restart.pl
|
||||
pip-selfcheck.json
|
||||
pip-selfcheck.json
|
||||
data/ssl.pl
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
### mdserver-web 0.8.6
|
||||
|
||||
简单的Linux面板,感谢BT.CN写出如此好的web管理软件。我一看到,就知道这是我一直想要的页面化管理方式。
|
||||
复制了后台管理界面,按照自己想要的方式写了一版。
|
||||
|
||||
@@ -18,6 +19,8 @@
|
||||
|
||||
基本上可以使用,后续会继续优化!欢迎提供意见!
|
||||
|
||||
- 吹水组 - https://t.me/mdserver_web
|
||||
|
||||
|
||||
### 主要插件介绍
|
||||
* OpenResty - 轻量级,占有内存少,并发能力强。
|
||||
@@ -38,11 +41,6 @@
|
||||
* swap插件[虚拟内存]。
|
||||
|
||||
|
||||
### 问题
|
||||
- OP防火墙,暂不要开启。
|
||||
|
||||
|
||||
|
||||
### GW使用
|
||||
|
||||
- 自动安装
|
||||
|
||||
+22
-16
@@ -191,34 +191,40 @@ class files_api:
|
||||
# self.setFileAccept(path + '/' + filename)
|
||||
return mw.returnJson(True, '已将下载任务添加到队列!')
|
||||
|
||||
# 删除进程下的所有进程
|
||||
def removeTaskRecursion(self, pid):
|
||||
cmd = "ps -ef|grep " + pid + \
|
||||
" | grep -v grep |sed -n '2,1p' | awk '{print $2}'"
|
||||
sub_pid = mw.execShell(cmd)
|
||||
|
||||
if sub_pid[0].strip() == '':
|
||||
return 'ok'
|
||||
|
||||
self.removeTaskRecursion(sub_pid[0].strip())
|
||||
mw.execShell('kill -9 ' + sub_pid[0].strip())
|
||||
return sub_pid[0].strip()
|
||||
|
||||
def removeTaskApi(self):
|
||||
import system_api
|
||||
mid = request.form.get('id', '')
|
||||
try:
|
||||
name = mw.M('tasks').where('id=?', (mid,)).getField('name')
|
||||
status = mw.M('tasks').where('id=?', (mid,)).getField('status')
|
||||
# print(name, status)
|
||||
mw.M('tasks').delete(mid)
|
||||
if status == '-1':
|
||||
os.system(
|
||||
"kill `ps -ef |grep 'python panelSafe.pyc'|grep -v grep|grep -v panelExec|awk '{print $2}'`")
|
||||
os.system(
|
||||
"kill `ps aux | grep 'python task.pyc$'|awk '{print $2}'`")
|
||||
os.system('''
|
||||
pids=`ps aux | grep 'sh'|grep -v grep|grep install|awk '{print $2}'`
|
||||
arr=($pids)
|
||||
task_pid = mw.execShell(
|
||||
"ps aux | grep 'task.py' | grep -v grep |awk '{print $2}'")
|
||||
|
||||
for p in ${arr[@]}
|
||||
do
|
||||
kill -9 $p
|
||||
done
|
||||
''')
|
||||
task_list = task_pid[0].strip().split("\n")
|
||||
for i in range(len(task_list)):
|
||||
self.removeTaskRecursion(task_list[i])
|
||||
|
||||
os.system(
|
||||
'rm -f ' + name.replace('扫描目录[', '').replace(']', '') + '/scan.pl')
|
||||
isTask = mw.getRootDir() + '/tmp/panelTask.pl'
|
||||
mw.writeFile(isTask, 'True')
|
||||
os.system('/etc/init.d/mw start')
|
||||
system_api.system_api().restartTask()
|
||||
except:
|
||||
os.system('/etc/init.d/mw start')
|
||||
system_api.system_api().restartTask()
|
||||
return mw.returnJson(True, '任务已删除!')
|
||||
|
||||
# 上传文件
|
||||
|
||||
@@ -86,9 +86,9 @@ class site_api:
|
||||
name = request.form.get('name', '')
|
||||
import time
|
||||
# 清理旧的
|
||||
defaultSite = mw.readFile('data/defaultSite.pl')
|
||||
if defaultSite:
|
||||
path = self.getHostConf(defaultSite)
|
||||
default_site = mw.readFile('data/default_site.pl')
|
||||
if default_site:
|
||||
path = self.getHostConf(default_site)
|
||||
if os.path.exists(path):
|
||||
conf = mw.readFile(path)
|
||||
rep = "listen\s+80.+;"
|
||||
@@ -106,7 +106,7 @@ class site_api:
|
||||
conf = re.sub(rep, 'listen 443 ssl default_server;', conf, 1)
|
||||
mw.writeFile(path, conf)
|
||||
|
||||
mw.writeFile('data/defaultSite.pl', name)
|
||||
mw.writeFile('data/default_site.pl', name)
|
||||
mw.restartWeb()
|
||||
return mw.returnJson(True, '设置成功!')
|
||||
|
||||
@@ -114,7 +114,7 @@ class site_api:
|
||||
data = {}
|
||||
data['sites'] = mw.M('sites').field(
|
||||
'name').order('id desc').select()
|
||||
data['defaultSite'] = mw.readFile('data/defaultSite.pl')
|
||||
data['default_site'] = mw.readFile('data/default_site.pl')
|
||||
return mw.getJson(data)
|
||||
|
||||
def setPsApi(self):
|
||||
@@ -1653,6 +1653,7 @@ include enable-php-''' % (fix.strip().replace(',', '|'), domains.strip().replace
|
||||
os.makedirs(path)
|
||||
if not mw.isAppleSystem():
|
||||
mw.execShell('chown -R www:www ' + path)
|
||||
mw.writeFile(path + '/index.html', 'Work has started!!!')
|
||||
mw.execShell('chmod -R 755 ' + path)
|
||||
|
||||
def nginxAddDomain(self, webname, domain, port):
|
||||
@@ -1688,6 +1689,7 @@ include enable-php-''' % (fix.strip().replace(',', '|'), domains.strip().replace
|
||||
content = content.replace('{$PORT}', self.sitePort)
|
||||
content = content.replace('{$SERVER_NAME}', self.siteName)
|
||||
content = content.replace('{$ROOT_DIR}', self.sitePath)
|
||||
content = content.replace('{$PHP_DIR}', self.setupPath + '/php')
|
||||
content = content.replace('{$PHPVER}', self.phpVersion)
|
||||
content = content.replace('{$OR_REWRITE}', self.rewritePath)
|
||||
|
||||
|
||||
@@ -102,6 +102,12 @@ class system_api:
|
||||
return mw.returnJson(True, '正在重启服务器!')
|
||||
##### ----- end ----- ###
|
||||
|
||||
def restartTask(self):
|
||||
initd = mw.getRunDir() + '/scripts/init.d/mw'
|
||||
if os.path.exists(initd):
|
||||
os.system(initd + ' ' + 'restart_task')
|
||||
return True
|
||||
|
||||
def restartMw(self):
|
||||
mw.writeFile('data/restart.pl', 'True')
|
||||
return True
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
t.vvv
|
||||
+1
-1
@@ -15,7 +15,7 @@ server
|
||||
#ERROR-PAGE-END
|
||||
|
||||
#PHP-INFO-START
|
||||
include enable-php-{$PHPVER}.conf;
|
||||
include {$PHP_DIR}/conf/enable-php-{$PHPVER}.conf;
|
||||
#PHP-INFO-END
|
||||
|
||||
#REWRITE-START
|
||||
|
||||
+14
-3
@@ -61,6 +61,9 @@ Install_gogs()
|
||||
|
||||
if [ -d $serverPath/gogs ];then
|
||||
echo $version > $serverPath/gogs/version.pl
|
||||
|
||||
cd ${rootPath} && python3 ${rootPath}/plugins/gogs/index.py start
|
||||
cd ${rootPath} && python3 ${rootPath}/plugins/gogs/index.py initd_install
|
||||
fi
|
||||
# if id -u gogs > /dev/null 2>&1; then
|
||||
# echo "gogs user exists"
|
||||
@@ -75,11 +78,19 @@ Install_gogs()
|
||||
|
||||
Uninstall_gogs()
|
||||
{
|
||||
rm -rf $serverPath/gogs
|
||||
if [ -f /usr/lib/systemd/system/gogs.service ];then
|
||||
|
||||
if [ -f /lib/systemd/system/gogs.service ];then
|
||||
systemctl stop gogs
|
||||
rm -rf /usr/lib/systemd/system/gogs.service
|
||||
systemctl disable gogs
|
||||
rm -rf /lib/systemd/system/gogs.service
|
||||
systemctl daemon-reload
|
||||
fi
|
||||
|
||||
if [ -f $serverPath/gogs/initd/gogs ];then
|
||||
$serverPath/gogs/initd/gogs stop
|
||||
fi
|
||||
|
||||
rm -rf $serverPath/gogs
|
||||
echo 'uninstall success' > $install_tmp
|
||||
}
|
||||
|
||||
|
||||
@@ -26,13 +26,28 @@ Install_mem(){
|
||||
echo "./configure --prefix=${serverPath}/memcached && make && make install"
|
||||
cd $serverPath/source/memcached-${VERSION} && ./configure --prefix=$serverPath/memcached && make && make install
|
||||
|
||||
echo '1.6' > $serverPath/memcached/version.pl
|
||||
echo 'install ok' > $install_tmp
|
||||
if [ -d $serverPath/memcached ];then
|
||||
echo '1.6' > $serverPath/memcached/version.pl
|
||||
echo 'install ok' > $install_tmp
|
||||
|
||||
cd ${rootPath} && python3 ${rootPath}/plugins/memcached/index.py start
|
||||
cd ${rootPath} && python3 ${rootPath}/plugins/memcached/index.py initd_install
|
||||
fi
|
||||
}
|
||||
|
||||
Uninstall_mem()
|
||||
{
|
||||
${serverPath}/memcached/init.d/memcached stop
|
||||
|
||||
if [ -f /lib/systemd/system/memcached.service ];then
|
||||
systemctl stop memcached
|
||||
systemctl disable memcached
|
||||
rm -rf /lib/systemd/system/memcached.service
|
||||
systemctl daemon-reload
|
||||
fi
|
||||
|
||||
if [ -f $serverPath/memcached/initd/memcached ];then
|
||||
$serverPath/memcached/initd/memcached stop
|
||||
fi
|
||||
rm -rf $serverPath/memcached
|
||||
}
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ Install_mysql()
|
||||
fi
|
||||
|
||||
if [ ! -f ${mysqlDir}/mysql-boost-8.0.25.tar.gz ];then
|
||||
wget -O ${mysqlDir}/mysql-boost-8.0.25.tar.gz https://cdn.mysql.com/archives/mysql-8.0/mysql-boost-8.0.25.tar.gz
|
||||
wget -O ${mysqlDir}/mysql-boost-8.0.25.tar.gz --tries=3 https://cdn.mysql.com/archives/mysql-8.0/mysql-boost-8.0.25.tar.gz
|
||||
fi
|
||||
|
||||
#检测文件是否损坏.
|
||||
@@ -51,7 +51,7 @@ Install_mysql()
|
||||
else
|
||||
# 重新下载
|
||||
rm -rf ${mysqlDir}/mysql-8.0.25
|
||||
wget -O ${mysqlDir}/mysql-boost-8.0.25.tar.gz https://cdn.mysql.com/archives/mysql-8.0/mysql-boost-8.0.25.tar.gz
|
||||
wget -O ${mysqlDir}/mysql-boost-8.0.25.tar.gz --tries=3 https://cdn.mysql.com/archives/mysql-8.0/mysql-boost-8.0.25.tar.gz
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ http
|
||||
stub_status on;
|
||||
access_log off;
|
||||
}
|
||||
include {$SERVER_PATH}/openresty/nginx/conf/php_status/*.conf;
|
||||
include {$SERVER_PATH}/web_conf/php/status/*.conf;
|
||||
}
|
||||
include {$SERVER_PATH}/web_conf/nginx/vhost/*.conf;
|
||||
}
|
||||
|
||||
+10
-13
@@ -86,15 +86,6 @@ def getInitDTpl():
|
||||
return path
|
||||
|
||||
|
||||
def makeConf():
|
||||
vhost = getServerDir() + '/nginx/conf/vhost'
|
||||
if not os.path.exists(vhost):
|
||||
os.mkdir(vhost)
|
||||
php_status = getServerDir() + '/nginx/conf/php_status'
|
||||
if not os.path.exists(php_status):
|
||||
os.mkdir(php_status)
|
||||
|
||||
|
||||
def getFileOwner(filename):
|
||||
import pwd
|
||||
stat = os.lstat(filename)
|
||||
@@ -136,7 +127,10 @@ def confReplace():
|
||||
mw.writeFile(nconf, content)
|
||||
|
||||
# 静态配置
|
||||
static_conf = getServerDir() + '/nginx/conf/enable-php-00.conf'
|
||||
php_conf = mw.getServerDir() + '/web_conf/php/conf'
|
||||
if not os.path.exists(php_conf):
|
||||
mw.execShell('mkdir -p ' + php_conf)
|
||||
static_conf = mw.getServerDir() + '/web_conf/php/conf/enable-php-00.conf'
|
||||
if not os.path.exists(static_conf):
|
||||
mw.writeFile(static_conf, '')
|
||||
|
||||
@@ -189,9 +183,6 @@ def initDreplace():
|
||||
mw.writeFile(systemService, se_content)
|
||||
mw.execShell('systemctl daemon-reload')
|
||||
|
||||
# make nginx vhost or other
|
||||
makeConf()
|
||||
|
||||
return file_bin
|
||||
|
||||
|
||||
@@ -206,6 +197,12 @@ def status():
|
||||
def restyOp(method):
|
||||
file = initDreplace()
|
||||
|
||||
# 启动时,先检查一下配置文件
|
||||
check = getServerDir() + "/bin/openresty -t"
|
||||
check_data = mw.execShell(check)
|
||||
if not check_data[1].find('test is successful'):
|
||||
return check_data[1]
|
||||
|
||||
if not mw.isAppleSystem():
|
||||
data = mw.execShell('systemctl ' + method + ' openresty')
|
||||
if data[1] == '':
|
||||
|
||||
@@ -49,18 +49,29 @@ Install_openresty()
|
||||
|
||||
if [ -d $serverPath/openresty ];then
|
||||
echo "${VERSION}" > $serverPath/openresty/version.pl
|
||||
echo "" > $serverPath/openresty/nginx/conf/enable-php-00.conf
|
||||
echo "" > $serverPath/web_conf/php/conf/enable-php-00.conf
|
||||
|
||||
#初始化
|
||||
cd ${rootPath} && python3 ${rootPath}/plugins/openresty/index.py start
|
||||
cd ${rootPath} && python3 ${rootPath}/plugins/openresty/index.py initd_install
|
||||
fi
|
||||
echo '安装完成' > $install_tmp
|
||||
}
|
||||
|
||||
Uninstall_openresty()
|
||||
{
|
||||
rm -rf $serverPath/openresty
|
||||
|
||||
|
||||
if [ -f /lib/systemd/system/openresty.service ];then
|
||||
systemctl stop openresty
|
||||
rm -rf /lib/systemd/system/openresty.service
|
||||
systemctl daemon-reload
|
||||
fi
|
||||
|
||||
if [ -f $serverPath/openresty/init.d/openresty ];then
|
||||
$serverPath/openresty/init.d/openresty stop
|
||||
fi
|
||||
|
||||
rm -rf $serverPath/openresty
|
||||
echo '卸载完成' > $install_tmp
|
||||
}
|
||||
|
||||
|
||||
@@ -97,12 +97,12 @@ function orPluginOpServiceOp(a,b,c,d,a,v){
|
||||
}
|
||||
|
||||
if( g.status && g.data != 'ok' ) {
|
||||
layer.msg(g.data, {icon: 2,time: 3000,shade: 0.3,shadeClose: true});
|
||||
layer.msg(g.data, {icon: 2,time: 10000,shade: 0.3});
|
||||
}
|
||||
|
||||
setTimeout(function(){
|
||||
location.reload();
|
||||
},2000);
|
||||
// setTimeout(function(){
|
||||
// location.reload();
|
||||
// },2000);
|
||||
},'json').error(function() {
|
||||
layer.close(e);
|
||||
layer.msg('操作异常!', {icon: 2});
|
||||
|
||||
@@ -4,5 +4,5 @@ location ~ [^/]\.php(/|$)
|
||||
fastcgi_pass unix:/tmp/php-cgi-{$PHP_VERSION}.sock;
|
||||
fastcgi_index index.php;
|
||||
include fastcgi.conf;
|
||||
include pathinfo.conf;
|
||||
include {$SERVER_PATH}/web_conf/php/pathinfo.conf;
|
||||
}
|
||||
+46
-30
@@ -122,37 +122,49 @@ def contentReplace(content, version):
|
||||
def makeOpenrestyConf():
|
||||
phpversions = ['00', '52', '53', '54', '55', '56',
|
||||
'70', '71', '72', '73', '74', '80', '81']
|
||||
if mw.isInstalledWeb():
|
||||
sdir = mw.getServerDir()
|
||||
d_pathinfo = sdir + '/openresty/nginx/conf/pathinfo.conf'
|
||||
if not os.path.exists(d_pathinfo):
|
||||
s_pathinfo = getPluginDir() + '/conf/pathinfo.conf'
|
||||
shutil.copyfile(s_pathinfo, d_pathinfo)
|
||||
|
||||
info = getPluginDir() + '/info.json'
|
||||
content = mw.readFile(info)
|
||||
content = json.loads(content)
|
||||
versions = content['versions']
|
||||
tpl = getPluginDir() + '/conf/enable-php.conf'
|
||||
tpl_content = mw.readFile(tpl)
|
||||
for x in phpversions:
|
||||
dfile = sdir + '/openresty/nginx/conf/enable-php-' + x + '.conf'
|
||||
if not os.path.exists(dfile):
|
||||
if x == '00':
|
||||
mw.writeFile(dfile, '')
|
||||
else:
|
||||
w_content = contentReplace(tpl_content, x)
|
||||
mw.writeFile(dfile, w_content)
|
||||
sdir = mw.getServerDir()
|
||||
|
||||
# php-fpm status
|
||||
for version in phpversions:
|
||||
dfile = sdir + '/openresty/nginx/conf/php_status/phpfpm_status_' + version + '.conf'
|
||||
tpl = getPluginDir() + '/conf/phpfpm_status.conf'
|
||||
if not os.path.exists(dfile):
|
||||
content = mw.readFile(tpl)
|
||||
content = contentReplace(content, version)
|
||||
mw.writeFile(dfile, content)
|
||||
mw.restartWeb()
|
||||
dst_dir = sdir + '/web_conf/php'
|
||||
dst_dir_conf = sdir + '/web_conf/php/conf'
|
||||
dst_dir_status = sdir + '/web_conf/php/status'
|
||||
if not os.path.exists(dst_dir):
|
||||
mw.execShell('mkdir -p ' + dst_dir)
|
||||
|
||||
if not os.path.exists(dst_dir_conf):
|
||||
mw.execShell('mkdir -p ' + dst_dir_conf)
|
||||
|
||||
if not os.path.exists(dst_dir_status):
|
||||
mw.execShell('mkdir -p ' + dst_dir_status)
|
||||
|
||||
d_pathinfo = sdir + '/web_conf/php/pathinfo.conf'
|
||||
if not os.path.exists(d_pathinfo):
|
||||
s_pathinfo = getPluginDir() + '/conf/pathinfo.conf'
|
||||
shutil.copyfile(s_pathinfo, d_pathinfo)
|
||||
|
||||
info = getPluginDir() + '/info.json'
|
||||
content = mw.readFile(info)
|
||||
content = json.loads(content)
|
||||
versions = content['versions']
|
||||
tpl = getPluginDir() + '/conf/enable-php.conf'
|
||||
tpl_content = mw.readFile(tpl)
|
||||
for x in phpversions:
|
||||
dfile = sdir + '/web_conf/php/conf/enable-php-' + x + '.conf'
|
||||
if not os.path.exists(dfile):
|
||||
if x == '00':
|
||||
mw.writeFile(dfile, '')
|
||||
else:
|
||||
w_content = contentReplace(tpl_content, x)
|
||||
mw.writeFile(dfile, w_content)
|
||||
|
||||
# php-fpm status
|
||||
for version in phpversions:
|
||||
dfile = sdir + '/web_conf/php/status/phpfpm_status_' + version + '.conf'
|
||||
tpl = getPluginDir() + '/conf/phpfpm_status.conf'
|
||||
if not os.path.exists(dfile):
|
||||
content = mw.readFile(tpl)
|
||||
content = contentReplace(content, version)
|
||||
mw.writeFile(dfile, content)
|
||||
|
||||
|
||||
def phpPrependFile(version):
|
||||
@@ -537,6 +549,10 @@ def checkFpmStatusFile(version):
|
||||
def getFpmStatus(version):
|
||||
checkFpmStatusFile(version)
|
||||
|
||||
stat = status(version)
|
||||
if stat == 'stop':
|
||||
return mw.returnJson(False, 'PHP[' + version + ']未启动!!!')
|
||||
|
||||
try:
|
||||
url = 'http://' + mw.getHostAddr() + '/phpfpm_status_' + version + '?json'
|
||||
result = mw.httpGet(url)
|
||||
@@ -552,7 +568,7 @@ def getFpmStatus(version):
|
||||
except Exception as e:
|
||||
data = {}
|
||||
|
||||
return mw.getJson(data)
|
||||
return mw.returnJson(True, "OK", data)
|
||||
|
||||
|
||||
def getDisableFunc(version):
|
||||
|
||||
+19
-1
@@ -31,4 +31,22 @@ if [ ! -d $curPath/versions/$2 ];then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
sh -x $curPath/versions/$2/install.sh $1
|
||||
if [ "${action}" == "uninstall" ];then
|
||||
|
||||
if [ -f /lib/systemd/system/php${type}.service ];then
|
||||
systemctl stop php${type}
|
||||
systemctl disable php${type}
|
||||
rm -rf /lib/systemd/system/php${type}.service
|
||||
systemctl daemon-reload
|
||||
fi
|
||||
fi
|
||||
|
||||
cd ${curPath} && sh -x $curPath/versions/$2/install.sh $1
|
||||
|
||||
if [ "${action}" == "install" ];then
|
||||
#初始化
|
||||
cd ${rootPath} && python3 ${rootPath}/plugins/php/index.py start ${type}
|
||||
cd ${rootPath} && python3 ${rootPath}/plugins/php/index.py initd_install ${type}
|
||||
fi
|
||||
|
||||
|
||||
|
||||
@@ -312,7 +312,13 @@ function setFpmConfig(version){
|
||||
|
||||
function getFpmStatus(version){
|
||||
phpPost('get_fpm_status', version, '', function(ret_data){
|
||||
var rdata = $.parseJSON(ret_data.data);
|
||||
var tmp_data = $.parseJSON(ret_data.data);
|
||||
if(!tmp_data.status){
|
||||
layer.msg(tmp_data.msg, { icon: tmp_data.status ? 1 : 2 });
|
||||
return;
|
||||
}
|
||||
|
||||
var rdata = tmp_data.data;
|
||||
var con = "<div style='height:420px;overflow:hidden;'><table class='table table-hover table-bordered GetPHPStatus' style='margin:0;padding:0'>\
|
||||
<tr><th>应用池(pool)</th><td>" + rdata.pool + "</td></tr>\
|
||||
<tr><th>进程管理方式(process manager)</th><td>" + ((rdata['process manager'] == 'dynamic') ? '动态' : '静态') + "</td></tr>\
|
||||
|
||||
Executable
+107
@@ -0,0 +1,107 @@
|
||||
#!/bin/bash
|
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
|
||||
export PATH
|
||||
|
||||
curPath=`pwd`
|
||||
|
||||
rootPath=$(dirname "$curPath")
|
||||
rootPath=$(dirname "$rootPath")
|
||||
rootPath=$(dirname "$rootPath")
|
||||
rootPath=$(dirname "$rootPath")
|
||||
serverPath=$(dirname "$rootPath")
|
||||
sourcePath=${serverPath}/source/php
|
||||
|
||||
actionType=$1
|
||||
version=$2
|
||||
|
||||
LIBNAME=gd
|
||||
LIBV=0
|
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts`
|
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so
|
||||
|
||||
sysName=`uname`
|
||||
if [ "$sysName" == "Darwin" ];then
|
||||
BAK='_bak'
|
||||
else
|
||||
BAK=''
|
||||
fi
|
||||
|
||||
Install_lib()
|
||||
{
|
||||
|
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"`
|
||||
if [ "${isInstall}" != "" ];then
|
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!"
|
||||
return
|
||||
fi
|
||||
|
||||
ln -s /usr/lib64/libjpeg.so /usr/lib/libjpeg.so
|
||||
ln -s /usr/lib64/libpng.so /usr/lib/
|
||||
cp -frp /usr/lib64/libldap* /usr/lib/
|
||||
|
||||
|
||||
if [ ! -f "$extFile" ];then
|
||||
|
||||
if [ ! -d $sourcePath/php${version}/ext ];then
|
||||
cd $serverPath/mdserver-web/plugins/php && /bin/bash install.sh install ${version}
|
||||
fi
|
||||
|
||||
cd $sourcePath/php${version}/ext/${LIBNAME}
|
||||
|
||||
$serverPath/php/$version/bin/phpize
|
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config \
|
||||
--with-gd \
|
||||
--with-jpeg-dir=/usr/lib \
|
||||
--with-freetype-dir=${serverPath}/lib/freetype_old \
|
||||
--enable-gd-native-ttf \
|
||||
--enable-gd-jis-conv
|
||||
|
||||
make clean && make && make install && make clean
|
||||
|
||||
fi
|
||||
|
||||
if [ ! -f "$extFile" ];then
|
||||
echo "ERROR!"
|
||||
return
|
||||
fi
|
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini
|
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
|
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
|
||||
|
||||
$serverPath/php/init.d/php${version} restart
|
||||
echo '==========================================================='
|
||||
echo 'successful!'
|
||||
}
|
||||
|
||||
|
||||
Uninstall_lib()
|
||||
{
|
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then
|
||||
echo "php-$version 未安装,请选择其它版本!"
|
||||
return
|
||||
fi
|
||||
|
||||
if [ ! -f "$extFile" ];then
|
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!"
|
||||
return
|
||||
fi
|
||||
|
||||
echo $serverPath/php/$version/etc/php.ini
|
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini
|
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
|
||||
|
||||
rm -f $extFile
|
||||
$serverPath/php/init.d/php$version reload
|
||||
echo '==============================================='
|
||||
echo 'successful!'
|
||||
}
|
||||
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then
|
||||
Install_lib
|
||||
elif [ "$actionType" == 'uninstall' ];then
|
||||
Uninstall_lib
|
||||
fi
|
||||
@@ -36,19 +36,19 @@ else
|
||||
fi
|
||||
|
||||
|
||||
if [ "$OSNAME" == 'ubuntu' ] || [ "$OSNAME" == 'debian' ] ;then
|
||||
apt install bison=2.4.1
|
||||
if [ "$?" != "0" ]; then
|
||||
echo 'The system version is too high to install'
|
||||
exit 1
|
||||
fi
|
||||
# if [ "$OSNAME" == 'ubuntu' ] || [ "$OSNAME" == 'debian' ] ;then
|
||||
# apt install bison=2.4.1
|
||||
# if [ "$?" != "0" ]; then
|
||||
# echo 'The system version is too high to install'
|
||||
# exit 1
|
||||
# fi
|
||||
|
||||
apt install flex=2.5.4
|
||||
if [ "$?" != "0" ]; then
|
||||
echo 'The system version is too high to install'
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
# apt install flex=2.5.4
|
||||
# if [ "$?" != "0" ]; then
|
||||
# echo 'The system version is too high to install'
|
||||
# exit 1
|
||||
# fi
|
||||
# fi
|
||||
|
||||
|
||||
version=5.2.17
|
||||
@@ -116,32 +116,26 @@ if [ $sysName == 'Darwin' ]; then
|
||||
OPTIONS="${OPTIONS} --with-curl=${serverPath}/lib/curl"
|
||||
else
|
||||
OPTIONS="--with-iconv=${serverPath}/lib/libiconv"
|
||||
OPTIONS="${OPTIONS} --with-freetype-dir=${serverPath}/lib/freetype_old"
|
||||
OPTIONS="${OPTIONS} --with-gd --enable-gd-native-ttf"
|
||||
OPTIONS="${OPTIONS} --with-curl"
|
||||
fi
|
||||
|
||||
|
||||
if [ ! -d $serverPath/php/${PHP_VER} ];then
|
||||
ln -s /usr/lib64/libjpeg.so /usr/lib/libjpeg.so
|
||||
ln -s /usr/lib64/libpng.so /usr/lib/
|
||||
cp -frp /usr/lib64/libldap* /usr/lib/
|
||||
export MYSQL_LIB_DIR=/usr/lib64/mysql
|
||||
|
||||
export MYSQL_LIB_DIR=/usr/lib64/mysql
|
||||
|
||||
cd $sourcePath/php/php${PHP_VER} && ./configure \
|
||||
--prefix=$serverPath/php/${PHP_VER} \
|
||||
--exec-prefix=$serverPath/php/${PHP_VER} \
|
||||
--with-config-file-path=$serverPath/php/${PHP_VER}/etc \
|
||||
--with-zlib-dir=$serverPath/lib/zlib \
|
||||
--enable-xml \
|
||||
--enable-mysqlnd \
|
||||
--enable-shared \
|
||||
--with-mysql=mysqlnd \
|
||||
--enable-embedded-mysqli=shared \
|
||||
--enable-sysvmsg \
|
||||
--enable-sysvsem \
|
||||
--enable-sysvshm \
|
||||
--disable-fileinfo \
|
||||
$OPTIONS \
|
||||
--enable-fastcgi \
|
||||
--enable-fpm
|
||||
|
||||
@@ -48,6 +48,7 @@ else
|
||||
OPTIONS="--with-iconv=${serverPath}/lib/libiconv"
|
||||
OPTIONS="${OPTIONS} --with-freetype-dir=${serverPath}/lib/freetype_old"
|
||||
OPTIONS="${OPTIONS} --with-gd --enable-gd-native-ttf"
|
||||
OPTIONS="${OPTIONS} --with-jpeg --with-jpeg-dir=/usr/lib"
|
||||
OPTIONS="${OPTIONS} --with-curl"
|
||||
fi
|
||||
|
||||
@@ -85,7 +86,7 @@ if [ ! -d $serverPath/php/53 ];then
|
||||
--disable-fileinfo \
|
||||
$OPTIONS \
|
||||
--enable-fpm
|
||||
make clean && make ${MAKEJN:--j2} && make install && make clean
|
||||
make clean && make && make install && make clean
|
||||
fi
|
||||
|
||||
|
||||
|
||||
@@ -42,6 +42,7 @@ else
|
||||
OPTIONS="--with-iconv=${serverPath}/lib/libiconv"
|
||||
OPTIONS="${OPTIONS} --with-freetype-dir=${serverPath}/lib/freetype_old"
|
||||
OPTIONS="${OPTIONS} --with-gd --enable-gd-native-ttf"
|
||||
OPTIONS="${OPTIONS} --with-jpeg --with-jpeg-dir=/usr/lib"
|
||||
OPTIONS="${OPTIONS} --with-curl"
|
||||
fi
|
||||
|
||||
@@ -70,7 +71,7 @@ if [ ! -d $serverPath/php/${PHP_VER} ];then
|
||||
$OPTIONS \
|
||||
--enable-fpm
|
||||
|
||||
make clean && make ${MAKEJN:--j2}
|
||||
make clean && make
|
||||
|
||||
#debian11,没有生成php54 man
|
||||
if [ ! -f sapi/cli/php.1 ];then
|
||||
|
||||
@@ -41,6 +41,7 @@ else
|
||||
OPTIONS="--with-iconv=${serverPath}/lib/libiconv"
|
||||
OPTIONS="${OPTIONS} --with-freetype-dir=${serverPath}/lib/freetype_old"
|
||||
OPTIONS="${OPTIONS} --with-gd --enable-gd-native-ttf"
|
||||
OPTIONS="${OPTIONS} --with-jpeg --with-jpeg-dir=/usr/lib"
|
||||
OPTIONS="${OPTIONS} --with-curl"
|
||||
fi
|
||||
|
||||
@@ -68,7 +69,7 @@ if [ ! -d $serverPath/php/55 ];then
|
||||
--disable-fileinfo \
|
||||
$OPTIONS \
|
||||
--enable-fpm
|
||||
make clean && make ${MAKEJN:--j2} && make install && make clean
|
||||
make clean && make && make install && make clean
|
||||
fi
|
||||
|
||||
#------------------------ install end ------------------------------------#
|
||||
|
||||
@@ -41,6 +41,7 @@ else
|
||||
OPTIONS="--with-iconv=${serverPath}/lib/libiconv"
|
||||
OPTIONS="${OPTIONS} --with-freetype-dir=${serverPath}/lib/freetype_old"
|
||||
OPTIONS="${OPTIONS} --with-gd --enable-gd-native-ttf"
|
||||
OPTIONS="${OPTIONS} --with-jpeg --with-jpeg-dir=/usr/lib"
|
||||
OPTIONS="${OPTIONS} --with-curl"
|
||||
fi
|
||||
|
||||
@@ -71,7 +72,7 @@ if [ ! -d $serverPath/php/56 ];then
|
||||
--disable-fileinfo \
|
||||
$OPTIONS \
|
||||
--enable-fpm
|
||||
make clean && make ${MAKEJN:--j2} && make install && make clean
|
||||
make clean && make && make install && make clean
|
||||
fi
|
||||
|
||||
#------------------------ install end ------------------------------------#
|
||||
|
||||
@@ -41,6 +41,7 @@ else
|
||||
OPTIONS="--with-iconv=${serverPath}/lib/libiconv"
|
||||
OPTIONS="${OPTIONS} --with-freetype-dir=${serverPath}/lib/freetype_old"
|
||||
OPTIONS="${OPTIONS} --with-gd --enable-gd-native-ttf"
|
||||
OPTIONS="${OPTIONS} --with-jpeg --with-jpeg-dir=/usr/lib"
|
||||
OPTIONS="${OPTIONS} --with-curl"
|
||||
fi
|
||||
|
||||
@@ -67,7 +68,7 @@ if [ ! -d $serverPath/php/70 ];then
|
||||
--disable-fileinfo \
|
||||
$OPTIONS \
|
||||
--enable-fpm
|
||||
make clean && make ${MAKEJN:--j2} && make install && make clean
|
||||
make clean && make && make install && make clean
|
||||
fi
|
||||
|
||||
#------------------------ install end ------------------------------------#
|
||||
|
||||
@@ -40,6 +40,7 @@ else
|
||||
OPTIONS="--with-iconv=${serverPath}/lib/libiconv"
|
||||
OPTIONS="${OPTIONS} --with-freetype-dir=${serverPath}/lib/freetype_old"
|
||||
OPTIONS="${OPTIONS} --with-gd --enable-gd-native-ttf"
|
||||
OPTIONS="${OPTIONS} --with-jpeg --with-jpeg-dir=/usr/lib"
|
||||
OPTIONS="${OPTIONS} --with-curl"
|
||||
fi
|
||||
|
||||
@@ -67,7 +68,7 @@ if [ ! -d $serverPath/php/71 ];then
|
||||
--disable-fileinfo \
|
||||
$OPTIONS \
|
||||
--enable-fpm
|
||||
make clean && make ${MAKEJN:--j2} && make install && make clean
|
||||
make clean && make && make install && make clean
|
||||
fi
|
||||
|
||||
#------------------------ install end ------------------------------------#
|
||||
|
||||
@@ -41,6 +41,7 @@ else
|
||||
OPTIONS="--with-iconv=${serverPath}/lib/libiconv"
|
||||
OPTIONS="${OPTIONS} --with-freetype-dir=${serverPath}/lib/freetype_old"
|
||||
OPTIONS="${OPTIONS} --with-gd --enable-gd-native-ttf"
|
||||
OPTIONS="${OPTIONS} --with-jpeg --with-jpeg-dir=/usr/lib"
|
||||
OPTIONS="${OPTIONS} --with-curl"
|
||||
fi
|
||||
|
||||
@@ -68,7 +69,7 @@ if [ ! -d $serverPath/php/72 ];then
|
||||
--disable-fileinfo \
|
||||
$OPTIONS \
|
||||
--enable-fpm
|
||||
make clean && make ${MAKEJN:--j2} && make install && make clean
|
||||
make clean && make && make install && make clean
|
||||
fi
|
||||
|
||||
#------------------------ install end ------------------------------------#
|
||||
|
||||
@@ -44,7 +44,8 @@ if [ $sysName == 'Darwin' ]; then
|
||||
else
|
||||
OPTIONS="--with-iconv=${serverPath}/lib/libiconv"
|
||||
OPTIONS="${OPTIONS} --with-freetype-dir=${serverPath}/lib/freetype_old"
|
||||
OPTIONS="${OPTIONS} --with-gd"
|
||||
OPTIONS="${OPTIONS} --with-gd --enable-gd-native-ttf"
|
||||
OPTIONS="${OPTIONS} --with-jpeg --with-jpeg-dir=/usr/lib"
|
||||
OPTIONS="${OPTIONS} --with-curl"
|
||||
OPTIONS="${OPTIONS} --with-libzip=${serverPath}/lib/libzip"
|
||||
fi
|
||||
@@ -72,7 +73,7 @@ if [ ! -d $serverPath/php/73 ];then
|
||||
--disable-fileinfo \
|
||||
$OPTIONS \
|
||||
--enable-fpm
|
||||
make clean && make ${MAKEJN:--j2} && make install && make clean
|
||||
make clean && make && make install && make clean
|
||||
fi
|
||||
|
||||
#------------------------ install end ------------------------------------#
|
||||
|
||||
Executable
+103
@@ -0,0 +1,103 @@
|
||||
#!/bin/bash
|
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
|
||||
export PATH
|
||||
|
||||
curPath=`pwd`
|
||||
|
||||
rootPath=$(dirname "$curPath")
|
||||
rootPath=$(dirname "$rootPath")
|
||||
rootPath=$(dirname "$rootPath")
|
||||
rootPath=$(dirname "$rootPath")
|
||||
serverPath=$(dirname "$rootPath")
|
||||
sourcePath=${serverPath}/source/php
|
||||
|
||||
actionType=$1
|
||||
version=$2
|
||||
|
||||
LIBNAME=gd
|
||||
LIBV=0
|
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts`
|
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so
|
||||
|
||||
sysName=`uname`
|
||||
if [ "$sysName" == "Darwin" ];then
|
||||
BAK='_bak'
|
||||
else
|
||||
BAK=''
|
||||
fi
|
||||
|
||||
Install_lib()
|
||||
{
|
||||
|
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"`
|
||||
if [ "${isInstall}" != "" ];then
|
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!"
|
||||
return
|
||||
fi
|
||||
|
||||
if [ ! -f "$extFile" ];then
|
||||
|
||||
if [ ! -d $sourcePath/php${version}/ext ];then
|
||||
cd $serverPath/mdserver-web/plugins/php && /bin/bash install.sh install ${version}
|
||||
fi
|
||||
|
||||
cd $sourcePath/php${version}/ext/${LIBNAME}
|
||||
|
||||
$serverPath/php/$version/bin/phpize
|
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config \
|
||||
--enable-gd \
|
||||
--with-webp \
|
||||
--with-xpm \
|
||||
--with-jpeg \
|
||||
--with-freetype \
|
||||
--enable-gd-jis-conv
|
||||
|
||||
make clean && make && make install && make clean
|
||||
|
||||
fi
|
||||
|
||||
if [ ! -f "$extFile" ];then
|
||||
echo "ERROR!"
|
||||
return
|
||||
fi
|
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini
|
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
|
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
|
||||
|
||||
$serverPath/php/init.d/php${version} restart
|
||||
echo '==========================================================='
|
||||
echo 'successful!'
|
||||
}
|
||||
|
||||
|
||||
Uninstall_lib()
|
||||
{
|
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then
|
||||
echo "php-$version 未安装,请选择其它版本!"
|
||||
return
|
||||
fi
|
||||
|
||||
if [ ! -f "$extFile" ];then
|
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!"
|
||||
return
|
||||
fi
|
||||
|
||||
echo $serverPath/php/$version/etc/php.ini
|
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini
|
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
|
||||
|
||||
rm -f $extFile
|
||||
$serverPath/php/init.d/php$version reload
|
||||
echo '==============================================='
|
||||
echo 'successful!'
|
||||
}
|
||||
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then
|
||||
Install_lib
|
||||
elif [ "$actionType" == 'uninstall' ];then
|
||||
Uninstall_lib
|
||||
fi
|
||||
@@ -80,7 +80,7 @@ if [ ! -d $serverPath/php/${PHP_VER} ];then
|
||||
--disable-fileinfo \
|
||||
$OPTIONS \
|
||||
--enable-fpm
|
||||
make ${MAKEJN:--j2} && make install && make clean
|
||||
make && make install && make clean
|
||||
fi
|
||||
#------------------------ install end ------------------------------------#
|
||||
}
|
||||
|
||||
Executable
+103
@@ -0,0 +1,103 @@
|
||||
#!/bin/bash
|
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
|
||||
export PATH
|
||||
|
||||
curPath=`pwd`
|
||||
|
||||
rootPath=$(dirname "$curPath")
|
||||
rootPath=$(dirname "$rootPath")
|
||||
rootPath=$(dirname "$rootPath")
|
||||
rootPath=$(dirname "$rootPath")
|
||||
serverPath=$(dirname "$rootPath")
|
||||
sourcePath=${serverPath}/source/php
|
||||
|
||||
actionType=$1
|
||||
version=$2
|
||||
|
||||
LIBNAME=gd
|
||||
LIBV=0
|
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts`
|
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so
|
||||
|
||||
sysName=`uname`
|
||||
if [ "$sysName" == "Darwin" ];then
|
||||
BAK='_bak'
|
||||
else
|
||||
BAK=''
|
||||
fi
|
||||
|
||||
Install_lib()
|
||||
{
|
||||
|
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"`
|
||||
if [ "${isInstall}" != "" ];then
|
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!"
|
||||
return
|
||||
fi
|
||||
|
||||
if [ ! -f "$extFile" ];then
|
||||
|
||||
if [ ! -d $sourcePath/php${version}/ext ];then
|
||||
cd $serverPath/mdserver-web/plugins/php && /bin/bash install.sh install ${version}
|
||||
fi
|
||||
|
||||
cd $sourcePath/php${version}/ext/${LIBNAME}
|
||||
|
||||
$serverPath/php/$version/bin/phpize
|
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config \
|
||||
--enable-gd \
|
||||
--with-webp \
|
||||
--with-xpm \
|
||||
--with-jpeg \
|
||||
--with-freetype \
|
||||
--enable-gd-jis-conv
|
||||
|
||||
make clean && make && make install && make clean
|
||||
|
||||
fi
|
||||
|
||||
if [ ! -f "$extFile" ];then
|
||||
echo "ERROR!"
|
||||
return
|
||||
fi
|
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini
|
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
|
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
|
||||
|
||||
$serverPath/php/init.d/php${version} restart
|
||||
echo '==========================================================='
|
||||
echo 'successful!'
|
||||
}
|
||||
|
||||
|
||||
Uninstall_lib()
|
||||
{
|
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then
|
||||
echo "php-$version 未安装,请选择其它版本!"
|
||||
return
|
||||
fi
|
||||
|
||||
if [ ! -f "$extFile" ];then
|
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!"
|
||||
return
|
||||
fi
|
||||
|
||||
echo $serverPath/php/$version/etc/php.ini
|
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini
|
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
|
||||
|
||||
rm -f $extFile
|
||||
$serverPath/php/init.d/php$version reload
|
||||
echo '==============================================='
|
||||
echo 'successful!'
|
||||
}
|
||||
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then
|
||||
Install_lib
|
||||
elif [ "$actionType" == 'uninstall' ];then
|
||||
Uninstall_lib
|
||||
fi
|
||||
@@ -78,7 +78,7 @@ if [ ! -d $serverPath/php/${PHP_VER} ];then
|
||||
--disable-fileinfo \
|
||||
$OPTIONS \
|
||||
--enable-fpm
|
||||
make clean && make ${MAKEJN:--j2} && make install && make clean
|
||||
make clean && make && make install && make clean
|
||||
fi
|
||||
#------------------------ install end ------------------------------------#
|
||||
}
|
||||
|
||||
Executable
+103
@@ -0,0 +1,103 @@
|
||||
#!/bin/bash
|
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
|
||||
export PATH
|
||||
|
||||
curPath=`pwd`
|
||||
|
||||
rootPath=$(dirname "$curPath")
|
||||
rootPath=$(dirname "$rootPath")
|
||||
rootPath=$(dirname "$rootPath")
|
||||
rootPath=$(dirname "$rootPath")
|
||||
serverPath=$(dirname "$rootPath")
|
||||
sourcePath=${serverPath}/source/php
|
||||
|
||||
actionType=$1
|
||||
version=$2
|
||||
|
||||
LIBNAME=gd
|
||||
LIBV=0
|
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts`
|
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so
|
||||
|
||||
sysName=`uname`
|
||||
if [ "$sysName" == "Darwin" ];then
|
||||
BAK='_bak'
|
||||
else
|
||||
BAK=''
|
||||
fi
|
||||
|
||||
Install_lib()
|
||||
{
|
||||
|
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"`
|
||||
if [ "${isInstall}" != "" ];then
|
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!"
|
||||
return
|
||||
fi
|
||||
|
||||
if [ ! -f "$extFile" ];then
|
||||
|
||||
if [ ! -d $sourcePath/php${version}/ext ];then
|
||||
cd $serverPath/mdserver-web/plugins/php && /bin/bash install.sh install ${version}
|
||||
fi
|
||||
|
||||
cd $sourcePath/php${version}/ext/${LIBNAME}
|
||||
|
||||
$serverPath/php/$version/bin/phpize
|
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config \
|
||||
--enable-gd \
|
||||
--with-webp \
|
||||
--with-xpm \
|
||||
--with-jpeg \
|
||||
--with-freetype \
|
||||
--enable-gd-jis-conv
|
||||
|
||||
make clean && make && make install && make clean
|
||||
|
||||
fi
|
||||
|
||||
if [ ! -f "$extFile" ];then
|
||||
echo "ERROR!"
|
||||
return
|
||||
fi
|
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini
|
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
|
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
|
||||
|
||||
$serverPath/php/init.d/php${version} restart
|
||||
echo '==========================================================='
|
||||
echo 'successful!'
|
||||
}
|
||||
|
||||
|
||||
Uninstall_lib()
|
||||
{
|
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then
|
||||
echo "php-$version 未安装,请选择其它版本!"
|
||||
return
|
||||
fi
|
||||
|
||||
if [ ! -f "$extFile" ];then
|
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!"
|
||||
return
|
||||
fi
|
||||
|
||||
echo $serverPath/php/$version/etc/php.ini
|
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini
|
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
|
||||
|
||||
rm -f $extFile
|
||||
$serverPath/php/init.d/php$version reload
|
||||
echo '==============================================='
|
||||
echo 'successful!'
|
||||
}
|
||||
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then
|
||||
Install_lib
|
||||
elif [ "$actionType" == 'uninstall' ];then
|
||||
Uninstall_lib
|
||||
fi
|
||||
@@ -51,7 +51,6 @@ if [ $sysName == 'Darwin' ]; then
|
||||
else
|
||||
OPTIONS="--with-iconv=${serverPath}/lib/libiconv"
|
||||
OPTIONS="${OPTIONS} --with-freetype-dir=${serverPath}/lib/freetype"
|
||||
OPTIONS="${OPTIONS} --with-gd"
|
||||
OPTIONS="${OPTIONS} --with-curl"
|
||||
OPTIONS="${OPTIONS} --with-libzip=${serverPath}/lib/libzip"
|
||||
fi
|
||||
@@ -83,7 +82,7 @@ if [ ! -d $serverPath/php/${PHP_VER} ];then
|
||||
--disable-fileinfo \
|
||||
$OPTIONS \
|
||||
--enable-fpm
|
||||
make clean && make ${MAKEJN:--j2} && make install && make clean
|
||||
make clean && make && make install && make clean
|
||||
fi
|
||||
#------------------------ install end ------------------------------------#
|
||||
}
|
||||
|
||||
@@ -140,6 +140,19 @@
|
||||
"shell": "exif.sh",
|
||||
"check": "exif.so"
|
||||
},
|
||||
{
|
||||
"name": "gd",
|
||||
"versions": [
|
||||
"52",
|
||||
"74",
|
||||
"80",
|
||||
"81"
|
||||
],
|
||||
"type": "通用扩展",
|
||||
"msg": "通用GD库!",
|
||||
"shell": "gd.sh",
|
||||
"check": "gd.so"
|
||||
},
|
||||
{
|
||||
"name": "intl",
|
||||
"versions": [
|
||||
|
||||
@@ -6,7 +6,7 @@ server
|
||||
root {$SERVER_PATH}/phpmyadmin;
|
||||
|
||||
#error_page 404 /404.html;
|
||||
include enable-php-{$PHP_VER}.conf;
|
||||
include {$PHP_CONF_PATH}/enable-php-{$PHP_VER}.conf;
|
||||
|
||||
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
|
||||
{
|
||||
|
||||
@@ -98,8 +98,10 @@ def contentReplace(content):
|
||||
service_path = mw.getServerDir()
|
||||
php_ver = getCachePhpVer()
|
||||
# print php_ver
|
||||
php_conf_dir = mw.getServerDir() + '/web_conf/php/conf'
|
||||
content = content.replace('{$ROOT_PATH}', mw.getRootDir())
|
||||
content = content.replace('{$SERVER_PATH}', service_path)
|
||||
content = content.replace('{$PHP_CONF_PATH}', php_conf_dir)
|
||||
content = content.replace('{$PHP_VER}', php_ver)
|
||||
return content
|
||||
|
||||
|
||||
@@ -28,18 +28,30 @@ Install_redis()
|
||||
cd redis-${VERSION} && make PREFIX=$serverPath/redis install
|
||||
sed '/^ *#/d' redis.conf > $serverPath/redis/redis.conf
|
||||
|
||||
echo "${VERSION}" > $serverPath/redis/version.pl
|
||||
if [ -d $serverPath/redis ];then
|
||||
echo "${VERSION}" > $serverPath/redis/version.pl
|
||||
echo '安装完成' > $install_tmp
|
||||
|
||||
echo '安装完成' > $install_tmp
|
||||
|
||||
cd ${rootPath} && python3 ${rootPath}/plugins/redis/index.py start
|
||||
cd ${rootPath} && python3 ${rootPath}/plugins/redis/index.py initd_install
|
||||
fi
|
||||
}
|
||||
|
||||
Uninstall_redis()
|
||||
{
|
||||
rm -rf $serverPath/redis
|
||||
|
||||
if [ -f /lib/systemd/system/redis.service ];then
|
||||
systemctl stop redis
|
||||
systemctl disable redis
|
||||
rm -rf /lib/systemd/system/redis.service
|
||||
systemctl daemon-reload
|
||||
fi
|
||||
|
||||
if [ -f $serverPath/redis/initd/redis ];then
|
||||
$serverPath/redis/initd/redis stop
|
||||
fi
|
||||
|
||||
rm -rf $serverPath/redis
|
||||
echo "Uninstall_redis" > $install_tmp
|
||||
}
|
||||
|
||||
|
||||
@@ -14,13 +14,26 @@ Install_rsyncd()
|
||||
{
|
||||
echo '正在安装脚本文件...' > $install_tmp
|
||||
mkdir -p $serverPath/rsyncd
|
||||
|
||||
|
||||
echo '1.0' > $serverPath/rsyncd/version.pl
|
||||
echo '安装完成' > $install_tmp
|
||||
|
||||
cd ${rootPath} && python3 ${rootPath}/plugins/rsyncd/index.py start
|
||||
cd ${rootPath} && python3 ${rootPath}/plugins/rsyncd/index.py initd_install
|
||||
}
|
||||
|
||||
Uninstall_rsyncd()
|
||||
{
|
||||
if [ -f /lib/systemd/system/rsyncd.service ];then
|
||||
systemctl stop rsyncd
|
||||
systemctl disable rsyncd
|
||||
rm -rf /lib/systemd/system/rsyncd.service
|
||||
systemctl daemon-reload
|
||||
fi
|
||||
|
||||
if [ -f $serverPath/rsyncd/initd/rsyncd ];then
|
||||
$serverPath/rsyncd/initd/rsyncd stop
|
||||
fi
|
||||
rm -rf $serverPath/rsyncd
|
||||
echo "卸载完成" > $install_tmp
|
||||
}
|
||||
|
||||
@@ -54,15 +54,29 @@ Install_sphinx()
|
||||
fi
|
||||
|
||||
cd ${SPHINX_DIR} && tar -zxvf sphinx-3.1.1.tar.gz
|
||||
|
||||
cp -rf ${SPHINX_DIR}/sphinx-3.1.1/ $serverPath/sphinx/bin
|
||||
|
||||
echo '3.1.1' > $serverPath/sphinx/version.pl
|
||||
echo '安装完成' > $install_tmp
|
||||
if [ -d $serverPath/sphinx ];then
|
||||
echo '3.1.1' > $serverPath/sphinx/version.pl
|
||||
echo '安装完成' > $install_tmp
|
||||
cd ${rootPath} && python3 ${rootPath}/plugins/sphinx/index.py start
|
||||
cd ${rootPath} && python3 ${rootPath}/plugins/sphinx/index.py initd_install
|
||||
fi
|
||||
}
|
||||
|
||||
Uninstall_sphinx()
|
||||
{
|
||||
if [ -f /lib/systemd/system/sphinx.service ];then
|
||||
systemctl stop sphinx
|
||||
systemctl disable sphinx
|
||||
rm -rf /lib/systemd/system/sphinx.service
|
||||
systemctl daemon-reload
|
||||
fi
|
||||
|
||||
if [ -f $serverPath/sphinx/initd/sphinx ];then
|
||||
$serverPath/sphinx/initd/sphinx stop
|
||||
fi
|
||||
|
||||
rm -rf $serverPath/sphinx
|
||||
echo "Uninstall_sphinx" > $install_tmp
|
||||
}
|
||||
|
||||
+16
-1
@@ -29,16 +29,31 @@ Install_swap()
|
||||
fi
|
||||
|
||||
echo '安装完成' > $install_tmp
|
||||
|
||||
cd ${rootPath} && python3 ${rootPath}/plugins/swap/index.py start
|
||||
cd ${rootPath} && python3 ${rootPath}/plugins/swap/index.py initd_install
|
||||
}
|
||||
|
||||
Uninstall_swap()
|
||||
{
|
||||
swapoff $serverPath/swap/swapfile
|
||||
rm -rf $serverPath/swap
|
||||
|
||||
if [ -f /lib/systemd/system/swap.service ];then
|
||||
rm -rf /lib/systemd/system/swap.service
|
||||
fi
|
||||
|
||||
if [ -f /lib/systemd/system/swap.service ];then
|
||||
systemctl stop swap
|
||||
systemctl disable swap
|
||||
rm -rf /lib/systemd/system/swap.service
|
||||
systemctl daemon-reload
|
||||
fi
|
||||
|
||||
if [ -f $serverPath/swap/initd/swap ];then
|
||||
$serverPath/swap/initd/swap stop
|
||||
fi
|
||||
|
||||
rm -rf $serverPath/swap
|
||||
|
||||
echo "Uninstall_swap" > $install_tmp
|
||||
}
|
||||
|
||||
@@ -922,7 +922,7 @@ function setIndex(id){
|
||||
|
||||
//设置默认站点
|
||||
function setDefaultSite(){
|
||||
var name = $("#defaultSite").val();
|
||||
var name = $("#default_site").val();
|
||||
var loadT = layer.msg('正在处理,请稍候...',{icon:16,time:0,shade: [0.3, '#000']});
|
||||
$.post('/site/set_default_site','name='+name,function(rdata){
|
||||
layer.closeAll();
|
||||
@@ -938,7 +938,7 @@ function getDefaultSite(){
|
||||
var selected = '';
|
||||
for(var i=0;i<rdata.sites.length;i++){
|
||||
selected = '';
|
||||
if(rdata.defaultSite == rdata.sites[i].name) selected = 'selected';
|
||||
if(rdata.default_site == rdata.sites[i].name) selected = 'selected';
|
||||
opt += '<option value="' + rdata.sites[i].name + '" ' + selected + '>' + rdata.sites[i].name + '</option>';
|
||||
}
|
||||
|
||||
@@ -952,7 +952,7 @@ function getDefaultSite(){
|
||||
content:'<div class="bt-form ptb15 pb70">\
|
||||
<p class="line">\
|
||||
<span class="tname text-right">默认站点</span>\
|
||||
<select id="defaultSite" class="bt-input-text" style="width: 300px;">'+opt+'</select>\
|
||||
<select id="default_site" class="bt-input-text" style="width: 300px;">'+opt+'</select>\
|
||||
</p>\
|
||||
<ul class="help-info-text c6 plr20">\
|
||||
<li>设置默认站点后,所有未绑定的域名和IP都被定向到默认站点</li>\
|
||||
|
||||
@@ -184,6 +184,9 @@ case "$1" in
|
||||
'restart_panel')
|
||||
mw_stop_panel
|
||||
mw_start_panel;;
|
||||
'restart_task')
|
||||
mw_stop_task
|
||||
mw_start_task;;
|
||||
'status') mw_status;;
|
||||
'logs') error_logs;;
|
||||
'default')
|
||||
|
||||
@@ -77,6 +77,9 @@ dnf install -y lsof net-tools
|
||||
dnf install -y ncurses-devel cmake
|
||||
dnf --enablerepo=crb install mysql-devel
|
||||
|
||||
for yumPack in make cmake gcc gcc-c++ gcc-g77 flex bison file libtool libtool-libs autoconf kernel-devel patch wget libjpeg libjpeg-devel libpng libpng-devel libpng10 libpng10-devel gd gd-devel libxml2 libxml2-devel zlib zlib-devel glib2 glib2-devel tar bzip2 bzip2-devel libevent libevent-devel ncurses ncurses-devel curl curl-devel libcurl libcurl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel libidn libidn-devel vim-minimal gettext gettext-devel ncurses-devel gmp-devel pspell-devel libcap diffutils ca-certificates net-tools libc-client-devel psmisc libXpm-devel git-core c-ares-devel libicu-devel libxslt libxslt-devel zip unzip glibc.i686 libstdc++.so.6 cairo-devel bison-devel ncurses-devel libaio-devel perl perl-devel perl-Data-Dumper lsof vixie-cron crontabs expat-devel readline-devel;
|
||||
do yum -y install $yumPack;done
|
||||
|
||||
|
||||
cd /www/server/mdserver-web/scripts && bash lib.sh
|
||||
chmod 755 /www/server/mdserver-web/data
|
||||
|
||||
@@ -83,7 +83,11 @@ yum install -y python-imaging libicu-devel zip bzip2-devel gcc libxml2 libxml2-d
|
||||
yum install -y libjpeg-devel libpng-devel libwebp libwebp-devel
|
||||
yum install -y lsof net-tools
|
||||
yum install -y ncurses-devel cmake
|
||||
yum install -y MySQL-python
|
||||
yum install -y MySQL-python
|
||||
|
||||
|
||||
for yumPack in make cmake gcc gcc-c++ gcc-g77 flex bison file libtool libtool-libs autoconf kernel-devel patch wget libjpeg libjpeg-devel libpng libpng-devel libpng10 libpng10-devel gd gd-devel libxml2 libxml2-devel zlib zlib-devel glib2 glib2-devel tar bzip2 bzip2-devel libevent libevent-devel ncurses ncurses-devel curl curl-devel libcurl libcurl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel libidn libidn-devel vim-minimal gettext gettext-devel ncurses-devel gmp-devel pspell-devel libcap diffutils ca-certificates net-tools libc-client-devel psmisc libXpm-devel git-core c-ares-devel libicu-devel libxslt libxslt-devel zip unzip glibc.i686 libstdc++.so.6 cairo-devel bison-devel ncurses-devel libaio-devel perl perl-devel perl-Data-Dumper lsof vixie-cron crontabs expat-devel readline-devel;
|
||||
do yum -y install $yumPack;done
|
||||
|
||||
|
||||
cd /www/server/mdserver-web/scripts && bash lib.sh
|
||||
|
||||
@@ -78,7 +78,8 @@ yum -y install python-devel
|
||||
yum -y install MySQL-python
|
||||
yum -y install python3-devel
|
||||
|
||||
|
||||
for yumPack in make cmake gcc gcc-c++ gcc-g77 flex bison file libtool libtool-libs autoconf kernel-devel patch wget libjpeg libjpeg-devel libpng libpng-devel libpng10 libpng10-devel gd gd-devel libxml2 libxml2-devel zlib zlib-devel glib2 glib2-devel tar bzip2 bzip2-devel libevent libevent-devel ncurses ncurses-devel curl curl-devel libcurl libcurl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel libidn libidn-devel vim-minimal gettext gettext-devel ncurses-devel gmp-devel pspell-devel libcap diffutils ca-certificates net-tools libc-client-devel psmisc libXpm-devel git-core c-ares-devel libicu-devel libxslt libxslt-devel zip unzip glibc.i686 libstdc++.so.6 cairo-devel bison-devel ncurses-devel libaio-devel perl perl-devel perl-Data-Dumper lsof vixie-cron crontabs expat-devel readline-devel;
|
||||
do yum -y install $yumPack;done
|
||||
|
||||
cd /www/server/mdserver-web/scripts && bash lib.sh
|
||||
chmod 755 /www/server/mdserver-web/data
|
||||
|
||||
@@ -40,7 +40,9 @@ pip3 install mysqlclient
|
||||
|
||||
chmod 755 $DEV/server/mdserver-web/data
|
||||
if [ -f $DEV/server/mdserver-web/bin/activate ];then
|
||||
cd $DEV/server/mdserver-web && python3 -m venv $DEV/server/mdserver-web && source $DEV/server/mdserver-web/bin/activate && pip3 install -r $DEV/server/mdserver-web/requirements.txt
|
||||
cd $DEV/server/mdserver-web && python3 -m venv $DEV/server/mdserver-web
|
||||
source $DEV/server/mdserver-web/bin/activate
|
||||
pip3 install -r $DEV/server/mdserver-web/requirements.txt
|
||||
else
|
||||
cd $DEV/server/mdserver-web && pip3 install -r $DEV/server/mdserver-web/requirements.txt
|
||||
fi
|
||||
|
||||
@@ -76,6 +76,8 @@ yum install -y lsof net-tools
|
||||
yum install -y ncurses-devel mysql-devel cmake
|
||||
yum install -y MySQL-python
|
||||
|
||||
for yumPack in make cmake gcc gcc-c++ gcc-g77 flex bison file libtool libtool-libs autoconf kernel-devel patch wget libjpeg libjpeg-devel libpng libpng-devel libpng10 libpng10-devel gd gd-devel libxml2 libxml2-devel zlib zlib-devel glib2 glib2-devel tar bzip2 bzip2-devel libevent libevent-devel ncurses ncurses-devel curl curl-devel libcurl libcurl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel libidn libidn-devel vim-minimal gettext gettext-devel ncurses-devel gmp-devel pspell-devel libcap diffutils ca-certificates net-tools libc-client-devel psmisc libXpm-devel git-core c-ares-devel libicu-devel libxslt libxslt-devel zip unzip glibc.i686 libstdc++.so.6 cairo-devel bison-devel ncurses-devel libaio-devel perl perl-devel perl-Data-Dumper lsof vixie-cron crontabs expat-devel readline-devel;
|
||||
do yum -y install $yumPack;done
|
||||
|
||||
cd /www/server/mdserver-web/scripts && bash lib.sh
|
||||
chmod 755 /www/server/mdserver-web/data
|
||||
|
||||
+1
-23
@@ -202,28 +202,6 @@ Install_OpenSSL()
|
||||
echo -e "Install_OpenSSL" >> ${libPath}/lib.pl
|
||||
}
|
||||
|
||||
Install_Lib()
|
||||
{
|
||||
if [ -f "/www/server/nginx/sbin/nginx" ] || [ -f "/www/server/apache/bin/httpd" ] || [ -f "/www/server/mysql/bin/mysql" ]; then
|
||||
return
|
||||
fi
|
||||
lockFile='${libPath}/data/mw_lib.lock'
|
||||
if [ ! -f "${lockFile}" ];then
|
||||
sed -i "s#SELINUX=enforcing#SELINUX=disabled#" /etc/selinux/config
|
||||
rpm -e --nodeps mariadb-libs-*
|
||||
|
||||
mv /etc/yum.repos.d/epel.repo /etc/yum.repos.d/epel.repo.backup
|
||||
rm -f /var/run/yum.pid
|
||||
for yumPack in make cmake gcc gcc-c++ gcc-g77 flex bison file libtool libtool-libs autoconf kernel-devel patch wget libjpeg libjpeg-devel libpng libpng-devel libpng10 libpng10-devel gd gd-devel libxml2 libxml2-devel zlib zlib-devel glib2 glib2-devel tar bzip2 bzip2-devel libevent libevent-devel ncurses ncurses-devel curl curl-devel libcurl libcurl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel libidn libidn-devel openssl openssl-devel vim-minimal gettext gettext-devel ncurses-devel gmp-devel pspell-devel libcap diffutils ca-certificates net-tools libc-client-devel psmisc libXpm-devel git-core c-ares-devel libicu-devel libxslt libxslt-devel zip unzip glibc.i686 libstdc++.so.6 cairo-devel bison-devel ncurses-devel libaio-devel perl perl-devel perl-Data-Dumper lsof pcre pcre-devel vixie-cron crontabs expat-devel readline-devel;
|
||||
do yum -y install $yumPack;done
|
||||
|
||||
mv /etc/yum.repos.d/epel.repo.backup /etc/yum.repos.d/epel.repo
|
||||
groupadd www
|
||||
useradd -s /sbin/nologin -M -g www www
|
||||
echo 'true' > $lockFile
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
Install_Curl()
|
||||
{
|
||||
@@ -337,7 +315,7 @@ else
|
||||
yum install -y bison re2c cmake
|
||||
|
||||
yum install -y libmemcached libmemcached-devel
|
||||
yum install -y curl-devel
|
||||
yum install -y curl curl-devel
|
||||
yum install -y zlib zlib-devel
|
||||
yum install -y libzip libzip-devel
|
||||
yum install -y pcre pcre-devel
|
||||
|
||||
Reference in New Issue
Block a user