Installation - Windows Server 2008

Important Installation Notes

Difficulty: For Advanced Users Only
Estimated Duration: 45 minutes

Windows Media Services & MediaCP are compatible on 32bit and 64bit operating systems.

The MediaCP_latest.zip files will appear corrupted if you download with Internet Explorer.
We recommend using Google Chrome instead.

System Prerequisites:
Disk Space: 100MB Minimum, 500MB Recommended
Memory: 256MB Minimum, 1GB Recommended
Licensing Requirements: 1 Static IP Address & 1 Static Domain Name with access to license.cast-control.net
MySQL Configuration: Strict Mode Disabled.

You will need to have the Windows Server Installation Disc mounted or inserted in the computer to install Active Directory & Windows Media Services.

 

Table of Contents



Configure Server for WMS 

Follow this step only if you plan to use Windows Media Services with the MediaCP.

Important Note!
Windows Media Services integration on MediaCP will only work on 32bit operating systems.
Wowza Media, Shoutcast etc will all function fine on a 64bit operating system.

 

  1. Install Active Directory
    Open Start -> Run and type "dcpromo.exe".
    You will see the welcome screen, press Next.
    You will now see the Operating System Compatibility screen, press Next.

     - Create a new domain in a new forest.


  2. Configure Active Directory for MediaCP
    You will need to create an organisation unit for your windows media services customers.
    This will enable you to secure/lockdown the user accounts used in association with Windows Media Services.

    Open Start -> Program Files -> Administrative Tools -> Active Directory Users & Computers.
    Right click on your computer/domain and select New -> Organisational Unit.
    Name this MediaPanel and press OK.

    Right click on MediaPanel OU and select New -> Group.
    Name this "MediaPanel" and enter the pre-windows 2000 name as the same.
    Press OK and close Active Directory Users and Computers MMC.


  3. Update Administrator account "Member Of"
    For 64bit operating systems, it is crucial that you include all of the following Security Groups under the administrator account.
    a) Click on the "Users" Organisational Unit and right click your administrator account.
    b) Now select the "Member Of" tab.
    c) Ensure the following groups are added:
      - Administrators
      - Cert Publishers
      - Domain Admins
      - Domain Controllers
      - Domain Users
      - Enterprise Admins
      - Group Policy Creator Owners
      - Schema Admins



  4. Configure LDAP communication for PHP
    Create the folder structure for C:/openldap/sysconf/
    Create a new text file in C:/openldap/sysconf/ldap.conf
    In this text file paste the following:
    TLS_REQCERT never
    TLS_CACERT c:/openldap/sysconf/myserver.pem

    Copy the ldap.conf into C:/ldap.conf and C:/windows/system32/ldap.conf
    (Some versions of PHP look in these spots incorrectly for the ldap.conf)


  5. Install & Configure Secure Certificate
    Open Start -> Administrative Tools-> Server Manager
    Right click on "Roles" and select "Add Role".
    Install "Active Directory Certificate Services".

    Important Steps
     Role Services -> Select Certificate Authority and press Next.
     Setup Type -> Select Enterprise for Setup Type and press Next.
     CA Type -> Root CA.
     Private Key -> Create a new Private Key
     Cryptography -> Select Microsoft Strong Cryptographic Provider

    Continue through the installation, defaults in most cases will work fine.


  6. Export Certificate for LDAPS
    Open Start -> Administrative Tools -> Certificate Authority.
    Right click your server and select Properties.
    Select View Certificate then select Details tab and press the "Copy to File..." button.
    Export a Base-64 encoded X.509 (.CER) to your desktop as myserver.cer

    Download http://downloads.sourceforge.net/gnuwin32/openssl-0.9.8h-1-bin.zip
    Open the zip file and drag bin to C:/bin/ (We will delete this later)
    Move the myserver.cer into C:\bin\myserver.cer
    Open Start -> Run and type cmd.exe then hit enter.
    Enter the following and press enter, this will create the myserver.pem certificate in c:\openldap\sysconf\myserver.pem:
    C:\bin\openssl.exe x509 -in c:\bin\myserver.cer -out C:\openldap\sysconf\myserver.pem


  7. Install Windows Media Services
    Download & Install from Microsoft WMS Downloads

    Open Start -> Administrative Tools -> Server Manager.
    Right click on Roles and select Add Role.

    Install Streaming Media Services.

  8. Configure Windows Media Services
    Open Start -> Administrative Tools -> Windows Media Services.

    Select your server (usually HOSTxxxxx).
    On the right hand side of the WMS MMC Console select the Properties tab then select Authorization.
    Right click WMS Publishing Points ACL Authorization and select Properties (also ensure it is enabled).
    Select Add then select Object Types.. and tick Groups
    Add the Security Group of "MediaPanel" and allow them to Read and Write (Not Create!).


    That is it, you have now pre-configured your system to use Windows Media Services


