Need an on-premises resource booking system? Jack Wallen shows you how to install the open source Booked solution.
Your small- to medium-sized business might rely on a calendar to book and track resources. But why use a simple calendar, when you can install a free open source tool created for the express purpose of tracking and scheduling of various types of resources?
Such a tool exists and it's called Booked. Booked is used by hundreds of thousands of universities, laboratories, businesses, and nonprofits across the globe. Why? Because it's reliable, easy to use, extendable, and includes features like:
LDAP and AD integration
Registered and anonymous users
Roles and permissions
Integrated payment and credit system
If that sounds like a tool your business needs, let's walk through the process of installing it on Ubuntu Server 18.04.
SEE: 10 things companies are keeping in their own data centers (TechRepublic download)
What you'll need
A running instance of Ubuntu Server 18.04
A user with sudo privileges
How to install necessary dependencies
The first thing to be done is the installation of the necessary dependencies. Log in to your Ubuntu Server and issue the command:
sudo apt-get install apache2 mysql-server mysql-client php php-cgi libapache2-mod-php php-common php-pear php-mbstring php-text-captcha wget unzip -y
When that command completes, start and enable the necessary services with the commands:
sudo systemctl start mysql sudo systemctl start apache2 sudo systemctl enable mysql sudo systemctl enable apache2
You'll also need to configure the MySQL server, which can be accomplished by running the command:
Once you've given the MySQL admin user a password and answered the remaining questions, you can then create the database and user.
How to create the database
Log in to the MySQL prompt with the command:
sudo mysql -u root -p
At the prompt, create the database with the command:
CREATE DATABASE bookeddb;
Create the new user and give that user full permissions to the new database with the commands:
CREATE USER 'booked_user'@'localhost' IDENTIFIED BY 'PASSWORD'; GRANT ALL PRIVILEGES ON booked.* to 'booked_user'@'localhost' IDENTIFIED BY 'PASSWORD';
Finalize the database with the commands:
FLUSH PRIVILEGES; exit
How to download and unpack the Booked file
Download the file with the command:
Unpack the file with the command:
Move the file into the correct directory with the command:
sudo mv booked /var/www/html/
Give the newly-moved directory the correct ownership with the command:
sudo chown -R www-data:www-data /var/www/html/booked
There are two sub-directories that must have 0755 permissions. Do this with the commands:
sudo chmod -R 0755 /var/www/html/booked/tpl sudo chmod -R 0755 /var/www/html/booked/tpl_c
How to configure Apache
Now we can configure our web server. Create a new configuration file with the command:
sudo nano /etc/apache2/sites-available/booked.conf
In that file, paste the following (edit to meet your needs):
<VirtualHost *:80> ServerName yourdomain.com DocumentRoot /var/www/html/booked <Directory /var/www/bookedscheduler> Options -Indexes +FollowSymLinks +MultiViews AllowOverride All Require all granted </Directory> ErrorLog /var/log/apache2/booked-error.log CustomLog /var/log/apache2/booked-access.log combined </VirtualHost>
Save and close the file.
Enable the new configuration and the rewrite module with the commands:
sudo a2ensite booked sudo a2enmod rewrite
Restart Apache with the command:
sudo systemctl restart apache2
How to configure Booked
Finally, we have to take care of a few configurations and then import the database tables. Copy the configuration file with the command:
sudo cp /var/www/html/booked/config/config.dist.php /var/www/html/booked/config/config.php
Open the configuration file for editing with the command:
sudo nano /var/www/html/booked/config/config.php
In that file, you'll want to edit the following lines to fit your installation:
$conf['settings']['default.timezone'] = 'America/Chicago'; $conf['settings']['admin.email'] = 'email@example.com'; $conf['settings']['script.url'] = 'http://SERVER_IP/booked/Web'
Change the above settings to reflect your timezone, admin email address, and server IP address.
In the Database Configuration section, change the following lines:
$conf['settings']['database']['user'] = 'USER'; $conf['settings']['database']['password'] = 'PASSWORD'; $conf['settings']['database']['name'] = 'DBNAME';
- USER is the booked user you created at the MySQL prompt
- PASSWORD is the password you created the MySQL prompt
- DBNAME is the name of the database you created at the MySQL prompt
Finally, check in the Mail Server Configuration section and configure your SMTP server information. You'll need to configure the following lines:
$conf['settings']['phpmailer']['smtp.host'] = 'SMTP_HOST'; $conf['settings']['phpmailer']['smtp.port'] = '25'; $conf['settings']['phpmailer']['smtp.secure'] = 'SSL or TLS'; $conf['settings']['phpmailer']['smtp.username'] = 'ADDRESS'; $conf['settings']['phpmailer']['smtp.password'] = 'PASSWORD';
SMTP_HOST is your outgoing email server address
Choose between SSL or TLS
ADDRESS is the username for your SMTP server
PASSWORD is the password for your SMTP user
Save and close the file.
Last but not least, import the database schema with the command:
sudo mysql -u USER -p DATABASE < database_schema/create-schema.sql
Where USER is the username you created at the MySQL prompt and DATABASE is the name of the database you created.
How to register your user
You can now point a web browser to http://SERVER_IP/booked where SERVER_IP is the IP address of your hosting server and then click Register User (Figure A).
You must register with the email address you used to configure the admin email in the configuration file. Once you've done that, you're ready to start using Booked.
- How to install the Observium network discovery tool on Ubuntu Server 18.10 (TechRepublic)
- How to become a database administrator: A cheat sheet (TechRepublic)
- How to enable Wake On LAN in Ubuntu Server 18.04 (TechRepublic)
- How to install OpenNMS network manager on Ubuntu 18.04 (TechRepublic)
- How to perform security audits on Ubuntu server with OpenSCAP (TechRepublic)
- How to install ntopng on a Debian minimal server (TechRepublic)
- Public cloud providers' network performance wildly varies (ZDNet)
- Best cloud services for small businesses (CNET)
- DevOps: More must-read coverage (TechRepublic on Flipboard)