The following step by step guideline helps to install red5 on Centos Server.

 

1. Install Java.

========
yum -y install java-1.6.0-openjdk java-1.6.0-openjdk-devel
========

2. Install ant.

========
yum list | grep ant  // check whether ant is available in yum
yum install ant
—-
Otherwise
cd /root/tmp
wget http://apache.mirrors.pair.com/ant/binaries/apache-ant-1.8.2-bin.tar.gz
tar jxvf apache-ant-1.8.2-bin.tar.bz2
mv apache-ant-1.8.2 /usr/local/ant
========

3. Export variables for ant and Java using by executing the following commands in command line.

========
export ANT_HOME=/usr/local/ant
export JAVA_HOME=/usr/lib/jvm/java
export PATH=$PATH:/usr/local/ant/bin
export CLASSPATH=.:$JAVA_HOME/lib/classes.zip

echo ‘export ANT_HOME=/usr/local/ant’ >> /etc/bashrc
echo ‘export JAVA_HOME=/usr/lib/jvm/java’ >> /etc/bashrc
echo ‘export PATH=$PATH:/usr/local/ant/bin’ >> /etc/bashrc
echo ‘export CLASSPATH=.:$JAVA_HOME/lib/classes.zip’ >> /etc/bashrc
========

4. Install subversion and perl.

========
yum install perl-URI
yum install subversion
========

Note : If you face difficulty in installing subversion, then you can temporarily remove perl from the /etc/yum.conf exclude line, install subversion, then add perl back to the /etc/yum.conf exclude line after you’ve gotten subversion installed.

5. Install Red5

========
svn checkout http://red5.googlecode.com/svn/java/server/trunk/ red5
mv red5 /usr/local/
cd /usr/local/red5

ant prepare
ant dist
cp -r dist/conf .
========

6. Start Red5

========
./red5.sh &
========

Important : Red5 stops connecting when the script is terminated. Inform the client about the bug in red5. Also, it can be executed in screen or make the script to be started in init level. This is very important.

7. Add init file to start the service red5.

=======
cd /etc/init.d/
wget http://www.sohailriaz.com/downloads/red5.txt
mv red5.txt red5
chmod +x red5
service red5 start
=======

8. Install red5 “admin page” and “add user page” by installing the following plugins.

=======
Get the plugins:

cd /root/tmp
mkdir /usr/local/red5/plugins
wget http://red5.googlecode.com/files/AdminPlugin-1.0.zip
unzip -d /usr/local/red5/plugins AdminPlugin-1.0.zip

Code:

Get the Red5 admin register page:

mkdir /usr/local/red5/webapps/admin
wget http://red5.googlecode.com/files/admin.jsp
mv admin.jsp /usr/local/red5/webapps/admin
=======

Note :

The user add panel can be accessed using “http://Ip address of the server:5080/admin/admin.jsp”.
The admin panel can be accessed using “http://Ip address of the server:5080/demos/adminPanel.html”. Since the installation of admin page is in demos it is demo. You can try copying/moving the admin page as per your convenience.

Check the working of Red5 using “http://Ip address of the server:5080/demos/publisher.html”. Play the sample video in webapps.

Note : Replace the localhost with the ip address. And then click connect. Give the sample video file to be played and click enter. The player should play the video.

**********************************
Integrating a domain with Live Streaming.
**********************************

Please follow the steps below to live stream your videos once you confirm that installation is complete and you should view the sample video.

===================

1. Login to the following URL.

++++
http://IP:5080/demos/publisher.html
++++

2. Select “Server”.

3. Replace the location as “rtmp://IP/oflaDemo”.

4. Click “connect”.

5. Select “video”.

6. Select your local camera in “Device”.

7. Click “Apply”.

8. Select the type as “Live”.

9. Give a name to the video. Example : sample

10. Click “publish”.

11. Again click “server”.

12. Give the name as the created video name i.e sample.

13. Go to the following URL in the browser.

++++++

14. Click “Externel Communications”.

15. Replace streamer as “rtmp://IP/oflaDemo”.

16. Click “File properties” and give file name as the created file name i.e sample.

17. Then click “update preview & code”.

18. If you preview your player given in the link, you can see the live video.

19. There is a point called “Copy your code”. Copy your code.

20. Create a html file in the document root of the domain with the copied contents. Example : test.html

21. Then download necessary dependency files in the document root where the video file is kept from the following URL. Please extract the files.

+++++
http://www.longtailvideo.com/jw/upload/mediaplayer-viral.zip
+++++

21. Then load that appropriate URL in the browser and click play. Now, you can view the live video.

 

 

Leave a Reply