Configure Wowza Media Server 

 

  1. Install Java JDK
    Download and install the latest Java JDK from http://www.oracle.com/technetwork/java/javase/downloads/java-se-jdk-7-download-432154.html
    We recommend JDK over JRE as JDK will allow you to manage your Wowza Media Server using the Java Console.

  2. Install Wowza Media Server 3
    Download and install the latest Wowza Media Server 3 from http://www.wowza.com/pricing/installer

  3. Install Additional Wowza Libraries
    Download and extract http://www.cast-control.net/files/setup_win_extra.zip 
    Open MediaSecurity_2.0.zip then open MediaSecurity/lib and drag the two jar files into "C:\Program Files (x86)\Wowza Media Systems\Wowza Media Server 3.x.x\lib"
    Open wms-plugin-collection.zip and do the same (only 1 jar file).

  4. Update VHosts.xml and Authentication.xml
    Open [WowzaDir]/conf/VHosts.xml
    Change "Name" to "default".
    Change "ConfigDir" to “${com.wowza.wms.ConfigHome}/vhosts/default”.

    Open [WowzaDir]/conf/Authentication.xml
    Update the the value for the first two instances of "passwordFile" to the following:
    ${com.wowza.wms.context.VHostConfigHome}/conf/${com.wowza.wms.context.Application}/publish.password


  5. Update VHost.xml
    Open [WowzaDir]/conf/VHost.xml
    Change "1935" to "1935,554" to support Android/Blackberry.


  6. Update admin.password
    Open [WowzaDir]/conf/admin.password and configure a username and password seperated by a space on a new line.
    For example: admin changeme

  7. Create the virtual host
    Create a new directories for [WowzaDir]/vhosts/default
    Copy applications, content, conf, keys and logs into [WowzaDir]/vhosts/default/

  8. Restart Wowza Media Server
    Open Start -> Run and type in "services.msc".
    Locate Wowza Media Server, right click and select Restart.

    Congratulations! Your Wowza Media Server is now ready for MediaCP.

 

Configuring Web Server 

The following instructions will install XAMPP with Apache & MySQL.
If you prefer to use your own MySQL server, you must NOT start or stop the MySQL service in XAMPP control panel.

  1. Older Windows 2003 or 2008
    You may be required to install the Microsoft Visual C++ 2008 Redistributable.
    Download: x86 x64

  2. Download & Install Google Chrome
    This is required to download the MediaCP Application.
    You can download google chrome from http://www.google.com/chrome

  3. Download & Configure XAMPP
    Download the XAMPP from http://www.apachefriends.org/download.php?xampp-win32-1.7.7-VC9.zip

    The file is approximately 160MB and includes:
     a) Webserver, PHP & MySQL (XAMPP)

    Extract the files to C:/xampp/

  4. Configure Webserver on Port 2000
    Open C:/xampp/apache/conf/httpd.conf in WordPad.
    Press CTRL + F to find "Listen 80" and change this to "Listen 2000".

    Press CTRL + F to find "conf/extra/httpd-ssl.conf" and place a hash (#) at the beginning of the line
    This line should now look like: #Include "conf/extra/httpd-ssl.conf"

    Save and close the httpd.conf file.

  5. Configure LDAP and CURL extension for PHP
    Open C:/xampp/php/php.ini in WordPad.

    Press CTRL + F to find "php_curl.dll" and uncomment this line (delete the ; before the line).
    Press CTRL + F to find "php_ldap.dll" and uncomment this line (delete the ; before the line).

    Save and close the php.ini file.

    Copy C:/xampp/php/libsasl.dll into C:/Windows/libsasl.dll
    (some php versions have difficulty finding this file, it is necessary for LDAPS secure connection)

  6. Start XAMPP, MySQL & FileZilla FTP Server
    Open C:/xampp/setup_xampp.bat
    Wait for it to say "Press any key to continue..." then close the window.
    This will configure xampp for your system.

    Open C:/xampp/xampp-control-3-beta.exe
    a) Check the service box next to "Apache" to install the apache service. Run as Administrator and uncheck "Run this program with restricted access"
    b) Check the service box next to mySQL to install the MySQL service. Run as Administrator and uncheck "Run this program with restricted access"
    c) Check the service box next to FileZilla to install the FileZilla FTP Service. Run as Administrator and uncheck "Run this program with restricted access"

  7. Configure XAMPP & MySQL Authorisation
    Open  the browser on the server and navigate to http://localhost:2000/security/index.php
    Update the MySQL root password and configure the XAMPP Directory username/password.
    REMEMBER THESE DETAILS!!!

  8. Congratulations! XAMPP is now configured to support the Media Control Panel.

 

