-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdeploy
49 lines (36 loc) · 1.13 KB
/
deploy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
1.
apt-get install git
apt-get install libmysqld-dev
apt-get install libmysqlclient-dev
apt-get install python-dev
apt-get install nginx
apt-get install supervisor
2.
pip install virtualenv
pip install virtualenvwrapper
pip install django-crontab
pip install tushare
3.
mkvirtualenv 'your virtualenv directory'
workon 'your virtualenv directory'
cd into you project directory
git clone 'your project website'
4.
apt-get install mysql-server mysql-client
apt-get install python-mysqldb
mysql -uroot -p
use mysql;
if not has "%":
mysql> update user set host='%' where user='root';
mysql> flush privileges;
mysql> GRANT ALL PRIVILEGES ON *.* TO 'set user'@'%' IDENTIFIED BY 'set password' WITH GRANT OPTION;
mysql> flush privileges;
mysql> CREATE DATABASE db_name DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
pip install django==1.9.7
pip install gevent==1.1.1
pip install gunicorn==19.6.0
5.
echo_supervisord_conf > /etc/supervisord.conf #create a supervisord config
6.
supervisorctl method [add clear fg open quit remove restart start stop update
I use this start myproject supervisord -c /home/django-scrapy/supervisord.conf