Install and configure a corporate Open Source Booking System on Centos 7

Install and configure a corporate Open Source Booking System on Centos 7

Install and configure a corporate Open Source Booking System on Centos 7

In today’s business, it is increasingly necessary to share workspaces, labs, tools, and any other type of resources. Making the most of the available resources has become a competitive advantage for modern businesses.eval(ez_write_tag([[728,90],’howtoforge_com-box-3′,’ezslot_6′,106,’0′,’0′]));

Every company has finite resources, so there is a dispute over the use of these resources by all members, this is the point, the dispute of these resources can cause problems among employees, wear and tear on relationships and unproductivity in the organization.
This discussion seems to be far from the technology, however, to solve these types of problem, many free Softwares are available and in this article, I write about a corporate tool able to help organize the use of resources in a fair and effective way.eval(ez_write_tag([[580,400],’howtoforge_com-medrectangle-3′,’ezslot_2′,121,’0′,’0′]));

Software Overview

Booked is open source software written in PHP and MySQL that helps organizations and groups efficiently manage, record and track resources of any kind. It allows you to create schedules so users can find schedules available for resource use.

Booked allows resources to be distributed fairly through the use of quotas. It also lets you control the use of resources through reserve approvals. An automatic range between the reservations of a resource can also be configured.

Booked includes great enterprise features like support for a lot of languages, web based, mobile first, reporting system, reminders, LDAP, Active Directory, ical files to integrate with e-mail clients, and more.

The Environment

This article covers the Booked installation and basic configuration. This article was written based on the following environment: A Virtual Box VM with CENTOS 7 Minimal, 2GB RAM, 8GB HD and 2 network interfaces (host-only and NAT).


This article does not cover completely this subject who is complex and extensive. It put the focus on the simple S.O. configuration and Booked system configuration.


Assuming that you use a fresh installation of Centos 7 Minimal, before to install Booked, run the following command to update the system and install additional packages: 

yum update
Transaction Summary ================================================================================ Install 1 Package Upgrade 39 Packages Total download size: 91 M Is this ok [y/d/N]: y

Install your favorite text editor or use VI. In this article I use VIM, to install it, run the following command:

yum install vim

Install WGET package, run the following command:eval(ez_write_tag([[580,400],’howtoforge_com-medrectangle-4′,’ezslot_1′,108,’0′,’0′]));

yum install wget

Install UNZIP package, run the following command:

yum install unzip

To configure network, run the following command to open the NMTUI (Network Manager Text User Interface) tool and edit the network interfaces and hostname how you wish:


After setup of network settings and hostname on CentOS 7, run the following command to apply the changes:

service networks restart

To verify the network information, run the following command:

ip addr

The output look like this:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 08:00:27:67:bc:73 brd ff:ff:ff:ff:ff:ff
inet brd scope global dynamic enp0s3
valid_lft 84631sec preferred_lft 84631sec
inet6 fe80::9e25:c982:1091:90eb/64 scope link
valid_lft forever preferred_lft forever
3: enp0s8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 08:00:27:68:88:f3 brd ff:ff:ff:ff:ff:ff
inet brd scope global dynamic enp0s8
valid_lft 1044sec preferred_lft 1044sec
inet6 fe80::a00:27ff:fe68:88f3/64 scope link
valid_lft forever preferred_lft forever

Disable SELINUX (Security Enhanced Linux) on Centos 7, edit the following config file:

vim /etc/selinux/config
"/etc/selinux/config" 14L, 547C# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
# SELINUXTYPE= can take one of three two values:
#     targeted - Targeted processes are protected,
#     minimum - Modification of targeted policy. Only selected processes are prootected. 
#     mls - Multi Level Security protection.

Change the value enforcing of directive SELINUX to disabled, save the file and reboot the server.

To check the status of SELinux on Centos 7, run the following command:


The output must be:


To disable FirewallD on Centos 7, run the following commands:

systemctl disable firewalld
systemctl stop firewalld

To check firewall status on Centos 7, run the following command:

systemctl status firewalld

Install MariaDB, Apache, and PHP on Centos 7

To install MariaDB on Centos 7, run the following command:

yum -y install mariadb-server

To start MariaDB, run the following command:

systemctl start mariadb

To increase the security of MariaDB, run the following command:


Setup the options according to the following output or use your own preferences:


In order to log into MariaDB to secure it, we'll need the current
password for the root user.  If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none):<Press Enter>

OK, successfully used password, moving on...

Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.

Set root password? [Y/n] <Press Y>

Setup root password:

