How to Install Booked Scheduler on Ubuntu 18.04

Updated on November 21, 2023
How to Install Booked Scheduler on Ubuntu 18.04 header image

Introduction

Booked Scheduler is an open source application that is designed to help users schedule processes and manage allocated resources. It is a web based application that runs using MariaDB and is written in PHP.

That said, it is quite powerful - layouts are flexible and the administrator panel is user friendly. Other features include reminders, quotas, reservations and more.

Prerequisites

In order to install Booked Scheduler, you'll need the following:

  • Ubuntu 18.04/18.10 (a 64-bit system is required)
  • root access
  • unzip

Installation

Before we begin installation, run the following command to update your existing packages:

apt-get update -y

This may take a few minutes depending on the number of packages you have.

Once the update process is complete, we'll need to install a LEMP stack:

apt-get install nginx php-fpm -y
service nginx start

Verify that Nginx is installed by visiting http://YOUR_SERVER_IP. It will display a page titled "Welcome to Nginx."

Install MariaDB by running the following command:

apt-get install mariadb-server mariadb-client -y

Configure MariaDB by performing the following commands. If you are prompted to enter a password, simply press Enter:

mysql_secure_installation 
Set root password? [Y/n] Y
New password: (enter a password)
Re-enter new password: (repeat the password)

Once MariaDB updates the password, you will see the following:

Password updated successfully!
Reloading privilege tables..
 ... Success!
 
By default, a MariaDB installation has an anonymous user, allowing anyone to log into
MariaDB without having to have a user account created for them.  This is intended only for 
testing, and to make the installation go a bit smoother.  You should remove them before
moving into a production environment.

For the rest of the prompts, enter Y and Enter.

Remove anonymous users? [Y/n] Y
(...)
Disallow root login remotely? [Y/n] Y
(...)
Remove test database and access to it? [Y/n] Y
(...)
Reload privilege tables now? [Y/n] Y

Upon successful completion, you will see the following output:

Thanks for using MariaDB!

Now, we'll need to create a database and user for Booked Scheduler:

mysql -u root -p

Enter your password when prompted.

Create the database and user:

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]>create database bookedscheduler;
MariaDB [(none)]>exit;

Download & Install Booked Scheduler:

wget https://gigenet.dl.sourceforge.net/project/phpscheduleit/Booked/2.7/booked-2.7.2.zip
unzip booked-2.7.2.zip
mv booked /var/www/html/

Configure nginx & php-fpm:

nano /etc/php/7.2/fpm/php.ini

Locate the following line, remove the semicolon and replace 0 with 1:

cgi.fix_pathinfo=1

Now, restart php-fpm: service php7.2-fpm restart

We will now edit our nginx config to pass PHP requests to php-fpm:

nano /etc/nginx/sites-available/default

Paste the following before the end of the first server block:

location ~ \.php$ {
        fastcgi_pass unix:/run/php/php7.2-fpm.sock;
    }
    
location ~ /\.ht {
    deny all;
}

Modify the index parameter as well:

index index.html index.htm index.php;

Finally, modify the root parameter:

root /var/www/html/booked;

Configure Booked Scheduler:

cd /var/www/html/booked
nano config/config.dist.php

Change the following parameters:

$conf['settings']['default.timezone'] = 'America/Toronto';        // your timezone
$conf['settings']['admin.email'] = 'your_admin@email.com';        // email address of admin user
$conf['settings']['admin.email.name'] = 'John Doe';             
$conf['settings']['script.url'] = 'http://YOUR_DOMAIN.com/Web';   // your domain
$conf['settings']['database']['type'] = 'mysql';
$conf['settings']['database']['user'] = 'root';
$conf['settings']['database']['password'] = '(CHANGE_ME)';		  // your database password
$conf['settings']['database']['hostspec'] = '127.0.0.1';          // your IP    
$conf['settings']['database']['name'] = 'bookedscheduler';

Note: Make sure to replace (CHANGE_ME) with your database password.

Save and exit using Ctrl + O, followed by Enter.

Rename config.dist.php to config.php:

mv config.dist.php config.php

We will now populate the database:

mysql -u root -p bookedscheduler < database_schema/create-schema.sql
mysql -u root -p bookedscheduler < database_schema/create-data.sql

Finally, navigate to your server's IP and register the administrator account.

Congratulations

You've successfully installed Booked Scheduler.