hostnamectl set-hostname radio
nano /etc/hosts
apt-get update && apt-get -y dist-upgrade && apt-get -y install gcc libcurl4-gnutls-dev libvorbis-dev libxslt1-dev pkg-config libtheora-dev libspeex-dev openssl
last 3 are optional (libtheora-dev libspeex-dev openssl), not sure about pkg-config
cd /usr/src/
wget http://downloads.xiph.org/releases/icecast/icecast-2.4.3.tar.gz
tar -xzvf icecast-2.4.3.tar.gz
cd icecast-2.4.3/
./configure
make
make install
# libshout
cd /usr/src/
wget http://downloads.xiph.org/releases/libshout/libshout-2.4.1.tar.gz
tar -xzvf libshout-2.4.1.tar.gz
cd libshout-2.4.1/
./configure
make
make install
# EZ Stream
apt-get -y install libtagc0-dev madplay lame
cd /usr/src/
wget http://downloads.xiph.org/releases/ezstream/ezstream-0.6.0.tar.gz
tar -xzvf ezstream-0.6.0.tar.gz
cd ezstream-0.6.0/
./configure
# check that metadata support is "TagLib", had to run configure with --with-taglib-includes=/usr/include/taglib/ once
make
make install
# clean up
rm -rf /usr/src/*
# prepare icecast
cd /usr/local/etc/
cp icecast.xml /usr/local/share/examples
cp /usr/local/share/examples/ezstream/ezstream_reencode_mp3.xml ezstream.xml
nano icecast.xml
nano ezstream.xml
adduser icecast2
adduser icecast2 sudo
mkdir -p /usr/local/var/log/icecast
chown icecast2 /usr/local/var/log/icecast
icecast -c /usr/local/etc/icecast.xml
find /usr/local/music/station1/ -name '*.mp3' > /usr/local/music/station1-sorted.txt
ezstream -s /usr/local/music/station1-sorted.txt > /usr/local/music/station1.txt
ezstream -q -c /usr/local/etc/station1.xml
# next track:
killall -SIGUSR1 ezstream
# rebuild playlist, shuffle, and reload stream:
find /usr/local/music/station1/ -name '*.mp3' > /usr/local/music/station1-sorted.txt && ezstream -s /usr/local/music/station1-sorted.txt > /usr/local/music/station1.txt && killall -SIGHUP ezstream