Cài đặt BigBlueButton trên Ubuntu 10

Giới thiệu:
BigBlueButton (BBB) là một web conferencing mã nguồn mở, cho phép các trường học hoặc các công ty tạo một lớp học từ xa cho các sinh viên, nhân viên, hoặc tổ chức những cuộc họp thông qua giao diện web. BBB hỗ trợ chia sẽ được nhiều loại tài liệu như: PDF, PPT, DOC, XLS, office 2007, office 2010, *JPG… Ngoài ra BBB còn có thể share desktop, thao tác viết bảng, chat, truyền videos thông qua Webcam, camera.
BBB sử dụng hơn mười thành phần mã nguồn mở như: asterisk, red5, apache MQ, tomcat 6, pdf2swf, nginx, open office, mysql, grails, ghostscript, xuggler, và imagemagick.
Trong bài này, mình sẽ hướng dẫn cách cài đặt BigBlueButton 0.71a trên Ubuntu 10.x 🙂
Chuẩn bị:
- Hệ thống sử dụng hệ điều hành Ubuntu 10.04x hoặc mới hơn.
- Đã mở các cổng: 80 (HTTP), 1935 (RTMP) và 9123 (Desktop sharing).
Tiến hành cài đặt và cấu hình.
Đăng nhập bằng quyền root
|
1
|
sudo –i |
Đảm bảo hệ thống sử dụng card có tên eth0 để kết nối tới Internet. Giả sử hệ thống đang sử dụng card eth1 để kết nối tới Internet, chúng ta có thể thay đổi thành card eth0 như sau:
|
1
|
vi /etc/udev/rules.d/70-presistent-net.rules |
Nội dung hiển thị mẫu:
|
1
2
3
4
5
6
7
8
9
10
11
|
# This file was automatically generated by the /lib/udev/write_net_rules# program, run by the persistent-net-generator.rules rules file.## You can modify it, as long as you keep each rule on a single# line, and change only the value of the NAME= key.# PCI device 0x1022:0x2000 (pcnet32)SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:23:d1:b3", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"# PCI device 0x1022:0x2000 (pcnet32)SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:dd:b4:51", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0" |
Chúng ta sẽ thay đổi tên card trong phần Name, sau đó lưu file và tiến hành khởi động lại hệ thống.
Cập nhật hệ thống trước khi cài đặt:
|
1
2
|
apt-get updateapt-get upgrade |
Cài đặt MySQL:
|
1
|
apt-get install mysql-server |
Cài đặt Tomcat:
|
1
|
apt-get install tomcat6 |
Sau khi cài đặt xong tomcat6, kiểm tra lại bằng cách sử dụng trình duyệt và vào địa chỉ http://localhost:8080/ nếu có kết quả “It’s work” hiển thị thì bạn đã cài đặt tomcat6 thành công.
Cài đặt swftools
|
1
|
apt-get install swftools |
Nếu hệ thống báo không có gói cài đặt này thì chúng ta sẽ thay đổi nội dung file sources.list như sau:
|
1
|
vi /etc/apt/sources.list |
Bỏ chú thích dòng: deb http://archive.canonical.com/ubuntu lucid partner
Cài đặt ImageMagick:
|
1
|
apt-get install imagemagick |
Cài đặt Nginx
|
1
|
apt-get install nginx |
Cài đặt ActiveMQ
|
1
2
3
4
5
6
|
mkdir /tmp/bbbcd /tmp/bbbwget http://mirrors.ibiblio.org/pub/mirrors/maven2/org/apache/activemq/apache-activemq/5.4.1/apache-activemq-5.4.1-bin.tar.gztar zxvf apache-activemq-5.4.1-bin.tar.gzmv /tmp/bbb/apache-activemq-5.4.1 /usr/share/activemqchown -R root:root /usr/share/activemq |
ActiceMQ dựa trên Jsvc, vì thế chúng ta sẽ cài thêm Jsvc
|
1
|
apt-get install jsvc |
Cài đặt red5:
|
1
2
3
4
|
cd /tmp/bbbwget http://bigbluebutton.org/downloads/0.70/red5-0.9.1.tar.gztar xvf red5-0.9.1.tar.gzmv /tmp/bbb/red5-0.9.1 /usr/share/red5 |
Tạo một red5 user mới:
|
1
|
adduser --system --home /usr/share/red5 --no-create-home --group --disabled-password --shell /bin/false red5 |
Phân quyền:
|
1
2
3
4
5
|
chown -R root:root /usr/share/red5chown -R red5:adm /usr/share/red5/logchmod 755 /usr/share/red5/logchgrp red5 /usr/share/red5/webappschmod 775 /usr/share/red5/webapps |
Tải về bộ cài đặt của BigBlueButton:
Ở đây mình sẽ tải về phiên bản BigBlueButton 0.71a với những link bên dưới:
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
cd /tmp/bbbwget http://bigbluebutton.org/downloads/0.71a/init-scripts.tar.gzwget http://bigbluebutton.org/downloads/0.71a/freeswitch-config.tar.gzwget http://bigbluebutton.org/downloads/0.71a/red5-bigbluebutton.tar.gzwget http://bigbluebutton.org/downloads/0.71a/red5-deskshare.tar.gzwget http://bigbluebutton.org/downloads/0.71a/red5-sip.tar.gzwget http://bigbluebutton.org/downloads/0.71a/red5-video.tar.gzwget http://bigbluebutton.org/downloads/0.71a/www-bigbluebutton-default.tar.gzwget http://bigbluebutton.org/downloads/0.71a/www-bigbluebutton.tar.gzwget http://bigbluebutton.org/downloads/0.71a/bigbluebutton.warwget http://bigbluebutton.org/downloads/0.71a/nginx-bigbluebutton.confwget http://bigbluebutton.org/downloads/0.71a/bbb-conf |
Cấu hình tự động khởi động ActiceMQ, bbb-openoffice-headless và red5 mỗi khi hệ thống được bật
|
1
2
3
4
5
6
7
8
|
cd /etc/init.dtar xzvf /tmp/bbb/init-scripts.tar.gzchmod +x /etc/init.d/activemqchmod +x /etc/init.d/red5chmod +x /etc/init.d/bbb-openoffice-headlessupdate-rc.d activemq defaultsupdate-rc.d red5 defaultsupdate-rc.d bbb-openoffice-headless defaults |
Cài đặt FreeSWITCH:
|
1
2
3
4
|
apt-get install python-software-propertiesadd-apt-repository ppa:freeswitch-drivers/freeswitch-nightly-driversapt-get updateapt-get install freeswitch freeswitch-lang-en |
Cấu hình FreeSWITCH:
|
1
2
3
4
5
|
cd /opt/freeswitch/tar xzvf /tmp/bbb/freeswitch-config.tar.gzchown -R freeswitch:daemon confchmod -R 755 confsed -i 's/FREESWITCH_ENABLED=\"false\"/FREESWITCH_ENABLED=\"true\"/g' /etc/default/freeswitch |
Cấu hình Nginx:
Thay đổi giá trị <YOUR-IP> thành địa chỉ IP hoặc domain của hệ thống.
|
1
|
cat /tmp/bbb/nginx-bigbluebutton.conf | sed "s/192.168.0.35/< YOUR-IP >/" > /etc/nginx/sites-available/bigbluebutton |
Bật Bigbluebutton nginx config:
|
1
|
ln -s /etc/nginx/sites-available/bigbluebutton /etc/nginx/sites-enabled/bigbluebutton |
Cài đặt OpenOffice:
|
1
|
apt-get install openoffice.org |
Khởi động OpenOffice như một dịch vụ:
|
1
|
service bbb-openoffice-headless start |
Disable tính năng bảo mật cho Tomcat6
|
1
|
sed -i "s/#TOMCAT6_SECURITY=yes/TOMCAT6_SECURITY=no/" /etc/default/tomcat6 |
Cài đặt Database:
Đăng nhập vào Mysql Server với quyền root bằng lệnh:
|
1
|
mysql -u root -p |
Tại dấu nhắc lệnh mysql> gõ:
|
1
2
3
4
|
create database bigbluebutton_dev;grant all on bigbluebutton_dev.* to 'bbb'@'localhost' identified by 'secret';flush privileges;quit |
Cài đặt bbb-web:
|
1
|
cp /tmp/bbb/bigbluebutton.war /var/lib/tomcat6/webapps/bigbluebutton.war |
Xác định PDF2SWF, CONVERT và GS:
Tạo một Note nơi pdf2swf được cài đặt
|
1
|
which pdf2swf |
Bạn sẽ thấy dòng như sau:
|
1
|
/usr/bin/pdf2swf |
Tạo một Note nơi ứng dụng convert được cài đặt
|
1
|
which convert |
Bạn sẽ thấy dòng như sau:
|
1
|
/usr/bin/convert |
Tạo một Note nơi GhostScript được cài đặt
|
1
|
which gs |
Bạn sẽ thấy dòng như sau:
|
1
|
/usr/bin/gs |
Sử đổi thuộc tính của bbb-web:
|
1
|
vi /var/lib/tomcat6/webapps/bigbluebutton/WEB-INF/classes/bigbluebutton.properties |
Tạo một GUID:
Vì lý do bảo mật, bạn nên tạo 1 mã GUID. Chúng ta có thể sử dụng các công cụ trực tuyến như tranghttp://www.somacon.com/p113.php để tạo ra 1 GUID được mã hóa dưới dạng mã HEX.
Thay đổi các nội dung sau
- swfToolsDir: nơi pdf2swf được cài đặt.
- imageMagickDir: nơi ứng dụng convert được cài đặt.
- ghostScriptExec: nơi chứa file thực thi gs
- Thay đổi bigbluebutton.web.serverURL=http://<YOUR IP> với YOUR IP là địa chỉ Ip của hệ thống.
- Thay đổi beans.dynamicConferenceService.securitySalt=< YOUR-GUID > với YOUR-GUID là đoạn mã GUID bạn đã tạo ở bước trên.
Tạo tệp noPdfMarkWorkaround.ps
Tạo tệp /etc/bigbluebutton/nopdfmark.ps với nội dung như sau:
|
1
2
|
%!/pdfmark {cleartomark} bind def |
Khởi động lại Tomcat6
|
1
|
service tomcat6 restart |
Tạo thư mục dùng để upload dữ liệu:
|
1
2
3
|
mkdir /var/bigbluebuttonchown -R tomcat6:adm /var/bigbluebuttonchmod -R 777 /var/bigbluebutton |
Cài đặt bbb-apps:
|
1
2
|
cd /usr/share/red5/webappstar xzvf /tmp/bbb/red5-bigbluebutton.tar.gz |
Cài đặt bbb-deskshare-app
|
1
|
tar xzvf /tmp/bbb/red5-deskshare.tar.gz |
Cài đặt bbb-video-app
|
1
|
tar xzvf /tmp/bbb/red5-video.tar.gz |
Cài đặt bb-voice-app
|
1
|
tar xzvf /tmp/bbb/red5-sip.tar.gz |
Mở file bigbluebutton-sip.properties
|
1
|
vi /usr/share/red5/webapps/sip/WEB-INF/bigbluebutton-sip.properties |
Thay dòng sip.server.host=192.168.0.35 thành địa chỉ IP của hệ thống.
Cài đặt Default Web Pages:
|
1
2
|
cd /var/wwwtar xzvf /tmp/bbb/www-bigbluebutton-default.tar.gz |
Cài đặt bbb-client:
|
1
|
tar xzvf /tmp/bbb/www-bigbluebutton.tar.gz |
Tạo một file bbb_api_config.jsp với nội dung như sau (nhớ đổi GUID và YOUR-IP thành giá trị của bạn):
|
1
2
3
4
5
6
7
|
echo "<%!// This is the security salt that must match the value set in the BigBlueButton serverString salt = \"<YOUR-GUID>\";// This is the URL for the BigBlueButton serverString BigBlueButtonURL = \"http://<YOUR-IP>/bigbluebutton/\";%>" > /var/lib/tomcat6/webapps/bigbluebutton/demo/bbb_api_conf.jsp |
Cấu hình file config:
|
1
|
vi /var/www/bigbluebutton/client/conf/config.xml |
Thay đổi đường dẫn thành IP của hệ thống. Tệp tin cấu hình config.xml mẫu như sau:
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
<?xml version="1.0"? ><config> <localeversion>0.71</localeversion> <version>3818-2011-01-18</version> <porttest host="192.168.0.35" application="video"/> <application uri="rtmp://192.168.0.35/bigbluebutton" host="http://192.168.0.35/bigbluebutton/api/enter" /> <language userSelectionEnabled="true" /> <skinning enabled="false" url="branding/css/theme.css.swf" /> <debug showDebugWindow="false" /> <modules> <module name="ChatModule" url="ChatModule.swf?v=3818" dependsOn="ViewersModule" translationOn="true" translationEnabled="true" /> <module name="ViewersModule" url="ViewersModule.swf?v=3818" allowKickUser="false" /> <module name="ListenersModule" url="ListenersModule.swf?v=3818" /> <module name="DeskShareModule" url="DeskShareModule.swf?v=3818" /> <module name="PhoneModule" url="PhoneModule.swf?v=3818" autoJoin="false" dependsOn="ViewersModule" /> <module name="VideoconfModule" url="VideoconfModule.swf?v=3818" dependsOn="ViewersModule" videoQuality="70" presenterShareOnly="false" /> <module name="WhiteboardModule" url="WhiteboardModule.swf?v=3818" dependsOn="PresentModule" /> <module name="PresentModule" url="PresentModule.swf?v=3818" dependsOn="ViewersModule" /> <!-- new module in development: <module name="DynamicInfoModule" url="DynamicInfoModule.swf?v=3818" host="http://192.168.0.35" infoURL="http://192.168.0.35/client/conf/example-info-data.xml?user={userID}&role={role}&meetingID={meetingID}" /> --> <!--<module name="ExampleChatModule" url="ExampleChatModule.swf?v=56" host="http://192.168.0.35" />--> <!--<module name="BreakoutModule" url="BreakoutModule.swf?v=3818" host="http://192.168.0.225" dependsOn="ViewersModule" salt="1708e5ecf25b7142b06f2338b4ea3cf1" />--> </modules></config> |
Cài đặt bbb-conf:
|
1
2
|
cp /tmp/bbb/bbb-conf /usr/local/binsudo chmod a+x /usr/local/bin/bbb-conf |
Kết thúc quá trình cài đặt:
|
1
2
3
4
5
6
|
# Tao thu muc chua Logsmkdir /var/log/bigbluebutton# Tao file logtouch /var/log/bigbluebutton/bbb-web.logchown tomcat6:tomcat6 /var/log/bigbluebutton/bbb-web.log |
Gõ 2 dòng sau để kiểm tra lại bbb-conf:
|
1
2
|
sudo bbb-conf --cleansudo bbb-conf --check |
Bây giờ thì quá trình cài đặt đã kết thúc :), khá dài dòng phải không? cài đặt quá nhiều thứ =.=”. Bây giờ chúng ta hãy mở trình duyệt lênh và gõ http://<IP-Server> để tận hưởng thành quả :).
Ngô Duy Khánh – http://Khanh.Com.Vn