How to Install OpenMeetings on Ubuntu 16.04

Published on: Fri, Jul 27, 2018 at 11:01 am EST
Business Linux Guides Server Apps Ubuntu

Apache OpenMeetings is an open source web conferencing application. It is written in Java and supports multiple database servers. It provides many features, such as audio and video conferencing, screen sharing, file explorer, a user moderation system, private messages and contacts, an integrated calendar for meeting plans and many more. You can also record conferencing sessions. It provides a SOAP/REST API and multiple plugins to easily integrate with Moodle, Jira, Joomla, Confluence and more.

Prerequisites

  • A Vultr Ubuntu 16.04 server instance with at least 4GB RAM.
  • A sudo user.
  • A domain name pointed towards the server.

For this tutorial, we will use 192.168.1.1 as the public IP address and meetings.example.com as the domain name pointed towards the Vultr instance. Please make sure to replace all occurrences of the example IP address and domain name with the actual one.

Update your base system using the guide How to Update Ubuntu 16.04. Once your system has been updated, proceed to install Java.

Install Java

OpenMeetings is written in Java, thus it requires Java Runtime Environment (JRE) to work. Add the Ubuntu repository for Oracle Java 8.

sudo add-apt-repository --yes ppa:webupd8team/java
sudo apt update

Install Java.

sudo apt -y install oracle-java8-installer

Verify Java's version.

java -version

You will see the following output.

user@vultr:~$ java -version
java version "1.8.0_161"
Java(TM) SE Runtime Environment (build 1.8.0_161-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.161-b12, mixed mode)

Set the default path for Java by installing the following package.

sudo apt -y install oracle-java8-set-default

You can verify that JAVA_HOME is set by running the following.

echo $JAVA_HOME

You will see a similar output.

user@vultr:~$ echo $JAVA_HOME
/usr/lib/jvm/java-8-oracle

If you see no output at all, you will need to log out from the current shell and log back in.

Install Dependencies

Install the ImageMagick and GhostScript libraries.

sudo apt -y install imagemagick ghostscript libxt6 libxrender1

ImageMagick provides support to upload images and import them to the whiteboard. GhostScript enables you to upload PDFs to the whiteboard.

Verify the version of ImageMagick and GhostScript to ensure that they have installed successfully.

user@vultr:~$ identify -version
Version: ImageMagick 6.8.9-9 Q16 x86_64 2017-07-31 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC
Features: DPC Modules OpenMP
Delegates: bzlib cairo djvu fftw fontconfig freetype jbig jng jpeg lcms lqr ltdl lzma openexr pangocairo png rsvg tiff wmf x xml zlib

user@vultr:~$ ghostscript -v
GPL Ghostscript 9.18 (2015-10-05)
Copyright (C) 2015 Artifex Software, Inc.  All rights reserved.

Furthur, we will also need to install either Apache OpenOffice or LibreOffice on the system. Installing either of these will enable OpenMeetings to import the files in Office document formats such as .doc, .docx, .ppt, .pptx, or .xlx. In this tutorial, we will install Apache OpenOffice.

Switch to the temporary directory and download the Apache OpenOffice package for Ubuntu.

cd /tmp
wget https://downloads.sourceforge.net/project/openofficeorg.mirror/4.1.5/binaries/en-US/Apache_OpenOffice_4.1.5_Linux_x86-64_install-deb_en-US.tar.gz

Extract the archive and install all the DEB packages.

tar xf Apache_OpenOffice_4.1.5_Linux_x86-64_install-deb_en-US.tar.gz
cd en-US/DEBS
sudo dpkg -i *.deb
sudo dpkg -i desktop-integration/openoffice4.1-debian-menus_4.1.5*.deb

Install the PPA for the latest version of FFmpeg.

sudo add-apt-repository --yes ppa:jonathonf/ffmpeg-3
sudo apt update

Install FFmpeg and SoX.

sudo apt -y install ffmpeg sox

FFmpeg and SoX will enable you to record meetings. They will also help in importing media files such as .avi, .flv, .mov and .mp4 into the whiteboard. Verify the installation by checking the versions of both FFmpeg and SoX.

user@vultr:~$ sox --version
sox:      SoX v14.4.1

user@vultr:~$ ffmpeg -version
ffmpeg version 3.4.2-1~16.04.york0.2 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.9) 20160609

Install PostgreSQL

OpenMeetings supports multiple types of database servers, such as MySQL, PostgreSQL, Apache Derby, and Oracle. In this tutorial, we will use PostgreSQL to host the OpenMeeting database.

