Difference between revisions of "Red5: Instalasi dari SVN Server"

From OnnoWiki
Jump to navigation Jump to search
 
(25 intermediate revisions by the same user not shown)
Line 1: Line 1:
==Instalasi==
+
Sumber:
 +
* http://sujianto.wordpress.com/2012/06/24/install-red5-streaming-server-di-ubuntu-12-04/
 +
* http://aisholla.16mb.com/note/archives/tag/red5
 +
* http://red5wiki.com/wiki/Installing_and_running_Red5
  
Instalasi menggunakan perintah
+
==Instalasi Paket Yang Dibutuhkan==
  
sudo apt-get install subversion java-package sun-java6-jdk ant htop wget screen telnet
+
Install library paket yang dibutuhkan red5
  
==Test Java==
+
sudo apt-get update
 +
sudo apt-get install sun-java6-jdk openjdk-7-jdk ant subversion
 +
sudo update-alternatives --config java
 +
 
 +
Akan keluar
 +
 
 +
There are 3 choices for the alternative java (providing /usr/bin/java).
 +
 +
  Selection    Path                                          Priority  Status
 +
------------------------------------------------------------
 +
* 0            /usr/lib/jvm/java-6-openjdk-i386/jre/bin/java  1061      auto mode
 +
  1            /usr/lib/jvm/java-6-openjdk-i386/jre/bin/java  1061      manual mode
 +
  2            /usr/lib/jvm/java-6-sun/jre/bin/java            63        manual mode
 +
  3            /usr/lib/jvm/java-7-openjdk-i386/jre/bin/java  1051      manual mode
 +
 +
Press enter to keep the current choice[*], or type selection number:
 +
 
 +
Pilih /usr/lib/jvm/java-6-sun/jre/bin/java.
 +
Tekan 2 kemudian ENTER
  
Ketik perintah
 
  
which java
+
==Download & Compile==
  
harusnya keluar
+
Pastikan server mempunyai sambungan ke [[Internet]] yang baik, karena kita akan melakukan banyak download [[source code]].
  
/usr/bin/java
+
Tampaknya red5 versi 1.0RC2 bermasalah, coba pakai versi 0.9.1 mungkin lebih stabil.
  
Ketik perintah
+
Download [[source code]] red5 melalui subversion, ada beberapa pilihan versi untuk di coba
  
  java -version
+
  cd /usr/local/src
 +
svn co http://red5.googlecode.com/svn/java/server/tags/1_0rc2/ red5
 +
svn co http://red5.googlecode.com/svn/java/server/tags/0_9_1/ red5
 +
svn co http://red5.googlecode.com/svn/java/server/tags/0_9/ red5
 +
svn co http://red5.googlecode.com/svn/java/server/tags/0_9rc1/ red5
  
akan keluar
 
  
java version "1.6.0_22"
+
Pindahkan paket red5 & lakukan instalasi
OpenJDK Runtime Environment (IcedTea6 1.10.2) (6b22-1.10.2-0ubuntu1~11.04.1)
 
OpenJDK Server VM (build 20.0-b11, mixed mode)
 
  
itch default
+
sudo su -
 +
cd /usr/local/src
 +
mv red5 /usr/share/
 +
cd /usr/share/red5/
 +
ant prepare
 +
ant dist
  
sudo update-alternatives --config java
 
  
akan keluar
+
Akan keluar pada layar
  
  There are 2 choices for the alternative java (providing /usr/bin/java).
+
  Buildfile: /usr/share/red5/build.xml
 
   
 
   
  Selection    Path                                      Priority  Status
+
  prepare:
  ------------------------------------------------------------
+
    [mkdir] Created dir: /usr/share/red5/bin
* 0            /usr/lib/jvm/java-6-openjdk/jre/bin/java  1061     auto mode
+
    [mkdir] Created dir: /usr/share/red5/dist
  1            /usr/lib/jvm/java-6-openjdk/jre/bin/java  1061     manual mode
+
     [mkdir] Created dir: /usr/share/red5/log
  2            /usr/lib/jvm/java-6-sun/jre/bin/java      63        manual mode
+
    [mkdir] Created dir: /usr/share/red5/dist/log
 +
    [mkdir] Created dir: /usr/share/red5/bin/testcases/classes
 +
     [mkdir] Created dir: /usr/share/red5/bin/testcases/testreports
 
   
 
   
  Press enter to keep the current choice[*], or type selection number:
