Today I decided to try and set up an ice cast server on a linode to see if I could do it. following is my journey chronicling what happened, and what lessons are to be learned.
What you might need
You will need a linode, at least that’s the best way to learn how to do this. You can go to this site to learn more. After you get your account set up you will need a working knowledge of the shell. We will not go in to it in this guide.
When it comes time to do the installation you might run in to an error such as the following paraphrased.
ice cast not found. >
Try the following.
- if not logged in to your shell, log in as root.
- Run the following command.
- Wait for that process to finish
- try running apt-get install icecast2 and press enter.
Importent: editing the xml file
There are several fields you might need to edit the xml file. I can’t go in to all of them as I’m still learning but I will walk you through some of these that you might want to change.
username and pwd for both source and admin
Unless you want to get hacked, the smart thing would be to change the user name and pwd (password) ) of both your source and admin. These can be anything you want, how ever I recommend strong passwords. The defaults are hackme, and many people know these are the default passwords so change them so that you don’t get hacked, or no one can broadcast with out your knowing.
the user account
Next you will need to create a user account to run the ice cast process from. You can do this using ssh. Look up how to do this.
Once your user is created you will need to put this in your xml file. It’s at the bottom under security.
- comment out the changeowner section. You will need this
- enter the user name you created in the user name field. I was confused as to why this was needed but I got some help from some people on twitter regarding this.
- change the group from nogroup to root. This is necessary if you get an error in your prompt when trying to start ice cast.
I next set the logs up after getting a ton of permission denied after starting the ice cast service. You will get logs set some ware else. Set them up in a separate user name so your logs will go in to for example
You can create a log folder if you so desire, how ever it is not necessary.
You will want to change the section that looks like
Modify those to your /your home user name. directory
Note: If the admin and web folders don’t look right, modify the xml to where they point. In my case it was
/etc/icecast2. Your results might or might not varry.
After changing the place of the log files, modify the next section to look like this.
<loglevel>4</loglevel> <!-- 4 Debug, 3 Info, 2 Warn, 1 Error -->
Next cd to your home directory, that is, the home directory in which you will assign the user for the ice cast process, and type
touch access.log error.log
and hit enter. This will create 2 log files of which ice cast will proceed to write.
starting the server
with luck and with allot of patience you will have an ice cast server up and running with in about 2 hours of your time. Remember though to work slowly and carefully through setting it up.
To start the service
- cd to the directory where your icecast.xml is In my case it was in /etc/icecast2
- enter the following command
icecast2 -c icecast.xml
- Of corse if your xml is called something else replace it with the name. The -c tells the program to use the correct configuration
- If you want your process to run in the back round so you can do other things add -b to the end of the line.
If you are using a screen reader please read the lines of code carefully so that mistakes are few and far between.
I hope this has helped someone. I’m mainly doing this to keep a record for myself, but I’m hoping this little guide will help someone in the long run. If I missed anything feel free to leave a comment so that I may both learn, and gain knowledge in the ssh shell.