OpenMeetings是一套免費的Open-Source網頁視訊會議系統(Web-based Video Conferencing System),使用Java語言開發,前端使用Flash作為介面,後端使用免費的Open Source Flash Server
Red5作為Flash串流伺服器,資料庫部分使用
Hibernate技術,理論上可以支援絕大多數的資料庫。由於PostgreSQL對UTF-8字元的支援較佳,故我選擇使用PostgreSQL作為後端的資料庫。
安裝過程大致如下:
0.JDK安裝:這個應該沒太大問題(已經安裝直接跳過)。
1.資料庫調整:OpenMeetings要求要使用UTF-8編碼的資料庫,PostgreSQL對這方面的支援沒有問題。另外需要開放TCP Listen,我們需要調整兩個檔案/var/lib/pgsql/data/postgresql.conf和/var/lib/pgsql/data/pg_hba.conf即可:
postgresql.sh:
yum -y install postgresql-server
sed -i -e "s/#listen_addresses = 'localhost'/listen_addresses = '*'/g" /var/lib/pgsql/data/postgresql.conf
sed -i -e "s/local all all ident sameuser/local all all trust/g" /var/lib/pgsql/data/pg_hba.conf
sed -i -e "s/host all all 127.0.0.1\/32 ident sameuser/host all all 127.0.0.1\/32 md5/g" /var/lib/pgsql/data/pg_hba.conf
sed -i -e "69a\host all all 192.168.1.0\/24 md5" /var/lib/pgsql/data/pg_hba.conf
chkconfig --level 235 postgresql on
/etc/init.d/postgresql start
2.安裝OpenOffice.org並啟動OpenOffice-Service在TCP 8100 port上。
3.安裝ImageMagick(會自動安裝GhostScript)
4.安裝SWFTools
5.安裝FFMpeg
6.安裝Flash Player 10
7.安裝OpenMeetings(含Red5)
8.啟動Red5
openmeetings.sh:
#!/bin/bash
# Name: openmeetings.sh
# Author: Andowson Chang (andowson [at] gmail [dot] com)
# Version: 1.0
# Last Modified: 2009-05-10
#
# install openoffice-service running on port 8100 in headless mode
#
yum -y install openoffice.org-base openoffice.org-headless openoffice.org-writer openoffice.org-impress openoffice.org-calc
#
# generate openoffice startup script
#
echo '#!/bin/bash
# openoffice.org headless server script
#
# chkconfig: 2345 80 30
# description: headless openoffice server script
# processname: openoffice
#
# Author: Vic Vijayakumar
# Modified by Federico Ch. Tomasczik
#
OOo_HOME=/usr/lib/openoffice.org/program
SOFFICE_PATH=$OOo_HOME/soffice.bin
PIDFILE=/var/run/openoffice-server.pid
set -e
case "$1" in
start)
if [ -f $PIDFILE ]; then
echo "OpenOffice headless server has already started."
sleep 5
exit
fi
echo "Starting OpenOffice headless server"
$SOFFICE_PATH -headless -nologo -nofirststartwizard -accept="socket,host=127.0.0.1,port=8100;urp" & > /dev/null 2>&1
touch $PIDFILE
;;
stop)
if [ -f $PIDFILE ]; then
echo "Stopping OpenOffice headless server."
killall -9 soffice.bin
rm -f $PIDFILE
exit
fi
echo "Openoffice headless server is not running."
exit
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
esac
exit 0' > /etc/init.d/openoffice
chmod 755 /etc/init.d/openoffice
chkconfig --level 235 openoffice on
/etc/init.d/openoffice start
#
# install ImageMagick(=>GhostScript will be installed as dependency)
#
yum -y install ImageMagick
#
# install SWFTools
#
yum -y install giflib-devel libjpeg-devel freetype-devel
if [ ! -r swftools-0.9.0.tar.gz ]; then
wget http://www.swftools.org/swftools-0.9.0.tar.gz
fi
tar zxvf swftools-0.9.0.tar.gz
cd swftools-*
./configure
make
make install
cd ..
#
# install FFmpeg
#
if [ ! -r ffmpeg-0.5.tar.bz2 ]; then
wget http://www.ffmpeg.org/releases/ffmpeg-0.5.tar.bz2
fi
tar jxvf ffmpeg-0.5.tar.bz2
cd ffmpeg-*
./configure
make
make install
cd ..
#
# install Flash player 10
#
if [ ! -r flash-plugin-10.0.22.87-release.i386.rpm ]; then
wget http://fpdownload.macromedia.com/get/flashplayer/current/flash-plugin-10.0.22.87-release.i386.rpm
fi
rpm -Uvh flash-plugin-10.0.22.87-release.i386.rpm
#
# install OpenMeetings with Red5
#
if [ ! -r openmeetings_0_8_rc2.zip ]; then
wget http://openmeetings.googlecode.com/files/openmeetings_0_8_rc2.zip
fi
unzip openmeetings_0_8_rc2.zip
mv red5-0.8.RC3-build-hudson-red5_jdk6_stable-79_2 /var/red5
# modify hibernate.cfg.xml
cd /var/red5/webapps/openmeetings/conf
sed -i -e '12c\ <property name="connection.username">openmeetings</property>' hibernate.cfg.xml
sed -i -e '13c\ <property name="connection.password">openmeetings</property>' hibernate.cfg.xml
sed -i -e '16c\ <property name="connection.driver_class">org.postgresql.Driver</property>' hibernate.cfg.xml
sed -i -e '18c\ <property name="dialect">org.hibernate.dialect.PostgreSQLDialect</property>' hibernate.cfg.xml
sed -i -e '19c\ <property name="connection.url">jdbc:postgresql://localhost/openmeetings</property>' hibernate.cfg.xml
sed -i -e '33c\ <property name="hibernate.query.factory_class">org.hibernate.hql.classic.ClassicQueryTranslatorFactory</property>' hibernate.cfg.xml
sed -i -e '17d' hibernate.cfg.xml
chmod 755 /var/red5/red5-shutdown.sh
#
# create user and database openmeetings
#
sudo -u postgres psql -c "create user openmeetings createdb;" template1
sudo -u postgres psql -c "create database openmeetings with encoding 'unicode';" -U openmeetings template1
sudo -u postgres psql -c "alter user openmeetings nocreatedb;" template1
sudo -u postgres psql -c "alter user openmeetings with encrypted password 'openmeetings';" template1
#
# start up red5
#
cd /var/red5
nohup ./red5.sh &
9.開啟瀏覽器,輸入網址http://192.168.1.3:5080/openmeetings/install
按照畫面上的提示輸入相關資訊,其中兩個轉檔工具路徑如下:
SWFTools Path /usr/local/bin
ImageMagick Path /usr/bin
注意:這邊建議先關閉系統的防火牆,等測試好了再啟用。
需要設定的有下列:
1935:tcp 9999:tcp 8088:tcp 5080:tcp 8443:tcp
可以利用以下的指令來查詢:
netstat -ant|grep LISTEN|grep -v 192 |grep -v 127
[root@www red5]# netstat -ant|grep LISTEN|grep -v 192 |grep -v 127
tcp 0 0 0.0.0.0:49952 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:1935 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:9999 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:8088 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:5080 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:5432 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:8443 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN
10.停止服務可以使用
cd /var/red5
./red5-shutdown.sh
參考資料:
http://code.google.com/p/openmeetings/wiki/InstallationOpenMeetings
http://code.google.com/p/openmeetings/wiki/TechnologyPortfolio