当前位置:网站首页>宝塔的安装和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
忘记密码:
边栏推荐
- 美新泽西州州长签署七项提高枪支安全的法案
- Release of the sample chapter of "uncover the secrets of asp.net core 6 framework" [200 pages /5 chapters]
- Several ways of MySQL database optimization (pen interview must ask)
- There are software load balancing and hardware load balancing. Which one to choose?
- C杂讲 双向循环链表
- 六月刷题02——字符串
- May brush question 03 - sorting
- May brush question 27 - figure
- Random notes
- June brush question 01 - array
猜你喜欢

MapReduce instance (IV): natural sorting

MapReduce instance (VIII): Map end join

Interview shock 62: what are the precautions for group by?

Compilation of libwebsocket

Selection of software load balancing and hardware load balancing

Canoe cannot automatically identify serial port number? Then encapsulate a DLL so that it must work

C杂讲 文件 初讲

听哥一句劝,按这套嵌入式的课程内容和课程体系去学习

Hero League rotation chart manual rotation

MapReduce instance (V): secondary sorting
随机推荐
May brush question 02 - string
Random notes
[deep learning] semantic segmentation: paper reading: (CVPR 2022) mpvit (cnn+transformer): multipath visual transformer for dense prediction
五月刷题02——字符串
Une grande vague d'attaques à la source ouverte
五月刷题03——排序
Keep these four requirements in mind when learning single chip microcomputer with zero foundation and avoid detours
手把手教您怎么编写第一个单片机程序
Webrtc blog reference:
五月刷题27——图
[NLP] bert4vec: a sentence vector generation tool based on pre training
[deep learning] semantic segmentation - source code summary
一大波開源小抄來襲
MapReduce instance (IV): natural sorting
Contest3145 - the 37th game of 2021 freshman individual training match_ C: Tour guide
【深度学习】语义分割:论文阅读:(2021-12)Mask2Former
How can I take a shortcut to learn C language in college
Cap theory
Mapreduce实例(八):Map端join
MapReduce instance (VIII): Map end join