Monday, August 9, 2010


Thefollowing instructions will guide you to install BigBlueButton onCentOS. So far the instructions have been tested on CentOS 5.3 
Instructions#### NOTE: If your "hostname" command does not return the proper (working)
#### IP or domain - YOU MUST REPLACE `hostname` with the proper domain or IP
#### manually - it appears several times in this documentation
#### or, you can run "hostname to make this script work
# we'll work mostly from the /tmp/ directory:
cd /tmp

# install JDK 6
yum install -y java-1.6.0-openjdk

# install MySQL server
yum install -y mysql-server
service mysqld start
chkconfig mysqld on

# Tomcat6 is not available in the main repos, so we will
# use the jpackage repos:
yum install -y jpackage-utils
cat jpackage17.repo | sed 's/1\.7/5.0/'
| sed 's/\[jpack/\[5jpack/'
mv jpackage17.repo /etc/yum.repos.d/
yum makecache

# now you should be able to install tomcat6 easily:
yum install -y tomcat6

# start tomcat and configure it to automatically start on boot:
service tomcat6 start
chkconfig tomcat6 on

# for compiling your own packages, you will need some development tools
yum -y install gcc gcc-c++ compat-gcc-32 compat-gcc-32-c++
# some more requirements for packages that we will soon install:
yum -y install -y zlib zlib-devel freetype freetype-devel libjpeg libjpeg-devel

# install openoffice
yum -y groupinstall 'Office/Productivity'
yum -y install

# download openoffice server initializing script
cd /etc/init.d
# start the openoffice server
chmod +x /etc/init.d/bbb-openoffice-headless
chkconfig --add bbb-openoffice-headless
chkconfig bbb-openoffice-headless on
service bbb-openoffice-headless start

# install swftools:
tar xzf swftools-0.8.1.tar.gz 
cd swftools-0.8.1
make install
cd ..
# install ImageMagick:
yum install -y ImageMagick
# nginx also needs an alternative repo - using EPEL
rpm -Uvh
yum makecache

# now install nginx:
yum install -y nginx

# install activemq from source:
useradd activemq
tar xzf apache-activemq-5.2.0-bin.tar.gz 
mv apache-activemq-5.2.0
ln -s /opt/apache-activemq-5.2.0
chown -R activemq.activemq /opt/apache-activemq-5.2.0
chown -R activemq.activemq /opt/activemq

# Now get the init.d file that we created for you
mv activemq /etc/init.d/
# now make that file executable, start the service and configure it to auto-start
chmod a+x /etc/init.d/activemq
service activemq start
chkconfig activemq on

# now we will install Red5 from source
useradd red5
tar xvf red5-0.8.tar.gz 
mv red5-0.8
chown -R red5.red5 /opt/red5-0.8
# Now get the init.d file that we created for you
mv red5 /etc/init.d/
# now chmod the file, start and config auto-start:
chmod a+x /etc/init.d/red5
service red5 start
chkconfig red5 on

  • Now you need to install the oflaDemo that comes with Red5. This is a manual process.
Go to: http://< YOURIP-OR-DOMAIN >:5080/ 
Click on "Click here to install demos" and then choose oflaDemo java 6. 
Go to: http://< YOURIP-OR-DOMAIN >:5080/demos/ 
Click "View demo" under "OFLA DEMO", which should take you to: http://< YOURIP-OR-DOMAIN >:5080/demos/ofla_demo.html 
Inthe upper right corner, change localhost to your domain or IP, like:rtmp://< YOURIP-OR-DOMAIN >/oflaDemo Click connect 
You would see a list of available videos. Select one to play. 
Now prepare for Asterisk build:  
yum install -y kernel-devel

# On Xen VM you need:
# yum install -y kernel-xen-devel

yum install -y ncurses-devel openssl-devel newt-devel zlib-devel bison

# install asterisk
tar zxvf asterisk-1.4.25.tar.gz
cd asterisk-1.4.25
make install
make samples
make config
cd ..
# configure asterisk
mv bbb_extensions.conf /etc/asterisk/
echo "#include \"bbb_extensions.conf\""

mv bbb_sip.conf /etc/asterisk/bbb_sip.conf
echo "#include \"bbb_sip.conf\""

mv /usr/lib/asterisk/modules/
chmod 755
# set autoload module BigBlueButton conference
echo "load =>"

chmod a+x

# set enabled to yes in manager.conf
cat /etc/asterisk/manager.conf | sed 's/^enabled = no/enabled = yes/'
mv -f /tmp/manager.conf /etc/asterisk/
# add account to manager.conf
echo "

; BigBlueButton: Enable Red5 to connect
secret = secret
permit =
read = system,call,log,verbose,command,agent,user
write = system,call,log,verbose,command,agent,user

# configure nginx
mkdir -p /etc/nginx/sites-available
mkdir -p /etc/nginx/sites-enabled

mv -f nginx.conf /etc/nginx/
cat nginx-bigbluebutton.conf  | sed "s/`hostname`/"
rm nginx-bigbluebutton.conf
ln -s /etc/nginx/sites-available/bigbluebutton /etc/nginx/sites-enabled/bigbluebutton
service nginx start
chkconfig nginx on

