当前位置:网站首页>宝塔的安装和flask项目部署
宝塔的安装和flask项目部署
2022-07-06 09:05:00 【东方】
部署flask
我按这种方式宝塔python项目管理器安装的时候报错,提醒我需要虚拟环境。
然后听闻远方大佬给出了解决方法
要进入虚拟环境然后在启动
在这之前你需要先 cd 命令 进入项目的目录下。
source venv/bin/activate
python app.py
和大佬的思路不谋而合,那么我猜想应该是必须要虚拟环境(来隔离包冲突)。
直接运行远方大佬给我的命令行就行了。
群里有一本flask的书籍应该也有写到。
但其实不知道为什么每过一段时间 都会有数据库错误。
重启一下再进行访问就可以了。
查了一些相关资料,应该是 数据库连接的问题。
数据库报错的话 ,每次都要进行重启服务。
安装参考
运行完指令之后:
云服务器端口放行
必须要放行 8888 端口
如需完整使用宝塔的所有功能 你还需要放行如下端口:
建防火墙
编辑防火墙规则,增加以下端口:8888,888,80,443,20,21
修改外网防火墙为新建的防火墙
安装后的使用
http://117.50.181.88:8888/74e59d27
username: l9qfim2z
password: a1ccf6f5
忘记密码:
边栏推荐
- [Yu Yue education] Wuhan University of science and technology securities investment reference
- 华南技术栈CNN+Bilstm+Attention
- Mapreduce实例(九):Reduce端join
- 发生OOM了,你知道是什么原因吗,又该怎么解决呢?
- Compress decompress
- Contest3145 - the 37th game of 2021 freshman individual training match_ C: Tour guide
- 【深度学习】语义分割:论文阅读:(2021-12)Mask2Former
- [Yu Yue education] reference materials of power electronics technology of Jiangxi University of science and technology
- Release of the sample chapter of "uncover the secrets of asp.net core 6 framework" [200 pages /5 chapters]
- Mapreduce实例(八):Map端join
猜你喜欢

一大波開源小抄來襲

MapReduce instance (x): chainmapreduce

嵌入式開發中的防禦性C語言編程

33岁可以学PLC吗
![[deep learning] semantic segmentation: thesis reading (neurips 2021) maskformer: per pixel classification is not all you need](/img/84/cfcd006d445fc54ea0eda3f92e7d9d.jpg)
[deep learning] semantic segmentation: thesis reading (neurips 2021) maskformer: per pixel classification is not all you need

CAPL script pair High level operation of INI configuration file

Mapreduce实例(四):自然排序

Hero League rotation map automatic rotation

CANoe仿真功能之自动化序列(Automation Sequences )

Selection of software load balancing and hardware load balancing
随机推荐
33岁可以学PLC吗
五月刷题26——并查集
Tianmu MVC audit II
Some thoughts on the study of 51 single chip microcomputer
Embedded development is much more difficult than MCU? Talk about SCM and embedded development and design experience
Upload vulnerability
发生OOM了,你知道是什么原因吗,又该怎么解决呢?
一大波開源小抄來襲
Libuv thread
在CANoe中通过Panel面板控制Test Module 运行(初级)
068. Find the insertion position -- binary search
【深度學習】語義分割-源代碼匯總
Tianmu MVC audit I
机械工程师和电气工程师方向哪个前景比较好?
大学C语言入门到底怎么学才可以走捷径
MapReduce instance (VI): inverted index
CANoe不能自动识别串口号?那就封装个DLL让它必须行
Mapreduce实例(五):二次排序
[deep learning] semantic segmentation - source code summary
Delayed note learning