multiple instances of darwin streaming server on 1 pysical server.

Hey folks,

Here is a (very) rough guide to running multiple instances of darwin streaming server on 1 pysical server.

I may have missed somthing or this may be overkill so comments are welcome and encoraged 🙂

files from standard install that need to be available per instance:
/etc/streaming/streamingserver.xml
/etc/streaming/qtusers
/etc/streaming/qtgroups
/etc/streaming/streamingloadtool.conf
/etc/streaming/relayconfig.xml
/usr/local/sbin/streamingadminserver.pl

Changes to streamingserver.xml (per instance to reflect options or file folder location as per the above)
opt <PREF NAME=”maximum_connections” TYPE=”SInt32″ >1000</PREF>
<PREF NAME=”movie_folder” >/usr/local/movies/</PREF>
<PREF NAME=”bind_ip_addr” >0</PREF>
<PREF NAME=”error_logfile_dir” >/var/streaming/logs/</PREF>
<PREF NAME=”run_user_name” >qtss</PREF>
?<PREF NAME=”run_group_name” >qtss</PREF>
?<PREF NAME=”append_source_addr_in_transport” TYPE=”Bool16″ >false</PREF>  
?<PREF NAME=”pid_file” >/var/run/DarwinStreamingServer.pid</PREF>
?<PREF NAME=”relay_prefs_file” >/etc/streaming/relayconfig.xml</PREF>
<PREF NAME=”request_logfile_dir” >/var/streaming/logs/</PREF>
<PREF NAME=”request_logfile_name” >StreamingServer</PREF>
<PREF NAME=”mp3_request_logfile_dir” >/var/streaming/logs/</PREF>
<PREF NAME=”mp3_broadcast_password” >xxxx</PREF>
<PREF NAME=”modAccess_usersfilepath” >/etc/streaming/qtusers</PREF>
<PREF NAME=”modAccess_groupsfilepath” >/etc/streaming/qtgroups</PREF>
Changes to streamingadminserver.pl (er instance)
 %vital = (“port”, 1221,
“root”, “/var/streaming/AdminHtml”,
      “plroot”, “/var/streaming/playlists/”,
          “qtssPort”, “554”,
          “qtssName”, “/usr/local/sbin/DarwinStreamingServer”,
          “logfile”, “/var/streaming/logs/streamingadminserver.log”,
          “crtfile”, “/etc/streaming/streamingadminserver.pem”,
          “keyfile”, “/etc/streaming/streamingadminserver.pem”,
          “qtssQTPasswd”, “/usr/local/bin/qtpasswd”,
          “qtssPlaylistBroadcaster”, “/usr/local/bin/PlaylistBroadcaster”,
          “qtssMP3Broadcaster”, “/usr/local/bin/MP3Broadcaster”,
          “pidfile”, “/var/run/streamingadminserver.pid”,
          “runUser”, “qtss”,
          “runGroup”, “qtss”,

NOTE: streamingadminserver.pl can be ran with -c to specify a config file to load.

DSS cli usage:
usage: DarwinStreamingServer [ -d | -p port | -v | -c /myconfigpath.xml | -o /myconfigpath.conf | -x | -S numseconds | -I | -h ]
-d: Run in the foreground
-D: Display performance data
-p XXX: Specify the default RTSP listening port of the server
-c /myconfigpath.xml: Specify a config file
-o /myconfigpath.conf: Specify a DSS 1.x / 2.x config file to build XML file from
-x: Force create new .xml config file and exit.
-S n: Display server stats in the console every “n” seconds
-I: Start the server in the idle state
-h: Prints usage

qtpasswd:
 Usage: qtpasswd [-F] [-f filename] [-c] [-g groupsfilename] [-r realm] [-p password] [-P passwordfile] [-A group] [-D group] [-d] [username]
  -F   Don’t ask for confirmation when deleting users or overwriting existing files.
  -f   Password file to manipulate (Default is “/etc/streaming/qtusers”).
  -c   Create new file.
  -g   Groups file to manipulate (Default is “/etc/streaming/qtgroups”). If not found, will create one when necessary.
  -r   The realm name to use when creating a new file via “-c” (Default is “Streaming Server”).
  -p   Allows entry of password at command line rather than prompting for it.
  -P   File to read the password from rather than prompting for it.
  -d   Delete the user. (Deletes the user from all groups)
  -A   Add user to group. Will create group automatically if group is not already present.
  -D   Delete the user from the group.
  -C   Create new group. Do not specify username with this option.
  -R   Delete the group. Do not specify username with this option.
  -O   Set the owner of the file (Default is “qtss”).
  -h   Displays usage.
  -v   Displays usage.
  -?   Displays usage.

  Note:
  The username must always be specified except when -C and -R options are used to create/delete group.
  Usernames cannot be more than 255 characters long and must not include a colon [:].
  Passwords cannot be more than 80 characters long.
  Groups cannot be more than 255 characters long and must not include a colon [:].
  If the username/password contains whitespace or characters that may be
  interpreted by the shell please enclose it in single quotes,
  to prevent it from being interpolated.

So thats the very rough guide, got this working a few times now, I will keep updating / improving / simplifying this as I go.

I will be writing this up in to a script that will do everything for you including installing the first instance of DSS.

Not sure at this stage if multiple copies of the adminhtml folder/files are required?????? comments?

Final goal: WHMCS style module for auto provisioning from a cpanel server.