Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.9.9 #185

Merged
merged 52 commits into from
Sep 9, 2022
Merged

0.9.9 #185

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
3b5a520
Update index.py
midoks Aug 31, 2022
8cb3b57
Update index.py
midoks Aug 31, 2022
325046d
Update index.py
midoks Aug 31, 2022
13d038e
mysql,mariadb删除,不再支持程序删除。
midoks Aug 31, 2022
52f7939
Update phplib.conf
midoks Aug 31, 2022
3e89c35
Update phplib.conf
midoks Aug 31, 2022
b89b180
修复rsyncd在debian或ubuntu下安装失败的bug.
itcbx Sep 1, 2022
277b95f
Merge pull request #183 from itcbx/dev
midoks Sep 1, 2022
8e587cf
Update install.sh
midoks Sep 2, 2022
f1e1e3c
Update README.md
midoks Sep 3, 2022
1d712d1
Update README.md
midoks Sep 3, 2022
3c2e517
Update README.md
midoks Sep 3, 2022
4db4284
Update README.md
midoks Sep 3, 2022
cc3f1ed
Update README.md
midoks Sep 3, 2022
b4cdc7f
Update memcached.sh
midoks Sep 3, 2022
8a247c9
Update memcached.sh
midoks Sep 3, 2022
be2c2a2
Update phplib.conf
midoks Sep 3, 2022
8503e6e
增加 amazon
midoks Sep 3, 2022
2a7c96b
Update install_dev.sh
midoks Sep 3, 2022
20cb30b
Update update_dev.sh
midoks Sep 3, 2022
7195de0
up
midoks Sep 3, 2022
38b1dba
卸载是停止
midoks Sep 3, 2022
8a337fc
Update site_api.py
midoks Sep 3, 2022
ad9595b
Update update_dev.sh
midoks Sep 4, 2022
d73be68
Update README.md
midoks Sep 4, 2022
80f3d98
Update update_dev.sh
midoks Sep 4, 2022
655946a
Update install.sh
midoks Sep 4, 2022
6b5717b
优化的配置模板
midoks Sep 4, 2022
aad4343
Update whmcs.conf
midoks Sep 5, 2022
d72abb1
修复php-yum无法更改性能调整
midoks Sep 5, 2022
44fa68f
Update index.py
midoks Sep 5, 2022
e13df3a
Update index.py
midoks Sep 5, 2022
8535dd2
up
midoks Sep 5, 2022
7b956c7
Update index.py
midoks Sep 5, 2022
4ed7f5d
Update index.py
midoks Sep 5, 2022
e4de3cf
更新图标
midoks Sep 6, 2022
82828aa
优化gogs插件
midoks Sep 6, 2022
3bee84a
Update README.md
midoks Sep 6, 2022
c8af676
up
midoks Sep 6, 2022
8a81515
Update README.md
midoks Sep 6, 2022
e9f1e52
Update README.md
midoks Sep 6, 2022
3dbece0
Update README.md
midoks Sep 6, 2022
8b1b509
Update README.md
midoks Sep 6, 2022
998f677
Create cloudfare_real_ip.conf
midoks Sep 7, 2022
e994375
Update cloudfare_real_ip.conf
midoks Sep 7, 2022
68112ba
Update install.sh
midoks Sep 7, 2022
750efbf
Update xhprof.sh
midoks Sep 7, 2022
74d565c
0.9.9
midoks Sep 8, 2022
e082baa
PHP加入igbinary扩展
midoks Sep 8, 2022
42e8057
Update memcached.sh
midoks Sep 8, 2022
3da7b57
Update README.md
midoks Sep 8, 2022
becb7f8
Update README.md
midoks Sep 9, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 39 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
### mdserver-web 0.9.7
<p align="center">
<img alt="logo" src="https://cdn.jsdelivr.net/gh/midoks/mdserver-web@latest/route/static/logo.png" height="140" />
<h3 align="center">mdserver-web</h3>
<p align="center">一款简单Linux面板服务</p>
</p>

### 简介

简单的Linux面板,感谢BT.CN写出如此好的web管理软件。我一看到,就知道这是我一直想要的页面化管理方式。
复制了后台管理界面,按照自己想要的方式写了一版。
Expand Down Expand Up @@ -61,6 +67,15 @@ PHP[53-72]支持phpMyAdmin[4.4.15]
PHP[72-81]支持phpMyAdmin[5.2.0]
```

# AD - VPS推荐 - 🙏

- [ZZZ评测](https://www.zzzvps.com/)

| 服务商 | LOGO | 推广地址 | 优惠码 |
| ------------- |----------|-----------|-------|
| digitalvirt |[![digitalvirt](https://digitalvirt.com/templates/BlueWhite/img/logo-dark.svg)](https://digitalvirt.com/aff.php?aff=154) | https://digitalvirt.com/aff.php?aff=154 | 9SYDY7UH0U |
| 搬瓦工 |[![搬瓦工](https://bwh81.net/templates/organicbandwagon/images/logo.png)](https://bandwagonhost.com/aff.php?aff=54161) | https://bandwagonhost.com/aff.php?aff=54161 | BWH3HYATVBJW |

# Docker

- 由[DDSRem](https://github.com/DDSRem)开发维护。
Expand All @@ -71,10 +86,19 @@ docker run -itd --name mw-server --privileged=true -p 7200:7200 -p 80:80 -p 443:
```


