ICode9

精准搜索请尝试: 精确搜索
首页 > 系统相关> 文章详细

django+uwsgi+nginx实现负载均衡

2020-07-07 12:06:01  阅读:63  来源: 互联网

标签:django nginx 虚拟环境 yum python3 install pip uwsgi


一、部署设备:

nginx服务器:192.168.110.128(转交设备)

uwsgi服务器:192.168.110.128/129/130/131(负载设备)

二、环境配置:

1、django环境:

yum install -y gcc-c++
yum install -y vim
yum update eple-release
yum install -y python3-pip
yum install -y python3
yum install -y python-dev.x86-64
pip install virtualenv
pip isntall virtualenvwrapper
#配置虚拟环境
cd
vim ~/.bashrc
行末加入:
VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3
export WORKON_HOME=$HOME/.virtualenvs
source /usr/local/bin/virtualenvwrapper.sh
立即生效:source ~/.bashrc
创建虚拟环境:workon dj_nginx
进入项目目录安装依赖:pip install -r requirements.txt

 

标签:django,nginx,虚拟环境,yum,python3,install,pip,uwsgi
来源: https://www.cnblogs.com/Fmaj7/p/13259960.html

专注分享技术,共同学习,共同进步。侵权联系[admin#icode9.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有