Mudanças entre as edições de "Icecast2"
De MochilaWiki
Ir para navegaçãoIr para pesquisar (Nova página: Montando um servidor de rádio/tv web com Icecast2 em Debian Etch Não querendo re-inventar a roda, um ótimo tutorial de configuração do Icecast2 está disponivel no endereço http...) |
|||
(16 revisões intermediárias por 4 usuários não estão sendo mostradas) | |||
Linha 1: | Linha 1: | ||
− | + | página do projeto | |
+ | * http://www.icecast.org/ | ||
− | + | sources.list | |
− | + | deb http://ftp.us.debian.org/debian wheezy main non-free contrib | |
+ | deb-src http://ftp.us.debian.org/debian wheezy main non-free contrib | ||
+ | deb http://security.debian.org/ wheezy/updates main non-free contrib | ||
+ | deb-src http://security.debian.org/ wheezy/updates main non-free contrib | ||
+ | deb http://www.deb-multimedia.org wheezy main non-free | ||
+ | deb-src http://www.deb-multimedia.org wheezy main non-free | ||
− | + | instalando dependências: | |
+ | <source lang="bash"> | ||
+ | apt-get update | ||
+ | apt-get install -y deb-multimedia-keyring | ||
+ | apt-get update | ||
+ | apt-get build-dep icecast2 | ||
+ | </source> | ||
− | + | instalando icecast | |
− | + | <source lang="bash"> | |
+ | cd /usr/src | ||
+ | wget http://downloads.xiph.org/releases/icecast/icecast-2.4.1.tar.gz | ||
+ | tar zxvf icecast-2.4.1.tar.gz | ||
+ | cd icecast-2.4.1 | ||
+ | ./configure | ||
+ | make | ||
+ | make install | ||
+ | </source> | ||
− | < | + | ajustando configurações |
+ | <source lang="bash"> | ||
+ | addgroup --system icecast | ||
+ | adduser --system --disabled-password --disabled-login \ | ||
+ | --home /usr/share/icecast2 --no-create-home --ingroup icecast \ | ||
+ | icecast2 | ||
+ | mkdir /etc/icecast2 | ||
+ | mkdir /var/log/icecast/ | ||
+ | cp /usr/local/etc/icecast.xml /etc/icecast2/icecast.xml | ||
+ | chown -R icecast2: /etc/icecast2 /var/log/icecast/ | ||
+ | chmod -R ug+rw,o+r,ugo+X /etc/icecast2 | ||
+ | chmod ug+rw,o=,ug+X /etc/icecast2/icecast.xml | ||
+ | wget http://pub.nkosi.org/icecast.init -O /etc/init.d/icecast | ||
+ | chmod +x /etc/init.d/icecast | ||
+ | update-rc.d -f icecast defaults | ||
+ | </source> | ||
+ | |||
+ | redirecionando porta 8000 para 80 | ||
+ | <source lang="bash"> | ||
+ | iptables -A PREROUTING -t nat -p tcp -d 192.168.2.32 --dport 80 -j REDIRECT --to-port 8000 | ||
+ | iptables-save > /etc/iptables.up.rules | ||
+ | echo 'pre-up iptables-restore < /etc/iptables.up.rules' >> /etc/network/interfaces | ||
+ | </source> | ||
+ | |||
+ | == criando ponto de montagem == | ||
+ | para criar um ponto de montagem coloque esse exemplo simples em /etc/icecast2/icecast.xml: | ||
+ | * para mp3 | ||
+ | |||
+ | <mount> | ||
<mount-name>radio</mount-name> | <mount-name>radio</mount-name> | ||
<password>m4l4t4est4</password> | <password>m4l4t4est4</password> | ||
<max-listeners>1000</max-listeners> | <max-listeners>1000</max-listeners> | ||
− | </mount | + | </mount> |
− | + | * para ogg | |
− | + | <mount> | |
<mount-name>/radio.ogg</mount-name> | <mount-name>/radio.ogg</mount-name> | ||
<password>m4l4test4</password> | <password>m4l4test4</password> | ||
<max-listeners>1000</max-listeners> | <max-listeners>1000</max-listeners> | ||
− | </mount | + | </mount> |
agora basta iniciar o serviço: | agora basta iniciar o serviço: | ||
− | # /etc/init.d/ | + | # /etc/init.d/icecast restart |
+ | |||
+ | |||
+ | |||
+ | * http://wiki.debian.org/iptables | ||
− | + | [[Categoria:Servidor]] | |
+ | [[Categoria:Streaming]] |
Edição atual tal como às 19h11min de 5 de dezembro de 2014
página do projeto
sources.list
deb http://ftp.us.debian.org/debian wheezy main non-free contrib deb-src http://ftp.us.debian.org/debian wheezy main non-free contrib deb http://security.debian.org/ wheezy/updates main non-free contrib deb-src http://security.debian.org/ wheezy/updates main non-free contrib deb http://www.deb-multimedia.org wheezy main non-free deb-src http://www.deb-multimedia.org wheezy main non-free
instalando dependências:
apt-get update
apt-get install -y deb-multimedia-keyring
apt-get update
apt-get build-dep icecast2
instalando icecast
cd /usr/src
wget http://downloads.xiph.org/releases/icecast/icecast-2.4.1.tar.gz
tar zxvf icecast-2.4.1.tar.gz
cd icecast-2.4.1
./configure
make
make install
ajustando configurações
addgroup --system icecast
adduser --system --disabled-password --disabled-login \
--home /usr/share/icecast2 --no-create-home --ingroup icecast \
icecast2
mkdir /etc/icecast2
mkdir /var/log/icecast/
cp /usr/local/etc/icecast.xml /etc/icecast2/icecast.xml
chown -R icecast2: /etc/icecast2 /var/log/icecast/
chmod -R ug+rw,o+r,ugo+X /etc/icecast2
chmod ug+rw,o=,ug+X /etc/icecast2/icecast.xml
wget http://pub.nkosi.org/icecast.init -O /etc/init.d/icecast
chmod +x /etc/init.d/icecast
update-rc.d -f icecast defaults
redirecionando porta 8000 para 80
iptables -A PREROUTING -t nat -p tcp -d 192.168.2.32 --dport 80 -j REDIRECT --to-port 8000
iptables-save > /etc/iptables.up.rules
echo 'pre-up iptables-restore < /etc/iptables.up.rules' >> /etc/network/interfaces
criando ponto de montagem
para criar um ponto de montagem coloque esse exemplo simples em /etc/icecast2/icecast.xml:
- para mp3
<mount> <mount-name>radio</mount-name> <password>m4l4t4est4</password> <max-listeners>1000</max-listeners> </mount>
- para ogg
<mount> <mount-name>/radio.ogg</mount-name> <password>m4l4test4</password> <max-listeners>1000</max-listeners> </mount>
agora basta iniciar o serviço:
# /etc/init.d/icecast restart