开源电子书发布平台Booktype搭建
1、基础环境 安装CentOS5.5(64bit),Python升级到2.7.3(Booktype需要Python2.5以上版本),安装pip1.2,安装apt-get 0.5.15,安装git 1.8 安装Django框架1.4版本: https://docs.djangoproject.com/en/dev/topics/install/#installing-official-release 2、安装依赖库 #database use pqsql pip-2.7 install postgres pip-2.7 install python-psycopg2 安装redis server,simplejson,lxml,South,unidecode 3、安装Booktype: 1) 获取软件包 git clone https://github.com/sourcefabric/Booktype.git 2) 更换路径 cd Booktype/scripts 3) 建立网站根路径 sudo mkdir /home/www/pysite/mybooktype/ 4) 创建数据库实例 ./createbooki --database postgresql /var/www/mybooktype/ 5) 更换路径 6) 加载环境变量 . ./booki.env 7) 初始化数据库 django-admin.py syncdb --noinput 8) 迁移数据 django-admin.py migrate 9) 创建超级用户 django-admin.py createsuperuser 10) 添加公共文档授权 django-admin.py loaddata documentation_licenses 11) 启动该网站 django-admin.py runserver 0.0.0.0:8000 另外如果希望脱离console执行,可把booki.env里面的内容添加到/etc/profile中去 --------- iefreer (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |