Wednesday, October 6, 2010

CentOS 5 Icecast Server HowTo

So, you wanna stream some tunes, aye? Ok well here's mine, click to listen:

   Jah Radio

Please feel free to tune in, currently it's pretty much all Bob Marley. I'm using some pretty schweet software called icecast. You can pretty much stream any kind of audio you want. The icecast server takes a feed and retransmits, so you'll need a source. That can either be local MP3 files, or a stream from your desktop player, or someone else's stream. Which is what I'm doing. I'm just grabbing some other dude's stream and rebroadcasting it.

Here's how ya do that on a fresh CentOS 5 install:

First, grab the source:

Next, add the RPMforge repo (make sure it matches your architecture, goober):
rpm -Uhv

Install the depdencies:
yum -y install libvorbis-devel libogg-devel curl-devel libxml2-devel libxslt-devel libtheora-devel speex-devel

If you don't have development tools installed, you'll need them to build, compile and bundle, so just run:
yum groupinstall 'Development Tools'

Otherwise, if you already have gcc and all that jazz, run:
rpmbuild -ta icecast-2.3.2.tar.gz

That takes the icecast source and builds you an RPM which you can install. I like doing it that way so you can make a copy of that RPM and use it for other deployments.

Now, once the rpm(s) are build, you can install them like so:
rpm -Uvh /usr/src/redhat/RPMS/x86_64/icecast*.rpm

I like to stuff to log to /var/log - some folks don't. Whatever, it's your call, if your doing it my way (which you should because I'm awesome) do:
mkdir /var/log/icecast/
chown -R nobody:nobody /var/log/icecast/

Now, move their default /etc/icecast.xml and use mine:
mv /etc/icecast.xml /etc/icecast.xml.orig

This is a fully, ready to roll config file which will have you rebroadcasting a popular shoutcast Bob Marley stream:




<alias source="/" dest="/status.xsl"/>

<loglevel>3</loglevel> <!-- 4 Debug, 3 Info, 2 Warn, 1 Error -->
<logsize>10000</logsize> <!-- Max size of a logfile -->



You'll have to edit that file slightly for the hostname. Also, find your own music here:


and update the relay stanza in the above config.

Now, just make sure you have port 8000 open for TCP connects and hit:

Relax and enjoy.

By the way, I had to encode all that XML above to get it to look right in Blogger. The way to do that is to use a site like this:

Worked great.


  1. Tahnks for teh guide, this rely great. I cant seem to finded a SentOS build for my Amiga 500. Cam you helps me ? TIA

  2. Great article, but you forgot the startup line required in the command line that you might want to add to the /etc/ro.local file which is su -c 'icecast -c /etc/icecast.xml -b'

  3. thanks a lot bro..
    i have one question, how to create multiple mount point..?

  4. The subject of icecast hosting is a controversial issue. I really, really like icecast hosting. Given that its influence pervades our society, spasmodically it returns to create a new passion amongst those who study its history. It still has the power to shock socialists, obviously. At the heart of the subject are a number of key factors