Instalar Red5 en CentOs 5.5 (Final)
2 de Enero de 2.011.
Aprovechando que teníamos que realizar la instalación de un Red5 en CentOs 5.5 para uno de nuestros clientes hemos decidido preparar esta guía-manual.
Nosotros lo utilizamos tal y como está para instalar Red5 en nuestros servidores que llevan CentOs y no hemos tenido ningún problema con la instalación. No obstante declinamos cualquier tipo de responsabilidad directa o indirecta por el uso de este tutorial.
Antes de proceder tenemos que asegurarnos de tener copia de seguridad de toda la información contenida en el servidor.
Necesitaremos instalar lo siguiente:
- Subversion.
- Java.
- Ant (También conocido como Apache Ant).
- Exportar variables.
- Descargar e instalar Red5.
- Comprobar funcionamiento.
- Crear script de inicio.
1. Instalación de Subversion:
Lo primero es conectarse al servidor utilizando Putty o cualquier otro programa utilizando a root. Empezamos instalando el sistema de control de versiones.
yum install mod_dav_svn subversion
2. Instalación de Java:
Red 5 es un servidor de streaming que funciona con Java. Necesitamos instalar OpenJDK 1.6 en CentOs utilizando yum.
yum install java-1.6.0-openjdk java-1.6.0-openjdk-devel java-1.6.0-openjdk-javadoc java-1.6.0-openjdk-src
3. Instalación de Ant:
Ahora vamos a instalar Ant.
Ya está instalado Ant. Tenemos que añadir unas variables para que Java y Ant sean funcionales en CentOs. Lo haremos creando un archivo de la siguiente manera:
vim /etc/profile.d/ant.sh
En nuestro nuevo archivo agregamos las siguientes líneas:
export ANT_HOME=/opt/ant export PATH=/opt/ant/bin:$PATH
Ahora necesitamos reiniciar el servidor. Escribiremos:
reboot
Después del reinicio, debemos comprobar que Ant está correctamente instalado. Lo haremos escribiendo lo siguiente:
env |grep ANT
La respuesta al comando anterior debe ser:
ANT_HOME=/opt/ant
Ahora vamos a comprobar que Ant esté funcionando correctamente. Escribiremos:
La respuesta debe ser:
Apache Ant version 1.8.2 compiled on December 20 2010
4. Instalación de Red5.
Ahora vamos a descargar e instalar Red 5 versión 0.9. Este proceso puede durar hasta 10 minutos dependiendo de la velocidad y carga del servidor. Durante este proceso no hay que tocar nada:
cd /usr/srcsvn checkout http://red5.googlecode.com/svn/java/server/trunk/ red5mv red5 /usr/local/cd /usr/local/red5ant prepareant dist
Una vez terminado el proceso tenermos que ver:
BUILD SUCCESSFUL
Colocamos Red5 en su sitio
Damos permiso para poder utilizar el archivo red5.sh
Arrancamos Red5
Llegados a este punto veremos la pantalla llena de información procedente a Java. Podemos salir en cualquier momento pulsando Control + C.

5. Comprobación de Red5:
Para probar Red5 tenemos que entrar desde cualquier navegador, sin haber cerrado la ejecución de ./red5.sh, a la siguiente dirección:
http://IP_DE_NUESTRO_SERVIDOR:5080
Veremos lo siguiente:

