• Get In Touch
April 29, 2017

How to Install Booked Source on CentOS 7

Want your very own server? Get our 1GB memory, Xeon V4, 25GB SSD VPS for £10.00 / month.
Get a Cloud Server

Booked is a free and open source application written in PHP and MySQL that can be used to manage, record and track resources of any kind. It allows you to create schedules so users can find schedules available for resource use.

You can easily find available times for the resources as per your need. Booked comes with simple calender views that allows everyone to see resource availability at a glance.

Booked provides lots of features, some of them are listed below:

  1. Easy to use and easy to manage.
  2. Multiple languages, LDAP and Active Directory support.
  3. Easily integrates with Google Calender and Outlook.
  4. User and group quotas, roles and permissions.

In this tutorial, we will go through how to install Booked on CentOS 7 server.

Requirements

  • A server running CentOS 7.
  • A sudo user with root privileges setup on your server.

Getting Started

Before starting, update your system with the latest version by running the following command:

sudo yum update -y

Next, install other required packages with the following command:

sudo yum install vim wget unzip -y

Once you are done, you can proceed to install LAMP server.

Install LAMP Server

Next, you will need to install Apache, MariaDB and PHP on your server.

You can install all of them with the following command:

sudo yum install httpd mariadb-server php php-mysql -y

Once installation is completed, start apache and mariadb server and enable them to start at boot time with the following command:

sudo systemctl start httpd
sudo systemctl enable httpd
sudo systemctl start mariadb
sudo systemctl enable mariadb

Configure Database

By default, MariaDB is not secured. You can secure it by running the mysql_secure_installation script:

sudo mysql_secure_installation

Answer all the questions as shown below:

Set root password? [Y/n] n
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

Once MariaDB is secured, log in to the MySQL shell and create a database for booked:

mysql -u root -p

Enter your root password when prompt, then create a database for booked. It is recommended to set secure password:

MariaDB [(none)]> create database bookeddb;

Query OK, 1 row affected (0.00 sec)`

Next, create a database user and password for booked with the following command:

MariaDB [(none)]>CREATE USER 'bookeduser'@'localhost' IDENTIFIED BY 'password';

Query OK, 1 row affected (0.00 sec)`

Next, grant all privileges with the following command:

MariaDB [(none)]>GRANT ALL PRIVILEGES ONbookeddb.* TO 'bookeduser'@'localhost';

Next, run FLUSH PRIVILEGES command so that the privileges table will be reloaded by MySQL and we can use new credential:

MariaDB [(none)]>FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)

Exit from the MySQL console by typing \q:

MariaDB [(none)]>\q
Query OK, 0 rows affected (0.00 sec)

Once you are done, you can proceed to install Booked:

Install Booked

First, you will need to download the latest version of the booked from sourceforge.net site. Use the following command to download it easily:

wget https://ufpr.dl.sourceforge.net/project/phpscheduleit/Booked/2.6/booked-2.6.5.zip

Once the download is completed, extract the downloaded file with the following command:

unzip booked-2.6.5.zip

Next, move the extracted directory to the apache web root directory with the following command:

sudo mv booked /var/www/html/

Next, change the permissions of the booked directory with the following command:

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

Next, you will need to rename some configuration file:

cd /var/www/html/booked
sudo cp config/config.dist.php config/config.php

Next, edit the config.php file:

sudo nano config/config.php

Make the following changes:

$conf['settings']['default.timezone'] = 'Asia/Kolkata';
$conf['settings']['admin.email'] = 'hitjethva@gmail.com';         // email address of admin user
$conf['settings']['admin.email.name'] = 'Hitesh Jethva';
$conf['settings']['script.url'] = 'http://yourdomain.com/Web';
$conf['settings']['database']['type'] = 'mysql';
$conf['settings']['database']['user'] = 'bookeduser';
$conf['settings']['database']['password'] = 'password';
$conf['settings']['database']['hostspec'] = '127.0.0.1';
$conf['settings']['database']['name'] = 'bookeddb';

