Sourcefabric Manuals

 English |  Español |  Français |  Italiano |  Português |  Русский |  Shqip

Booktype 2.3 for Authors and Publishers

Manual installation on OS X

Before installing Booktype on an OS X machine, you need to create a suitable environment. You can use the command line tool pip to obtain the necessary Python dependencies and Homebrew to install Redis. The page at http://mxcl.github.com/homebrew/ provides instructions for a first time install of Homebrew.

To use Redis you need to install Command Line Tools for Xcode which can be found at the Apple developer web pages (https://developer.apple.com/downloads - you'll need an Apple ID before you are allowed to download), and xcode which can be downloaded using the OS X app store.

After the successful installation of Homebrew, open a terminal and enter the command:

brew install redis

To download Booktype from the source code repository you'll need git from http://git-scm.com/download/mac or the native GitHub application from https://central.github.com/mac/latest

Once git is installed, you can download Booktype 2.0 with the command:

git clone https://github.com/sourcefabric/Booktype.git --branch 2.0 --depth 1 --single-branch

Then install the Python dependencies for a development install with sqlite, using the commands:

easy_install pip
pip install -r booktype/requirements/dev.txt

Optionally, you can install these Python packages in a virtualenv (Python virtual environment).

Open another terminal, and enter the command:

redis-server

to run Redis.

Back in the original terminal, where you downloaded Booktype with git, change to the scripts directory and create a Booktype instance called 'mybooktype' and a sqlite database with the commands:

cd scripts
./createbooktype --check-versions --database sqlite $HOME/mybooktype

Change to the target directory $HOME/mybooktype and edit the settings/base.py and settings/dev.py files to suit your installation. In this example we are using a python virtualenv and the sqlite3 database:

DATABASES = {
        'default': {
                'NAME':'/Users/bostjan/peskovnik/virtualenv/booktype/mybooktype/database.sqlite',
                'ENGINE':'django.db.backends.sqlite3',
                'USER': '',
                'PASSWORD' : ''
        }
        }

Load the environment variables, with the command:

. ./booktype.env

Then populate the database with data and complete the installation:

manage.py syncdb --noinput
manage.py migrate
manage.py createsuperuser
manage.py collectstatic
manage.py compress
manage.py update_permissions

If you get an unknown locale: UTF-8 error try the command:

export LC_ALL=en_US.UTF-8; export LANG=en_US.UTF-8

before running the above commands again. Finally, run a test server on an unused port, such as port 8005, with the command:

manage.py runserver 0.0.0.0:8005

Then open the localhost IP address and the specified port in your web browser, for example http://127.0.0.1:8005/ and you should see the test server.

You can sign in to the test server using the superuser account details that you created in the installation step above.

There has been error in communication with Booktype server. Not sure right now where is the problem.

You should refresh this page.