6. Crear script de inicio:
Para que Red5 esté disponible cada vez que el servidor inicie es necesario crear un script de inicio.
vi /etc/init.d/red5
Dentro hay que copiar este código y guardar el archivo. Utilizando vi, se guarda con :wq
#!/bin/sh# For RedHat and cousins:# chkconfig: 2345 85 85# description: Red5 flash streaming server# processname: red5
PROG=red5RED5_HOME=/usr/local/red5DAEMON=$RED5_HOME/$PROG.shPIDFILE=/var/run/$PROG.pid
# Source function library. /etc/rc.d/init.d/functions
[ -r /etc/sysconfig/red5 ] && . /etc/sysconfig/red5
RETVAL=0
case “$1″ instart)echo -n $”Starting $PROG: ”cd $RED5_HOME$DAEMON >/dev/null 2>/dev/null &RETVAL=$?if [ $RETVAL -eq 0 ]; thenecho $! > $PIDFILEtouch /var/lock/subsys/$PROG
fi[ $RETVAL -eq 0 ] && success $”$PROG startup” || failure $”$PROG startup”echo;;stop)echo -n $”Shutting down $PROG: ”killproc -p $PIDFILERETVAL=$?echo[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$PROG;;restart)$0 stop$0 start;;status)status $PROG -p $PIDFILERETVAL=$?;;*)echo $”Usage: $0 {start|stop|restart|status}”RETVAL=1esac
exit $RETVAL
Ahora inicializamos el script de inicio:
/etc/init.d/red5 start
Pasamos a comprobar que todo esté bien:
/etc/init.d/red5 status
Veremos: red5 (pid XXXXX) is running…
Podemos parar, iniciar, comprobar el estado o reiniciar al servidor de streaming Red5:
/etc/init.d/red5 stop/etc/init.d/red5 start/etc/init.d/red5 status/etc/init.d/red5 restart
Fuente: http://www.solutein.com/instalar-red5-en-centos-5-5
mayo 6, 2009
Posted by voyageravv under
Linux Leave a Comment
This explains how to share individual logged in users desktops using x11vnc instead of the built-in “Remote Desktop” feature of Ubuntu. The reason for this is because “vino” which is used by the “Remote Desktop” option is inadequate for a lot of people (no clipboard support), no accessible configuration options, and quite slow.
OK, we have a two step process here, getting x11vnc to run automagically on a user’s login and then installing autocutsel; Autocutsel is used to make sure the VNC Clipboard gets updated from both just selecting and right-click copying. You do not have to install autocutsel, it just makes things work a little nicer.
Before you do anything else, you need to enable the universe repositories
Setting up x11vnc
1. Install x11vnc: sudo apt-get install x11vnc
2. Set the password: vncpasswd ~/.vnc/passwd (vncpasswd is included with vnc-common, which is installed by default)
3. Make it auto-start when the user logs in and show which port we’re running on (useful if you run multiple vnc servers) the port will be put in ~/.vnc/port.txt:
1. sudo gedit /usr/local/bin/sharex11vnc Paste in the following:
Code:
#!/bin/sh
x11vnc -nap -bg -many -rfbauth ~/.vnc/passwd -desktop “VNC ${USER}@${HOSTNAME}”|grep -Eo “[0-9]{4}”>~/.vnc/port.txt
# comment out the following if you don’t want a popup telling you which port you’re using.
zenity –info –text=”Your VNC port is `cat ~/.vnc/port.txt`”
2. sudo chmod 755 /usr/local/bin/sharex11vnc
3. System->Preferences->Sessions->Startup Programs then click Add and type in sharex11vnc
Installing autocutsel:
1. Download tar.gz from http://www.lepton.fr/tools/autocutsel/
2. Move file: sudo mv /home/user/location/autocutsel-0.8.0.tar.gz /usr/src
3. Extract file: cd /usr/src;sudo tar -xzvf autocutsel-0.8.0.tar.gz
4. Install packages required to compile and install autocutsel into a deb package:
1. sudo apt-get install gcc checkinstall libx11-dev libxaw8-dev This may take a while if you don’t already have gcc or the xlibs installed installed.
2. cd autocutsel-0.8.0
3. ./configure –prefix=/usr
4. sudo checkinstall -y –nodoc The resulting deb will be installed and the package will be left in the current directory
5. Make it auto-start when the user logs in:
System->Preferences->Sessions->Startup Programs then click Add and type in autocutsel
The best VNC client for windows is UltraVNC http://ultravnc.sf.net – I recommend it for all your VNC needs.