django-cms安装

ubuntu:12.04 (32bit)

djangocms 0.5.1

===========================

首先,跟着这个做:

https://github.com/divio/django-cms-tutorial/

 

期间,碰到了问题,pip无法下载,需要添加镜像,添加文件 /root/.pip/pip.conf ,内容如下:

[global]

index-url = http://pypi.douban.com/simple

 

pypi镜像看这里:www.pypi-mirrors.org

 

ok,继续,然后有碰到问题,virtualenv无法创建实例,原因是版本不兼容,用easy_install指定 1.10.1版本进行安装。(参考:http://stackoverflow.com/questions/20916712/cannot-create-virtualenv-instance-in-python-2-7-5-because-of-pip-installation-er)

 

后面在最后一步创建网站demo的时候,又碰到问题: Pillow is not compiled with JPEG support,无奈啊,在stackoverflow找到了解决方案: http://stackoverflow.com/questions/23078303/getting-error-while-running-django-cms-demo-page#23086541

如下:

sudo apt-get install libjpeg-dev libfreetype6-dev zlib1g-dev

# Link the libraries for Pillow to find them:

sudo ln -s /usr/lib/`uname -i`-linux-gnu/libfreetype.so /usr/lib/
sudo ln -s /usr/lib/`uname -i`-linux-gnu/libjpeg.so /usr/lib/
sudo ln -s /usr/lib/`uname -i`-linux-gnu/libz.so /usr/lib/

# reinstall Pillow (In case you have Pillow already installed)
pip install --upgrade --force-reinstall pillow

哦弥陀佛,终算大功告成,特记录之,供后来人参考。

 

========================

国外的vps(ubuntu 12.04 32bit),部署命令:

apt-get install python-dev

easy_install http://pypi.douban.com/packages/source/v/virtualenv/virtualenv-1.10.1.tar.gz#md5=3a04aa2b32c76c83725ed4d9918e362e
virtualenv djangocms_env

source /home/djangocms_env/bin/activate

pip install djangocms-installer

sudo apt-get install libjpeg-dev libfreetype6-dev zlib1g-dev
 
# Link the libraries for Pillow to find them:
 
sudo ln -s /usr/lib/`uname -i`-linux-gnu/libfreetype.so /usr/lib/
sudo ln -s /usr/lib/`uname -i`-linux-gnu/libjpeg.so /usr/lib/
sudo ln -s /usr/lib/`uname -i`-linux-gnu/libz.so /usr/lib/
 
# reinstall Pillow (In case you have Pillow already installed)
pip install --upgrade --force-reinstall pillow
 
djangocms -p . blog

  

  

posted @ 2014-07-30 17:04  tommy.yu  阅读(965)  评论(0编辑  收藏  举报