apache2 + virtualenv +djangocms

命令记录:

cd /var/www
makedir django
cd django/
virtualenv env --no-site-packages
source /var/www/django/env

  

 

apt-get update
apt-get install python-dev
pip install -i http://pypi.douban.com/simple djangocms-installer
apt-get install libjpeg-dev libfreetype6-dev zlib1g-dev
pip install -i http://pypi.douban.com/simple --upgrade --force-reinstall pillow
djangocms -p . my_blog
chmod 755 ./manage.py
./manage.py runserver 192.168.1.244:8000
vi /etc/apache2/sites-enabled/000-default#配置虚拟主机
chmod 755 my_blog/*.py
vi my_blog/settings.py #修改project.db的绝对引用路径
service apache2 restart

其中配置虚拟主机:

查看日志:cat /var/log/apache2/error.log#查看错误日志(apache2的安装查看这里:http://blog.csdn.net/lion_awake/article/details/38069833)

<VirtualHost *:80>
    WSGIDaemonProcess my_blog python-path=/var/www/django:/var/www/django/env/lib/python2.7/site-packages
    WSGIProcessGroup my_blog
    WSGIScriptAlias / /var/www/django/my_blog/wsgi.py
</VirtualHost>
posted @ 2014-07-31 20:58  tommy.yu  阅读(262)  评论(0编辑  收藏  举报