Install Media Control Panel 

 

  1. Configure Prerequisites / 3rd Party Media Servers
    Download http://www.cast-control.net/files/setup_win_extra.zip
    Open setup_win_extra.zip and drag "CastControl" into C:/xampp/CastControl/

    Move C:/xampp/CastControl/rrdtool/DejaVuSansMono-Roman.ttf and VeraMono.ttf into C:/Windows/Fonts/

  2. Download MediaCP
    Latest Stable: http://www.cast-control.net/files/MediaCP_latest.zip
    Latest Unstable: http://www.cast-control.net/files/MediaCP_latest_rc.zip

  3. Extract into XAMPP
    Extract the .zip to your desktop.
    Move all files inside the upload_and_rename/ directory into C:/xampp/htdocs/
    Delete the C:/xampp/htdocs/index.html

  4. Install Ioncube Loader
    You now must install the ioncube loader for your operating system.
    You can do this by accessing the wizard at http://localhost:2000/ioncube/loader-wizard.php
    Select Local Install.
    Follow the instructions and remember to restart XAMPP -> Apache when you finish.

  5. Run the MediaCP Setup
    From your local PC, open http://your-domain.com:2000/setup/setup.php

    Enter your license key and press Proceed.
    You will be prompted with a file permissions check, press Next.

    Database Configuration
    Enter the database password you configured earlier on.
    For Database Name, if you are using the root username enter anything you like - for example "mediacp".
    The database will automatically be created if it does not exist.

    Set the RRDtool binary path to "C:/xampp/CastControl/rrdtool/rrdtool.exe"

    Complete the remaining details on this page and press Submit Details

    Scheduled Task Configuration
    WARNING! IF YOU ARE USING PLESK, DO NOT CREATE THE SCHEDULED TASK THROUGH THE CONTROL PANEL.

    Open Start -> Administrative Tools, click Scheduled Tasks
    Select Task Schedular Library
    On the right hand side select Create Task...

    Name: MediaCP
    Select Run whether user is logged on or not.
    Select Run with highest privileges.

    Select Triggers and then New...
    Select under Settings -> Daily option.
    Check the Repeat task every box and enter "Repeat task ever "1 minute".
    Press OK.

    Select Actions and then New...
    Program/Script: C:/xampp/php/php.exe
    Add arguments: -c C:/xampp/php/php.ini C:/xampp/htdocs/scanner/cron.php auto=1
    Press OK.



  6. Application Module Preperation
    Check all the boxes except for services you do not wish to install then press Continue Setup Process.


    Windows Media Server
    Domain The domain name that you configured for Active Directory:
    Example: www.mydomain.com
    Username You must enter your Administrator username here (usually Administrator)
    Password You must enter the administrator password here
    OU This is the organisational unit you configured above.
    This should be set to "MediaPanel" if you followed the entire guide.
    Group This is the security group you configured above.
    This should be set to "MediaPanel" if you followed the entire guide.
    UserSwitchOndemand Allow Customer to change service to Ondemand Streaming
    UserChangeFromOndemand Allow a Customer with Ondemand Service to change to Shoutcast or Live Streaming.
    WindowsUsernamePrefix Apply a prefix to all windows user accounts that are created.
    ShowWMPlayer Whether to display a windows media player on the webpage or not.


    Wowza Media Server
    WowzaDir The full path using backslashes to Wowza Media Server
    Example: C:\Program Files (x86)\Wowza Media Systems\Wowza Media Server 3.x.x\
    AdminUserPass Enter the username and password configured earlier seperated by a colon.
    OnDemandDir This is where Media Files are stored.
    default stores Media Files in C:/xampp/htdocs/content/

    To change this, enter the full path to where you prefer to store these:
    Example: D:\Media\
    Be sure the directory already exists!
    FtpIntegration These options are now deprecated. Configure FTP Settings after installation
    UserSwitchOndemand Allow Customer to change service to Ondemand Streaming
    UserChangeFromOndemand Allow a Customer with Ondemand Service to change to Shoutcast or Live Streaming.
    ShowRTMPLink / RTSP / RTMPT Show Direct RTMP/RTSP/RTMPT links on customers service overview.
    ShowJWPlayer Display a Flash Player with embed code for the customer.
    BitrateThreshold Percentage that the customer is allowed to stream over their services bitrate limit.
    We recommend 5% as sometimes Flash Media Encoder can use slightly more than the rates configured.



    Icecast 2.3.2
    Select Operating System as Windows.
    Executable path is C:/xampp/CastControl/Icecast2/icecast2console.exe
    Share is C:/xampp/CastControl/Icecast2/

    Shoutcast 1.9.8
    Select Operating System as Windows.

    Shoutcast 2
    Select Operating System as Windows.

    sctransv2 (AutoDJ)
    Select Operating System as win32.


  7. Firewall Exceptions
    You may wish to add program exceptions for the following:
    Shoutcast C:/xampp/htdocs/files/shoutcast198/windows/sc_serv.exe
    Icecast C:/xampp/CastControl/Icecast2/Icecast2Console.exe

    Congratulations! Cast-Control Media Control Panel is now installed!
    We highly recommend reading our Quickstart Guide to get started.
    If you have difficulty, please refer to our windows server 2003 troubleshooting document.

 

What to do next? 

Now that the control panel basics are installed you can either configure additional features or begin creating your media services.

Wowza Media Server Tuning Guide
It is highly recommend to run the Wowza Media Server Tuning Guide if you have installed Wowza Media Server.
Click here for more information.

Control Panel Configuration

 

Create Media Services
Products Web Services LiveZilla Live Help