New password: *******
Re-enter new password: ******* 
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.

Remove anonymous users? [Y/n] <Press Y>

... Success!

Normally, root should only be allowed to connect from 'localhost'. This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] <Choose acording your needs>

... Success!

By default, MariaDB comes with a database named 'test' that anyone can
access. This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n] <Press Y>

- Dropping test database...
... Success!
- Removing privileges on test database...
... Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n] <Press Y>

... Success!

Cleaning up...

All done! If you've completed all of the above steps, your MariaDB
installation should now be secure.

Thanks for using MariaDB!

Setup MariaDB to start up automatically with the Centos 7:

systemctl enable mariadb.service

To install Apache, run the following command:

yum install httpd

To start Apache, run the following command:

systemctl start httpd.service

Setup Apache to start up automatically with the Centos 7:

systemctl enable httpd.service

To test Apache, in your web browser, type the IP addres of your server. If every thing is all rigth you can see a test page:

To install PHP, run the following command:

yum install php php-mysql

Restart Apache, run the following command:

systemctl restart httpd.service

To test PHP create a file phpinfo.php inside of /var/www/html directory with the following content:

<?php phpinfo(); ?>

Now you can access the phpinfo.php through the browser with the following URL: http://[your-ip-addres]/phpinfo.php. If everything is ok, you can see the following page:

Setup database through the terminal

Access the MariaDB through the terminal and create the database bookedscheduler and the user booked_user with rights enough to manage this database. Run the following commands to do through terminal: 

 mysql -u root -p

Create bookedscheduler database:

MariaDB [(none)]> create database bookedscheduler;

Create booked_user on MariaDb:

CREATE USER 'booked_user'@'localhost' IDENTIFIED BY 'your_password';

Grant permissions to user  booked_user to bookedscheduler database:

GRANT ALL PRIVILEGES ON database.bookedscheduler TO 'booked_user'@'localhost';

Import Booked database schema and data, from the /var/www/html/booked/database_schema/ directory, the following sql files must be imported, create_schema.sql and create-data.sql

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

Setup database through the PHPMyAdmin

Install PHPMyAdmin on Centos 7 (opitional)

PHPMyAdmin is a tool to manage mysql (mariaDB) databases in a friendly way through a browser. To install phpmyadmin automatically, you need to install the Epel repository, run the following command:

yum install epel-release

Now you can run the following command:

yum install phpmyadmin

After the PHPMyAdmin installation, we need to configure it. First of all, make a copy of config file and edit the phpMyAdmin.conf file in /etc/httpd/conf.d/:

cp /etc/httpd/conf.d/phpMyAdmin.conf /etc/httpd/conf.d/phpMyAdmin.conf.old
vim /etc/httpd/conf.d/phpMyAdmin.conf

Change the values according to your network environment, in my case, I changed following lines (17, 25, 34, 42). My config file looks like this:

# phpMyAdmin - Web based MySQL browser written in php
# Allows only localhost by default
# But allowing phpMyAdmin to anyone other than localhost should be considered
# dangerous unless properly secured by SSL
Alias /phpMyAdmin /usr/share/phpMyAdmin
Alias /phpmyadmin /usr/share/phpMyAdmin

<IfModule mod_authz_core.c>
# Apache 2.4
Require ip
Require ip
Require ip ::1
<IfModule !mod_authz_core.c>
# Apache 2.2
Order Deny,Allow
Deny from All
Allow from
Allow from ::1
<Directory /usr/share/phpMyAdmin/setup/>
<IfModule mod_authz_core.c>
# Apache 2.4
Require ip
Require ip ::1
<IfModule !mod_authz_core.c>
# Apache 2.2
Order Deny,Allow
Deny from All
Allow from
Allow from ::1
# These directories do not require access over HTTP - taken from the original
# phpMyAdmin upstream tarball
<Directory /usr/share/phpMyAdmin/libraries/>
Order Deny,Allow
Deny from All
Allow from None
<Directory /usr/share/phpMyAdmin/setup/lib/>
Order Deny,Allow
Deny from All
Allow from None
<Directory /usr/share/phpMyAdmin/setup/frames/>
Order Deny,Allow
Deny from All
Allow from None
# This configuration prevents mod_security at phpMyAdmin directories from
# filtering SQL etc. This may break your mod_security implementation.
#<IfModule mod_security.c>
# <Directory /usr/share/phpMyAdmin/>
# SecRuleInheritance Off
# </Directory>

Restart Apache, run the following command:

systemctl restart httpd.service