+
  BUILD SUCCESSFUL
 +
Total time: 1 second
 +
root@stream:/usr/share/red5# ant dist
 +
Unable to locate tools.jar. Expected to find it in /usr/lib/jvm/java-6-openjdk-i386/lib/tools.jar
 +
Buildfile: /usr/share/red5/build.xml
  
Pilih java-6-sun dalam hal ini pilih nomor 2
+
...dst ..
  
==Siapkan Lingkungan==
+
dist:
 +
      [copy] Copying 43 files to /usr/share/red5/dist/lib
 +
      [copy] Copying 22 files to /usr/share/red5/dist/conf
 +
      [copy] Copying 7 files to /usr/share/red5/dist/plugins
 +
      [copy] Copying 1 file to /usr/share/red5/dist/webapps
 +
      [copy] Copying 11 files to /usr/share/red5/dist
 +
 +
BUILD SUCCESSFUL
 +
Total time: 13 seconds
  
Siapkan lingkungan, lihat versi
+
==Konfigurasi & Siap digunakan==
  
ls /usr/lib/jvm/
+
Pindahkan File Konfigurasi
  
  export JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.24/jre
+
  sudo su
  export ANT_HOME=/usr/share/ant/
+
cd /usr/share/red5/
 +
  cp -r dist/conf .
  
[[Instalasi Flash Plugin | flash plugin installer]]
+
Instalasi Red5 selesai, selanjutnya jalankan red5 dengan perintah
  
  sudo apt-get install flashplugin-installer flashplugin-nonfree flashplugin-nonfree-extrasound
+
  sudo su
 +
cd /usr/share/red5/
 +
sudo chmod a+x red5.sh
 +
./red5.sh
  
Jika berjalan dengan baik harus kita dapat menginstalasi aplikasi yang sudah di siapkan.
+
Akan keluar
  
==Siapkan Red5==
+
Running on  Linux
 +
Starting Red5
 +
Red5 root: /usr/share/red5
 +
Configuation root: /usr/share/red5/conf
  
Lakukan
+
...dst..
  
  cd /usr/local/src
+
  [INFO] [Launcher:/live] org.red5.server.Server - Add mapping global: default host:  context: live
  svn co http://red5.googlecode.com/svn/java/server/trunk red5
+
  [WARN] [Launcher:/] org.red5.server.scope.Scope - Invalid scope was not added: [WebScope@1b9ecd0 Depth = 1, Path = '/default', Name = '']
  cd /usr/local/src/red5
+
  [INFO] [Launcher:/installer] org.red5.server.service.Installer - Installer service created
/usr/share/ant/bin/ant
 
  
Dalam proses ant akan banyak mendownload ivy dari [[Internet]]. Pastikan sambungan ke [[Internet]] lancar.
+
Selesai sudah proses instalasi
  
Kita kena masalah juga di
+
==Membuat init script untuk red5==
  
[ivy:resolve] ::::::::::::::::::::::::::::::::::::::::::::::
+
Buat init script di /etc/init.d
[ivy:resolve] ::          UNRESOLVED DEPENDENCIES        ::
 
[ivy:resolve] ::::::::::::::::::::::::::::::::::::::::::::::
 
[ivy:resolve] :: org.slf4j#com.springsource.slf4j.api;1.6.1: not found
 
[ivy:resolve] :: org.slf4j#com.springsource.slf4j.bridge;1.6.1: not found
 
[ivy:resolve] :: org.apache.commons#com.springsource.org.apache.commons.codec;1.4.0: not found
 
[ivy:resolve] :: org.apache.commons#com.springsource.org.apache.commons.collections;3.2.1: not found
 
[ivy:resolve] :: org.apache.commons#com.springsource.org.apache.commons.modeler;2.0.1: not found
 
[ivy:resolve] :: org.apache.xerces#com.springsource.org.apache.xerces;2.9.1: not found
 
[ivy:resolve] :: org.objectweb.asm#com.springsource.org.objectweb.asm;3.2.0: not found
 
[ivy:resolve] :: org.objectweb.asm#com.springsource.org.objectweb.asm.commons;3.2.0: not found
 
[ivy:resolve] :: org.antlr#com.springsource.org.antlr;3.1.3: not found
 
