Я не нашел толкового руководства в интернете, действовал "вслепую". В итоге решил что ничего не получилось, и успокоился, поставив Icecast просто на другой сервер. Однако выяснилось, что он тогда всё-таки установился... Я разрыл .bash_history и привожу его часть где видны мои отчаянные попытки таки поставить Icecast. Знаю, возможно, это самое дерьмовое руководство, которое я публиковал :)
Внимание: не вбивайте в консоль все команды подряд (как перечислено ниже).
uname -a
all
lsb_release -a
yum -y install icecast
yum -y install icecast2
yum search icecast
yum search icecast2
yum search icecast-server
uname -a
yum update
cd /etc/yum.repos.d
ls ./
yum info icecast
yum info icecast
yum update
yum search icecast2
yum search icecast-server
rpm -Uhv http://apt.sw.be/packages/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
rpm -Uhv http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.i386.rpm
cd ~
wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.i386.rpm
rpm -Uhv rpmforge-release-0.5.2-2.el5.rf.i386.rpm
rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt
rpm -K rpmforge-release-0.5.2-2.el5.rf.*.rpm
rpm -i rpmforge-release-0.5.2-2.el5.rf.*.rpm
yum info htop
yum info htop
yum info icecast
yum info icecast2
yum info icecast-server
yum install curl-devel libtheora-devel libvorbis-devel libxslt-devel speex-devel
rpm -ivh http://downloads.xiph.org/releases/icecast/icecast-2.3.1-0.src.rpm
rpm -ivh http://downloads.xiph.org/releases/icecast/icecast-2.3.1-0.src.rpm
rpmbuild -bb /usr/src/redhat/SPECS/icecast.spec
yum install rpm-build
rpmbuild -bb /usr/src/redhat/SPECS/icecast.spec
rpm -ivh http://downloads.xiph.org/releases/icecast/icecast-2.3.1-0.src.rpm
rpmbuild -bb /usr/src/redhat/SPECS/icecast.spec
rpm -ivh /usr/src/redhat/RPMS/i386/icecast-2.3.1-0.i386.rpm
service icecast start
exit
cd /home
wget http://downloads.xiph.org/releases/icecast/icecast-2.3.1-0.src.rpm
rpmbuild --rebuild icecast-2.3.1-0.src.rpm
exit
mc
jobs
exit
all
lsb_release -a
yum -y install icecast
yum -y install icecast2
yum search icecast
yum search icecast2
yum search icecast-server
uname -a
yum update
cd /etc/yum.repos.d
ls ./
yum info icecast
yum info icecast
yum update
yum search icecast2
yum search icecast-server
rpm -Uhv http://apt.sw.be/packages/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
rpm -Uhv http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.i386.rpm
cd ~
wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.i386.rpm
rpm -Uhv rpmforge-release-0.5.2-2.el5.rf.i386.rpm
rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt
rpm -K rpmforge-release-0.5.2-2.el5.rf.*.rpm
rpm -i rpmforge-release-0.5.2-2.el5.rf.*.rpm
yum info htop
yum info htop
yum info icecast
yum info icecast2
yum info icecast-server
yum install curl-devel libtheora-devel libvorbis-devel libxslt-devel speex-devel
rpm -ivh http://downloads.xiph.org/releases/icecast/icecast-2.3.1-0.src.rpm
rpm -ivh http://downloads.xiph.org/releases/icecast/icecast-2.3.1-0.src.rpm
rpmbuild -bb /usr/src/redhat/SPECS/icecast.spec
yum install rpm-build
rpmbuild -bb /usr/src/redhat/SPECS/icecast.spec
rpm -ivh http://downloads.xiph.org/releases/icecast/icecast-2.3.1-0.src.rpm
rpmbuild -bb /usr/src/redhat/SPECS/icecast.spec
rpm -ivh /usr/src/redhat/RPMS/i386/icecast-2.3.1-0.i386.rpm
service icecast start
exit
cd /home
wget http://downloads.xiph.org/releases/icecast/icecast-2.3.1-0.src.rpm
rpmbuild --rebuild icecast-2.3.1-0.src.rpm
exit
mc
jobs
exit
:)))
Так или иначе, на этом этапе, предполагается, что Icecast в системе установлен.
Теперь создадим ему пользователя (как описано здесь):
groupadd icecast && useradd icecast2 -g icecast
Создадим папки и файлы:
mkdir /var/log/icecast && touch /var/log/icecast/access.log && touch /var/log/icecast/error.log && touch /var/log/icecast/playlist.log && chown -R icecast2 /var/log/icecast/* && chgrp -R icecast /var/log/icecast/* && chmod 644 /var/log/icecast/*
Открываем конфиг (у меня это /etc/icecast.xml) и прописываем:
1. Запуск от имени пользователя icecast2 (иначе будет вылетать ERROR: You should not run icecast2 as root Use the changeowner directive in the config file):
<security>
<chroot>0</chroot>
<changeowner>
<user>icecast2</user>
<group>icecast</group>
</changeowner>
</security>
<chroot>0</chroot>
<changeowner>
<user>icecast2</user>
<group>icecast</group>
</changeowner>
</security>
2. Пути к логам:
<logdir>/var/log/icecast</logdir>
Запускаеи Icecast2:
icecast -b -c /etc/icecast.xml
Можно также использовать полный путь к программе, в моём случае /usr/bin/icecast:
/usr/bin/icecast -b -c /etc/icecast.xml
Чтобы Icecast стартовал при запуске системы нужен соответствующий скрипт /etc/rc.d/init.d/icecast2. В моей системе его не оказалось, поэтому был найден следующий вариант:
#!/bin/sh
#
# icecast This shell script takes care of starting and stopping
# the icecast multimedia streaming systen.
#
# chkconfig: - 85 15
# description: icecast is a multimedia streaming daemon. It is used to \
# relay and offer multimedia streaming content.
# processname: icecast
# pidfile: /var/run/icecast/icecast.pid
# config: /etc/icecast.xml
# Source function library.
. /etc/rc.d/init.d/functions
[ -x /usr/bin/icecast ] || exit 0
# See how we were called.
case "$1" in
start)
# Start daemon.
echo -n $"Starting icecast streaming daemon: "
daemon "/usr/bin/icecast -b -c /etc/icecast.xml > /dev/null"
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/icecast
;;
stop)
# Stop daemon.
echo -n $"Shutting down icecast streaming daemon: "
killproc icecast
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/icecast
;;
status)
status icecast
RETVAL=$?
;;
restart)
$0 stop
$0 start
;;
reload)
echo -n $"Reloading icecast: "
killproc icecast -HUP
RETVAL=$?
echo
;;
condrestart)
[ -f /var/lock/subsys/icecast ] && restart || :
;;
*)
echo $"Usage: $0 {start|stop|status|restart|reload}"
RETVAL=1
;;
esac
exit $RETVAL
#
# icecast This shell script takes care of starting and stopping
# the icecast multimedia streaming systen.
#
# chkconfig: - 85 15
# description: icecast is a multimedia streaming daemon. It is used to \
# relay and offer multimedia streaming content.
# processname: icecast
# pidfile: /var/run/icecast/icecast.pid
# config: /etc/icecast.xml
# Source function library.
. /etc/rc.d/init.d/functions
[ -x /usr/bin/icecast ] || exit 0
# See how we were called.
case "$1" in
start)
# Start daemon.
echo -n $"Starting icecast streaming daemon: "
daemon "/usr/bin/icecast -b -c /etc/icecast.xml > /dev/null"
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/icecast
;;
stop)
# Stop daemon.
echo -n $"Shutting down icecast streaming daemon: "
killproc icecast
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/icecast
;;
status)
status icecast
RETVAL=$?
;;
restart)
$0 stop
$0 start
;;
reload)
echo -n $"Reloading icecast: "
killproc icecast -HUP
RETVAL=$?
echo
;;
condrestart)
[ -f /var/lock/subsys/icecast ] && restart || :
;;
*)
echo $"Usage: $0 {start|stop|status|restart|reload}"
RETVAL=1
;;
esac
exit $RETVAL
Работает.
P.S. под конец все-таки нашел какое-то руководство, но уже не стал проверять. http://www.linuxhelp.net/forums/index.php?showtopic=8226&pid=27924&st=0entry27924
No comments:
Post a Comment