PostgreSQL is an object-relational database system, known for its stability and speed. The default Ubuntu repository contains an old version of PostgreSQL, so add the PostgreSQL repository.

echo "deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main" | sudo tee /etc/apt/sources.list.d/pgdg.list
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt update

Install the PostgreSQL database server.

sudo apt -y install postgresql

Start the PostgreSQL server and enable it to start automatically at boot time.

sudo systemctl start postgresql
sudo systemctl enable postgresql

Change the password for the default PostgreSQL user.

sudo passwd postgres

Log in as the PostgreSQL user.

sudo su - postgres

Create a new PostgreSQL user for the OpenMeetings user.

createuser openmeetings

You can use any username instead of openmeetings.

Switch to the PostgreSQL shell.

psql

Set a password for the newly created user for the OpenMeetings database.

ALTER USER openmeetings WITH ENCRYPTED password 'DBPassword';

Replace DBPassword with a secure password.

Create a new database for the OpenMeetings installation.

CREATE DATABASE openmeetings OWNER openmeetings;

Exit from the psql shell.

\q

Switch to the sudo user.

exit

Save the file and exit the editor.

Installing OpenMeetings

Since all the required dependencies are installed, create a new user for OpenMeetings. Using a non-root user for running OpenMeetings is recommended for the security of the server.

sudo adduser --home /var/openmeetings --disabled-login --disabled-password --gecos "OpenMeetings User" openmeetings

The command above will also create the home directory of the openmeetings user in /var/openmeetings.

Check the Apache OpenMeetings download page to obtain the link to the latest available release. Download the OpenMeetings archive.

cd /tmp
wget http://www-eu.apache.org/dist/openmeetings/4.0.2/bin/apache-openmeetings-4.0.2.tar.gz

Extract the archive into the /var/openmeetings directory.

sudo tar xf apache-openmeetings-*.tar.gz -C /var/openmeetings

Provide ownership of the files to the OpenMeetings user we have created earlier.

sudo chown -R openmeetings:openmeetings /var/openmeetings

You can now start the application.

sudo su -s /bin/bash -c 'cd /var/openmeetings/ && sh red5.sh' openmeetings

You can now access http://192.168.1.1:5080/openmeetings in your favorite browser. You will see the welcome screen with instructions to install GhostScript.

Since we have already installed GhostScript, proceed further. On the next interface, you will be prompted to provide database server details. Select database type "PostgreSql" and provide your database server details that you configured during the PostgreSQL installation.

Click on the "Check" button and you will get the message: "Database check was successful". Provide your administrator account details and a group name in the next interface.

Configure the basic settings of your installation; such as to allow self-registration, email verification, and default language. Also, provide your SMTP server details. If you do not have an SMTP server ready, you can also provide the SMTP details later in the administrator dashboard.

You will be asked for the path to the binaries of different applications. Provide /usr/bin as the path for ImageMagick, FFmpeg, and SoX. If the application is providing errors for the path entered, then you can use which <binary_name> to find the absolute path to the binary. For example, which ffmpeg should give you /usr/bin/ffmpeg as output. Use /opt/openoffice4 as the path to the OpenOffice binaries.

You can skip the configuration on the next interface since we are going to use the default values. Finally, click the "Finish" button to install the application and write the database.

OpenMeetings is now installed on your server. To make it more production friendly, we will setup Systemd to manage the OpenMeetings server. We will also configure Nginx with a Let's Encrypt SSL as the secured reverse proxy to serve the application.

Setting up Systemd

It is recommended to set up a Systemd service unit to manage the application. This will ensure that the service is automatically started on boot time and failures.

Stop the OpenMeetings server either by pressing CTRL + C or by killing the shell of the openmeetings user.

sudo pkill -KILL -u openmeetings

Create a new Systemd unit file for OpenMeetings.

sudo nano /etc/systemd/system/openmeetings.service

Populate the file.

[Unit]
Description=OpenMeeting Service 
After=network.target

[Service]
Type=simple
User=openmeetings
WorkingDirectory=/var/openmeetings 
ExecStart=/var/openmeetings/red5.sh
Restart=always

[Install]
WantedBy=multi-user.target

Start the OpenMeetings server and enable it to automatically start at boot time.

sudo systemctl start openmeetings
sudo systemctl enable openmeetings

To check the status of the service, you can run the following.

sudo systemctl status openmeetings

You will see a similar output.