# download BBB apps
cd /tmp/
mkdir bbb-install
cd bbb-install
# configure MySQL database
echo "create database bigbluebutton_dev;"
| mysql -u root
echo "grant all on bigbluebutton_dev.* to 'bbb'@'localhost' identified by 'secret';"
| mysql -u root
echo "commit;"
| mysql -u root

# now install the webapp
cp /tmp/bbb-install/bigbluebutton.war /var/lib/tomcat6/webapps/bigbluebutton.war

# download blank slide and thumbnail dummies
mkdir -p /var/bigbluebutton/blank
cd /var/bigbluebutton/blank
wget Generate a GUID (manual step) 
For security, you need to generate a GUID. You can use an online GUID generator, such as this one. Keep this GUID handy as we will need it shortly. 
Determine PDF2SWF, CONVERT and GS applications (manual step) 

# Make a note of where pdf2swf is installed
      which pdf2swf
      # You should see something like
# /usr/local/bin/pdf2swf
# Make a note of where the convert application is installed
      which convert

      # You shoud see something like.
# /usr/bin/convert
# Note where GhostScript is installed
      which gs

      # You should see something like.
# /usr/bin/gsEdit bbb-web properties 
vi /var/lib/tomcat6/webapps/bigbluebutton/WEB-INF/classes/

# Change the following:
#  - swfToolsDir to the directory where pdf2swf is located (in this example, it is /usr/local/bin/)
#  - imageMagickDir to the directory where convert is located (in this example, it is /usr/bin/)
#  - ghostScriptExec to point to the gs application (in this example, it is /usr/bin/gs)
#  - change bigbluebutton.web.serverURL=http://
#  - set beans.dynamicConferenceService.securitySalt to be equal to the guid we just generated (i.e. beans.dynamicConferenceService.securitySalt=)Back to the automated tasks:  
# create nopdfworkaround file
mkdir /etc/bigbluebutton
echo '%!
/pdfmark {cleartomark} bind def'

# restart tomcat
service tomcat6 restart

# make sure that your database was created:
echo "show tables"
| mysql -u root bigbluebutton_dev
echo "select * from user"
| mysql -u root bigbluebutton_dev

# setup the slide upload folder
mkdir /var/bigbluebutton
chown -R tomcat:adm /var/bigbluebutton
chmod -R 777

# setup the red5 apps
tar xvf bigbluebutton-apps.tar.gz
rsync -a webapps/* /opt/red5-0.8/webapps/
rm -rf webapps

# install video app
cd /opt/red5-0.8/webapps
cp /tmp/bbb-install/video.tar.gz .
tar xvf video.tar.gz
rm -f video.tar.gz

# install voice app
cp /tmp/bbb-install/sip.tar.gz ./
tar xvf sip.tar.gz
rm -f sip.tar.gz

# install bbb-client:
mkdir -p /var/www/bigbluebutton
cd /var/www/bigbluebutton
cp /tmp/bbb-install/client.tar.gz ./
tar xvf client.tar.gz
rm -f client.tar.gz

cat /var/www/bigbluebutton/client/conf/config.xml | sed "s/`hostname`/" | sed "s|conf/join-mock.xml|http://`hostname`/bigbluebutton/conference-session/enter|" > /tmp/config.xml
mv -f /tmp/config.xml /var/www/bigbluebutton/client/conf/config.xml

# install bbb-default pages
cd /var/www/
cp /tmp/bbb-install/bbb-default.tar.gz .
tar xvf bbb-default.tar.gz
mv web ./bigbluebutton-default
rm -rf bbb-default.tar.gzNowwe need to create bbb_api_conf.jsp, which will hold our GUID and theBigBlueButtonURL. Be sure to replace < YOUR-GUID > and with the GUID we generated earlier and your IP,respectively. 
echo "<%!
// This is the security salt that must match the value set in the BigBlueButton server
String salt = \"\";

// This is the URL for the BigBlueButton server
String BigBlueButtonURL = \"http:///bigbluebutton/\";
/var/lib/tomcat6/webapps/bigbluebutton/demo/bbb_api_conf.jspInstalling Desktop Sharing (optional) 
# install deskshare app
# Desktop sharing uses Xuggler.  Before you install desktop sharing in BigBlueButton
# please read how this changes the licensing of BigBlueButton from LGPL to AGPL.
# ... llingDesktopSharing 

cp /tmp/bbb-install/deskshare.tar.gz /opt/red5-0.8/webapps/
cd /opt/red5-0.8/webapps
tar zxvf deskshare.tar.gz
rm -f deskshare.tar.gzDesktopsharing is disabled by default. To enable it, edit"/var/www/bigbluebutton/client/conf/config.xml" and uncomment theDeskShareModule. You will find the DeskshareModule commented asfollows: 

Finish the installation 
# create directory for log files
mkdir /var/log/bigbluebutton

# create an empty log file
touch /var/log/bigbluebutton/bbb-web.log
chmod 777

# restart things:
service activemq restart
service asterisk restart
service red5 restart
service tomcat6 restart