2 ‐ Installation Guide - Ubivis/bookcreator GitHub Wiki

Installation Guide

This guide covers the installation process for the Markdown to PDF Book Generator. The tool can be installed on any server with PHP 7.4 or higher.

System Requirements

  • PHP 7.4 or higher
  • Composer
  • Web server with PHP support (Apache, Nginx, etc.)
  • 128MB+ of memory allocated to PHP
  • Write permissions for the output directory
  • GD or Imagick extension for image processing

Standard Installation

Step 1: Clone or Download the Repository

Clone the repository using Git:

git clone https://github.com/Ubivis/bookcreator.git
cd bookcreator

Alternatively, download the ZIP file from GitHub and extract it to your web server directory.

Step 2: Install Dependencies

Use Composer to install the required dependencies:

composer install

For production environments, use:

composer install --no-dev --optimize-autoloader

Step 3: Create the Output Directory

Create a directory for the generated PDFs and set the appropriate permissions:

mkdir -p output
chmod 755 output

Step 4: Configure Web Server

Configure your web server to point to the directory. For example, with Apache, you might need a .htaccess file with:

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
</IfModule>

Installation on Shared Hosting

Step 1: Upload Files

Upload all the files to your hosting account via FTP or the hosting control panel.

Step 2: Install Composer Dependencies

Some hosting providers offer Composer through their control panel. If not, you can:

  1. Install Composer locally on your machine
  2. Run composer install locally
  3. Upload the vendor directory to your server

Step 3: Set Permissions

Make sure the output directory has write permissions:

chmod 755 output

Installation on Plesk

Step 1: Create a Subdomain

In Plesk:

  1. Go to Domains > example.com > Subdomains
  2. Create a new subdomain (e.g., book.example.com)
  3. Set the document root to where you'll upload the files

Step 2: Upload Files

Upload the files to the subdomain's directory using FTP or Plesk's File Manager.

Step 3: Run Composer

Using SSH access:

cd /var/www/vhosts/example.com/book.example.com
composer install --no-dev --optimize-autoloader

Alternatively, if your Plesk has the Composer extension:

  1. Go to Tools & Settings > Composer
  2. Navigate to your subdomain directory
  3. Click "Install Dependencies"

Step 4: Set Permissions

mkdir -p output
chmod 755 output

PHP Configuration

You may need to adjust your PHP settings for optimal performance, especially for large books:

memory_limit = 128M
max_execution_time = 120
post_max_size = 16M
upload_max_filesize = 16M

These settings can be adjusted in:

  • PHP.ini file
  • .htaccess file (if using Apache)
  • Through your hosting control panel

Verifying Installation

To verify the installation:

  1. Navigate to the URL where you installed the generator
  2. You should see the web interface with tabs for file upload and GitHub integration
  3. Try a simple test by uploading a small Markdown file

If you see the interface and can generate a PDF, the installation was successful!

Next Steps

Now that you've installed the generator, head over to the [Usage Guide](Usage-Guide) to learn how to use it to create your first PDF book.

⚠️ **GitHub.com Fallback** ⚠️