Hi all,
Thanks very much for an excellent project. I've been having a go at
installing a CentOS 5 server on EC2 using RightScale scripts. I've
also distilled my scripts into a single list of tasks that should get
someone close to a working install onto a standalone CentOS 5 server.
If you want to turn this into a wiki page, please feel free.
Cheers,
Tony.
My notes now follow:
# activate rpmforge repo
rpm -Uvh $ATTACH_DIR/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
# install ant:
mkdir -p /opt
tar -xzf $ATTACH_DIR/apache-ant-1.7.1-bin.tar.gz -C /opt
mv /opt/apache-ant-1.7.1/ /opt/ant
#create ant.sh to set some environment stuff
cat <<EOF> /etc/profile.d/ant.sh
export ANT_HOME=/opt/ant
export PATH=$PATH:/opt/ant/bin
EOF
# install red5:
yum -y install swftools
yum -y install xml-commons-apis
# xml-commons-apis uninstalls jdk, (why?!) so put the latest one back
in:
rpm -Uvh $ATTACH_DIR/jdk-6u7-linux-i586.rpm
#unpack and build 0.6.3
tar -zxf $ATTACH_DIR/red5-0.6.3.tar.gz -C /opt/
mv /opt/red5-0.6.3 /opt/red5
perl -p -i -e 's/PREFIX=\/usr/PREFIX=\/opt\/red5/' /opt/red5/Makefile
cd /opt/red5
make
#remove demo apps
rm -rf /opt/red5/webapps/SOSample
rm -rf /opt/red5/webapps/admin
rm -rf /opt/red5/webapps/dump
rm -rf /opt/red5/webapps/echo
rm -rf /opt/red5/webapps/fitcDemo
rm -rf /opt/red5/webapps/messageRecorder
rm -rf /opt/red5/webapps/midiDemo
rm -rf /opt/red5/webapps/oflaDemo
rm -rf /opt/red5/webapps/root
rm -rf /opt/red5/webapps/test
rm -rf /opt/red5/webapps/tutorial
#install startup script - this is listed after these notes and came
from
http://osflash.org/red5/suse
cp $ATTACH_DIR/red5 /etc/init.d/red5
chmod 755 /etc/init.d/red5
useradd red5
chown -R red5 /opt/red5
chmod 755 /opt/red5/red5.sh
# install mysqld
yum install mysql-server
perl -p -i -e 's/skip-networking/#skip-networking/' /etc/my.cnf
service mysqld restart
# install openmeetings
#prerequisites
yum install ImageMagick ghostscript
#create the db - assumes mysql root user has no password
echo 'create database openmeetings COLLATE utf8_general_ci DEFAULT
CHARACTER SET utf8;' | mysql -u root
#set db permissions (username + password both set to be openmeetings)
echo "GRANT ALL PRIVILEGES on openmeetings.* TO openmeetings@localhost
IDENTIFIED BY 'openmeetings' ;" | mysql -u root
echo "FLUSH PRIVILEGES;" | mysql -u root
# unpack the webdata
unzip $ATTACH_DIR/openmeetings051.zip -d /opt/red5/webapps/
rm -rf /opt/red5/webapps/__MACOSX
chown -R red5 /opt/red5/webapps/openmeetings
# configure the app
mv /opt/red5/webapps/openmeetings/conf/mysql_hibernate.cfg.xml /opt/
red5/webapps/openmeetings/conf/hibernate.cfg.xml
perl -p -i -e 's/username">root</username">openmeetings</' /opt/red5/
webapps/openmeetings/conf/hibernate.cfg.xml
perl -p -i -e 's/password"></password">openmeetings</' /opt/red5/
webapps/openmeetings/conf/hibernate.cfg.xml
# start red5
service red5 start
# open firewall ports 1935, 5080, 8088 if iptables is in use
# now browse to
http://servername:5080/openmeetings/install
#####################################
# red5 init.d script
# from
http://osflash.org/red5/suse
#####################################
#! /bin/sh
#
# Author: Jake Hilton <
re...@jakehilton.com>
# /etc/init.d/red5
#
# Check for missing file
RED5_DIR=/opt/red5
test -x $RED5_DIR/red5.sh || exit 5
case "$1" in
start)
echo -n "Starting Red5 Service"
echo -n " "
cd $RED5_DIR
su -s /bin/bash -c "$RED5_DIR/red5.sh &" red5
sleep 2
;;
stop)
echo -n "Shutting down red5"
echo -n " "
su -s /bin/bash -c "killall -q -u red5 java" red5
sleep 2
;;
restart)
## Stop the service and regardless of whether it was
## running or not, start it again.
$0 stop
$0 start
;;
esac