Thursday, July 9, 2020

[Howto] install Icecast on Centos 8

Icecast package is not available on Centos 8 / EPEL 8 package repositories. Here is the gist I use to install this package on Centos 8:


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=icecast
ExecStart=/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

No comments:

Post a Comment

How to export Apple Health / Google Fit training activity to TCX format

  I own a Xiaomi Smart Band 7, and recently, my Mi Fitness app stopped syncing running activities to Strava. Mi Fitness supports syncing dat...