user@vultr:~$ sudo systemctl status openmeetings
● openmeetings.service - OpenMeeting Service
   Loaded: loaded (/etc/systemd/system/openmeetings.service; enabled; vendor preset: enabled)
   Active: active (running) since Sun 2018-04-08 19:08:33 UTC; 52s ago
 Main PID: 8788 (java)
   CGroup: /system.slice/openmeetings.service
           └─8788 /usr/bin/java -Dred5.root=/var/openmeetings -Djava.security.debug=failure -Xms256m

Apr 08 19:08:40 vultr red5.sh[8788]: [INFO] [main] org.apache.catalina.core.StandardService - Starti
Apr 08 19:08:40 vultr red5.sh[8788]: Apr 08, 2018 7:08:40 PM org.apache.catalina.core.StandardEngine

...

Setup Nginx as a Reverse Proxy

By default, OpenMeetings listens to port 5080. If the connection between the browser and server are not encrypted with SSL, then logins and other information will be sent using plain text. This might be a potential threat as someone eavesdropping on the network might obtain the information. To mitigate this issue, we will setup Nginx as the reverse proxy which will listen to the default HTTPS port and will proxy all the requests to the OpenMeetings server.

Install Nginx.

sudo apt -y install nginx

Start Nginx and enable it to automatically start at boot time.

sudo systemctl start nginx
sudo systemctl enable nginx

Add the Certbot repository.

sudo add-apt-repository --yes ppa:certbot/certbot
sudo apt-get update

Install Certbot, which is the client application for Let's Encrypt CA.

sudo apt -y install certbot

Note: To obtain certificates from Let's Encrypt CA, the domain for which the certificates are to be generated must be pointed towards the server. If not, make the necessary changes to the DNS records of the domain and wait for the DNS to propagate before making the certificate request again. Certbot checks the domain authority before providing the certificates.

Generate the SSL certificates.

sudo certbot certonly --webroot -w /var/www/html -d meetings.example.com

The generated certificates are likely to be stored in /etc/letsencrypt/live/meetings.example.com/. The SSL certificate will be stored as fullchain.pem and private key will be stored as privkey.pem.

Let's Encrypt certificates expire in 90 days, hence it is recommended to set up auto-renewal of the certificates using Cron jobs.

Open the cron job file.

sudo crontab -e

Add the following line at the end of the file.

30 5 * * * /usr/bin/certbot renew --quiet

The above cron job will run every day at 5:30 AM. If the certificate is due for expiration, it will automatically be renewed.

Create a new configuration file for OpenMeetings.

sudo nano /etc/nginx/sites-available/openmeetings

Populate the file.

server {
    listen 80;
    server_name meetings.example.com;
    return 301 https://$host$request_uri;
}

server {
    listen 443;
    server_name meetings.example.com;

    ssl_certificate           /etc/letsencrypt/live/meetings.example.com/fullchain.pem;
    ssl_certificate_key       /etc/letsencrypt/live/meetings.example.com/privkey.pem;

    ssl on;
    ssl_session_cache  builtin:1000  shared:SSL:10m;
    ssl_protocols  TLSv1 TLSv1.1 TLSv1.2;
    ssl_ciphers HIGH:!aNULL:!eNULL:!EXPORT:!CAMELLIA:!DES:!MD5:!PSK:!RC4;
    ssl_prefer_server_ciphers on;

    access_log  /var/log/nginx/openmeetings.access.log;

location / {
    proxy_pass            http://localhost:5080;        
    proxy_set_header    host $host;
    proxy_http_version  1.1;
    proxy_set_header upgrade $http_upgrade;         
    proxy_set_header connection "upgrade";     
    } 
}

Active the configuration.

sudo ln -s /etc/nginx/sites-available/openmeetings /etc/nginx/sites-enabled/openmeetings

Check for errors in the new configuration file.

sudo nginx -t

If you see the following output, the configuration is error free.

user@vultr:~$ sudo nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

If you have received some kind of error, make sure to double check the path to the SSL certificates. Restart the Nginx web server to implement the change in configuration.

sudo systemctl restart nginx

Before you can start using the application on the SSL secured site, you will need to make a configuration change in OpenMeetings. Login to your OpenMeetings administrative dashboard and navigate to "Administration >> Configuration". In the table with columns ID, key and value, find application.base.url. Change its value to https://meetings.example.com according to your domain name. Save the configuration by clicking the save icon above.

Restart the OpenMeetings service.

sudo systemctl restart openmeetings

Now, you can browse to https://meetings.example.com using your favorite web browser and log in to use the application.

Congratulations, Apache OpenMeetings is now installed on your server. You can invite your friends and start using OpenMeetings for online conferences.

Want to contribute ?

You could earn up to $300 by adding new articles