Openmeetings provides video conferencing, instant messaging, white board, collaborative document editing and other groupware tools using API functions of the Red5 Streaming Server for Remoting and Streaming….according to their official site.

In this post, I’ll describe how to install openmeetings 3.0.5 on FreeBSD 10.

Install database

openmeetings comes with Apache Derby database, but they recommend using some other type of database for production use. We’ll use MariaDB which is a drop-in replacement for MySQL. If you already have MySQL or MariaDB running, skip to the next section.

pkg install mariadb55-server

Add this line in /etc/rc.conf so the database starts on boot.

mysql_enable="YES"

Start the database.

service mysql-server start

and do an initial configuration with:

mysql-secure-installation

Configure your root password for the database and accept the defaults.

Create database

Create the database first by invoking the mysql tool.

mysql -u root -p

Type this to create the database.

CREATE DATABASE openmeetings DEFAULT CHARACTER SET 'utf8';
GRANT ALL PRIVILEGES ON openmeetings.* TO 'openmeetings'@'localhost' IDENTIFIED BY 'change_password' WITH GRANT OPTION;
quit

In this case, we created a database called openmeetings and made the user openmeetings@localhost a super user with a password change_password. Change according to your needs.

Java install

openmeetings depends on Java, so we’ll install the latest run-time environment.

pkg install openjdk8-jre

Edit /etc/fstab and add these lines:

fdesc   /dev/fd         fdescfs         rw      0       0
proc    /proc           procfs          rw      0       0

You don’t have to reboot for these “filesystems” to take effect. Just mount them right away.

mount -t fdescfs fdesc /dev/fd
mount -t procfs proc /proc

Install tools

We’ll have to install the following tools that are in use by openmeetings.

pkg install ImageMagick
pkg install swftools
pkg install libreoffice
pkg install sox

We also have to install ffmpeg, but the default package doesn’t come with lame, so we’ll have to install it from the ports.
If you don’t have the ports tree, get it with:

portsnap fetch && portsnap extract

If you already have the ports tree, install ffmpeg from there. Make sure you select lame.

cd /usr/ports/multimedia/ffmpeg
make install clean

01
The ffmpeg install takes a while. On a test VM with SSD, 1CPU, 1GB RAM it took about 25 minutes.

Install openmeetings

Create the directories and get the zip archive first.

cd /usr/local
mkdir openmeetings && cd openmeetings
wget http://www.webhostingjams.com/mirror/apache/openmeetings/3.0.5/bin/apache-openmeetings-3.0.5.zip
unzip apache-openmeetings-3.0.5.zip   
rm apache-openmeetings-3.0.5.zip

We need a MySQL connector for Java. It’s not a direct download and it requires a free registration. Go to http://dev.mysql.com/downloads/connector/j/ and download the zip file.

02
Put this file under /tmp. Then do:

cd /tmp
unzip mysql-connector-java-5.1.35.zip
cd mysql-connector-java-5.1.35
cp mysql-connector-java-5.1.35-bin.jar /usr/local/openmeetings/webapps/openmeetings/WEB-INF/lib/
cd /usr/local/openmeetings/webapps/openmeetings/WEB-INF/lib/
cp /usr/local/openmeetings/webapps/openmeetings/WEB-INF/classes/META-INF/mysql_persistence.xml persistence.xml

Edit persistence.xml and look for the username and password. Change this so it reflects the username and password that you choose when you created the database.

03
Another requirement is the jodconverter. It’s for PDF/DOC conversion.

cd /tmp
wget https://jodconverter.googlecode.com/files/jodconverter-core-3.0-beta-4-dist.zip --no-check-certificate
unzip jodconverter-core-3.0-beta-4-dist.zip

Finally, let’s install openmeetings.

cd /usr/local/openmeetings/webapps/openmeetings
cp -R /tmp/jodconverter-core-3.0-beta-4 .
cd /usr/local/openmeetings/
sh red5.sh

It takes 3-5 mins. Even if you see nothing is moving, just wait. When you see something like “…sendMails done.” you are pretty much done.

04
Now, go to the following URL to access openmeetings for the first time.
http://your_ip_or_server_name:5080/
Openmeetings will complain that some components are missing, just ignore them.

05
Switch from Apache Derby to MySQL and fill out the form. Use the same username and password that you used when created the database.

06
Click Check and make sure it says that the database check was successful.

07
Enter the username and password and configure your e-mail address and the time zone.

08
Change something if you want, but it’s fine with the defaults.

09
When the screen below shows up, change the paths for SWFTools, ImageMagick, FFMPEG, sox, JOD and LibreOffice. Pretty much everything is /usr/local/bin except for JOD which is /usr/local/openmeetings/webapps/openmeetings/jodconverter-core-3.0-beta-4/lib

10
I choose the defaults here, I am not using SIP.

11
Click Finish and you are ready to go. Click on Enter the Application then log in.

12
13

Auto start

Let’s install bash first. Both start/stop scripts for red5 rely on bash.

pkg install bash
cd /bin
ln -s /usr/local/bin/bash

Then, create a rc startup script.

cd /usr/local/etc/rc.d

Name the file openmeetings and copy and paste the following.

# cat openmeetings
#!/bin/sh
#
# PROVIDE: openmeetings
# REQUIRE: LOGIN
# KEYWORD: shutdown

. /etc/rc.subr

name="openmeetings"
rcvar=openmeetings_enable

command="/usr/local/openmeetings/om-start.sh"

run_rc_command "$1"

Make sure the script is executable.

chmod 555 openmeetings

Edit /etc/rc.conf and add the following line so openmeetings starts on boot.

openmeetings_enable="YES"

Finally, go to the openmeetings folder, create a file called om-start.sh and add the following.

#!/bin/sh
cd /usr/local/openmeetings
sh red5.sh > /dev/null 2> /dev/null &

Make sure it’s executable.
If you want to stop red5, the stop script is under /usr/local/openmeetings.
Just execute red5-shutdown.sh.
Congrats! You are on your own now, check the official site for more information.


More Posts


Amazon AWS Command Line Interface
March 10, 2015

Amazon AWS Command Line Interface

pfSense 2.2 & Amazon AWS site-to-site
March 3, 2015

pfSense 2.2 & Amazon AWS site-to-site

SSH public-key authentication for scp
January 22, 2015

SSH public-key authentication for scp

Azure <---> FreeBSD site-to-site VPN (IPsec)
December 29, 2014

Azure <---> FreeBSD site-to-site VPN (IPsec)