Skip to content

Commit

Permalink
Merge pull request #407 from midoks/dev
Browse files Browse the repository at this point in the history
0.14.4
  • Loading branch information
midoks authored May 6, 2023
2 parents 6062699 + 39c6f19 commit a12c4dd
Show file tree
Hide file tree
Showing 15 changed files with 77 additions and 23 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,11 @@ docker run -itd --name mw-server --privileged=true -p 7200:7200 -p 80:80 -p 443:
```


### 版本更新 0.14.3
### 版本更新 0.14.4

* 安装优化,针对oracle中的curl库优化。
* PHP的Composer安装优化。
* 安装优化,redat系列优化。
* PHP74-82在redat的安装修复(oniguruma)。
* 面板端口修改优化。

### JSDelivr安装地址

Expand Down
2 changes: 1 addition & 1 deletion class/core/config_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

class config_api:

__version = '0.14.3'
__version = '0.14.4'
__api_addr = 'data/api.json'

def __init__(self):
Expand Down
7 changes: 6 additions & 1 deletion plugins/php/versions/74/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ sourcePath=${serverPath}/source
sysName=`uname`
install_tmp=${rootPath}/tmp/mw_install.pl


function version_gt() { test "$(echo "$@" | tr " " "\n" | sort -V | head -n 1)" != "$1"; }
function version_le() { test "$(echo "$@" | tr " " "\n" | sort -V | head -n 1)" == "$1"; }
function version_lt() { test "$(echo "$@" | tr " " "\n" | sort -rV | head -n 1)" != "$1"; }
Expand All @@ -29,6 +28,12 @@ cd ${rootPath}/plugins/php/lib && /bin/bash freetype_new.sh
cd ${rootPath}/plugins/php/lib && /bin/bash zlib.sh
cd ${rootPath}/plugins/php/lib && /bin/bash libzip.sh

# redat ge 8
which yum
if [ "$?" == "0" ];then
cd ${rootPath}/plugins/php/lib && /bin/bash oniguruma.sh
fi

if [ ! -d $sourcePath/php/php${PHP_VER} ];then

if [ ! -f $sourcePath/php/php-${version}.tar.xz ];then
Expand Down
6 changes: 6 additions & 0 deletions plugins/php/versions/80/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ mkdir -p $serverPath/php
cd ${rootPath}/plugins/php/lib && /bin/bash freetype_new.sh
cd ${rootPath}/plugins/php/lib && /bin/bash zlib.sh

# redat ge 8
which yum
if [ "$?" == "0" ];then
cd ${rootPath}/plugins/php/lib && /bin/bash oniguruma.sh
fi

if [ ! -d $sourcePath/php/php${PHP_VER} ];then

if [ ! -f $sourcePath/php/php-${version}.tar.xz ];then
Expand Down
5 changes: 5 additions & 0 deletions plugins/php/versions/81/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ mkdir -p $serverPath/php
cd ${rootPath}/plugins/php/lib && /bin/bash freetype_new.sh
cd ${rootPath}/plugins/php/lib && /bin/bash zlib.sh

# redat ge 8
which yum
if [ "$?" == "0" ];then
cd ${rootPath}/plugins/php/lib && /bin/bash oniguruma.sh
fi

if [ ! -d $sourcePath/php/php${PHP_VER} ];then

Expand Down
5 changes: 5 additions & 0 deletions plugins/php/versions/82/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ mkdir -p $serverPath/php
cd ${rootPath}/plugins/php/lib && /bin/bash freetype_new.sh
cd ${rootPath}/plugins/php/lib && /bin/bash zlib.sh

# redat ge 8
which yum
if [ "$?" == "0" ];then
cd ${rootPath}/plugins/php/lib && /bin/bash oniguruma.sh
fi

if [ ! -d $sourcePath/php/php${PHP_VER} ];then

Expand Down
6 changes: 5 additions & 1 deletion route/static/app/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,14 @@ $('input[name="host_ip"]').change(function(){

$('input[name="port"]').change(function(){
var port = $(this).val();
var old_port = $(this).data('port');
$('.btn_port').removeAttr('disabled');
$('.btn_port').unbind().click(function(){
$.post('/config/set_port','port='+port, function(rdata){
showMsg(rdata.msg,function(){window.location.reload();},{icon:rdata.status?1:2},2000);
showMsg(rdata.msg,function(){
window.location.href = window.location.href.replace(old_port,port);
// window.location.reload();
},{icon:rdata.status?1:2},5000);
},'json');
});
});
Expand Down
2 changes: 1 addition & 1 deletion route/templates/default/config.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@

<p class="mtb15">
<span class="set-tit text-right">面板端口</span>
<input id="banport" name="port" class="inputtxt bt-input-text" type="numner" value="{{data['port']}}" maxlength="5">
<input data-port="{{data['port']}}" id="banport" name="port" class="inputtxt bt-input-text" type="numner" value="{{data['port']}}" maxlength="5">
<button type="button" class="btn btn-success btn-sm ml5 btn_port" disabled>保存</button>
<span class="set-info c7">建议端口范围7200 - 65535</span>
</p>
Expand Down
2 changes: 1 addition & 1 deletion scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ elif grep -Eqi "CentOS" /etc/issue || grep -Eqi "CentOS" /etc/*-release; then
OSNAME='rhel'
yum install -y wget curl zip unzip tar crontabs
elif grep -Eqi "Fedora" /etc/issue || grep -Eqi "Fedora" /etc/*-release; then
OSNAME='fedora'
OSNAME='rhel'
yum install -y wget curl zip unzip tar crontabs
elif grep -Eqi "Rocky" /etc/issue || grep -Eqi "Rocky" /etc/*-release; then
OSNAME='rhel'
Expand Down
4 changes: 3 additions & 1 deletion scripts/install/centos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ yum install -y python3-devel
yum install -y python3-pip
yum install -y python-devel
yum install -y vixie-cron
yum install -y curl-devel libmcrypt libmcrypt-devel
yum install -y curl-devel
yum install -y libmcrypt
yum install -y libmcrypt-devel
yum install -y mysql-devel
yum install -y expect

Expand Down
2 changes: 1 addition & 1 deletion scripts/install/fedora.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ yum install -y epel-release

yum install -y libevent libevent-devel zip libmcrypt libmcrypt-devel
yum install -y gcc libffi-devel python-devel openssl-devel
yum install -y curl-devel libmcrypt libmcrypt-devel python3-devel
yum install -y libmcrypt libmcrypt-devel python3-devel

yum install -y wget python-devel python-imaging libicu-devel unzip bzip2-devel gcc libxml2 libxml2-devel libjpeg-devel libpng-devel libwebp libwebp-devel pcre pcre-devel crontabs
yum install -y net-tools
Expand Down
36 changes: 31 additions & 5 deletions scripts/install/rhel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
export LANG=en_US.UTF-8
SYS_ARCH=`arch`

if [ ! -f /usr/bin/applydeltarpm ];then
yum -y provides '*/applydeltarpm'
Expand All @@ -28,6 +29,16 @@ if [ $VERSION_ID -ge 8 ];then
PKGMGR='dnf'
fi

echo "install remi source"
if [ "$VERSION_ID" == "9" ];then
echo "install remi start"
if [ ! -f /etc/yum.repos.d/remi.repo ];then
rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-9.rpm
rpm --import http://rpms.famillecollet.com/RPM-GPG-KEY-remi
fi
echo "install remi end"
fi

#https need
if [ ! -d /root/.acme.sh ];then
curl https://get.acme.sh | sh
Expand Down Expand Up @@ -119,11 +130,25 @@ $PKGMGR groupinstall -y "Development Tools"

if [ $VERSION_ID -ge 8 ];then
# EL8 及以上
if [ $VERSION_ID -ge 9 ];then
REPOS='--enablerepo=appstream,baseos,epel,extras,crb'
else
REPOS='--enablerepo=appstream,baseos,epel,extras,powertools'
fi

# find repo

REPO_LIST=(remi appstream baseos epel extras crb powertools)
REPOS='--enablerepo='
for REPO_VAR in ${REPO_LIST[@]}
do
if [ -f /etc/yum.repos.d/${REPO_VAR}.repo ];then
REPOS="${REPOS},${REPO_VAR}"
fi
done
REPOS=${REPOS//=,/=}
echo "REPOS:${REPOS}"

# if [ $VERSION_ID -ge 9 ];then
# REPOS='--enablerepo=remi,appstream,baseos,epel,extras,crb'
# else
# REPOS='--enablerepo=remi,appstream,baseos,epel,extras,powertools'
# fi

for rpms in gcc gcc-c++ lsof autoconf bzip2 bzip2-devel c-ares-devel \
ca-certificates cairo-devel cmake crontabs curl curl-devel diffutils e2fsprogs e2fsprogs-devel \
Expand All @@ -135,6 +160,7 @@ if [ $VERSION_ID -ge 8 ];then
oniguruma oniguruma-devel patch pcre pcre-devel perl perl-Data-Dumper perl-devel procps psmisc python3-devel \
readline-devel rpcgen sqlite-devel tar unzip vim-minimal wget zip zlib zlib-devel ;
do
# dnf --enablerepo=remi,appstream,baseos,epel,extras,powertools install -y oniguruma5php-devel
dnf $REPOS install -y $rpms;
if [ "$?" != "0" ];then
dnf install -y $rpms;
Expand Down
2 changes: 1 addition & 1 deletion scripts/install_dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ elif grep -Eqi "CentOS" /etc/issue || grep -Eqi "CentOS" /etc/*-release; then
OSNAME='rhel'
yum install -y wget zip unzip
elif grep -Eqi "Fedora" /etc/issue || grep -Eqi "Fedora" /etc/*-release; then
OSNAME='fedora'
OSNAME='rhel'
yum install -y wget zip unzip
elif grep -Eqi "Rocky" /etc/issue || grep -Eqi "Rocky" /etc/*-release; then
OSNAME='rhel'
Expand Down
8 changes: 4 additions & 4 deletions scripts/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,16 @@ elif grep -Eqi "openSUSE" /etc/*-release; then
elif grep -Eqi "FreeBSD" /etc/*-release; then
OSNAME='freebsd'
elif grep -Eqi "CentOS" /etc/issue || grep -Eqi "CentOS" /etc/*-release; then
OSNAME='centos'
OSNAME='rhel'
yum install -y wget zip unzip
elif grep -Eqi "Fedora" /etc/issue || grep -Eqi "Fedora" /etc/*-release; then
OSNAME='fedora'
OSNAME='rhel'
yum install -y wget zip unzip
elif grep -Eqi "Rocky" /etc/issue || grep -Eqi "Rocky" /etc/*-release; then
OSNAME='rocky'
OSNAME='rhel'
yum install -y wget zip unzip
elif grep -Eqi "AlmaLinux" /etc/issue || grep -Eqi "AlmaLinux" /etc/*-release; then
OSNAME='alma'
OSNAME='rhel'
yum install -y wget zip unzip
elif grep -Eqi "Amazon Linux" /etc/issue || grep -Eqi "Amazon Linux" /etc/*-release; then
OSNAME='amazon'
Expand Down
6 changes: 3 additions & 3 deletions scripts/update_dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ elif grep -Eqi "CentOS" /etc/issue || grep -Eqi "CentOS" /etc/*-release; then
OSNAME='centos'
yum install -y wget zip unzip
elif grep -Eqi "Fedora" /etc/issue || grep -Eqi "Fedora" /etc/*-release; then
OSNAME='fedora'
OSNAME='rhel'
yum install -y wget zip unzip
elif grep -Eqi "Rocky" /etc/issue || grep -Eqi "Rocky" /etc/*-release; then
OSNAME='rocky'
OSNAME='rhel'
yum install -y wget zip unzip
elif grep -Eqi "AlmaLinux" /etc/issue || grep -Eqi "AlmaLinux" /etc/*-release; then
OSNAME='alma'
OSNAME='rhel'
yum install -y wget zip unzip
elif grep -Eqi "Amazon Linux" /etc/issue || grep -Eqi "Amazon Linux" /etc/*-release; then
OSNAME='amazon'
Expand Down

0 comments on commit a12c4dd

Please sign in to comment.