Friday, April 14, 2023

Installing MRBS on Debian/Ubuntu


Managing library hall bookings manually for every program conducted by various departments has become a challenging task for me. In my search for a solution, I realized the need for a system that enables teachers and students to book the hall without my intervention. I conducted extensive research to find an effective solution to manage the high demand for our library hall, and my efforts led me to discover MRBS (Meeting Room Booking System), a web-based reservation system that is both free and open-source, capable of handling everything from room booking to resource scheduling.


  •     Web/Intranet based - Available from any workstation through a Browser
  •     Simple to follow, Web based options and intuitive presentation
  •     Flexible Repeating Bookings
  •     Authentication with your existing user database (eg Netware, NT Domain, NIS etc.)
  •     Ensures that conflicting entries cannot be entered
  •     Reporting option
  •     Selectable DAY / WEEK / MONTH views
  •     Multiple auth levels (read-only, user, admin)
  •     Support for bookings by time or period - ideal for use in schools/colleges
  •     Room administrators can be notified of bookings by email

Here are the server specifications I used:

  •     Operating System: Debian 11
  •     RAM: 2 GB
  •     Storage: 10 GB
  •     SSH connection
  •    Created a "mrbs" subdomain pointing to the server's IP under the master domain.


If you're ready to get started, let's dive in!

Step 1: Update the System

Before proceeding with the installation, update your Debian 11 system to the latest version:

sudo apt update && sudo apt upgrade -y && sudo apt autoremove -y

Step 2: Install Required Packages

To install the required packages, run the following command:

sudo apt install -y apache2 apache2-utils software-properties-common mariadb-server mariadb-client php libapache2-mod-php php-mysql php-iconv


Securing MariaDB

Run this command to improve the security of the MariaDB installation:

sudo mysql_secure_installation

(The script will prompt you to set up the root user password, remove the anonymous user, restrict root user access to the local machine and remove the test database. In the end, the script will reload the privilege tables ensuring that all changes take effect immediately. All steps are explained in detail and it is recommended to answer “Y” (yes) to all questions.)

Step 3: Create a Directory for MRBS

Create a directory for MRBS in the /var/www/html directory:

sudo mkdir /var/www/html/mrbs

Step 4: Download and Extract MRBS

Download the latest version of MRBS from the official website:


Extract the MRBS archive to the previously created directory:

sudo unzip -d /var/www/html/mrbs

Step 5: Copy Configuration File

Copy the sample configuration file to the MRBS web directory:

sudo cp /var/www/html/mrbs/web/ /var/www/html/mrbs/web/

Step 6: Set Permissions

Set the permissions for the MRBS web directory:

sudo chown -R www-data:www-data /var/www/html/mrbs/web
sudo chmod -R 755 /var/www/html/mrbs/web

Step 7: Create a Virtual Host

Create a virtual host for MRBS:

sudo cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/mrbs.conf
sudo nano /etc/apache2/sites-available/mrbs.conf

In the editor, update the configuration file as follows:

<VirtualHost *:80>
    DocumentRoot /var/www/html/mrbs/web

        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        allow from all

    ErrorLog ${APACHE_LOG_DIR}/mrbs_error.log
    CustomLog ${APACHE_LOG_DIR}/mrbs_access.log combined

Disable the default Apache virtual host and enable the MRBS virtual host:

sudo a2dissite 000-default.conf
sudo a2ensite mrbs.conf

Restart the Apache webserver to apply the changes:

sudo systemctl reload apache2 && sudo systemctl restart apache2

Step 8: Create a Database and User

To store the MRBS data, we need to create a new database and user in MariaDB. Here are the steps to create a database and user:

Log in to the MariaDB shell as root:

sudo mysql -uroot -p

Create a new database and user for MRBS:

CREATE USER 'mrbs'@'localhost' IDENTIFIED BY 'mrbs123';

Note: Replace mrbs123 with a strong password of your choice.

Step 9: Import the MRBS Tables

Now that the database and user are created, we need to import the MRBS tables into the database. Here are the steps to import the tables:

Import the tables using the following command:

sudo mysql -u root -pyourmysqlrootpassword mrbs < /var/www/html/mrbs/

Once the tables are imported, we need to configure MRBS to use the newly created database.

Step 10: Configure MRBS

To configure MRBS to use the newly created database, we need to update the configuration file. Here are the steps to update the configuration file:

Open the configuration file in a text editor:

sudo vim /var/www/html/mrbs/web/

Change the following settings under the "Database Settings" section:

$dbsys = "mysql";
$db_host = "
$db_database = "
$db_login = "
$db_password = "

Note: Replace mrbs123 with the password you set in the previous step.

Save and close the file.

Step 11: Access the MRBS Application

Now that MRBS is installed and configured, we can access the application from a web browser using the URL



No comments:

Post a Comment