14.09.2011, 12:36
I didn't exactly know where to put this as it does not fit in with scripting discussion, well, it does a bit but feel free to move it.
A few things first:
This tutorial was designed for the Centos 5 64x gen of linux. If you are using another OS (Linux based, Ubuntu etc) the gist of doing this should pretty much be the same, however some commands may be different.
You are going to need some sort of VPS/Dedi for this, it is possible to do this off of your own PC (Not recommended due to bandwidth issues).
You need to be aware of copyright laws. I am not responsible for what you do or what you stream on this radio. Most music now a-day's is copyrighted. You cannot stream music unless you own the royalties to it, or have permission from the owner (highly unlikely, even getting direct permission from example usher would not work, you need to contact the legal copyright holders, and good luck getting in contact with them . I am not here to give out what is legal and what isn't, I'm not some sort of lawyer, so don't ask.)
Anyway, onto the tutorial.
The first thing you are going to want to do is make a separate user as running as root is NOT recommended.
[root@home ~] useradd shoutcast
[root@home ~] passwd shoutcast
*enter a password*
Then let's switch to the newly created account by doing
[root@home ~] su shoutcast
Next, we need to make a folder called shoutcast
[root@home ~] mkdir shoutcast
[root@home ~] cd shoutcast
Next, once you are in the shoutcast folder, download the newest version of shoutcast.
[root@home ~] wget http://download.nullsoft.com/shoutca...31_2011.tar.gz
Note: This is the 64x version of Shoutcast, yours may differ so check out the downloads here: http://www.shoutcast.com/broadcast-tools
Next, we need to extract the file we just downloaded
[root@home ~] tar xzf sc_serv2_linux_x64_07_31_2011.tar.gz
Now we need to edit the config file of shoutcast.
[root@home ~] nano sc_serv.conf
If you are unsure about using nano, ****** it.
In sc_serv.conf you are going to need the following lines (to meet your specifications).
MaxUser=32
32 is the default users on a shoutcast server, you are going to want to check up on bandwidth uses and how much you will need before going crazy with this number.
Password=
You can probably guess what this is, and it's PRETTY important to change it. Literally, that's why it says "changeme". This is the password you stream will be and what you connect to with.
PortBase=8000
8000 is the default port for shoutcast and icecast, some firewalls block this port, meaning limited connectivity, however this shouldn't be a matter unless you are playing in a school/work building. If you are start working!
These are the main nessecitys of what you need to change, you may wish to configure it further, so have a look through the config file yourself. Now save the file by pressing ctrl+x and then y and then enter to escape.
Woo! almost done, this is everything mainly setup, the next part should become easier.
Starting the server
[root@home ~] ./sc_serv &
entering this will cause the server to run in the background, meaning you can quit SSH/Putty without having to make a screen! Yay.
Testing the server
Now that it's all up and running error free, you are going to want to test it to see if it's running. Try going to http://serverip:8000 and double check if the shoutcast window pops up. If it does, all good to go!
Your server is now correctly configured and running, another way to check if your server is running through SSH is to type ps -ux and check if ./sc_serv is there.
//herp n derp.
All you need to do next is to connect to your stream with your IP and port and the password you supplied with programs such as Sam Broadcaster, or even winamp is a free alternative. Make a quick ****** of that to see how to connect to your newly made radio!
Edit: Ill do a Icecast setup in a bit, I'm hungry. Icecast set-up on Centos 5 is significantly harder.
A few things first:
This tutorial was designed for the Centos 5 64x gen of linux. If you are using another OS (Linux based, Ubuntu etc) the gist of doing this should pretty much be the same, however some commands may be different.
You are going to need some sort of VPS/Dedi for this, it is possible to do this off of your own PC (Not recommended due to bandwidth issues).
You need to be aware of copyright laws. I am not responsible for what you do or what you stream on this radio. Most music now a-day's is copyrighted. You cannot stream music unless you own the royalties to it, or have permission from the owner (highly unlikely, even getting direct permission from example usher would not work, you need to contact the legal copyright holders, and good luck getting in contact with them . I am not here to give out what is legal and what isn't, I'm not some sort of lawyer, so don't ask.)
Anyway, onto the tutorial.
The first thing you are going to want to do is make a separate user as running as root is NOT recommended.
[root@home ~] useradd shoutcast
[root@home ~] passwd shoutcast
*enter a password*
Then let's switch to the newly created account by doing
[root@home ~] su shoutcast
Next, we need to make a folder called shoutcast
[root@home ~] mkdir shoutcast
[root@home ~] cd shoutcast
Next, once you are in the shoutcast folder, download the newest version of shoutcast.
[root@home ~] wget http://download.nullsoft.com/shoutca...31_2011.tar.gz
Note: This is the 64x version of Shoutcast, yours may differ so check out the downloads here: http://www.shoutcast.com/broadcast-tools
Next, we need to extract the file we just downloaded
[root@home ~] tar xzf sc_serv2_linux_x64_07_31_2011.tar.gz
Now we need to edit the config file of shoutcast.
[root@home ~] nano sc_serv.conf
If you are unsure about using nano, ****** it.
In sc_serv.conf you are going to need the following lines (to meet your specifications).
MaxUser=32
32 is the default users on a shoutcast server, you are going to want to check up on bandwidth uses and how much you will need before going crazy with this number.
Password=
You can probably guess what this is, and it's PRETTY important to change it. Literally, that's why it says "changeme". This is the password you stream will be and what you connect to with.
PortBase=8000
8000 is the default port for shoutcast and icecast, some firewalls block this port, meaning limited connectivity, however this shouldn't be a matter unless you are playing in a school/work building. If you are start working!
These are the main nessecitys of what you need to change, you may wish to configure it further, so have a look through the config file yourself. Now save the file by pressing ctrl+x and then y and then enter to escape.
Woo! almost done, this is everything mainly setup, the next part should become easier.
Starting the server
[root@home ~] ./sc_serv &
entering this will cause the server to run in the background, meaning you can quit SSH/Putty without having to make a screen! Yay.
Testing the server
Now that it's all up and running error free, you are going to want to test it to see if it's running. Try going to http://serverip:8000 and double check if the shoutcast window pops up. If it does, all good to go!
Your server is now correctly configured and running, another way to check if your server is running through SSH is to type ps -ux and check if ./sc_serv is there.
//herp n derp.
All you need to do next is to connect to your stream with your IP and port and the password you supplied with programs such as Sam Broadcaster, or even winamp is a free alternative. Make a quick ****** of that to see how to connect to your newly made radio!
Edit: Ill do a Icecast setup in a bit, I'm hungry. Icecast set-up on Centos 5 is significantly harder.