Howto install OpenMeetings 2.2 server on a Debian Wheezy box
This guide is written specifically to cover a lack of quality documentation for the installation procedure of an OpenMeetings 2.2 server on a Debian Wheezy box.
It will be based on the manual available already for this procedure (but relatively badly structured and written in a rather improvable English), by Alvaro Bustos with the help of Federico Christian Tomasczik. Thanks to both of them. My manual is mostly a rewrite of the information in their guide, hopefully with enough precision to allow someone to script it. Also the fact that the guide is only available publicly as PDF is not ideal. Finally, there is a lot of space for interpretation in the dynamic links provided which, in my case, made me mistakenly go for 3.0 instead of my intended 2.2, which had considerable consequences in the particular task I was trying to achieve: write an OpenMeetings plugin for Chamilo.
Because that’s probably the easiest way to do it for anyone reading this manual, I will be explaining on the basis of a Digital Ocean virtual machine (or “Droplet”). I found that the $40/month (4GB of RAM) image works fine, but you can try with a 2GB one, maybe that works out too.
If you never tried Digital Ocean before, you have two options:
- You create an account, pay $20 in advance with PayPal, create a new Droplet, choose Debian Wheezy 64bit (I picked New York 2 Data Center, but it *really* shouldn’t matter where it is) and jump to the beginning of this tutorial or
- Find a machine where you can install Debian Wheezy (either virtual or physical), make sure it’s got an internet connection and start working
And of course, any Debian Wheezy machine would do.
For the sake of simplicity, I’ll assume you got root access to it.
I’ll also pass the OpenMeetings “client” install. If you don’t know how to install Flash, you should look for that information somewhere else.
I usually use VIM as an editor, so if the Debian box is new, I install vim:
apt-get install vim
Finally, I’ll assume that your server is available through a simple IP address or a domain name. Below, I will assume a ficticious URL of “video.openmeetings.net”. Replace that string with yours however you see fit.
Without further ado, let’s begin.
For some reason, Red5 seems to be failing to start when it cannot find a fully qualified domain name (FQDN) for the server on which it runs. To avoid this, simply put the right (or a fake) domain name in /etc/hosts, at the end of the first line. Following the logic above, I’m calling it video.openmeetings.net. Feel free to call it whatever you like, but try to use something that isn’t used by anyone else:
127.0.0.1 localhost video.openmeetings.net
Create an /etc/apt/sources.list.d/openmeetings.list with the following contents:
deb-src http://http.debian.net/debian/ wheezy main
deb http://http.debian.net/debian/ wheezy contrib non-free
deb http://http.debian.net/debian/ wheezy-updates main contrib
deb-src http://http.debian.net/debian/ wheezy-updates main contrib
deb http://www.deb-multimedia.org wheezy main non-free
Create an /etc/apt/sources.list.d/oracle-java.list with the following contents (because OpenMeetings does not officially support OpenJDK yet):
Then do the following (on the command line):
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys EEA14886
apt-get update && apt-get install -y --force-yes deb-multimedia-keyring oracle-java6-installer
You’ll have to agree to the Oracle Binary Code license terms with the last command (in the oracle-java6-installer). This is manual (as far as I know, there is no way to automate it).
Now, we want to make sure this installed version of Java will be the one used for the rest of the processes on this server, by updating the alternatives and picking the one that says java-6-oracle and “jre” in the same path:
update-alternatives --config java
If this is a new, clean, server, the command will only mention that there is only one alternative, so that there is nothing to select.
You may want to also automatically set the environment variable, feature which is provided by the following package in WebUpd8′s repository:
apt-get install oracle-java6-set-default
Now we want to install Libreoffice, as it will be used by JODconverter (installed below) to convert documents:
apt-get install -y --force-yes libreoffice
On Digital Ocean’s machines, the download is super-fast (around 10 seconds for 450MB) and the whole installation should take about 30 seconds max.
We also need to install a few conversion libraries:
apt-get install -y --force-yes imagemagick libgif4 libjpeg62 libmp3lame0
…and the SWFtools (this is one of the trickiest parts for Debian/Ubuntu installations, but luckily someone packaged it)
dpkg -i swftools_0.9.1-1_amd64.deb
Note: for 32bit, you’ll have to download http://assiste.serpro.gov.br/libs/swftools_0.9.1-1_i386.deb
Now the ffmpeg library needs to be installed by hand in order to get access to a more recent version of the lib. In effect, Debian Wheezy “deb-multimedia” repository’s version is 1.0.8 and we’d like to get 1.1.2. Note that, during the “make” process (which might take more than 10 minutes), you can continue the installation with the other steps in a parallel terminal. Just don’t forget, at the end, to launch the checkinstall process.
apt-get install -y --force-yes libart-2.0-2 libt1-5 zip unzip bzip2 subversion git-core checkinstall yasm texi2html libfaac-dev libfaad-dev libmp3lame-dev libsdl1.2-dev libx11-dev libxfixes-dev libxvidcore4 libxvidcore-dev zlib1g-dev libogg-dev sox libvorbis0a libvorbis-dev libgsm1 libgsm1-dev libfaad2 flvtool2 lame
tar zxf ffmpeg-1.1.2.tar.gz
./configure --enable-libmp3lame --enable-libxvid --enable-libvorbis --enable-libgsm --enable-gpl --enable-nonfree
mkdir /usr/local/share/ffmpeg /usr/local/share/man /usr/local/include
The “make” command is probably the step that will take the most time of the whole installation (around 12 minutes, just by itself).
Press “Enter” 3 times to select the default options suggested by the installer.
This will (slowly) make a Debian package (ffmpeg_1.1.2-1_amd64.deb) and install it (as I mentioned, this might take more than 12 minutes on the suggested virtual machine).
It is suggested you “hold” this package version, to prevent Debian from trying to update it during the next apt-get upgrade. To do this:
apt-mark hold ffmpeg
At this point, feel free to delete everything you want from the /opt directory where we downloaded and built the ffmpeg package:
rm -rf /opt/ffmpeg*
Install the MySQL server (there is a default database used by OpenMeetings but it’s not meant for production).
apt-get install mysql-server
Give it a root password (twice). Note that it’s considered *really bad practice* to leave a blank password, so please think about something simple and safe instead of avoiding your responsibility. It also has nothing to do with system’s root password.
Connect to MySQL to prepare the openmeetings database:
mysql -uroot -p
mysql> CREATE DATABASE openmeetings DEFAULT CHARACTER SET 'utf8';
mysql> GRANT ALL PRIVILEGES ON openmeetings.* TO 'openmeetings'@'localhost' IDENTIFIED BY 'some-password-here' WITH GRANT OPTION;
Now we’re ready to install OpenMeetings. You should get the latest stable version from here: http://openmeetings.apache.org/downloads.html
Other sources are likely to be less stable and I certainly did loose a lot of time on this, so I definitely recommend the stable. The following code is based on the stable that was downloadable at the time of writing, so you might want to check the link above. Beware that the link above does not provide a direct link for the download: it sends you to a mirrors page, from which you’ll have to pick a mirror. The command below downloads it directly from one of the mirrors.
tar zxf apache-openmeetings-2.2.0.tar.gz
mv persistence.xml persistence.xml-ori
mv mysql_persistence.xml persistence.xml
For the sake of copy-paste speed, you can launch all but the last command in one go with:
mkdir /opt/red5 && cd /opt/red5 && wget http://www.webhostingjams.com/mirror/apache/openmeetings/2.2.0/bin/apache-openmeetings-2.2.0.tar.gz && tar zxf apache-openmeetings-2.2.0.tar.gz && rm apache-openmeetings-2.2.0.tar.gz && cd webapps/openmeetings/WEB-INF/classes/META-INF/ && mv persistence.xml persistence.xml-ori && mv mysql_persistence.xml persistence.xml
Here is where you’ll have to configure the XML file to set the db name, username and password for the openmeetings database we created above.
Find the “Url=” part. A few lines below, you’ll find a Username and a Password fields. Place the right ones there and save (with :wq if using VIM).
, Password=some-password-here" />
Now we’ll install the Java to MySQL connector (MySQL Connector/J aka MySQL JDBC).
tar zxf mysql-connector-java-5.1.28.tar.gz
cp mysql-connector-java-5.1.28/mysql-connector-java-5.1.28-bin.jar /opt/red5/webapps/openmeetings/WEB-INF/lib/mysql-connector-java.jar
rm -rf mysql-connector*
Download the JOD converter to be able to convert files uploaded to OpenMeetings. Note that we’ll leave it into /opt for now, as OpenMeetings allows us to select the source for this converter. Also note that the version we download is version 3, while the one available in Wheezy is version 2.2.2 (I have no idea if this is relevant, but considering it is not to be installed or anything, the effort is not really worth the question in this case).
Newer versions might come in the future, so make sure you check http://code.google.com/p/jodconverter/downloads/list for any other version.
Now our red5 folder is ready to be put online, so we’ll move it to somewhere more permanent.
mv red5 /usr/lib
chown -R nobody /usr/lib/red5
Starting and stopping OpenMeetings is kind of complex, because there are several services involved. Luckily, someone wrote a script for us which, although not perfect, will help us solve this problem quickly:
mv OpenMeetings\ 2.x\ run\ script\ Squeeze/red5 /etc/init.d/
chmod +x /etc/init.d/red5
And then we can finally start OpenMeetings (or should I say the Red5 server, which serves OpenMeetings):
Now load it from your browser on http://video.openmeetings.net:5080/openmeetings/install and follow the information carefully.
Please note that the database doesn’t have to be configured through the web interface: it’s already been done in the XML file (remember?).
You will have to indicate the paths to the different conversion services, though.
To do this, you only need to know the following:
FFMPEG Path = /usr/local/bin
JOD Path = /opt/jodconverter-core-3.0-beta-4/lib
This should be enough for you to complete the installation and be able to use OpenMeetings! Have fun!
Bonus: if you want your server to be able to send e-mails, do the following:
apt-get install exim4
And then type “Enter” for every question except the one with 5 options beginning with “Internet sites”. There, you should select the first option “Internet sites” if you don’t know better, of course. Then go on with just “Enter” through it until you’re back on the command line.