banner



How To Set Up Shoutcast Dnas Server

SHOUTcast is proprietary software used to stream media over the Internet, especially used in music alive streaming by the radio stations on Cyberspace, and is developed past Nullsoft with versions for all major platforms, including Linux.

This tutorial will guide you on how y'all tin install The SHOUTcast Distributed Network Sound Server in CentOS 8, with the assist of which you can use media players, similar Winamp or Mixxx to connect to the streaming services and circulate your sound playlists to Internet listeners.

Although this tutorial only covers SHOUTcast server installation on a CentOS 8/7 auto, the same procedure tin be practical to other Linux distributions such as RHEL, Fedora, Ubuntu, Debian, Linux Mint, etc. with the remark that you lot must adapt firewall commands to suit your Linux distribution.

Step 1: Download and Install SHOUTcast Server

1. Before proceeding with the installation of the SHOUTcast server, create a local user from which you volition run the server because running the server from the root business relationship can impose serious security issues on your arrangement.

So, log in on your organization with the root business relationship, create a new user, called radio, after you lot're done log out from the root account, and, and then, login with your newly created user. Here are the following required commands that need to be executed on the terminal.

# adduser radio # passwd radio # su - radio $ pwd        
Create New User in Linux
Create New User in Linux

2. In one case logged in on your system with the radio account, create two directories named download and server, then switch to download binder.

$ mkdir download $ mkdir server # cd download        

3. Adjacent, grab the last version of the SHOUTcast server archive for Linux, depending on your arrangement architecture, by visiting the official Nullsot Download folio.

  1. http://download.nullsoft.com/shoutcast/tools

Alternatively, use the post-obit wget utility to download the archive from the command line.

          --------------- On 64-bit ---------------          $ wget http://download.nullsoft.com/shoutcast/tools/sc_serv2_linux_x64-latest.tar.gz          --------------- On 32-flake ---------------          $ wget http://download.nullsoft.com/shoutcast/tools/sc_serv2_linux-latest.tar.gz        
Download Shoutcast Server
Download Shoutcast Server

4. Later the download completes, extract the archive file, list the directory to locate the sc_serv executable binary file, and copy information technology to the installation directory, located in the server binder, then move to the SHOUTcast installation path, past issuing the following commands.

$ tar xfz sc_serv2_linux_x64-latest.tar.gz $ ls $ cp  sc_serv  ../server/ $ cd  ../server/ $ ls        
Extract Shoutcast Archive
Extract Shoutcast Archive

5. Now that you are located in the server installation path, create ii directories named command and logs and you're washed with the bodily installation process. List your directory content to verify if everything is in identify using ls command.

$ mkdir control $ mkdir logs $ ls        
Confirm Shoutcast Files
Confirm Shoutcast Files

Step two: Create a SHOUTcast Configuration File

6. In gild to run and operate the server, you demand to create a configuration file for SHOUTcast. Open up your favorite text editor and create a new file, named sc_serv.conf.

Brand sure that this file is created in the same path every bit your sc_serv eastward executable binary files are created. Using pwd command should show you this absolute path – /home/radio/server).

$ cd /home/radio/server/ $ pwd $ vi sc_serv.conf        
Create Shoutcast Configuration File
Create Shoutcast Configuration File

Add the following statements to sc_serv.conf file (example configuration).

adminpassword=countersign password=password1 requirestreamconfigs=1 streamadminpassword_1=password2 streamid_1=1 streampassword_1=password3 streampath_1=http://radio-server.lan:8000 logfile=logs/sc_serv.log w3clog=logs/sc_w3c.log banfile=control/sc_serv.ban ripfile=control/sc_serv.rip        

Some important settings that you should be aware of this file are countersign statements, which you must exist changed accordingly:

  • adminpassword – Admin password required to perform remote assistants via the web interface to the server.
  • streampassword_1 – Password required by the remote media player to connect and stream media content to the server.

Alternatively, if yous desire to create a configuration file for the SHOUTcast server you tin can become to download directory and run architect.sh or setup.sh scripts.

