Actualización de Sistema
[email protected]: apt update
[email protected]: apt upgrade
[email protected]: update-grub
[email protected]: reboot
Agregar Usuario
[email protected]:~# adduser matias
Adding user `matias' ...
Adding new group `matias' (1000) ...
Adding new user `matias' (1000) with group `matias' ...
Creating home directory `/home/matias' ...
Copying files from `/etc/skel' ...
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Changing the user information for matias
Enter the new value, or press ENTER for the default
Full Name []:
Room Number []:
Work Phone []:
Home Phone []:
Other []:
Is the information correct? [Y/n]
[email protected]:~# adduser matias sudo
Cambiar de usuario
[email protected]:~# su matias
Instalar Dependencias
[email protected]: sudo apt-get install build-essential
[email protected]: sudo apt-get install libxslt1-dev libvorbis-dev
Descargar Codigo
cd /home/matias/
wget https://github.com/karlheyes/icecast-kh/archive/icecast-2.4.0-kh10.tar.gz
Descomprimir
tar xzf icecast-2.4.0-kh10.tar.gz
Compilar – Configure
cd icecast-kh-icecast-2.4.0-kh10/
./configure
make
sudo make install
Crear usuario para el servicio
sudo adduser --disabled-login --disabled-password icecast
Crear Demonio
vim /etc/init.d/icecast
#!/bin/bash
### BEGIN INIT INFO
# Provides: icecast2
# Required-Start: $remote_fs $network
# Required-Stop: $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Starts the icecast audio streaming server daemon
### END INIT INFO
#
# icecast2
#
# Written by Miquel van Smoorenburg <[email protected]>.
# Modified for Debian
# by Ian Murdock <[email protected]>.
#
# Further modified by Keegan Quinn <[email protected]>
# for use with Icecast 2
#
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/local/bin/icecast
NAME=icecast
DESC=icecast
test -x $DAEMON || exit 0
# Defaults
CONFIGFILE="/usr/local/etc/icecast.xml"
CONFIGDEFAULTFILE="/etc/default/icecast2"
USERID=icecast
GROUPID=icecast
ENABLE="true"
# Reads config file (will override defaults above)
[ -r "$CONFIGDEFAULTFILE" ] && . $CONFIGDEFAULTFILE
if [ "$ENABLE" != "true" ]; then
echo "$NAME daemon disabled - read $CONFIGDEFAULTFILE."
exit 0
fi
set -e
case "$1" in
start)
echo -n "Starting $DESC: "
start-stop-daemon --start --quiet --chuid $USERID:$GROUPID \
--exec $DAEMON -- -b -c $CONFIGFILE
echo "$NAME."
;;
stop)
echo -n "Stopping $DESC: "
# Send TERM after 5 seconds, wait at most 30 seconds.
start-stop-daemon --stop --oknodo --retry TERM/5/0/30 --quiet --exec $DAEMON
echo "$NAME."
;;
reload|force-reload)
echo "Reloading $DESC configuration files."
start-stop-daemon --stop --signal 1 --quiet --exec $DAEMON
;;
restart)
echo -n "Restarting $DESC: "
# Send TERM after 5 seconds, wait at most 30 seconds.
start-stop-daemon --stop --oknodo --retry TERM/5/0/30 --quiet --exec $DAEMON
start-stop-daemon --start --quiet --chuid $USERID:$GROUPID \
--exec $DAEMON -- -b -c $CONFIGFILE
echo "$NAME."
;;
*)
echo "Usage: $0 {start|stop|restart|reload|force-reload}" >&2
exit 1
;;
esac
exit 0
Permisos de Ejecucion
sudo chmod +x /etc/init.d/icecast