1、更新系统、安装mysql、安装nginx
2、更新pip3 (其他用户前面加sudo)
apt-get install pip3
3、按需安装自己项目所需python包
pip3 install django -i https://pypi.doubanio.com/simple/
pip3 install gunicorn -i https://pypi.doubanio.com/simple/
pip3 install xlwt -i https://pypi.doubanio.com/simple/
pip3 install xlwings -i https://pypi.doubanio.com/simple/
pip3 install XlsxWriter -i https://pypi.doubanio.com/simple/
pip3 install requests -i https://pypi.doubanio.com/simple/
pip3 install qrcode -i https://pypi.doubanio.com/simple/
pip3 install pandas -i https://pypi.doubanio.com/simple/
pip3 install PyMySQL -i https://pypi.doubanio.com/simple/
pip3 install django-cors-headers -i https://pypi.doubanio.com/simple/
pip3 install django-import-export -i https://pypi.doubanio.com/simple/
pip3 install django-simpleui -i https://pypi.doubanio.com/simple/
pip3 install mysqlclient -i https://pypi.doubanio.com/simple/
pip3 install Pillow -i https://pypi.doubanio.com/simple/
pip3 install concurrent-log-handler -i https://pypi.doubanio.com/simple/
pip3 install django_redis -i https://pypi.doubanio.com/simple/
【Ubuntu】更换pip镜像源
mkdir ~/.pip
vi ~/.pip/pip.conf
# 填写以下内容
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
创建项目
django-admin startproject BookStore
创建应用
python manage.py startapp index
4、上传项目 通过Xftp将项目文件上传到home目录下(给权限chmod 777 home)
5、创建应用数据库
python manage.py makemigrations
python manage.py migrate
6、配置setting.py文件
python manage.py collectstatic
8、创建超级用户
python manage.py createsuperuser