0.基本环境说明:
a. Ubuntu 14.04 64bit
b. python 2.7.6
c. django 1.8
d. django-registration
e. django-widget-tweaks
1.install mysql(5.0+)
a. sudo apt-get install mysql-server
b. sudo apt-get install mysql-client
c. sudo apt-get install libmysqlclient-dev
d. 检查mysql的socket是否处于listen状态,如果是安装正确,否则请重新安装
sudo netstat -tap | grep mysql
2.install django(1.8)
sudo easy_install django
3.install mysql driver
sudo easy_install mysql-connector-python
sudo easy_install mysql-python
4.install django-registration
sudo easy_install django-registration
sudo easy_install django-registration-email
sudo easy_install django-widget-tweaks
Then add ‘widget_tweaks’ to INSTALLED_APPS.
6.create database and sync db
a. create database
mysql -u root -p
create DATABASE database_name
b. sync database
python manage.py migrate
备注
7.install easy_install
sudo apt-get install python-setuptools python-dev build-essential