Install and configure red5 in Linux

Source: Internet
Author: User

First, install the required Java Development Environment JDK for red5 to run. All my files are saved to/root/download.
Installation by users
For https://sdlc6e.sun.com/ECom/EComActionServlet;jsessionid= 8cec5d9dff18a14b277b3c32456062b1 I downloaded a file of Type Linux rpm in self-extracting file named
Jdk-1_5_0_09-linux-i586-rpm.bin


2. Add executable permissions to the file
[Root @ shywyz Java] # chmod + x jdk-1_5_0_09-linux-i586-rpm.bin


3. Perform jdk-1_5_0_09-linux-i586-rpm.bin
[Root @ shywyz Java] #./jdk-1_5_0_09-linux-i586-rpm.bin
Generate jdk-1_5_0_09-linux-i586-rpm after execution
Sun's license agreement will appear during installation. Press Ctrl + C to go through it. Of course you can check it if you have time.
Enter "yes" for installation confirmation. The RPM file will be installed automatically.
Here I JDK installed in the/usr/Java directory, will automatically generate the jdk-1_5_0_09 folder


4. Configure Environment Variables
There are three ways to configure environment variables (modify the/etc/profile file, modify the. bashrc file in the user directory, and directly modify it in shell)
I modified the/etc/profile file.
[Root @ shywyz Java] # vi/etc/profile
After opening the file, press the I key and add:
Java_home =/usr/Java/jdk1.5.0 _ 09
Path = $ java_home/bin: $ path
Classpath =.: $ java_home/lib/tools. jar: $ java_home/lib/dt. Jar
Export java_home path classpath
Press ESC and enter: WQ to save and exit.


5. Test the configuration Environment
Write a simple helloworld to test it.
[Root @ shywyz Java] # vi helloworld. Java
File input:
Public class helloworld {
Public static void main (string ARGs []) {
System. Out. println ("Hello world in Linux !! ");
}
}
: WQ save and exit


6. debug the Java File
[Root @ shywyz Java] # javac helloworld. Java
No error.
[Root @ shywyz Java] # Java helloworld
Output in shell: Hello world in Linux !!
Successful! Pai_^


7. Install Apche-ant, which is
Http://apache.justdn.org/ant/binaries/apache-ant-1.6.5-bin.tar.gz
[Root @ shywyz ~] # Cd/usr/local/
[Root @ shywyz ~] # Tar-zxvf ~ /Download/apache-ant-1.6.5-bin.tar.gz
[Root @ shywyz ~] # Mv APACHE-ant-1.6.5 ant


8. Set Environment Variables
Add the following statements in/etc/profile:
Export ant_home =/usr/local/ant
Export Path = $ path:/usr/local/ANT/bin
Source/etc/profile for configuration to take effect


9. Install red5, for: http://dl.fancycode.com/red5/red5-0.5.tar.gz
[Root @ shywyz ~] # Cd ~ /Download/
[Root @ shywyz ~ Wget http://dl.fancycode.com/red5/red5-0.5.tar.gz
[Root @ shywyz ~] # Cd/OPT
[Root @ shywyz ~] # Tar zxvf ~ /Downloads/red5-0.5.tar.gz
[Root @ shywyz ~] # Cd red5-0.5
Compile: Enter the ant command to automatically compile
Run
./Red5.sh &


10. simple configuration, using demo
Configure the port: CONF/red5.properties. modify this file. Remember to open all ports,
The IP address of my machine is 60.173.7.35, And the red5.properties content is
  
Rtmp. host_port = 0.0.0.0: 1935
Debug_proxy.host_port = 0.0.0.0: 1936
Proxy_forward.host_port = 127.0.0.1: 1935
Rtmps. host_port = 127.0.0.1: 1945
HTTP. Host = 60.173.7.35
HTTP. Port = 5080
Rtmpt. Host = 60.173.7.35
Rtmpt. Port = 8088
  
Accessing http: // ip: 5080
You can run the self-built demo. Remember that if you have configured an IP address, the address localhost in the self-built demo must be replaced with your real address.


 

In addition:

 

Red5 is an open-source flash streaming media server developed using Java. It supports: Converting audio (mp3) and video (FLV) into playing streams; recording client playback streams (only FLV); Sharing objects; releasing live streams; remote calls. Red5 uses RSTP as the streaming media transmission protocol. In some of its examples, it demonstrates some basic functions such as online recording, flash streaming media playback, online chat, and video conferencing.

1: download and install the Java Development Environment
Http://java.sun.com/javase/downloads/index.jsp
[Root @ server2 ~] # Cd/usr/local/src/tarbag/
[Root @ server2 tarbag] # chmod + x jdk-6u17-linux-i586.bin
[Root @ server2 tarbag] #./jdk-6u17-linux-i586.bin
[Root @ server2 tarbag] # mv jdk1.6.0 _ 17 // usr/local/Java
[Root @ server2 ~] # Java-version
Java version "1.4.2"
Gij (GNU libgcj) version 4.1.1 20070105 (Red Hat 4.1.1-52)
[Root @ server2 ~] # Rm-RF/usr/bin/Java
[Root @ server2 ~] # Ln-S/usr/local/Java/bin/Java/usr/bin/
[Root @ server2 ~] # Vi/etc/profile
Java_home =/usr/local/Java
Classpath =.: $ java_home/JRE/lib/RT. jar: $ java_home/lib/dt. jar: $ java_home/lib/tools. Jar
Path = $ path: $ java_home/bin
Ant_home =/usr/local/ant
Export path java_home classpath ant_home
[Root @ server2 ~] # Source/etc/profile
[Root @ server2 ~] # Java-version
Java version "1.6.0 _ 17"
Java (TM) se Runtime Environment (build 1.6.0 _ 17-b04)
Java hotspot (TM) Client VM (build 14.3-b01, mixed mode, sharing)

 

2: install Apache-ant
[Root @ server2 ~] # Cd/usr/local/src/tarbag/
[Root @ server2 tarbag] # wget http://mirror.cc.columbia.edu/pub/software/apache/ant/binaries/apache-ant-1.8.0-bin.tar.gz
[Root @ server2 tarbag] # tar-zxvf apache-ant-1.8.0-bin.tar.gz-C/usr/local/
[Root @ server2 tarbag] # mv/usr/local/Apache-ant-1.8.0 // usr/local/ant
[Root @ server2 tarbag] # ln-S/usr/local/ANT/bin/ANT/usr/bin/ant

 

 

3: download the latest version red5 and compile it with ant.
[Root @ server2 tarbag] # CD ../software/
[Root @ server2 software] # SVN Co http://red5.googlecode.com/svn/java/server/trunk
Checked out revision 4067.
[Root @ server2 software] # cd trunk/
[Root @ server2 trunk] # ant Server
[Root @ server2 trunk] # cp-r Dist // usr/local/red5

 

4. Start the service.
[Root @ server2 ~] # Cd/usr/local/red5/
[Root @ server2 ~] #./Red5.sh &
[Root @ server2 ~] # Netstat-ntpl | grep Java
TCP 0 0: 1935: * Listen 6929/Java
TCP 0 0: 9999: * Listen 6929/Java
TCP 0 0: 34071: * Listen 6929/Java
TCP 0 0: 5080: * Listen 6929/Java
Enter http: // ip: 5080. After the instance is installed online, you can view the movies in the instance. If the instance cannot be connected to port 5080, restart the service, kill-9 'pidof Java' first, and then run the preceding STARTUP script. This problem occurs on both servers I installed. If you don't know why, restart the server.


 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.