Question

Sourcefabric Booktype (Book Collab Software)?

  • Posted January 5, 2015

Hello all.

I just wonder if any of you have tried to install Sourcefabric Booktype (or other of their software) on a virtual server? https://www.sourcefabric.org/

Her is Booktype: https://www.sourcefabric.org/en/booktype/

Snapshots: http://apt.sourcefabric.org/snapshots/

http://sourcefabric.booktype.pro/booktype-20-for-authors-and-publishers/setting-up-the-database/ http://sourcefabric.booktype.pro/booktype-20-for-authors-and-publishers/automated-install-on-debian-or-ubuntu-gnulinux/

I would really like to get Booktype working on my server, but I am a newbie linux/server admin, thus I don’t want to mess up my droplet server setup.

Anyone want to test this Booktype in a virtual host?

Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

If you have built your own copy of redis from source, the Debian package manager will not know about that, it only tracks .deb packages. You probably have two copies of redis installed now :-)

The command:

dpkg-query -l redis-server

should return the Debian package version installed, which should be 2.8.17-1~bpo70+1+b1

If that is the case, please try running this command again:

sudo gdebi booktype_2.0.0~20150107-1_all.deb

That works for me on wheezy. If it still doesn’t work, we need to dig deeper…

What happens if you do this (as root)?

apt-get update apt-cache show redis-server

It should show you that both 2.4.14 and 2.8.17 are available. Then the command:

apt-get install redis-server

should install the 2.8 version for you.

Booktype 2.0 requires Redis server 2.8 or later, a version which is available in Ubuntu 14.04 LTS ‘Trusty’ but is not currently available in Debian 7 ‘wheezy’. If your Debian server runs wheezy, make sure you have the wheezy-backports apt repository set up. There should be a line similar to:

deb http://ftp.debian.org/debian wheezy-backports main

in your /etc/apt/sources.list file. If you need to add a line for wheezy-backports, you can find a list of mirror sites at https://www.debian.org/mirror/list

You are not doing anything wrong :-) This error is just because Booktype 2.0 has not been released yet. In the meantime, you can get the daily snapshots from http://apt.sourcefabric.org/snapshots/ and install them with any package manager that supports dependency resolution, for example using gdebi and today’s snapshot:

sudo apt-get install gdebi-core sudo gdebi booktype_2.0.0~20150107-1_all.deb

Let us know how you get on! You will probably need to put the Virtualbox ethernet interfaces into bridged mode so that the test servers can get a real IP address on your local network, for example by DHCP. That makes it easier to interact with the servers using your desktop machine as if it was a remote client.

Hi, if you are not confident with Python I would not recommend installing Booktype on your live server for now. I understand that virtualmin is like webmin for virtual servers, but I have not personally tried installing Booktype in that environment. Our current Booktype installation instructions cover the Debian/Ubuntu way of configuring services.

I’m planning to write a tutorial on installing Booktype on a droplet, at some point, but I’d be inclined to do that without the use of a hosting control panel. My reasoning is that users who need such a panel would have fewer headaches if they bought a managed hosting service :-)

If you have the time available and would like to learn for yourself, what I’d recommend is that you install VirtualBox on your local desktop computer, create something like a Debian stable (wheezy) instance on it, and get familiar with how to install programs like Booktype via the shell.

Hi, I wrote the documentation linked above, I’d be happy to help. Booktype will run on a standard Python 2.7 setup, including virtual servers. Personally, I use VirtualBox OSE from http://www.virtualbox.org/ to create Debian and Ubuntu instances for testing.

Before installing a Booktype 2.0 snapshot I would recommend that you create a login on the development server http://booktype-dev.sourcefabric.org/ which will give you an impression of the current state of Booktype 2.0.

I have no experience of virtualmin, but in general it is Apache that does the job of translating the http:// request into returning files from a particular directory. I suspect that what virtualmin does is provide an interface for creating Apache virtualhost definition files in a directory such as /etc/apache2/sites-available/ (on Debian or Ubuntu). You can choose to have this definition created automatically when installing Booktype 2.0 from a snapshot deb package.

If you use the command:

ls -l /etc/apache2/sites-enabled

