当前位置:网站首页>宝塔的安装和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
忘记密码:
边栏推荐
猜你喜欢

Learning SCM is of great help to society

If a university wants to choose to study automation, what books can it read in advance?

面试突击62:group by 有哪些注意事项?

Segmentation sémantique de l'apprentissage profond - résumé du code source
![[flask] crud addition and query operation of data](/img/fc/7a12ede31befed5f42b32b94ae5ecf.jpg)
[flask] crud addition and query operation of data
![[CV] target detection: derivation of common terms and map evaluation indicators](/img/e8/04cc8336223c0ab2dea5638def88df.jpg)
[CV] target detection: derivation of common terms and map evaluation indicators

C杂讲 动态链表操作 再讲

Elk project monitoring platform deployment + deployment of detailed use (II)

Nc29 search in two-dimensional array

Popularization of security knowledge - twelve moves to protect mobile phones from network attacks
随机推荐
CANoe CAPL文件操作目录合集
Cooperative development in embedded -- function pointer
Embedded development is much more difficult than MCU? Talk about SCM and embedded development and design experience
June brush question 01 - array
What you have to know about network IO model
Contest3145 - the 37th game of 2021 freshman individual training match_ C: Tour guide
Hugo blog graphical writing tool -- QT practice
六月刷题02——字符串
C杂讲 文件 续讲
[Chongqing Guangdong education] reference materials for nine lectures on the essence of Marxist Philosophy in Wuhan University
I2C summary (single host and multi host)
Basic concepts of libuv
Mapreduce实例(八):Map端join
Delayed note learning
Which is the better prospect for mechanical engineer or Electrical Engineer?
C杂讲 双向循环链表
Day 5 of MySQL learning
51单片机进修的一些感悟
[deep learning] semantic segmentation: thesis reading (neurips 2021) maskformer: per pixel classification is not all you need
C#/. Net phase VI 01C Foundation_ 01: running environment, process of creating new C program, strict case sensitivity, meaning of class library