Now you can access the PHPMyAdmin through the browser with the following URL: http://[your-ip-addres]/phpMyAdmin/

Use your root account and the password previously defined on the MariaDB installation to create the database and user. At the dashboard, select Databases option to create a new database:

Fill the form with the database name and select create.

To import the database data, on the left menu, select the bookedscheduler database, and the Import from PHPMyAdmin dashboard, choose the following files, create-schema.sql (1) and create-data.sql (2), from installation files and import it.

Create the user booked_user with the permissions to manage bookedscheduler database. On the PHPMyAdmin dashboard, select Users and Add:

On the user creation screen, fill the fields with the user database (booked_user), set up a password and select GO at the end of the page:


To set up privileges to booked_user on bookedscheduler database, select bookedscheduler from a database list and select Go:

On the privileges screen, select the option Check All and Go:

Installing Booked Scheduler Centos 7

We have two ways to install Booked Scheduler, manual or automatically. This article cover only the manual installation. To install Booked Scheduler on Centos 7, go to /tmp directory and download the source code:


Unzip the file on the /var/www/html directory, run the following command:

unzip -d /var/www/html/

Change the permissions of the unzipped file. 

cd /var/www/html/
chown -R apache:apache /booked

Setup the configuration file in /var/www/html/booked/config. Make a copy of the config.dist.php file to config.php and edit the blocks of the configuration file (It is my config file):

cp config.dist.php config.php

Change the values according to our environment, here I present the main settings to change, and be informed, the email address will be the system admin after the first sign up:

Copyright 2011-2016 Nick Korbel

This file is part of Booked Scheduler.

Booked Scheduler is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

Booked Scheduler is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with Booked Scheduler. If not, see <>.

error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT);
//ini_set('display_errors', 1);
//ini_set('display_startup_errors', 1);

* Application configuration
$conf['settings']['app.title'] = 'Booked Scheduler'; // application title
$conf['settings']['default.timezone'] = 'America/Chicago'; // Change your time zone - look up here
$conf['settings']['allow.self.registration'] = 'true'; // if users can register themselves
$conf['settings'][''] = '[email protected]'; // fill with the email address of admin user
$conf['settings'][''] = 'Booked Administrator'; // name to be used in From: field when sending automatic emails
$conf['settings'][''] = '50'; // number of records per page
$conf['settings'][''] = 'true'; // global configuration to enable if any emails will be sent
$conf['settings']['default.language'] = 'en_us'; Change acording to your language // find your language in the lang directory
$conf['settings']['script.url'] = 'http://[your-ip-address]/Web'; // public URL to the Web directory of this instance. this is the URL that appears when you are logging in. leave http: or https: off to auto-detect
$conf['settings'][''] = 'Web/uploads/images'; // full or relative path to where images will be stored
$conf['settings']['image.upload.url'] = 'uploads/images'; // full or relative path to show uploaded images from
$conf['settings']['cache.templates'] = 'true'; // true recommended, caching template files helps web pages render faster
$conf['settings']['use.local.jquery'] = 'false'; // false recommended, delivers jQuery from Google CDN, uses less bandwidth
$conf['settings']['registration.captcha.enabled'] = 'true'; // recommended. unless using recaptcha this requires php_gd2 enabled in php.ini
$conf['settings'][''] = 'true'; // requires = true
$conf['settings'][''] = 'false'; // requires = true
$conf['settings']['registration.notify.admin'] = 'true'; // whether the registration of a new user sends an email to the admin (ala phpScheduleIt 1.2)
$conf['settings']['inactivity.timeout'] = '30'; // minutes before the user is automatically logged out
$conf['settings']['name.format'] = '{first} {last}'; // display format when showing user names
$conf['settings']['css.extension.file'] = ''; // full or relative url to an additional css file to include. this can be used to override the default style
$conf['settings']['disable.password.reset'] = 'false'; // if the password reset functionality should be disabled
$conf['settings']['home.url'] = 'your-intranet-portal-url'; // the url to open when the logo is clicked
$conf['settings']['logout.url'] = 'your-intranet-portal-url'; // the url to be directed to after logging out
$conf['settings']['default.homepage'] = '1'; // the default homepage to use when new users register (1 = Dashboard, 2 = Schedule, 3 = My Calendar, 4 = Resource Calendar)