you can see the other part of the process, where the a2ensite command is used to symlink files from /etc/apache2/sites-available/ to /etc/apache2/sites-enabled/ (the step which makes the site appear to the public at the http:// address). Until then, the new site is ‘available’ but not ‘enabled’.

Now, how to get this working in a virtualmin virtual server environment? Example, get this installed and running in a existing directory, subdirectory or subdomain of an already created virtual servers /home/virtualservername.

Example: http://virtualserver.tld --> /home/virtualserver http://booktype.virtualserver.tld —> /home/virtualserver/booktype

Here is what I did for installing Booktype 2.0 on Ubuntu Server 14.04 x64, installed in VirtualBox on my local network, bridged mode. Then connected to it using Putty.

First updated Ubuntu

sudo apt-get update

sudo apt-get upgrade

Then I followed this guide for database setup: http://sourcefabric.booktype.pro/booktype-20-for-authors-and-publishers/setting-up-the-database/

Be aware step 4. in the above mentioned database setupguide:

  1. Confirm connections to the database booktype-db by booktype-user are allowed, by checking the PostgreSQL configuration file. The exact file name depends on the PostgreSQL version that you are using. For example, if the version was 9.1, the command to edit the file on Debian or Ubuntu GNU/Linux would be:
sudo nano /etc/postgresql/9.1/main/pg_hba.conf

Updated Ubuntu Server 14.04 has postgresql 9.3, so the command should be:

sudo nano /etc/postgresql/9.3/main/pg_hba.conf

When completed the database setupguide I went here: http://sourcefabric.booktype.pro/booktype-20-for-authors-and-publishers/automated-install-on-debian-or-ubuntu-gnulinux/

For Ubuntu, skipped the first part and jumped directly to “Setting up the secure apt repository”

Setting up the secure apt repository

To add the repository that contains Sourcefabric software, including Booktype, open the sources.list file in the nano editor with:

sudo nano /etc/apt/sources.list

Type your password, and the sources.list file will open. For Debian wheezy, scroll to the end of this document and add the following lines:

# Booktype
deb http://apt.sourcefabric.org/ trusty main

For Ubuntu 14.04 LTS ‘Trusty’, substitute trusty in place of wheezy. Press Ctrl+O to write out the sources.list file, and Ctrl-X to quit the nano editor.

You now need to update your sources. Type:

sudo apt-get update

You will probably see an error message about a missing public key. To fix this system error, you need to install the sourcefabric-keyring package, which contains the package signing key. This encryption key is a security measure which helps ensure that the Booktype packages you will download in future have not been tampered with by a third party.

sudo apt-get install sourcefabric-keyring

When prompted, press the y key on your keyboard to install the sourcefabric-keyring package without verification. If you wish to verify the authenticity of the package signing key, please contact Sourcefabric for assistance.

Update your sources again, to confirm that you are now using a trusted software repository:

sudo apt-get update

You should no longer see the error message about the public key.

DON’T GO ANY FURTHER IN THE INSTALL GUIDE, DO THIS INSTEAD

sudo apt-get install gdebi-core

Then update redis-server to latest version

wget http://no.archive.ubuntu.com/ubuntu/pool/universe/r/redis/redis-server_2.8.4-2_amd64.deb

…or choose another mirror here: http://packages.ubuntu.com/trusty/amd64/redis-server/download

sudo gdebi redis-server_2.8.4-2_amd64.deb

Then get the Booktype 2.0 latest snapshot

wget http://apt.sourcefabric.org/snapshots/booktype_2.0.0~20150107-1_all.deb

…or choose a newer one here: http://apt.sourcefabric.org/snapshots/

sudo gdebi booktype_2.0.0~20150107-1_all.deb

Let it install and then follow the Booktype 2.0 configuration wizard, it should start automatically.

Then I did the following to change the default document root in Apache

sudo a2dissite 000-default.conf

sudo a2ensite booktype-instance1.conf

sudo service apache2 restart

Then pointed my browser to the IP address of the Booktype 2.0 machine

Log in to Booktype 2.0 and create a book!

sudo a2dissite 000-default.conf

sudo a2ensite booktype-instance1.conf

Problem solved - Booktype 2.0 is now installed and working. Creating my first book :-)