Install SHOUTcast Server AutoDJ and Live Streaming
This tutorial will guide you on how you can install The SHOUTcast Distributed Network Audio Server (DNAS 2.0) in CentOS 6 32 bit, with the help of which you can use media players, like Winamp to connect to streaming server and broadcast your audio playlists to Internet listeners.
Tested :
[root@radio ~]# cat /etc/redhat-release
CentOS release 6.7 (Final)
[root@radio ~]#
1. Install your OS CentOS 6 32 Bit
2. If you've finished installing the OS, login to your server via putty and run this command,
Note : Do not forget to set IP, gateway and DNS your server to be connected to the Internet
3. You need to install nano editor and wget to download file,
[root@radio ~]# yum install wget nano
Before proceeding with the installation of SHOUTcast server, create a local user from which you will run the server, because running the DNAS server from root account can impose serious security issues to your system.
[root@radio ~]# su - [root@radio ~]# adduser radio [root@radio ~]# passwd radio [root@radio ~]# exit [root@radio ~]# su - radio [radio@radio ~]$ pwd4. And then create two directories named download and server, then switch to download folder.
[radio@radio ~]$ mkdir download [radio@radio ~]$ mkdir server [radio@radio ~]$ cd download5. Download and install ShoutCast
[radio@radio ~]$ wget http://download.nullsoft.com/shoutcast/tools/sc_serv2_linux_09_09_2014.tar.gz
[radio@radio ~]$ tar xfz sc_serv2_linux_09_09_2014.tar.gz
[radio@radio ~]$ cp sc_serv ../server/
[radio@radio ~]$ cd ../server/6. After that, create two directories named control and logs and you’re done with the actual installation process.
[radio@radio server]$ mkdir control
[radio@radio server]$ mkdir logs7. To run and operate the server we need to create a configuration file for SHOUTcast. Open your favorite text editor and create a new file, named sc_serv.conf.
[radio@radio server]$ nano sc_serv.confAdd the following statements to sc_serv.conf file (example configuration):
adminpassword=mypassword password=password requirestreamconfigs=1 streamadminpassword_1=mypassword streamid_1=1 streampassword_1=password streampath_1=http://192.168.2.111:8000 logfile=logs/sc_serv.log w3clog=logs/sc_w3c.log banfile=control/sc_serv.ban ripfile=control/sc_serv.rip
adminpassword – Admin password required to perform remote administration via the web interface to the server. streampassword_1 – Password required by remote media player to connect and stream media content to server.8. To start the server execute sc_serv file from your current working directory, which must be the server directory, put it on background with & bash operator and direct your browser to http://localhost:8000 URL. Also use netstat command to see if the server is running and on what port numbers it listens.
[radio@radio server]$ chmod +x sc_serv
[radio@radio server]$ ./sc_serv &
[radio@radio server]$ netstat -tulpn | grep sc_
Note : Make sure you firewall open/allowed port 80009. ShoutCast will run at port 8000, so try to visit http://Server-IP:8000 (E,g http://192.168.2.111:8000 or http://myradiodomain.com:8000)
And you'll get a page like this, that icecast is running on your vps:
[radio@radio ]$ pwd ## Assure that you are in the right installation directory - /home/radio/server [radio@radio ]$ ./sc_serv ## Start the server in foreground – Hit Ctrl + c to stop [radio@radio ]$ ./sc_serv daemon ## Start the server as a daemon [radio@radio ]$ ps aux | grep sc_serv ## Get Server PID [radio@radio ]$ killall sc_serv ## Stop server daemon
[radio@radio server]$ exit
[root@radio ~]# nano /usr/local/bin/radioNow add the following excerpt to radio file.
#!/bin/bash case $1 in start) cd /home/radio/server/ ./sc_serv & ;; stop) killall sc_serv ;; start_daemon) cd /home/radio/server/ ./sc_serv daemon ;; *) echo "Usage radio start|stop" ;; esacAfter the file was created, make it executable, exit root account and a new command shout be available for your SHOUTcast radio server management.
[root@radio ~]# chmod +x /usr/local/bin/radioTo manage the server from now on, use radio command with the following switches.
[radio@radio ]$ radio start_daemon ## Starts SHOUTcast server as a daemon [radio@radio ]$ radio start ## Starts SHOUTcast server in foreground [radio@radio ]$ radio stop ## Stops SHOUTcast server
[radio@radio ~]$ mkdir /home/radio/sct
[radio@radio ~]$ cd /home/radio/sct2. Download the SHOUTcast transcoder archive by entering the following command:
[radio@radio ~]$ wget http://mirror.lchost.net/download.nullsoft.com/shoutcast/tools/sc_trans_linux_10_07_2011.tar.gz3. Extract the SHOUTcast transcoder files by entering the following command:
[radio@radio sct]$ tar -xzf sc_trans_linux_10_07_2011.tar.gz4. Change ownership from root to the SHOUTcast user:
[radio@radio sct]$ chown -R radio.radio /home/radio/sct5. Change permissions by entering the following command:
[radio@radio sct]$ chmod a+x sc_transNow we need to configure the SHOUTcast transcoder. This example will walk you through a basic configuration. 6. Open and modify the configuration file by entering the following command:
[radio@radio sct]$ nano /home/radio/sct/sc_trans_basic.conf
logfile=logs/sc_trans.log calendarrewrite=0 uvoxauth_0=password uvoxstreamid_0=1 public=0 encoder_1=aacp encoder_2=mp3 bitrate_1=56000 bitrate_2=56000 outprotocol_1=3 serverip_1=192.168.2.111 serverport_1=8000 password_1=password streamid_1=1 endpointname_1=/Bob streamtitle=Radio Server streamurl=http://192.168.2.111 genre=Misc playlistfile=playlists/main.lst adminport=7999 adminuser=admin adminpassword=mypasswordSave the changes to the SHOUTcast configuration file by pressing Control-X, and then Y. 7. If you are using an automated playlist, upload your music files to the /home/radio/sct/music directory. And you’ll also need to create a playlist file. Here is an example:
[radio@radio sct]$ nano /home/radio/sct/playlists/playlist.lstAnd fill in the name of the song that is
../music/mysong1.mp3 ../music/mysong2.mp3 ../music/mysong3.mp3Once you have the transcoder configured and ready to go, you need to start it. To run the transcoder as a daemon, simply run this command, substituting sc_trans_basic.conf for whatever configuration file you are using:
[radio@radio sct]$ ./sc_trans daemon ./sc_trans_basic.confIf no errors appear, you should see output similar to the line below,
sc_trans going daemon with PIDTo shut down the transcoder, you’ll just need to issue a kill command:
kill -15 PID or CTRL+C8. Done (Configure server)
You should see information about the encoder status in the ‘Transfer Rate’ column. If it’s working properly, a numeric value will appear indicating the transmission speed.
You’re now streaming live on the Internet!
Copyright Albenet Hosting Saturday 16-Feb-2019 All rights reserved.