[ivy:resolve] :: org.codehaus.groovy#com.springsource.org.codehaus.groovy;1.7.0: not found
 
[ivy:resolve] :: org.mozilla.javascript#com.springsource.org.mozilla.javascript;1.7.0.R2: not found
 
[ivy:resolve] :: javax.xml.stream#com.springsource.javax.xml.stream;1.0.1: not found
 
[ivy:resolve] ::::::::::::::::::::::::::::::::::::::::::::::
 
[ivy:resolve]
 
[ivy:resolve] :: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS
 
 
BUILD FAILED
 
/usr/local/src/red5/build.xml:209: The following error occurred while executing this line:
 
/usr/local/src/red5/build.xml:223: The following error occurred while executing this line:
 
/usr/local/src/red5/build.xml:174: impossible to resolve dependencies:
 
resolve failed - see output for details
 
  
Belum tahu apa solusi-nya
+
sudo su -
 +
touch /etc/init.d/red5
 +
chmod 755 /etc/init.d/red5
 +
nano /etc/init.d/red5
  
==Menjalankan Red5==
+
Masukan script berikut
  
Menjalankan Red5
+
#!/bin/sh
 +
# init script for Red5
 +
# /etc/init.d/red5
 +
 
 +
RED5_USER=root
 +
RED5_HOME=/usr/share/red5
 +
RED5_PROG=red5
 +
 
 +
test -x $RED5_HOME/$RED5_PROG.sh || exit 5
 +
 
 +
case "$1" in
 +
      start)
 +
          echo -n "Starting Red5"
 +
          echo -n " "
 +
          cd $RED5_HOME
 +
          su -s /bin/bash -c "$RED5_HOME/$RED5_PROG.sh &" $RED5_USER
 +
          sleep 2
 +
          ;;
 +
      stop)
 +
          echo -n "Shutting down Red5"
 +
          echo -n " "
 +
          su -s /bin/bash -c "killall -q -u $RED5_USER java" $RED5_USER
 +
          sleep 2
 +
          ;;
 +
      restart)
 +
          $0 stop
 +
          $0 start
 +
          ;;
 +
esac
  
/usr/local/src/red5/red5.sh &
 
  
Test server menggunakan port 5080 (default red5)
+
Ubah permission
  
  http://localhost:5080
+
  chmod a+x /etc/init.d/red5
  
 +
Memanggil red5 dapat menggunakan perintah
 +
 +
sudo service red5 [start|restart|stop]
  
 
==Test Server==
 
==Test Server==
 +
 +
[[Instalasi Adobe Flash Player]] pada laptop yang akan mengakses Red5.
 +
Browse ke server red5
 +
 +
http://ip-address-server:5080
  
 
Instalasi Aplikasi Red5 yang ada di
 
Instalasi Aplikasi Red5 yang ada di
  
  http://localhost:5080/installer/
+
  http://ip-address-server:5080/installer/
  
 
Demo Aplikasi Red5 Melalui
 
Demo Aplikasi Red5 Melalui
  
  http://localhost:5080/demos/
+
  http://ip-address-server:5080/demos/
  
 
==Referensi==
 
==Referensi==

Latest revision as of 13:14, 12 July 2012

Sumber:

Instalasi Paket Yang Dibutuhkan

Install library paket yang dibutuhkan red5

sudo apt-get update
sudo apt-get install sun-java6-jdk openjdk-7-jdk ant subversion
sudo update-alternatives --config java

Akan keluar

There are 3 choices for the alternative java (providing /usr/bin/java).

  Selection    Path                                           Priority   Status
------------------------------------------------------------
* 0            /usr/lib/jvm/java-6-openjdk-i386/jre/bin/java   1061      auto mode
  1            /usr/lib/jvm/java-6-openjdk-i386/jre/bin/java   1061      manual mode
  2            /usr/lib/jvm/java-6-sun/jre/bin/java            63        manual mode
  3            /usr/lib/jvm/java-7-openjdk-i386/jre/bin/java   1051      manual mode

Press enter to keep the current choice[*], or type selection number: 

Pilih /usr/lib/jvm/java-6-sun/jre/bin/java. Tekan 2 kemudian ENTER


Download & Compile

Pastikan server mempunyai sambungan ke Internet yang baik, karena kita akan melakukan banyak download source code.

