yum groupinstall "Development Tools" -y
yum install -y curl-devel libtheora-devel libvorbis-devel libxslt-devel speex-devel libshout libxslt-devel -y
cd /usr/src
# from https://icecast.org/download/
wget http://downloads.xiph.org/releases/icecast/icecast-2.4.4.tar.gz
tar -zxvf icecast-2.4.4.tar.gz
cd icecast-2.4.4
./configure --sysconfdir=/etc --localstatedir=/var
make
make install
useradd -s /sbin/nologin icecast
mkdir -p /var/run/icecast
mkdir -p /var/log/icecast
chown -R icecast:icecast /var/run/icecast
chown -R icecast:icecast /var/log/icecast
sed -i /etc/icecast.xml -e "s,/usr/local/var/log/icecast,/var/log/icecast,g"
# Configure /etc/icecast.xml, update <authentication>, <changeowner>, <hostname>, <location> and <admin> sections
echo '[Unit]
Description=Icecast
After=network.target
[Service]
Type=simple
Restart=always
RestartSec=5
User=icecastExecStart=/usr/local/bin/icecast -c /etc/icecast.xml
ExecReload=/usr/bin/kill -HUP $MAINPID
[Install]
WantedBy=multi-user.target' > /etc/systemd/system/icecast.service
systemctl daemon-reload
systemctl enable icecast
service icecast restart
service icecast status