How to install Icecast

December 19, 2010 — 35 Comments


I had recently ran across a request from a customer asking me to install Icecast. I didn’t find any easy guides out there that had the entire process laid out. So, here is my contribution to the Internet. I hope one of you find this useful. With this guide, you can set it up in a mere 10 minutes.

What is Icecast?

Per the official website (http://www.icecast.org): Icecast is free server software for streaming multimedia. In particular, icecast streams audio to listeners over the Internet, and is compatible with Nullsoft’s Shoutcast.

Installation

We’re going to install Icecast via YUM. It’s quick, it’s easy, it’ll be manageable to maintain it. You’ll need to have root access to perform all these steps, so go ahead and log in as ‘root’.

The first thing to do is install the dependencies that are needed run icecast:

Next, you need to grab the EPEL repo that matches your version of CentOS:

CentOS 6 (64 bit):

CentOS 6 (32 bit):

CentOS 5 (64 bit):

CentOS 5 (32 bit):

And now we install the Icecast:

Configuration

Any custom configuration changes you want to make (such as admin password), you would make them in the Icecast conf:

In the past, you had to change the user that Icecast runs as and you had to change the logging directory. Then you would have had to create that log directory and user. No more! By installing it with YUM, the user and logging folder are automatically created and setup. The user is ‘icecast’. The logging folder is: /var/log/icecast

Run Icecast

This is it, the moment you’ve been waiting for:

Make sure port 8000 is opened in your firewall. Now you can test it by accessing: http://yourdomain.com:8000. You will see a screen like this:

Icecast status page

The front page for Icecast server

Auto-run/Add to system start up

In the event that your server is ever rebooted, you’ll want to make sure that Icecast automatically starts too. Take that last command we had to run Icecast (listed above) and place it in your:

Note about this article

This article is one I had written and shared with the ServInt blog as part of the ‘Tech bench’ series. You can view it on the ServInt blog here. They are using my article with my permission.

Change Log:

  • 05/29/13 | Completely revamped install method. Using YUM and EPEL repo as opposed to building the binary package. Now you can install Icecast on CentOS 5 & 6, on 32-bit & 64-bit!

  • 05/28/13 | Removed broken links to external sites’ install guides

  • 06/22/11 | Updated guide to use the latest version of Icecast (2.3.2)

Jacob "Boom Shadow" Tirey

Posts Twitter

A linux web hosting administrator, a professional production sound man, and a renegade cop without nothing left to lose.... Ok, that last part is made up. In all seriousness, my passion in life is to help people; whether that be with help running their sites or with their productions. The name 'Boom Shadow' was given to me by a great group of filmmakers called Star Wipe Films. back in 2005 and has been with me since. I hope my site is helpful to you, and if there's something you need, drop me a line!
  • Rik

    Hello, thanks for the tutorial. I’ve followed your directions & I was able to yeild the same results as shown in the tutorial. I now need to setup ices0 to enable mp3 streaming but I am getting an error (in ssh shell terminal) as the repo packages for ices are not available. I downloaded the source code from icecast but I am unsure where to untar, install the package. by any chance, do you have a tutorial or a work around to install ices or do I necessarily need to install ices in order to relay a music stream to my icecast directory? At this time, I do not see any active mount points in my admin panel, is there anything that I am doing wrong or do I even need an active mount point to stream through my server? Thanks again, & kudos for your great tutorial. & fwiw, I am running icecast on a centos 6.3 64bit vps machine (live website)

  • KAKA

    FATAL: could not open error logging (/usr/var/log/icecast/error.log): No such file or directory
    FATAL: could not open access logging (/usr/var/log/icecast/access.log): No such file or directory
    FATAL: Could not start logging

    this error

    • The problem is with your logging directory. This is mentioned in my instructions in the article 🙂 You need to create that folder: /usr/var/log/icecast/

      Personally, I like to change the logging directory to a more intuitive location: /var/log/icecast

      Edit your /etc/icecast.xml, and change the line that starts with:

  • Pradja

    How to Stop the icecast2 server on centos 5 ?

    • If you installed it via my instructions, you can just kill the icecast process. Look for it by running: ps auwx | grep -i icecast
      Then do a ‘kill’ on the PID that it finds.

  • Kobyn

    Thank you for the tutorial. I followed these directions and almost everything went trough.  I am getting this error when I type su icecast -c /path/to/icecast.xml

    ERROR: You should not run icecast2 as root
    Use the changeowner directive in the config file
     

    • The problem is actually like the error states, Icecast is still configured to run as root.
      Edit your /etc/icecast.xml, and look for the section:

  • This works for x64 too?

  • inzacky

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

  • Its the any way that o cant run icecast in centos like a service, similar like fedora ?

  • When I entered this command: rpmbuild -bb /usr/src/redhat/SPECS/icecast.specI am getting the following error:-bash: rpmbuild: command not foundPlease help what to do?

    • inzacky

      i so.. no such file or directory 🙁

  • Thanks very useful.

    Si me sirvio.

  • Tsafar

    How do i uninstall?

    rpm -e aint working :/

  • Lefteris

    Hello again. A little more help. I am trying to found how to hide
    icecast status page and all the viewable information such as current
    listeners etc. do you know how can i do this?

    i also installed centova cast for managing streams etc.
    Thanx in advancd

    • @b68862090db956d336cdf259aa0972ae:disqus , Are you trying to disable the entire page locate at: http://yourdomain.com:8000 ? If so, the easiest method would be to change the permissions on the document root folder. You could run: chmod 000 /usr/share/icecast/web

      • Lefteris

        Yes i want to disable the entire icecast2 status page. i don’t anyone to see my mount points with my active listeners. i tried to chmod as you said. but the page is still viewable.
        the status page is on 8900 port, if this means something.

        • @b68862090db956d336cdf259aa0972ae:disqus , removing the permissions of the web folder ought to do it. I now successfully get this error on my page: “Could not parse XSLT file”

          Perhaps your web root for icecast is set to a different location. Look at the icecast.xml (configuration file) and see what the path is for:

          If you set the permissions of that folder to 000, no one should be able to pull up the page. Alternatively, you could simply rename (or move) the static page itself instead of modifying the entire webroot folder. You could remove status.xsl & status2.xsl

  • Shadowknight

    using Cent OS 5 and getting an error:

    error: cannot write to %sourcedir /usr/src/redhat/SOURCES

    So I created this folder while logged in as root and got a warning that the user and group karl could not be found – using root. So I logged in as a user and still could not perform this.

  • Moslemovic

    Could not parse XSLT fileplease help me …

    • @434437af76d3baafc1b50eee7ae3cfec:disqus , which step gave you that error? Did you install the libxslt-devel?

  • Daniel

     thanks, what about the 64bit version?

    • @ @bfc10186b6581747068bf097a0139327:disqus : As of right now, installations on CentOS 5 64 bit do not work. I’m going to try my hardest to set aside some time in the near future to play around with it. Once I get working, I’ll update the article.

    • @bfc10186b6581747068bf097a0139327:disqus , I just came across this. Someone else wrote up an article for installing on 64bit. I tested it for myself, and it works fine. Although the icecast.xml was in a new location. Here is the link:

      http://support.cast-control.net/index.php?_m=knowledgebase&_a=viewarticle&kbarticleid=69

  • Lefteris

    in which path icecast is installed ? Thnx for the great tutorial

    • @b68862090db956d336cdf259aa0972ae:disqus , after the installation, icecast’s binary will be located at: /usr/bin/icecast

      • Lefteris

        Hello again. A little more help. I am trying to found how to hide icecast status page and all the viewable information such as current listeners etc. do you know how can i do this?

        thanks in advance

  • Anonymous

    thanks a lot. this is exactly what i was looking for!

    • I’m glad I could help!

      • Inganious

         when writing this command useradd icecast I got no such command error , is there any help ?
        Thanks