Instalación de icecast2 para streaming en ubuntu server 9.04
De Libre y Abierto
Insatlación de icecast en ubuntu server 9.04 (proximamente para ubuntu jaunty 9.04 de escritorio)
//instalamos el paquete de icecast2 a través de apt
sudo apt-get install icecast2
//ahora debemos editar el archivo icecast.xml y modificar las contraseñas de nuestro servidor de la cuenta source, del relay y del administrador
sudo nano /etc/icecast2/icecast.xml
=[...]
<authentication>
<source-password>AQUIESCRIBETUPASSWORD</source-password>
<relay-password>AQUIESCRIBETUPASSWORD</relay-password>
<admin-user>admin</admin-user>
<admin-password>AQUIESCRIBETUPASSWORD</admin-password>
</authentication>
[...]=
//después de haber colocado nuestras contraseñas, editamos /etc/default/icecast2 para cambiar ENABLE a true
sudo nano editamos /etc/default/icecast2
= # Defaults for icecast2 initscript
# sourced by /etc/init.d/icecast2 # installed at /etc/default/icecast2 by the maintainer scripts
# # This is a POSIX shell fragment #
# Full path to the server configuration file CONFIGFILE="/etc/icecast2/icecast.xml"
# Name or ID of the user and group the daemon should run under USERID=icecast2 GROUPID=icecast
# Edit /etc/icecast2/icecast.xml and change at least the passwords. # Change this to true when done to enable the init.d script ENABLE=true
=
// instalamos ices2
apt-get install ices2
//creamos los siguientes directorios
mkdir /var/log/ices mkdir /etc/ices2 mkdir /etc/ices2/music
//copiamos el archivo de configuración de ices-playlist a una de las carpetas que creamos
cp /usr/share/doc/ices2/examples/ices-playlist.xml /etc/ices2
//lo editamos y cambiamos <background>0</background> a <background>1</background> porque queremos que corra en segundo plano
//seteamos el password para nuestro Icecast2 server en la sección <instance>...</instance>
sudo nano /etc/ices2/ices-playlist.xml
=<?xml version="1.0"?>
<ices>
<background>1</background> <logpath>/var/log/ices</logpath> <logfile>ices.log</logfile> <loglevel>4</loglevel> <consolelog>0</consolelog>
<stream>
<metadata>
<name>Example stream name</name>
<genre>Example genre</genre>
<description>A short description of your stream</description>
</metadata>
<input>
<module>playlist</module>
<param name="type">basic</param>
<param name="file">/etc/ices2/playlist.txt</param>
<param name="random">0</param>
<param name="restart-after-reread">0</param>
<param name="once">0</param>
</input>
<instance>
<hostname>localhost</hostname>
<port>8000</port>
<password>password1</password>
<mount>/example1.ogg</mount>
<reconnectdelay>2</reconnectdelay>
<reconnectattempts>5</reconnectattempts>
<maxqueuelength>80</maxqueuelength>
<encode>
<nominal-bitrate>64000</nominal-bitrate>
<samplerate>44100</samplerate>
<channels>2</channels>
</encode>
</instance>
</stream>
</ices> =
//listo, iniciamos el servidor
sudo /etc/init.d/icecast2 start
//iniciamos ices2
sudo ices2 /etc/ices2/ices-playlist.xml
//si al iniciar icecast aparece un error como "start up server fail" en la terminal ingresamos
killall icecast
//y volvemos a intentar correr el servidor

