ubuntu服务器上安装uwsgi(系统全局和虚拟环境都安装uwsgi)

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/weixin_38570967/article/details/81841202

Step1# 首先在电脑上安装自己需要的python版本 及创建虚拟环境 安装教程。
https://blog.csdn.net/weixin_38570967/article/details/81811415

Step2# source /project/vcmt/bin/activate 来激活在vcmt这个虚拟环境 , deactivate退出虚拟环境。
这里写图片描述

step3# 执行pip install uwsgi 命令 ,在虚拟环境中安装uwsgi 。
这里写图片描述

sptep4# 执行启动uwsgi命令 uwsgi --http :8080 --module car.wsgi (每个django项目都有自己的wsgi文件)
这里写图片描述

到此可以从浏览器 输入 ip:8080 访问项目了 。在本实例中wsgi文件在 /project/vcmt/car/car/car目录下

uwsgi官方文档 https://uwsgi-docs.readthedocs.io/en/latest/tutorials/Django_and_nginx.html#before-you-start-setting-up-uwsgi

猜你喜欢

转载自blog.csdn.net/weixin_38570967/article/details/81841202