$conf['settings']['schedule']['use.per.user.colors'] = 'false'; // color reservations by user
$conf['settings']['schedule']['show.inaccessible.resources'] = 'true'; // whether or not resources that are inaccessible to the user are visible
$conf['settings']['schedule']['reservation.label'] = '{name}'; // format for what to display on the reservation slot label. Available properties are: {name}, {title}, {description}, {email}, {phone}, {organization}, {position}, {startdate}, {enddate} {resourcename} {participants} {invitees} {reservationAttributes}. Custom attributes can be added using att with the attribute id. For example {att1}
$conf['settings']['schedule']['hide.blocked.periods'] = 'false'; // if blocked periods should be hidden or shown

* ical integration configuration
$conf['settings']['ics']['require.login'] = 'true'; // recommended, if the user must be logged in to access ics files
$conf['settings']['ics']['subscription.key'] = ''; // must be set to allow webcal subscriptions
$conf['settings']['ics']['import'] = 'false'; // enable iCal import
$conf['settings']['ics']['import.key'] = ''; // it's recommended to set this key when iCal import is enabled
* Privacy configuration - Set up here your business rules
$conf['settings']['privacy']['view.schedules'] = 'true'; // if unauthenticated users can view schedules
$conf['settings']['privacy']['view.reservations'] = 'false'; // if unauthenticated users can view reservations
$conf['settings']['privacy']['hide.user.details'] = 'false'; // if personal user details should be displayed to non-administrators
$conf['settings']['privacy']['hide.reservation.details'] = 'false'; // if reservation details should be displayed to non-administrators
$conf['settings']['privacy']['allow.guest.reservations'] = 'false'; // if reservations can be made by users without a Booked account, if true this overrides schedule and resource visibility
* Reservation specific configuration
$conf['settings']['reservation']['start.time.constraint'] = 'future'; // when reservations can be created or edited. options are future, current, none
$conf['settings']['reservation']['updates.require.approval'] = 'false'; // if updates to previously approved reservations require approval again
$conf['settings']['reservation']['prevent.participation'] = 'false'; // if participation and invitation options should be removed
$conf['settings']['reservation']['prevent.recurrence'] = 'false'; // if recurring reservations are disabled for non-administrators
$conf['settings']['reservation']['enable.reminders'] = 'false'; // if reminders are enabled. this requires email to be enabled and the reminder job to be configured
$conf['settings']['reservation']['allow.guest.participation'] = 'false';
$conf['settings']['reservation']['allow.wait.list'] = 'false';
$conf['settings']['reservation']['checkin.minutes.prior'] = '5';
* Email notification configuration
$conf['settings']['reservation.notify']['resource.admin.add'] = 'false';
$conf['settings']['reservation.notify']['resource.admin.update'] = 'false';
$conf['settings']['reservation.notify']['resource.admin.delete'] = 'false';
$conf['settings']['reservation.notify']['resource.admin.approval'] = 'false';
$conf['settings']['reservation.notify']['application.admin.add'] = 'false';
$conf['settings']['reservation.notify']['application.admin.update'] = 'false';
$conf['settings']['reservation.notify']['application.admin.delete'] = 'false';
$conf['settings']['reservation.notify']['application.admin.approval'] = 'false';
$conf['settings']['reservation.notify']['group.admin.add'] = 'false';
$conf['settings']['reservation.notify']['group.admin.update'] = 'false';
$conf['settings']['reservation.notify']['group.admin.delete'] = 'false';
$conf['settings']['reservation.notify']['group.admin.approval'] = 'false';
/**end business rules
* File upload configuration
$conf['settings']['uploads']['enable.reservation.attachments'] = 'false'; // if reservation attachments can be uploaded
$conf['settings']['uploads']['reservation.attachment.path'] = 'uploads/reservation'; // full or relative (to the root of your installation) filesystem path to store reservation attachments
$conf['settings']['uploads']['reservation.attachment.extensions'] = 'txt,jpg,gif,png,doc,docx,pdf,xls,xlsx,ppt,pptx,csv'; // comma separated list of file extensions that users are allowed to attach. leave empty to allow all extensions
* Database configuration
$conf['settings']['database']['type'] = 'mysql';
$conf['settings']['database']['user'] = 'booked_user'; // database user with permission to the booked database
$conf['settings']['database']['password'] = 'your_password'; fill with the booked_user password
$conf['settings']['database']['hostspec'] = ''; // ip, dns or named pipe
$conf['settings']['database']['name'] = 'bookedscheduler';
/**TIP: if you have problems to conect to database, please, try with the user and passord of root, if it works, go back to user database permitions.
* Mail server configuration
*/To e-mail configurarion I need to use a relay to my e-mail server and in my server I instaled postfix and configurate it to send e-mails
$conf['settings']['phpmailer']['mailer'] = 'mail'; // options are 'mail', 'smtp' or 'sendmail'
$conf['settings']['phpmailer'][''] = 'your-mx'; // ''
$conf['settings']['phpmailer']['smtp.port'] = '25';
$conf['settings']['phpmailer'][''] = ''; // options are '', 'ssl' or 'tls'
$conf['settings']['phpmailer']['smtp.auth'] = 'true'; // options are 'true' or 'false'
$conf['settings']['phpmailer']['smtp.username'] = '[email protected]';
$conf['settings']['phpmailer']['smtp.password'] = 'your-password';
$conf['settings']['phpmailer']['sendmail.path'] = '/usr/sbin/sendmail';
$conf['settings']['phpmailer']['smtp.debug'] = 'false';
* Plugin configuration. For more on plugins, see readme_installation.html
$conf['settings']['plugins']['Authentication'] = '';
$conf['settings']['plugins']['Authorization'] = '';
$conf['settings']['plugins']['Permission'] = '';
$conf['settings']['plugins']['PostRegistration'] = '';
$conf['settings']['plugins']['PreReservation'] = '';
$conf['settings']['plugins']['PostReservation'] = '';
* Installation settings
$conf['settings']['install.password'] = ''; //just to automated instalation
* Pages
$conf['settings']['pages']['enable.configuration'] = 'true';
$conf['settings']['api']['enabled'] = 'false';
* ReCaptcha
$conf['settings']['recaptcha']['enabled'] = 'false';
$conf['settings']['recaptcha']['public.key'] = '';
$conf['settings']['recaptcha']['private.key'] = '';
* Email
$conf['settings']['email']['default.from.address'] = 'your-email-address';
$conf['settings']['email'][''] = 'your-system-name';
* Reports
$conf['settings']['reports']['allow.all.users'] = 'false';
* Account Password Rules
$conf['settings']['password']['minimum.letters'] = '6';
$conf['settings']['password']['minimum.numbers'] = '0';
$conf['settings']['password']['upper.and.lower'] = 'false';
* Label display settings
$conf['settings']['reservation.labels']['ics.summary'] = '{title}';
$conf['settings']['reservation.labels'][''] = '{title}';
$conf['settings']['reservation.labels']['rss.description'] = '<div><span>Start</span> {startdate}</div><div><span>End</span> {enddate}</div><div><span>Organizer</span> {name}</div><div><span>Description</span> {description}</div>';
$conf['settings']['reservation.labels']['my.calendar'] = '{resourcename} {title}';
$conf['settings']['reservation.labels']['resource.calendar'] = '{name}';
$conf['settings']['reservation.labels']['reservation.popup'] = ''; // Format for what to display in reservation popups. Possible values: {name} {dates} {title} {resources} {participants} {accessories} {description} {attributes}. Custom attributes can be added using att with the attribute id. For example {att1}
* Security header settings
$conf['settings']['security']['security.headers'] = 'false'; // Enable the following options
$conf['settings']['security']['security.strict-transport'] = 'true';
$conf['settings']['security']['security.x-frame'] = 'deny';
$conf['settings']['security']['security.x-xss'] = '1; mode=block';
$conf['settings']['security']['security.x-content-type'] = 'nosniff';
$conf['settings']['security']['security.content-security-policy'] = "default-src 'self'"; // Requires careful tuning (know what your doing)
* Google Analytics settings
$conf['settings'][''][''] = ''; // if set, Google Analytics tracking code will be added to every page in Booked

$conf['settings']['authentication']['allow.facebook.login'] = 'true';
$conf['settings']['authentication'][''] = 'true';
$conf['settings']['authentication'][''] = '';
* Credits functionality
$conf['settings']['credits']['enabled'] = 'false';

Configure Booked Scheduler WebInterface

Access the following address http://your-ipaddress/Web/index.php, if everything is working fine, you will see the following screen:

Select the option Register to create an admin account, remember,  use the e-mail address previously configured at the file config.php.

After creating your account, go to the login screen and authenticate. A dashboard will be load, like this image:

On the main menu, you can config all system, select Application Management 

Through this menu, you can configure all resources of Booked Scheduler, to change the config.php, select the Application Configuration:

This article is a small overview about Booked Scheduler, this software has a lot of amazing features who can help any environment to provide a rational use of resources. 


I hope this article can introduce you to the software, in case you have any problem with the installation, feel free to ask questions. If you want to get more information about Booked Scheduler access

About the Author

Leave a Reply