Tampaknya red5 versi 1.0RC2 bermasalah, coba pakai versi 0.9.1 mungkin lebih stabil.

Download source code red5 melalui subversion, ada beberapa pilihan versi untuk di coba

cd /usr/local/src
svn co http://red5.googlecode.com/svn/java/server/tags/1_0rc2/ red5
svn co http://red5.googlecode.com/svn/java/server/tags/0_9_1/ red5
svn co http://red5.googlecode.com/svn/java/server/tags/0_9/ red5
svn co http://red5.googlecode.com/svn/java/server/tags/0_9rc1/ red5


Pindahkan paket red5 & lakukan instalasi

sudo su - 
cd /usr/local/src
mv red5 /usr/share/
cd /usr/share/red5/
ant prepare
ant dist


Akan keluar pada layar

Buildfile: /usr/share/red5/build.xml

prepare:
    [mkdir] Created dir: /usr/share/red5/bin
    [mkdir] Created dir: /usr/share/red5/dist
    [mkdir] Created dir: /usr/share/red5/log
    [mkdir] Created dir: /usr/share/red5/dist/log
    [mkdir] Created dir: /usr/share/red5/bin/testcases/classes
    [mkdir] Created dir: /usr/share/red5/bin/testcases/testreports 

BUILD SUCCESSFUL
Total time: 1 second
root@stream:/usr/share/red5# ant dist
Unable to locate tools.jar. Expected to find it in /usr/lib/jvm/java-6-openjdk-i386/lib/tools.jar
Buildfile: /usr/share/red5/build.xml

...dst ..

dist:
     [copy] Copying 43 files to /usr/share/red5/dist/lib
     [copy] Copying 22 files to /usr/share/red5/dist/conf
     [copy] Copying 7 files to /usr/share/red5/dist/plugins
     [copy] Copying 1 file to /usr/share/red5/dist/webapps
     [copy] Copying 11 files to /usr/share/red5/dist

BUILD SUCCESSFUL
Total time: 13 seconds

Konfigurasi & Siap digunakan

Pindahkan File Konfigurasi

sudo su
cd /usr/share/red5/
cp -r dist/conf .

Instalasi Red5 selesai, selanjutnya jalankan red5 dengan perintah

sudo su
cd /usr/share/red5/
sudo chmod a+x red5.sh
./red5.sh

Akan keluar

Running on  Linux
Starting Red5
Red5 root: /usr/share/red5
Configuation root: /usr/share/red5/conf

...dst..

[INFO] [Launcher:/live] org.red5.server.Server - Add mapping global: default host:  context: live
[WARN] [Launcher:/] org.red5.server.scope.Scope - Invalid scope was not added: [WebScope@1b9ecd0 Depth = 1, Path = '/default', Name = ]
[INFO] [Launcher:/installer] org.red5.server.service.Installer - Installer service created

Selesai sudah proses instalasi

Membuat init script untuk red5

Buat init script di /etc/init.d

sudo su -
touch /etc/init.d/red5
chmod 755 /etc/init.d/red5
nano /etc/init.d/red5

Masukan script berikut

#!/bin/sh
# init script for Red5
# /etc/init.d/red5
  
RED5_USER=root
RED5_HOME=/usr/share/red5
RED5_PROG=red5
  
test -x $RED5_HOME/$RED5_PROG.sh || exit 5
  
case "$1" in
     start)
         echo -n "Starting Red5"
         echo -n " "
         cd $RED5_HOME
         su -s /bin/bash -c "$RED5_HOME/$RED5_PROG.sh &" $RED5_USER
         sleep 2
         ;;
     stop)
         echo -n "Shutting down Red5"
         echo -n " "
         su -s /bin/bash -c "killall -q -u $RED5_USER java" $RED5_USER
         sleep 2
         ;;
     restart)
         $0 stop
         $0 start
         ;;
esac


Ubah permission

chmod a+x /etc/init.d/red5 

Memanggil red5 dapat menggunakan perintah

sudo service red5 [start|restart|stop]

Test Server

Instalasi Adobe Flash Player pada laptop yang akan mengakses Red5. Browse ke server red5

http://ip-address-server:5080

Instalasi Aplikasi Red5 yang ada di

http://ip-address-server:5080/installer/

Demo Aplikasi Red5 Melalui

http://ip-address-server:5080/demos/

Referensi

Pranala Menarik