Giter Site home page Giter Site logo

tinyspoon's Introduction

TinySpoon

菜谱项目安装指南

准备一个新的环境

更新源

mysql -uroot -p123456  
apt-get update  

安装 pip

apt-get install python-pip python-dev -y  

安装 django

pip install django -i https://pypi.tuna.tsinghua.edu.cn/simple  

更新源

apt-get update  

安装 mysql

apt-get install mysql-server mysql-client -y  

弹窗输入密码:123456

安装 mysqldb

apt-get install python-mysqldb  

安装 djangorestframework

pip install djangorestframework -i https://pypi.tuna.tsinghua.edu.cn/simple  

安装 django-filter

pip install django-filter  

安装 git

apt-get install git -y  

安装 libmysqlclient-dev

apt-get install libmysqlclient-dev -y  

安装 Pillow

apt-get install libtiff5-dev libjpeg8-dev zlib1g-dev \  
    	libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python-tk -y
pip install Pillow -i https://pypi.tuna.tsinghua.edu.cn/simple

从github 上下载最新源代码

git clone https://github.com/lzq941129/TinySpoon.git  

创建数据库

进入mysql

mysql -uroot -p123456  

创建数据库名字为TinySpoon

create database TinySpoon default charset=utf8;  

更改编码问题:

cd /etc/mysql/  

打开目录下的my.cnf文件, 在[client]下边加上default-character-set=utf8

保存退出

重启mysql服务

service mysql restart  

导入TinySpoon的环境变量

export DBHOST=0.0.0.0 && export DBPASSWD=123456  

在项目的根目录做数据库迁移

python manage.py migrate  

创建管理员用户

python manage.py createsuperuser  

启动项目

python manage.py runserver 0.0.0.0:8080  

解决MySQL远程连接拒绝访问问题

mysql -uroot -p123456  

USE mysql;  
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123456' WITH GRANT OPTION;  
FLUSH PRIVILEGES;  
EXIT  

tinyspoon's People

Contributors

oslo12q avatar cyanlime avatar pythonli avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.