Last active
June 15, 2017 10:03
-
-
Save g3rhard/895726ea9a6fbb98e47c8e18f83f2863 to your computer and use it in GitHub Desktop.
Deploy OpenMeetings for Ubuntu 16.04
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# Ubuntu 16.04 deploy OpenMeetings | |
# wget -qO - https://gist.github.com/ | bash -s | |
# | |
apt update | |
apt -y install software-properties-common python-software-properties | |
add-apt-repository -y ppa:jonathonf/ffmpeg-3 | |
add-apt-repository -y ppa:webupd8team/java | |
apt update | |
apt install -y oracle-java8-installer | |
apt -y install mysql-server imagemagick ghostscript jodconverter libreoffice libmysql-java sox ffmpeg dnsutils build-essential zlib1g-dev | |
#add some useful stuff | |
apt -y install mc htop | |
install_om() { | |
om_ver=3.2.1 #replace the current version on http://apache-mirror.rbc.ru/pub/apache/openmeetings/ | |
cd /usr/src | |
[ -r apache-openmeetings-${om_ver}.tar.gz ] || wget http://apache-mirror.rbc.ru/pub/apache/openmeetings/${om_ver}/bin/apache-openmeetings-${om_ver}.tar.gz | |
mkdir -p /opt/openmeetings | |
cd /opt/openmeetings | |
tar -xf /usr/src/apache-openmeetings-${om_ver}.tar.gz | |
cat >/etc/init.d/openmeetings <<EOF | |
#!/bin/sh -e | |
# | |
# Startup script for Red5 | |
### BEGIN INIT INFO | |
# Provides: openmeetings | |
# Required-Start: \$remote_fs \$syslog \$named \$network \$time mysql | |
# Required-Stop: \$remote_fs \$syslog \$named \$network | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Red5 OpenMeetings service | |
### END INIT INFO | |
export RED5_HOME=/opt/openmeetings | |
start_red5="\$RED5_HOME/red5.sh start" | |
stop_red5="\$RED5_HOME/red5-shutdown.sh stop" | |
start() { | |
echo -n "Starting Red5: " | |
( cd \$RED5_HOME && \${start_red5} 2>&1 >>\$RED5_HOME/log/startup.log & ) | |
echo "done." | |
} | |
stop() { | |
echo -n "Shutting down Red5: " | |
\${stop_red5} | |
echo "done." | |
} | |
case "\$1" in | |
start) | |
start | |
;; | |
stop) | |
stop | |
;; | |
restart) | |
stop | |
sleep 10 | |
start | |
;; | |
*) | |
echo "Usage: \$0 {start|stop|restart}" | |
esac | |
exit 0 | |
EOF | |
chmod 0755 /etc/init.d/openmeetings | |
update-rc.d openmeetings defaults | |
mkdir /opt/openmeetings/log/ #fix for logs | |
} | |
install_swftools() { | |
cd /usr/src | |
apt-get -y build-dep swftools | |
[ -r PDFlib-Lite-7.0.5p3.tar.gz ] || wget http://www.pdflib.com/binaries/PDFlib/705/PDFlib-Lite-7.0.5p3.tar.gz | |
tar -xf PDFlib-Lite-7.0.5p3.tar.gz | |
cd PDFlib-Lite-7.0.5p3 | |
./configure --prefix=/usr | |
make && make install | |
cd .. | |
rm -R PDFlib-Lite-7.0.5p3 | |
[ -r swftools-0.9.2.tar.gz ] || wget http://swftools.org/swftools-0.9.2.tar.gz | |
tar -xf swftools-0.9.2.tar.gz | |
cd swftools-0.9.2 | |
./configure --prefix=/usr | |
make && make install | |
cd .. | |
rm -R swftools-0.9.2 | |
} | |
install_jodcnv() { | |
cd /usr/src | |
[ -r jodconverter-core-3.0-beta-4-dist.zip ] || wget https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/jodconverter/jodconverter-core-3.0-beta-4-dist.zip | |
unzip jodconverter-core-3.0-beta-4-dist | |
cd jodconverter-core-3.0-beta-4 && mkdir /opt/jod && mv * /opt/jod | |
cd .. && rm -R jodconverter-core-3.0-beta-4 | |
} | |
install_om | |
install_swftools | |
install_jodcnv |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment