View difference between Paste ID: epSdjaLn and 3NSGmZ3a
SHOW: | | - or go back to the newest paste.
1
# www.fduran.com
2
# django, virtualenv, pip, apache
3-
apt-get install python-setuptools python-dev build-essential
3+
4-
easy_install -U pip
4+
# pre-requirements, apache, mysql lib
5
apt-get update && apt-get install apache2 libapache2-mod-wsgi
6
7
# virtualenv
8
virtualenv --no-site-packages venv
9
source venv/bin/activate
10
pip install django
11
# other packages:
12
pip install South python-memcached
13
14
# mysql
15
apt-get install libmysqlclient-dev
16
apt-get install python-dev
17
pip install MySQL-python
18
19
pip freeze > requirements.txt
20
21
# configure apache virtualhost file
22
23
# create django app
24
django-admin.py startproject myproject
25
cd myproject
26
/etc/init.d/apache2 stop && python manage.py runserver 0.0.0.0:80
27
28
29
# set wsgi path : add to apache.wsgi file:
30
import site
31
site.addsitedir('/path/to/venv/lib/python2.6/site-packages')
32
33
# .gitignore
34
venv
35
.pyc
36
requirements.txt