Save and close the file when you are finished.

Next, you will need to import database schema and data. You can do this with the following command:

cd /var/www/html/booked

mysql -u bookeduser -p bookeddb < database_schema/create-schema.sql
mysql -u bookeduser -p bookeddb < database_schema/create-data.sql

Once you are done, you can proceed to configure Apache for booked.

Configure Apache for Booked

Next, you will need to create a new apache virtual host file for booked. You can do this by creating booked.conf file inside /etc/httpd/conf.d/ directory:

sudo nano /etc/httpd/conf.d/booked.conf

Add the following lines:

<VirtualHost *:80>
ServerAdmin webmaster@yourdomain.com
DocumentRoot /var/www/html/booked
ServerName 192.168.15.193
ErrorLog /var/log/httpd/booked-error_log
CustomLog /var/log/httpd/booked-access_log combined

<Directory /var/www/html/booked/>
DirectoryIndex index.php
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
</VirtualHost>

Save and close the file when you are finished, then restart apache server with the following command:

sudo systemctl restart httpd

Access Booked Web Interface

Before accessing the Booked web interface, you will need to set firewall rules for Booked to work properly.

You can do this by running the following command:

sudo firewall-cmd --permanent --zone=public --add-port=80/tcp

Next, reload the firewalld with the following command:

sudo firewall-cmd --reload

Finally, open your web browser and type the URL http://yourdomain.com/Web/register.php, you should see the following page:

HP_NO_IMG/data/uploads/users/7ecb43a5-b365-4ebf-93d5-f3b632f29f33/731857.png” alt=”” />

Here, you will need to register a new account for booked, then click on the Register button. After the admin user created you will be redirected to Booked Scheduler admin dashboard.

Thats it. You have successfully installed Booked on your CentOS 7 server.

Want your very own server? Get our 1GB memory, Xeon V4, 25GB SSD VPS for £10.00 / month.
Get a Cloud Server

Share this Article!

Related Posts

Node.js Authentication – A Complete Guide with Passport and JWT

Node.js Authentication – A Complete Guide with Passport and JWT

Truth be told, it’s difficult for a web application that doesn’t have some kind of identification, even if you don’t see it as a security measure in and of itself. The Internet is a kind of lawless land, and even on free services like Google’s, authentication ensures that abuses will be avoided or at least […]

Node.js and MongoDB: How to Connect MongoDB With Node

Node.js and MongoDB: How to Connect MongoDB With Node

MongoDB is a document-oriented NoSQL database, which was born in 2007 in California as a service to be used within a larger project, but which soon became an independent and open-source product. It stores documents in JSON, a format based on JavaScript and simpler than XML, but still with good expressiveness. It is the dominant […]

Using MySQL with Node.js: A Complete Tutorial

Using MySQL with Node.js: A Complete Tutorial

Although data persistence is almost always a fundamental element of applications, Node.js has no native integration with databases. Everything is delegated to third-party libraries to be included manually, in addition to the standard APIs. Although MongoDB and other non-relational databases are the most common choice with Node because if you need to scale an application, […]

Node.Js Vs Django: Which Is the Best for Your Project

Node.Js Vs Django: Which Is the Best for Your Project

Django and NodeJs are two powerful technologies for web development, both have great functionality, versatile applications, and a great user interface. Both are open source and can be used for free. But which one fits your project best? NodeJs is based on JavaScript, while Django is written in Python. These are two equally popular technologies […]

Nodejs Vs PHP:  Which Works Best?

Nodejs Vs PHP: Which Works Best?

Before getting into the “battle” between Node.js and PHP we need to understand why the issue is still ongoing. It all started with the increased demand for smartphone applications, their success forcing developers to adapt to new back-end technologies that could handle a multitude of simultaneous requests. JavaScript has always been identified as a client-side […]