-
Notifications
You must be signed in to change notification settings - Fork 0
/
INSTALL
90 lines (72 loc) · 2.76 KB
/
INSTALL
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
deb https://debian.ustc.edu.cn/ubuntu/ trusty main restricted universe multiverse
deb https://debian.ustc.edu.cn/ubuntu/ trusty-security main restricted universe multiverse
deb https://debian.ustc.edu.cn/ubuntu/ trusty-updates main restricted universe multiverse
deb https://debian.ustc.edu.cn/ubuntu/ trusty-proposed main restricted universe multiverse
deb https://debian.ustc.edu.cn/ubuntu/ trusty-backports main restricted universe multiverse
deb-src https://debian.ustc.edu.cn/ubuntu/ trusty main restricted universe multiverse
deb-src https://debian.ustc.edu.cn/ubuntu/ trusty-security main restricted universe multiverse
deb-src https://debian.ustc.edu.cn/ubuntu/ trusty-updates main restricted universe multiverse
deb-src https://debian.ustc.edu.cn/ubuntu/ trusty-proposed main restricted universe multiverse
deb-src https://debian.ustc.edu.cn/ubuntu/ trusty-backports main restricted universe multiverse
sudo apt-get update
sudo apt-get install nginx
sudo apt-get install python-dev
sudo apt-get install memcached
sudo apt-get install python-memcache
sudo apt-get install mysql-server
(User:root,Password:2011)
sudo apt-get install mysql-client
sudo apt-get install mysql-workbench
sudo apt-get install python-mysqldb
sudo apt-get install python-pip
sudo apt-get install python-setuptools
sudo apt-get install python-lxml
sudo apt-get install python-pil
sudo apt-get install python-reportlab
sudo pip install pip --upgrade
sudo pip install greenlet
sudo pip install gevent
sudo pip install gunicorn
sudo pip install pygal
sudo pip install pillow
sudo pip install geraldo
sudo pip install django-cache-machine
sudo pip install django==1.4.17
sudo pip install django-sendfile
copy photo to hchq/static/images/
import hchq database to mysql
configure nginx for hchq
server {
listen 80;
server_name localhost;
location / {
proxy_pass http://127.0.0.1:8088/;
proxy_redirect http://127.0.0.1:8088/ /;
#proxy_redirect off;
}
location /static/ {
alias /home/hchq/hchq/static/;
}
}
configure crontab for mysql backup
30 23 * * * cd ~/hchq/mysql_backup && ./mysql_backup.sh
dist package:
python -O -m compileall ../hchq
find -name "*.py" -exec rm -f {} \;
modify mysql root password:
mysql -u root -p
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('hchq2010-2014*.*');
/usr/local/mysql/bin/mysqldump -u username -p database > filename
/usr/local/mysql/bin/mysql -u username -p database < filename
CREATE SCHEMA `hchq` DEFAULT CHARACTER SET utf8 ;
gpg --keyserver keys.gnupg.net --search-key Bright Pan
gpg -a --output hchq-5.1.tar.gz.rsa -r [email protected] -e hchq-5.1.tar.gz
gpg --output hchq.tar.gz -d hchq-5.1.tar.gz.rsa
server:
10.220.11.141
hchq,hchq123456
screen -ls
screen -r ...
c-a k 杀死当前会话
c-a d 暂时退出
先备份数据,然后在覆盖。