### 版本更新 0.9.7
### 版本更新 0.9.9

* 更换Logo。
* 增加amazon linux系统支持。
* 修复rsyncd在debian或ubuntu下安装失败问题。
* Readme加入一AD。
* PHP-YUM|PHP-APT优化[性能调整]。
* 优化Gogs使用MySQL的方式。
* 配置模板添加一个whmcs。
* MySQL和MariaDB无法直接卸载。
* OpenResty加入http_realip_module模块。
* PHP加入igbinary扩展。

* haproxy插件添加.
* 细节优化.

### JSDelivr安装地址

Expand Down Expand Up @@ -120,9 +144,19 @@ curl -fsSL https://raw.githubusercontent.com/midoks/mdserver-web/dev/scripts/qu
```
curl -fsSL https://raw.githubusercontent.com/midoks/mdserver-web/dev/scripts/install_dev.sh | bash
curl -fsSL https://raw.githubusercontent.com/midoks/mdserver-web/dev/scripts/update_dev.sh | bash


curl -fsSL https://gitee.com/midoks/mdserver-web/raw/master/scripts/install_dev.sh | bash
curl -fsSL https://gitee.com/midoks/mdserver-web/raw/master/scripts/update_dev.sh | bash
```

### 捐赠地址 USDT(TRC20)

TVbNgrpeGBGZVm5gTLa21ADP7RpnPFhjya


### 微信赞助

