kcwebplus可视化框架
ContOS7安装
root用户执行以下命令安装
安装:cd / && yum install -y wget && wget https://file.kwebapp.cn/sh/install/intapp/kcwebplus3.sh && bash kcwebplus3.sh
重启应用
root用户执行以下命令
cd /kcwebplus && bash server.sh
ubuntu18安装
root用户执行以下命令安装
安装:cd / && apt-get install -y wget && wget https://file.kwebapp.cn/sh/install/intapp/kcwebplus3.sh && bash kcwebplus3.sh
重启应用
root用户执行以下命令
cd /kcwebplus && bash server.sh
windows安装 (仅支持开发环境)
依赖环境
python3.8
https://file.kwebapp.cn/software/Windows/python/python-3.8.3-amd64.exe
自行下载安装
python -m pip install --upgrade pip==24.0 自行该命令更换pip
安装 kcwebplus框架 创建insert.py文件内容如下
# from kcw.common import *
import os,shutil,requests,zipfile
def unzip_file(dst, src,all=True):
"解压"
if all:
zf = zipfile.ZipFile(dst)
zf.extractall(src)
zf.close()
else:
zip_ref=zipfile.ZipFile(dst)
for item in zip_ref.infolist():
zip_ref.extract(item, src)
zip_ref.close()
if os.name == 'nt':
pips='pip'
python='python'
else:
pips='pip3'
python='python3.8'
os.system(pips+' uninstall kcw -y')
os.system(pips+' uninstall kcweb -y')
os.system(pips+' uninstall kcwebplus -y')
response=requests.get("https://gitee.com/open_source_official_website/kcw/raw/master/kcw.zip")
f=open('kcw.zip',"wb")
f.write(response.content)
f.close()
unzip_file('kcw.zip','')
os.remove('kcw.zip')
os.system(python+" setup.py sdist install")
try:
shutil.rmtree('__pycache__')
except:pass
shutil.rmtree('build')
shutil.rmtree('dist')
shutil.rmtree('kcw')
shutil.rmtree('kcw.egg-info')
os.remove('setup.py')
response=requests.get("https://gitee.com/open_source_official_website/kcweb/raw/develop/kcweb.zip")
f=open('kcweb.zip',"wb")
f.write(response.content)
f.close()
unzip_file('kcweb.zip','')
os.remove('kcweb.zip')
os.system(python+" setup.py sdist install")
try:
shutil.rmtree('__pycache__')
except:pass
shutil.rmtree('build')
shutil.rmtree('dist')
shutil.rmtree('kcweb')
shutil.rmtree('kcweb.egg-info')
os.remove('setup.py')
response=requests.get("https://gitee.com/open_source_official_website/kcwebplus/raw/develop/kcwebplus.zip")
f=open('kcwebplus.zip',"wb")
f.write(response.content)
f.close()
unzip_file('kcwebplus.zip','')
os.remove('kcwebplus.zip')
os.system(python+" setup.py sdist install")
try:
shutil.rmtree('__pycache__')
except:pass
shutil.rmtree('build')
shutil.rmtree('dist')
shutil.rmtree('kcwebplus')
shutil.rmtree('kcwebplus.egg-info')
os.remove('setup.py')
然后执行
python install.py
安装 kcwebplus项目
kcwebplus --install
-
运行系统
进入 kcwebplus目录执行以下命令
kcwebplus server
kcwebplus继程了kcweb 命令格式与kcweb完全一致
执行完上述操作后,您的目录结构应该是这样,如下:
│kcwebplus 项目目录
├─app 应用目录
│ ├─common 公共函数目录
│ │ ├─__init__.py 函数文件
│ ├─config 配置目录
│ │ ├─__init__.py 配置文件
│ ├─intapp 模块目录
│ │ ├─common 该模块的公共函数目录
│ │ │ ├─__init__.py 函数文件
│ │ │ ├─autoload.py 自动加载文件
│ │ ├─controller 控制器目录
│ │ │ ├─__init__.py 控制器初始化文件
│ │ │ ├─index 插件
│ │ │ │ ├─common 函数初始化文件
│ │ │ │ │ ├─__init__.py 函数文件
│ │ │ │ │ ├─autoload.py 自动加载文件
│ │ │ │ │ ├─model.py sqlite数据库初始化
│ │ │ │ ├─tpl 模板命令
│ │ │ │ ├─__init__.py 函数初始化文件
│ │ │ │ ├─index.py 控制器文件
│ │ │ │ ├─... 其他控制器文件
│ │ ├─__init__.py 控制器初始化文件
│ ├─static 静态资源目录 (需手动作创建)
│ ├─runtime 缓存目录
│ ├─__init__.py 自动导入模块文件
执行 kcwebplus server , 然后 访问http://127.0.0.1:39001/
安装成功后
kcwebplus 的初始用户名为:kcw
kcwebplus 的初始用户登录密码:111111
关于 kcwebplus 的常用命令请 在终端中输入 kcwebplus help
kcwebplus help
如果您是部署在公网服务器,需要放行以下端口
39001
80
443
39020
39030
如需更新可执行以下命令 (建议您在一个空目录下执行)
kcwebplus update