#!/bin/sh
 cd
 env_path=Envs
 if [ ! -x "$env_path" ]; then
 mkdir Envs && cd Envs
 virtualenv -p python3 py3   # 创建虚拟环境
 source py3/bin/activate      # 进入虚拟环境
 pip install django -i https://pypi.tuna.tsinghua.edu.cn/simple/    # 安装各种的依赖包
 django-admin startproject webapp         # django项目
 cd webapp && python manage.py runserver      # 运行django项目
 fi

 

 

运行截图:

在ubuntu中用shell一键部署django

 

浏览器运行:

在ubuntu中用shell一键部署django

相关文章:

  • 2021-11-13
  • 2021-07-09
  • 2022-12-23
  • 2022-12-23
  • 2021-10-09
  • 2021-12-21
  • 2022-12-23
  • 2021-07-18
猜你喜欢
  • 2021-08-04
  • 2021-07-12
  • 2021-12-10
  • 2021-04-27
  • 2021-06-02
  • 2022-12-23
  • 2021-09-17
相关资源
相似解决方案