依赖环境配置
参考链接: https://github.com/gavin-orange/jasmin_smsc_gui
这个UI的依赖环境有3个:
- Python3, 版本要在3.5以上
- 可正常运行的SMS Jasmin 环境,这个可以参考我之前的两篇文章
- Py4web 框架
Py4web 搭建
cd /opt
python3 -m venv py4web
source py4web/bin/activate
cd py4web
python3 -m pip install --upgrade py4web --no-cache-dir
在这个过程中如果缺少任何依赖组件,根据提示,pip install xx即可,这边的问题不大。
运行py4web , 检查是否成功运行
py4web setup apps
py4web set_password
py4web run apps
首次启动会默认监听127.0.0.1:8000端口, 你可以通过wget 或curl检查下服务状态,即可。
Git拉取UI代码
cd apps
git clone https://github.com/Eudorajab1/jasmin_smsc_gui.git .
在这边可能会遇到点问题, git访问不到的话, 需要科学上网, 把代码下载回来。
拉取回来之后, 要对apps/jasmin_smsc_gui/settings.py记性部分修改, 如下:
JASMIN_HOST host as per telnet command
JASMIN_PORT port as per telnet command
JASMIN_USER as per jasmin config default is "jcliuser"
JASMIN_PWD as per jasmin config default is "jclipwd"
运行py4web
py4web run -H 0.0.0.0 -P 8000 apps >> start.log
成功之后页面显示如下: