1.上传项目到xshell,使用xshell自带的xftp
2.解压上传项目
tar -zxvf +项目压缩包
#如果是zip压缩包则使用 unzip+项目压缩包
3.Miniconda3的下载和安装
#Miniconda3的下载和安装
wget https://repo.anaconda.com/miniconda/Miniconda3-py39_23.3.1-0-Linux-x86_64.sh
#运行sh文件
bash Miniconda3-py39_23.3.1-0-Linux-x86_64.sh
bash之后,一直回车,最后选择yes,完成安装。
4.列出Conda创建的所有虚拟环境
conda env list
5.创建名为flask-app的虚拟环境,python版本为3.9的
conda create -n flask-app python=3.9 -y
6.激活虚拟程序
conda activate flask-app
7.安装项目依赖rew.txt,这个是自己写的安装依赖
pip install -r rew.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
8.指定端口启动
flask run -h 0.0.0.0 -p 8000