$ cd ../download/ $ bash setup.sh        

which will let you configure the server from a spider web interface that tin can be accessed from the following address.

http://localhost:8000 OR http://ipaddress:8000        
Shoutcast DNAS Setup
Shoutcast DNAS Setup

In one case the configuration is created you can copy it to the server installation directory.

7. To start the server execute sc_serv the file from your current working directory, which must exist the server directory, put information technology on background with & bash operator, and straight your browser to http://localhost-or-IP:8000 URL.

Besides, utilise netstat command to come across if the server is running and on what port numbers it listens.

$ chmod +x sc_serv $ ./sc_serv & $ netstat -tulpn | grep sc_serv        
Check Shoutcast Server Ports
Check Shoutcast Server Ports

Step 3: Open up Firewall Connections

8. Now the SHOUTcast server is upwardly and running only it can't be accessed nonetheless from the outside globe due to CentOS Firewall restrictions. To open the server to external connections login with root account and add the rule that will open up port 8000 TCP.

Afterwards the rule has been added reload the Firewall to utilize changes and logout from your root account.

$ su - # firewall-cmd --add together-port=8000/tcp --permanent # firewall-cmd --reload # exit        

9. Then open a browser from a remote machine and type your server IP Address on port 8000 on URL filed – http://192.168.one.80:8000 – and the SHOUTcast spider web interface should appear similar in the screenshot below, with no alive streams available.

Shoutcast Server Summary
Shoutcast Server Summary

Step 4: Manage SHOUTcast Server and Create Daemon script

10. The command used to manage the SHOUTcast radio server is the binary file itself, which must be run from its installation path location in order to be
able to read the configuration file. To run the server as a daemon using the daemon control option.

You tin as well instruct the server to read its configurations from a dissimilar location by indicating where the configuration file resides, but be brash that using this selection requires the creation of logs and command directories, which can be confusing in practice and tin pb to server disability to first.

$ pwd  ## Assure that you are in the right installation directory - /dwelling house/radio/server  $ ./sc_serv   ## Showtime the server in foreground – Hit Ctrl + c to finish  $ ./sc_serv daemon  ## Start the server as a daemon  $ ps aux | grep sc_serv   ## Go Server PID  $ killall sc_serv  ## Stop server daemon        

xi. If you need a simplified command to offset or stop SHOUTcast radio server, log in equally root once again and create the following executable script on /usr/local/bin/ path every bit in the example below.

$ su - # vi /usr/local/bin/radio        

Now add together the following extract to the radio file.

#!/bin/bash instance $1 in                 get-go) cd /home/radio/server/ ./sc_serv &               ;;                 end) killall sc_serv                 ;;                start_daemon) cd /home/radio/server/ ./sc_serv daemon                ;;                 *) echo "Usage radio start|stop"                 ;; esac        
Create Shoutcast Execute File
Create Shoutcast Execute File

12. After the file was created, make it executable, leave root account, and a new command shout be bachelor for your SHOUTcast radio server management.

# chmod +x /usr/local/bin/radio # exit        

13. To manage the server from now on, use radio control with the post-obit switches.

$ radio start_daemon		## Starts SHOUTcast server as a daemon  $ radio start                   ## Starts SHOUTcast server in foreground  $ radio terminate                    ## Stops SHOUTcast server        
Start Shoutcast Server
Start Shoutcast Server

14. If yous want to automatically start the server after reboot, just but on user login (in this case the server was installed on the local user named radio) issue the post-obit command from radio account home path, and then logout and login again to verify the functionality, as presented in the screenshot below.

$ whoami   $ repeat "radio start_daemon" >> ~/.bashrc        
Start Shoutcast at Reboot
Start Shoutcast at Reboot

That's it! Now, the SHOUTcast server is gear up to receive sound or playlists from remote media players such every bit Winamp from Windows and Mixxx from Linux and circulate all of the received audio content over the Internet.

Source: https://www.tecmint.com/install-shoutcast-in-linux/

0 Response to "How To Set Up Shoutcast Dnas Server"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel