Ready-made packages of Booktype are available for Debian and Ubuntu GNU/Linux via secure apt. This is the recommended installation method for Booktype, because it offers automatic updates and resolution of package dependencies.
You should follow the chapters Setting up the database and (optionally) Installing a PDF renderer before you install Booktype. This guide assumes that you have sudo or root powers on the target server - if not, you need to ask your system administrator to install Booktype for you.
To add the repository that contains 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 9 (stretch), scroll to the end of this document and add the following lines:
deb https://apt.sourcefabric.org/ stretch main
For Ubuntu 18.04 LTS 'Bionic', substitute bionic in place of stretch. Press Ctrl+O to write out the sources.list file, and Ctrl-X to quit the nano editor.
The next step is to obtain the Sourcefabric 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. You can do this with the command:
The output of this command should be similar to:
--2018-05-10 11:26:23-- https://apt.sourcefabric.org/sourcefabric-key
Resolving apt.sourcefabric.org (apt.sourcefabric.org)... 188.8.131.52, 2a01:4f8:200:63ed::2
Connecting to apt.sourcefabric.org (apt.sourcefabric.org)|184.108.40.206|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1825 (1.8K)
Saving to: ‘sourcefabric-key’
sourcefabric-key 100%[=====================================>] 1.78K --.-KB/s in 0s
2018-05-10 11:26:23 (22.8 MB/s) - ‘sourcefabric-key’ saved [1825/1825]
If you wish to verify the authenticity of the package signing key, please email email@example.com for assistance. You can add this key to your server with the command:
sudo apt-key add sourcefabric-key
Your server should respond with 'OK'. You now need to update your sources list. Type:
sudo apt update
In the ouput of this command, you should see a file being downloaded from apt.sourcefabric.org, for example:
Hit:13 https://apt.sourcefabric.org stretch InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
After confirming that the secure apt repository is set up, you can install the Booktype package with the command:
sudo apt install booktype
This command will install all of the Booktype components, plus other packages that Booktype requires in order to run.
The Booktype package installer will ask if you want to set up a default instance automatically. Use the cursor keys on your keyboard to highlight your answer. Press the Tab key to highlight the <OK> button and press the Enter key to continue.
If you answer "no thanks", Booktype files will be installed, but an instance will not be created. You will need to set up the instances that you require by following the method shown in the chapter Manual installation on GNU/Linux.
If you answer "yes please", the installer will ask further questions about the default instance. More details of these configuration values are shown in the chapter Manual installation on GNU/Linux.
The first five questions are about the Booktype database. Refer to the details of the PostgreSQL database which you created earlier.
The next three questions are for setting up the Booktype system administrator account.
The following two questions are about the default Booktype instance which will be created.
There are three questions about email configuration for the instance.
You can also set the name of the default publisher for new books.
The next four questions relate to the Redis server. For a simple configuration on a single server, with no other applications using Redis, you can use the defaults.
The final two questions concern the default time zone and interface localisation.
After these installation questions, Booktype's libraries will be installed, which can take a few minutes.
Finally, check that Booktype is running. Open a web browser with the URL of the Booktype instance that you have installed, such as http://booktype.example.com. If you see the Booktype homepage, you can now proceed to the chapter Getting Started.
If you chose to set up a default instance automatically, and see the error at the end of the package installation:
CommandError: Could not create the user.
this is due to a bug in Booktype, which can be misleading. If the user account you created for the Booktype administrator can be used to log in to the Booktype instance homepage, all is well.
There has been error in communication with Booktype server. Not sure right now where is the problem.
You should refresh this page.