[![截图](https://cdn.jsdelivr.net/gh/midoks/mdserver-web@latest/route/static/img/weixin_zz.jpg)](https://cdn.jsdelivr.net/gh/midoks/mdserver-web@latest/route/static/img/weixin_zz.jpg)


Expand All @@ -138,7 +172,7 @@ curl -fsSL https://raw.githubusercontent.com/midoks/mdserver-web/dev/scripts/up

### 感谢开发赞助

[![digitalvirt](https://digitalvirt.com/templates/BlueWhite/img/logo-dark.svg)](https://digitalvirt.com/)
[![digitalvirt](https://digitalvirt.com/templates/BlueWhite/img/logo-dark.svg)](https://digitalvirt.com/aff.php?aff=154)

### 授权许可

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 @@ -15,7 +15,7 @@

class config_api:

__version = '0.9.7'
__version = '0.9.9'

def __init__(self):
pass
Expand Down
2 changes: 1 addition & 1 deletion class/core/site_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ def setCertToSiteApi(self):
certName = request.form.get('certName', '')
siteName = request.form.get('siteName', '')
try:
path = self.sslDir + siteName
path = self.sslDir + siteName.strip()
if not os.path.exists(path):
return mw.returnJson(False, '证书不存在!')

Expand Down
3 changes: 3 additions & 0 deletions class/plugin/orm.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ def setCharset(self, charset):
def setPort(self, port):
self.__DB_PORT = port

def setUser(self, user):
self.__DB_USER = user

def setPwd(self, pwd):
self.__DB_PASS = pwd

Expand Down
6 changes: 6 additions & 0 deletions class/plugin/ormDb.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,12 @@ def setPwd(self, pwd):
def getPwd(self):
return self.__DB_PASS

def setDbName(self, name):
self.__DB_NAME = name

def setUser(self, user):
self.__DB_USER = user

def execute(self, sql):
# 执行SQL语句返回受影响行
if not self.__Conn():
Expand Down
91 changes: 0 additions & 91 deletions plugins/gogs/class/mysqlDb.py

This file was deleted.

24 changes: 12 additions & 12 deletions plugins/gogs/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ def getPluginName():
def getPluginDir():
return mw.getPluginDir() + '/' + getPluginName()

sys.path.append(getPluginDir() + "/class")
import mysqlDb


def getServerDir():
return mw.getServerDir() + '/' + getPluginName()
Expand Down Expand Up @@ -235,16 +232,19 @@ def getDbConfValue():


def pMysqlDb(conf):

host = conf['HOST'].split(':')
conn = mysqlDb.mysqlDb()
# pymysql
db = mw.getMyORM()
# MySQLdb |
# db = mw.getMyORMDb()

conn.setHost(host[0])
conn.setUser(conf['USER'])
conn.setPwd(conf['PASSWD'])
conn.setPort(int(host[1]))
conn.setDb(conf['NAME'])
return conn
db.setPort(int(host[1]))
db.setUser(conf['USER'])
db.setPwd(conf['PASSWD'])
db.setDbName(conf['NAME'])
# db.setSocket(getSocketFile())
db.setCharset("utf8")
return db


def pSqliteDb(conf):
Expand Down Expand Up @@ -476,7 +476,7 @@ def userList():

start = (page - 1) * page_size
list_count = pQuery('select count(id) as num from user')
count = list_count[0][0]
count = list_count[0]["num"]
list_data = pQuery(
'select id,name,email from user order by id desc limit ' + str(start) + ',' + str(page_size))
data['list'] = mw.getPage({'count': count, 'p': page,
Expand Down
2 changes: 2 additions & 0 deletions plugins/gogs/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ getBit(){

Install_gogs()
{
pip3 install mysqlclient

mkdir -p $serverPath/source/gogs

echo '正在安装脚本文件...' > $install_tmp
Expand Down
8 changes: 4 additions & 4 deletions plugins/gogs/js/gogs.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,11 @@ function gogsUserList(page, search) {

ulist = rdata['data']['data'];
for (i in ulist){
email = ulist[i][2] == '' ? '无' : ulist[i][2];
content += '<tr><td>'+ulist[i][0]+'</td>'+
'<td>'+ulist[i][1]+'</td>'+
email = ulist[i]["email"] == '' ? '无' : ulist[i]["email"];
content += '<tr><td>'+ulist[i]["id"]+'</td>'+
'<td>'+ulist[i]["name"]+'</td>'+
'<td>'+email+'</td>'+
'<td><a class="btlink" onclick="userProjectList(\''+ulist[i][1]+'\')">项目管理</a></td>'+
'<td><a class="btlink" onclick="userProjectList(\''+ulist[i]["name"]+'\')">项目管理</a></td>'+
'</tr>';
}

Expand Down
7 changes: 5 additions & 2 deletions plugins/mariadb/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -2180,8 +2180,11 @@ def installPreInspection(version):


def uninstallPreInspection(version):
# return "请手动删除MySQL[{}]".format(version)
return 'ok'
stop(version)
if mw.isDebugMode():
return 'ok'

return "请手动删除MariaDB[{}]<br/> rm -rf {}".format(version, getServerDir())

if __name__ == "__main__":
func = sys.argv[1]
Expand Down
7 changes: 5 additions & 2 deletions plugins/mysql/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -2338,8 +2338,11 @@ def installPreInspection(version):


def uninstallPreInspection(version):
# return "请手动删除MySQL[{}]".format(version)
return 'ok'
stop(version)
if mw.isDebugMode():
return 'ok'

return "请手动删除MySQL[{}]<br/> rm -rf {}".format(version, getServerDir())

if __name__ == "__main__":
func = sys.argv[1]
Expand Down
4 changes: 3 additions & 1 deletion plugins/openresty/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,12 @@ Install_openresty()
# --with-openssl=$serverPath/source/lib/openssl-1.0.2q
cd ${openrestyDir}/openresty-${VERSION} && ./configure \
--prefix=$serverPath/openresty \
--with-ipv6 \
--with-http_v2_module \
--with-http_ssl_module \
--with-http_slice_module \
--with-http_stub_status_module
--with-http_stub_status_module \
--with-http_realip_module

make -j${cpuCore} && make install && make clean

Expand Down
6 changes: 3 additions & 3 deletions plugins/php-apt/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -417,8 +417,8 @@ def setFpmConfig(version):
max_spare_servers = args['max_spare_servers']
pm = args['pm']

file = getServerDir() + '/php' + version + '/php-fpm.d/www.conf'
conf = mw.readFile(file)
filefpm = getFpmConfFile(version)
conf = mw.readFile(filefpm)

rep = "\s*pm.max_children\s*=\s*([0-9]+)\s*"
conf = re.sub(rep, "\npm.max_children = " + max_children, conf)
Expand All @@ -437,7 +437,7 @@ def setFpmConfig(version):
rep = "\s*pm\s*=\s*(\w+)\s*"
conf = re.sub(rep, "\npm = " + pm + "\n", conf)

mw.writeFile(file, conf)
mw.writeFile(filefpm, conf)
reload(version)

msg = mw.getInfo('设置PHP-{1}并发设置,max_children={2},start_servers={3},min_spare_servers={4},max_spare_servers={5}',
Expand Down
20 changes: 20 additions & 0 deletions plugins/php-apt/versions/phplib.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
{
"name": "pdo",
"versions": [
"56",
"70",
"71",
"72",
"73",
"74",
"80",
"81",
Expand All @@ -16,6 +21,11 @@
"name": "mysqlnd",
"versions": [
"56",
"70",
"71",
"72",
"73",
"74",
"80",
"81",
"82"
Expand All @@ -29,6 +39,11 @@
"name": "sqlite3",
"versions": [
"56",
"70",
"71",
"72",
"73",
"74",
"80",
"81",
"82"
Expand All @@ -50,6 +65,11 @@
"name": "odbc",
"versions": [
"56",
"70",
"71",
"72",
"73",
"74",
"80",
"81",
"82"
Expand Down
Loading