Here is how we installed latest Red5 and JDK on a server with Linux CentOS . These hints can help you install on many linux VPS or Dedicated enviroments. We mainly do software development and work from windows, so we use WinSCP and PuTTy (free software). We browsed a lot of tutorials and web pages to get instructions that installed latest versions.
First, we made sure we have all prerequisites to install the rpm:
yum install rpm-build
yum install redhat-rpm-config
JAVA INSTALLATION
We installed latest JDK from http://java.sun.com/javase/downloads/index.jsp .
Went to root/tmp folder for downloads:
cd /root/tmp
We got Java SE Development Kit, JDK 6 Update 13. We selected linux multilanguage, right clicked > properties on the jdk-6u13-linux-i586-rpm.bin and downloaded it with wget url on the server. It downloaded with a big name with parameters (ls to see after download). We use WinSCP so we right clicked, refreshed from there and then renamed the new file that showed up in the root home directory.
Update1: Downloaded jdk-6u14-linux-i586-rpm.bin instead. Make sure you install JDK and not JRE.
Made it executable and executed it:
chmod a+x jdk-6u13-linux-i586-rpm.bin
./jdk-6u13-linux-i586-rpm.bin
Press space or enter to scroll terms and when it asks you type yes and hit enter.
We installed it on 2 servers and had to change some shortcuts on one that already had an older java, so it runs the new one. Usually if preinstalled it’s located in a java or jdk folder in /usr or /usr/local .
Update1: Make sure the shortcuts in /usr/local point to the new locations (/usr/local/jdk to /usr/java/jdk1.6.0_14 and /usr/local/jre to /usr/java/jdk1.6.0_14/jre) .
Make sure this is the one used if you also have older versions installed:
java –version
ANT INSTALLATION
Downloaded ant (can be done from any mirror – see http://ant.apache.org/bindownload.cgi), unpacked it, moved it to a good location and added variable, shortcut.
wget http://apache.mirror.transip.nl/ant/binaries/apache-ant-1.7.1-bin.tar.gz
tar zxvf apache-ant-1.7.1-bin.tar.gz
mv apache-ant-1.7.1 /usr/local/ant
export ANT_HOME=/usr/local/ant
ln -s /usr/local/ant/bin/ant /usr/local/bin/ant
Checked ant version:
ant –version
SUBVERSION INSTALLATION
Downloading latest Red5 required subversion and we had to install perl uri first for that to work:
wget ftp://rpmfind.net/linux/dag/redhat/el2.1/en/i386/dag/RPMS/perl-URI-1.17-1.el2.rf.noarch.rpm
rpm –i perl-URI-1.17-1.el2.rf.noarch.rpm
yum install subversion
Update1: This time got “Error: Cannot retrieve repository metadata (repomd.xml) for repository: atrpms. Please verify its path and try again” .
Solution: yum –disablerepo=atrpms install subversion .
RED5 BUILD AND INSTALLATION
Then we downloaded Red5:
svn co http://red5.googlecode.com/svn/java/server/trunk red5
Update1: This downloads latest Red5. On this installation (update1) Red5 0.9 was downloaded.
Built red5 :
cd red5
ant prepare
ant dist
Moved Red5 from home folder:
cd ..
mv red5 /opt/red5
Started Red5:
cd /opt/red5/dist
./red5.sh > start.log &
The > start.log is to have it output the logs in the file and & is to keep it running in the background.
Verified that Red5 was running:
ps aux | grep red5
This should report a long line with java and many options and this command. Check start.log if it failed to start.
We added these lines to to /etc/rc.d/rc.local so it starts on each server start:
cd /opt/red5/dist
/opt/red5/dist/red5.sh &
Make sure your run it from the right folder. The one in /opt/red5 will not work – you must run it from /opt/red5/dist/ .
When Red5 is running you should be able to access http://your-server-domain-or-ip:5080/ .
If it works first thing go to http://your-server:5080/installer/and install admin. Then to http://your-server:5080/admin/register.html and register an username and password. Then you can check application statistics anytime from http://your-server:5080/admin/ with server ip and the registered username, password.
RED 5 RESTART
We do that everytime we add or update files in the /opt/red5/dist/webapps folder – where all applications should be installed.
Usually these should work and should be used each time you add a new application.
1. Check if red5 is running:
ps aux | grep red5
2. Go to its folder and shut red5 down:
cd /opt/red5/dist
./red5-shutdown.sh
3. See if it’s still running or not:
ps aux | grep red5
4. Restart it, and also make it output the logs into a file of your choice:
./red5.sh > start.log &
5. Make sure it’s back online:
ps aux | grep red5
We also noticed that red-shutdown.sh sometimes does not close it down to allow restart when webapps are added or updated. So we run ps aux | grep red5 to see process id (first number: PID) and then run kill process id if it’s still alive.
|
My Blog Title
|