<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>SparkSupport.com Blog &#187; general</title>
	<atom:link href="http://www.sparksupport.com/blog/category/general/feed" rel="self" type="application/rss+xml" />
	<link>http://www.sparksupport.com/blog</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Thu, 15 Sep 2011 14:39:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>Nasscom IMS 2010: We are Attending</title>
		<link>http://www.sparksupport.com/blog/nasscom-ims-2010-we-are-attending</link>
		<comments>http://www.sparksupport.com/blog/nasscom-ims-2010-we-are-attending#comments</comments>
		<pubDate>Thu, 09 Sep 2010 05:27:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Events]]></category>
		<category><![CDATA[general]]></category>
		<category><![CDATA[cloud computing]]></category>
		<category><![CDATA[nasscom ims 2010]]></category>
		<category><![CDATA[RIM]]></category>

		<guid isPermaLink="false">http://www.sparksupport.com/blog/?p=929</guid>
		<description><![CDATA[Nasscom Infrastructure Management Summit 2010, will be held in Bangalore on September 15 and 16 and we will be attending. With the Indian market shifting its focus to cloud computing and RIM services, NASSCOM IMS 2010 will be a platform for discussion about the emerging technologies and where the industry is heading. Event details on [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.nasscom.in/nims2010"><img class="alignleft" style="border: 0pt none; margin-left: 5px; margin-right: 5px;" src="http://www.nasscom.in/upload/Infrastructure_management_summit/help_promote/wellbethere.jpg" border="0" alt="" width="170" height="161" /></a><br />
Nasscom Infrastructure Management Summit 2010, will be held in Bangalore on September 15 and 16 and we will be attending.<br />
With the Indian market shifting its focus to cloud computing and RIM services, NASSCOM IMS 2010 will be a platform for discussion about the emerging technologies and where the industry is heading.</p>
<p><a href="http://www.nasscom.in/nasscom/templates/flagshipEvents.aspx?id=59164">Event details on the NASSCOM IMS 2010</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sparksupport.com/blog/nasscom-ims-2010-we-are-attending/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Load balancing in Wowza Media Server</title>
		<link>http://www.sparksupport.com/blog/load-balancing-in-wowza-media-server</link>
		<comments>http://www.sparksupport.com/blog/load-balancing-in-wowza-media-server#comments</comments>
		<pubDate>Tue, 03 Aug 2010 13:11:38 +0000</pubDate>
		<dc:creator>Jaseer</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[general]]></category>
		<category><![CDATA[clustering]]></category>
		<category><![CDATA[live stream repeater-edge applications]]></category>
		<category><![CDATA[load balancing]]></category>
		<category><![CDATA[wowza]]></category>

		<guid isPermaLink="false">http://www.sparksupport.com/blog/?p=844</guid>
		<description><![CDATA[Wowza Media Server is a Video Stream Server used by popular CDN providers to provide video content across the internet. It has come with a large variety of features and several streaming options. And one of the attractive feature provided by wowza is that, it allows clustering like feature so that multiple servers can be [...]]]></description>
			<content:encoded><![CDATA[<p>Wowza Media Server is a Video Stream Server used by popular CDN providers to provide video content across the internet. It has come with a large variety of features and several streaming options. And one of the attractive feature provided by wowza is that, it allows clustering like feature so that multiple  servers can be configured to provide a video stream to the clients. In such a setup one of the server will act as a loadbalancing server and the others will act as the loadbalancing edge/client servres. If a client requests a video stream then a load balancer server redirect it to the least loaded wowza server. This loadbalancing feature is usually used while publishing live streams becuase the number of concurrent connections to the server providing live stream will be high and a load balancing setup can easily manage it. Here we will discuss the load balancing setup for a live stream proess.</p>
<p>To employ loadbalancing setup in live streaming first we have to setup live streaming repeater configuration available with wowza. This is because the live stream will be actually published to only one server and we need to duplicate among a no of stream servers as our need. So there will be live repeater origin server and several live repeater edge servers.  When the player will request the contentfrom an edge server and the edge server will maintain a single connection per-unique stream to the origin. Origin and edge configuration is an application level configuration. A single Wowza Server instance can be configured as an origin for one application and an edge for another.</p>
<h5>1) Configuring liverepeater-origin server</h5>
<ul>
<li> Create a folder named <strong>[install-dir]/applications/liverepeater</strong>.</li>
</ul>
<ul>
<li> Create a folder named <strong>[install-dir]/conf/liverepeater</strong> and copy the file <strong>[install-dir]/conf/Application.xml </strong>into this new folder.</li>
</ul>
<ul>
<li>Edit the newly copied Application.xml file and make the following changes:</li>
</ul>
<p>a) Change the <strong>Streams</strong>/<strong>StreamType</strong> to <strong>liverepeater</strong>-<strong>origin </strong></p>
<p>b. Change the <strong>LiveStreamPacketizers </strong>to: <strong>cupertinostreamingpacketizer</strong>,<strong>smoothstreamingpacketizer</strong></p>
<p><strong>2)</strong>Configuring edge server</p>
<p>Follow these steps to configure each of the edge servers</p>
<ul>
<li>Create a folder named [install-dir]/applications/liverepeater.</li>
<li>Create a folder named [install-dir]/conf/liverepeater and copy the file [install-dir]/conf/Application.xml into this new folder.</li>
<li>Edit the newly copied Application.xml file and make the following changes.</li>
</ul>
<p>a)Change the Streams/StreamType to liverepeater-edge (you can use the liverepeater-edge-lowlatency stream type if low latency is important, this will add extra load to the server).</p>
<p>b)Change the LiveStreamPacketizers to: cupertinostreamingrepeater,smoothstreamingrepeater</p>
<p>c)Uncomment the Repeater/OriginURL section and set OriginURL to rtmp URL of the origin server. For example if the origin server uses the domain name      origin.mycompany.com, this value should be set to:</p>
<pre class="brush: bash;">

&lt;Repeater&gt;

         &lt;OriginURL&gt;rtmp://origin.mycompany.com&lt;/OriginURL&gt;

         &lt;QueryString&gt;&lt;/QueryString&gt;

&lt;/Repeater&gt;
</pre>
<p>Note: Let us assume origin.mycompany.com is the origin server here</p>
<p>3)Configring the Loadbalancer server</p>
<ul>
<li>First Download the loadbalancing module the from the following link of wowza forums. Unzip the downloaded file</li>
</ul>
<p>http://www.wowzamedia.com/forums/showthread.php?t=4637</p>
<ul>
<li>Copy the file <strong>lib/wms-plugin-loadbalancer.jar</strong> from this zip archive to the <strong>[install-dir]/lib/</strong> folder of Wowza Media Server 2</li>
</ul>
<ul>
<li>Copy the file <strong>conf/crossdomain.xml</strong> from this zip archive to the <strong>[install-dir]/conf/</strong> folder of Wowza Media Server 2.</li>
</ul>
<ul>
<li>Edit <strong>[install-dir]/conf/Server.xml</strong> and make the following changes:</li>
</ul>
<p>Add the following ServerListener entry to the &lt;ServerListeners&gt; list:</p>
<pre class="brush: bash;">
    &lt;ServerListener&gt;
           	  &lt;BaseClass&gt;com.wowza.wms.plugin.loadbalancer.ServerListenerLoadBalancerListener&lt;/BaseClass&gt;
    &lt;/ServerListener&gt;
</pre>
<p><code> Add the following properties to the &lt;properties&gt; section of the bottom of the server.xml file<br />
</code></p>
<pre class="brush: bash;">
      &lt;Property&gt;
               &lt;Name&gt;loadBalancerListenerKey&lt;/Name&gt;
	      &lt;Value&gt;023D4FB4IS83&lt;/Value&gt;
      &lt;/Property&gt;
      &lt;Property&gt;
	      &lt;Name&gt;loadBalancerListenerIpAddress&lt;/Name&gt;
	      &lt;Value&gt;*&lt;/Value&gt;
      &lt;/Property&gt;
      &lt;Property&gt;
	     &lt;Name&gt;loadBalancerListenerPort&lt;/Name&gt;
	     &lt;Value&gt;1934&lt;/Value&gt;
	     &lt;Type&gt;Integer&lt;/Type&gt;
      &lt;/Property&gt;
      &lt;Property&gt;
	      &lt;Name&gt;loadBalancerListenerRedirectorClass&lt;/Name&gt;
	      &lt;Value&gt;com.wowza.wms.plugin.loadbalancer.LoadBalancerRedirectorConcurrentConnects&lt;/Value&gt;
      &lt;/Property&gt;
      &lt;Property&gt;
	      &lt;Name&gt;loadBalancerListenerMessageTimeout&lt;/Name&gt;
	      &lt;Value&gt;5000&lt;/Value&gt;
	      &lt;Type&gt;Integer&lt;/Type&gt;
      &lt;/Property&gt;
</pre>
<ul>
<li>Edit <strong>[install-dir]/conf/VHost.xml</strong> and add the following <strong>HostPort/HTTPProvider</strong> XML snippet just before the <strong>HTTPProvider</strong> definition for <strong>com.wowza.wms.http.HTTPServerVersion</strong>:</li>
</ul>
<pre class="brush: bash;">
      &lt;HTTPProvider&gt;
                   &lt;BaseClass&gt;com.wowza.wms.plugin.loadbalancer.HTTPLoadBalancerRedirector&lt;/BaseClass&gt;
	           &lt;RequestFilters&gt;*loadbalancer&lt;/RequestFilters&gt;
	           &lt;AuthenticationMethod&gt;none&lt;/AuthenticationMethod&gt;
	           &lt;Properties&gt;
                              &lt;Property&gt;
		          	  &lt;Name&gt;enableServerInfoXML&lt;/Name&gt;
                   		  &lt;Value&gt;true&lt;/Value&gt;
		                  &lt;Type&gt;Boolean&lt;/Type&gt;
		           &lt;/Property&gt;
	         &lt;/Properties&gt;
     &lt;/HTTPProvider&gt;
</pre>
<p>4)To setup an edge servers in load balancing</p>
<p>Do the first two steps as done for the load balacer server</p>
<ul>
<li>Edit <strong>[install-dir]/conf/Server.xml</strong> and make the following changes:</li>
</ul>
<p>Add the following ServerListener entry to the &lt;ServerListeners&gt; list:</p>
<pre class="brush: bash;">

     &lt;ServerListener&gt;
	           &lt;BaseClass&gt;com.wowza.wms.plugin.loadbalancer.ServerListenerLoadBalancerSender&lt;/BaseClass&gt;
     &lt;/ServerListener&gt;
</pre>
<p>Add the following properties to the &lt;Properties&gt; section at the bottom of Server.xml:</p>
<pre class="brush: bash;">

   &lt;Property&gt;
	    &lt;Name&gt;loadBalancerSenderTargetPath&lt;/Name&gt;
	    &lt;Value&gt;${com.wowza.wms.AppHome}/conf/loadbalancertargets.txt&lt;/Value&gt;
   &lt;/Property&gt;
   &lt;Property&gt;
	    &lt;Name&gt;loadBalancerSenderRedirectAddress&lt;/Name&gt;
	    &lt;Value&gt;[redirect-address]&lt;/Value&gt;
   &lt;/Property&gt;
   &lt;Property&gt;
            &lt;Name&gt;loadBalancerSenderMonitorClass&lt;/Name&gt;
	    &lt;Value&gt;com.wowza.wms.plugin.loadbalancer.LoadBalancerMonitorDefault&lt;/Value&gt;
   &lt;/Property&gt;
   &lt;Property&gt;
	    &lt;Name&gt;loadBalancerSenderMessageInterval&lt;/Name&gt;
	    &lt;Value&gt;2500&lt;/Value&gt;
	    &lt;Type&gt;Integer&lt;/Type&gt;
   &lt;/Property&gt;
</pre>
<p>Where <strong>[redirect-address]</strong> is the external ip address or domain name of this machine. This address will be used when redirecting to this edge server. When using this system on EC2 you can set the [redirect-address] to   ${com.wowza.amazonaws.ec2.AWSEC2_METADATA_PUBLIC_IPV4} and upon server startup it will use the public ip address of the server for this value.</p>
<ul>
<li>Create the file <strong>[install-dir]/conf/loadbalancertargets.txt</strong> using a text editor and enter the following two lines (the first line is a comment):</li>
</ul>
<pre class="brush: bash;">

# [load-balancer-ip-address],[load-balancer-port],[encryption-key]

[load-balancer-ip-address],1934,023D4FB4IS83
</pre>
<pre><img src="http://www.sparksupport.com/blog/wp-includes/js/tinymce/plugins/wordpress/img/trans.gif" alt="" />
  Where <strong>[load-balancer-ip-address]</strong> is the ip  address or domain name of the load balancer.
</pre>
<p style="text-align: left">This configurations uses <strong>UDP port 1934</strong> for communication between the edge servers and the load balancer. Be sure this port is open on your firewall. All communication between the edge server and the load balancer is encrypted and signed. The encryption key is set on the load balancer server using the <strong>loadBalancerListenerKey</strong> property and in the <strong>loadbalancertargets.txt</strong> file on the edge servers. These keys must match. An edge server can communicate with multiple load balancers by adding additional lines to the<strong> loadbalancertargets.txt</strong> file.<strong> </strong></p>
<p style="text-align: left">You can now startup the load balancer and multiple edge servers. If functioning properly, the edge servers will update the load balancer every 2.5 seconds with status and load information. You can get information from the load balancer in regards to which edge servers are currently registered and their status by opening a web browser and entering the following url:</p>
<pre><code> <a href="http://[load-balancer-ip-address]:1935/loadbalancer?serverInfoXML">http://[load-balancer-ip-address]:1935/loadbalancer?serverInfoXML</a>

5)Now Configure a redirect application to redirect the connection requests to the least loaded server.
</code></pre>
<ul>
<li>Create the folder <strong>[install-dir]/applications/redirect</strong>.</li>
</ul>
<ul>
<li>Create the folder <strong>[install-dir]/conf/redirect</strong> and copy the file <strong>[install-dir]/conf/Application.xml</strong> into this new folder.</li>
</ul>
<ul>
<li>Create the folder <strong>[install-dir]/conf/redirect</strong> and copy the file <strong>[install-dir]/conf/Application.xml</strong> into this new folder.</li>
</ul>
<pre class="brush: bash;">
      &lt;Module&gt;
	    &lt;Name&gt;ModuleLoadBalancerRedirector&lt;/Name&gt;
	    &lt;Description&gt;ModuleLoadBalancerRedirector&lt;/Description&gt;
            &lt;Class&gt;com.wowza.wms.plugin.loadbalancer.ModuleLoadBalancerRedirector&lt;/Class&gt;
      &lt;/Module&gt;
</pre>
<ul>
<li>Add the following properties the properties section at the bottom of the Application.xml file:</li>
</ul>
<pre class="brush: bash;">
   &lt;Property&gt;
             &lt;Name&gt;redirectAppName&lt;/Name&gt;&lt;code&gt;
             &lt;Value&gt;[application-name]&lt;/Value&gt;
    &lt;/Property&gt;
    &lt;!--
    &lt;Property&gt;
	     &lt;Name&gt;redirectPort&lt;/Name&gt;
	     &lt;Value&gt;[redirect-port]&lt;/Value&gt;
    &lt;/Property&gt;
    --&gt;
    &lt;!--
    &lt;Property&gt;
	     &lt;Name&gt;redirectScheme&lt;/Name&gt;
              &lt;Value&gt;rtmp&lt;/Value&gt;
    &lt;/Property&gt;
    --&gt;
    &lt;Property&gt;
	     &lt;Name&gt;redirectOnConnect&lt;/Name&gt;
	     &lt;Value&gt;true&lt;/Value&gt;
	     &lt;Type&gt;Boolean&lt;/Type&gt;
    &lt;/Property&gt;
</pre>
<p>Where <strong>[application-name]</strong> is the name of the application you wish to redirect to on the edge server and <strong>[redirect-port]</strong> is the port to redirect to (such as port 1935 or port 80). The <strong>redirectPort</strong> and <strong>redirectScheme</strong> are commented out so that the system will use the same scheme and port used to connect to the load balancer to connect to the edge server. This will work better when using any type of protocol (rtmp to rtmpt) or port rollover scheme.</p>
<p><code> </code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sparksupport.com/blog/load-balancing-in-wowza-media-server/feed</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>How To Install Red5 on CentOS</title>
		<link>http://www.sparksupport.com/blog/how-to-install-red5-on-cenos</link>
		<comments>http://www.sparksupport.com/blog/how-to-install-red5-on-cenos#comments</comments>
		<pubDate>Mon, 02 Aug 2010 05:41:51 +0000</pubDate>
		<dc:creator>Jaseer</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[general]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[howto install red5]]></category>
		<category><![CDATA[Red5]]></category>
		<category><![CDATA[red5 installation]]></category>

		<guid isPermaLink="false">http://www.sparksupport.com/blog/?p=816</guid>
		<description><![CDATA[Red5 is an open source video sream server appllication which helps you to stream your video content across the web. Inorder to install and run red5, you need the java platform installed on your system. Using apache-ant or eclipse we can build and install Red5. Here apache-ant  method is described. 1)Using Apache-ant a)install jdk 1.6 [...]]]></description>
			<content:encoded><![CDATA[<p>Red5 is an open source video sream server appllication which helps you to stream your video content across the web. Inorder to install and run red5, you need the java platform installed on your system. Using <em><strong>apache-ant </strong></em>or <em><strong>eclipse</strong></em> we can build and install Red5. Here apache-ant  method is described.</p>
<h4><strong>1)Using Apache-ant</strong></h4>
<h5>a)install jdk 1.6 or higher and its curresponding deveopment package.</h5>
<p>#yum install java-1.6.0-openjdk java-1.6.0-openjdk-devel</p>
<h5>b)Install apache-ant</h5>
<p>To build the red5 binary from source we need apache-ant. So install it.</p>
<p>#cd /usr/src</p>
<p>#wget http://archive.apache.org/dist/ant/binaries/apache-ant-1.8.0-bin.tar.bz2</p>
<p>#tar -xjf apache-ant-1.8.0-bin.tar.bz2</p>
<p>#mv apache-ant-1.8.0 /usr/local/ant</p>
<h5>c)Set the enviroment variables for java, ant and java class path</h5>
<p>export ANT_HOME=/usr/local/ant<br />
export JAVA_HOME=/usr/lib/jvm/java<br />
export PATH=$PATH:/usr/local/ant/bin<br />
export CLASSPATH=.:$JAVA_HOME/lib/classes.zip</p>
<p>If you want this to be avilable for all users, append these lines to the file /etc/bashrc</p>
<h5>d)Now Install subversion to downlaod the svn version from the googlecode.</h5>
<p>#yum install subversion</p>
<h5>e)Download and Install Red5</h5>
<p>#svn checkout http://red5.googlecode.com/svn/java/server/trunk/ red5</p>
<p>#mv red5 /usr/local</p>
<p>#cd /usr/local/red5</p>
<p>#ant prepare</p>
<p>#ant build</p>
<p><span style="color: #ff0000">Note: If you are building on CentOS 5.4 use &#8220;#ant dist&#8221; command instead of &#8220;#ant build&#8221;</span></p>
<p>This will take some time. So please be patient.</p>
<p>Finally you will see a line &#8220;Build successful&#8221; .That means your red5 installation is complete. Now copy the conf directory from dist/ to the current directory and now test your installation by runnig the script</p>
<p>#cp -r dist/conf .<br />
#./red5.sh</p>
<p>Your Installation is ok if it shows &#8220;Installer service created&#8221; in the last. Now press ctrl+c to quit the process and go for the init script</p>
<h5>f)Init Script</h5>
<p>#vi /etc/init.d/red5</p>
<p>copy the following code to it.</p>
<pre><span style="color: #0000ff">#!/bin/bash
 PROG=red5
 RED5_HOME=/usr/local/red5
 DAEMON=$RED5_HOME/$PROG.sh</span><span style="color: #0000ff"> PIDFILE=/var/run/$PROG.pid
# Source function library</span><span style="color: #0000ff"> . /etc/rc.d/init.d/functions</span><span style="color: #0000ff">[ -r /etc/sysconfig/red5 ] &amp;&amp; . /etc/sysconfig/red5</span><span style="color: #0000ff">RETVAL=0
case "$1" in
 start)
 echo -n $"Starting $PROG: "
 cd $RED5_HOME
 $DAEMON &gt;/dev/null 2&gt;/dev/null &amp;
 RETVAL=$?
 if [ $RETVAL -eq 0 ]; then
 echo $! &gt; $PIDFILE
 touch /var/lock/subsys/$PROG
 fi
 [ $RETVAL -eq 0 ] &amp;&amp; success $"$PROG startup" || failure $"$PROG startup"
 echo
 ;;
 stop)
 echo -n $"Shutting down $PROG: "
 killproc -p $PIDFILE
 RETVAL=$?
 echo
 [ $RETVAL -eq 0 ] &amp;&amp; rm -f /var/lock/subsys/$PROG
 ;;
 restart)
 $0 stop
 $0 start
 ;;
 status)
 status $PROG -p $PIDFILE
 RETVAL=$?
 ;;
 *)
 echo $"Usage: $0 {start|stop|restart|status}"
 RETVAL=1</span><span style="color: #0000ff"> esac
exit $RETVAL

</span><span style="color: #0000ff"> </span></pre>
<h5>g)Start the service and test your server</h5>
<p>#/etc/init.d/red5 start</p>
<p>Now you can open your browser enter <strong>http://[your_ip]:5080</strong> and see your sever working. You can install the sample applications and view the demos.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sparksupport.com/blog/how-to-install-red5-on-cenos/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>What is Video Streaming</title>
		<link>http://www.sparksupport.com/blog/video-streaming</link>
		<comments>http://www.sparksupport.com/blog/video-streaming#comments</comments>
		<pubDate>Tue, 13 Jul 2010 12:58:01 +0000</pubDate>
		<dc:creator>Jaseer</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[general]]></category>
		<category><![CDATA[live video streaming]]></category>
		<category><![CDATA[rtmp]]></category>
		<category><![CDATA[rtsp]]></category>
		<category><![CDATA[Streaming video]]></category>
		<category><![CDATA[Video Streaming]]></category>

		<guid isPermaLink="false">http://www.sparksupport.com/blog/?p=641</guid>
		<description><![CDATA[Video stream servers are meant to provide the video content across internet in reliable and generic way so that any client can access easily. They uses diffrent protocols other than http namely rtsp, rtmp, rtp etc. And these protocols mainly uses udp. A basic video streaming system contains 3 components. A video publishing side, The [...]]]></description>
			<content:encoded><![CDATA[<p>Video stream servers are meant to provide the video content across internet in reliable and generic way so that any client can access easily. They uses diffrent protocols other than http namely rtsp, rtmp, rtp etc. And these protocols mainly uses udp. A basic video streaming system contains 3 components. A video publishing side, The video streaming server and the client side player (usually flash player embedded in the webpage). The video publishing system will upload a live or static video content to the Video Stream Server and the video stream sever will broadcast (means streaming)  that uploaded video such that the clients can view the videos without bothering about any codecs. The video uploading system should have an encoder to publish live contents to the server. The encoder does the process of transcoding to provide the content to the desired format of the stream server.</p>
<p>Major stream server applications are Wowza Media Server, Adobe Flash Media Server, Red5:open source flash server, Darwin Streaming server (open source) etc.</p>
<p><a href="http://www.sparksupport.com/blog/wp-content/uploads/2010/07/streaming.jpg"><img class="aligncenter size-full wp-image-656" src="http://www.sparksupport.com/blog/wp-content/uploads/2010/07/streaming.jpg" alt="" width="400" height="394" /></a></p>
<p><strong>Working</strong><br />
Actual work flow when a web client is accessing stream video from a website is deiscribed in the figure. When the user clicks on a particular video icon the web server passes a request to the stream server. It will also notify the information about the client side  player (usually it will be a flash player application). Because the if it is a flash client then the request sent will be rtmp (Real Time Messaging Protocol ) protocol based. The stream server will stream (send the video packets) video based on rtmp protocol for flash players. For client players like vlc, apple quick-time etc  the protocol used is rtsp (Real Time Streaming Protocol).</p>
<p>A video streaming setup contains 3 components they are</p>
<ol>
<li>Video Stream server</li>
<li>Web server for providing a web interface to the clients</li>
<li>The flash player embedded on the web page (Or stand alone players like vlc, quicktime etc if not accessing through the site).</li>
</ol>
<p>If the video server streams a live video then one publishing site will be there which will provide the  the live video source. Figure 2 illustrates such a video stream server setup. A video Streaming server application would be running on the Streaming server. The broadcaster would use an live  encoding tool (eg: flash live media encoder). If the client is accessing the video on an html web page the player might be adobe flash player. Flash offers online broadcasters a platform rich with unmatchable flexibility and superior quality video delivery. Flash has fast become the standard for delivery of rich-media over the internet. TV and Video Broadcasters and a wide variety of content creators around the globe have chosen Flash as their No. 1 streaming format.</p>
<div id="attachment_647" class="wp-caption aligncenter" style="width: 430px"><a href="http://www.sparksupport.com/blog/wp-content/uploads/2010/07/screenshot_dellivestream.gif"><img class="size-full wp-image-647" src="http://www.sparksupport.com/blog/wp-content/uploads/2010/07/screenshot_dellivestream.gif" alt="" width="420" height="452" /></a><p class="wp-caption-text">Live video stream setup</p></div>
<div style="width: 1px;height: 1px;overflow: hidden"><!-- 		@page { margin: 0.79in } 		P { margin-bottom: 0.08in } --></p>
<p style="margin-bottom: 0in;background: none repeat scroll 0% 0% #e6e6e6;font-weight: normal"><span style="font-family: Liberation Serif,serif"><span style="font-size: small">If the video server streams a live video then one publishing site will be there which will provide the  the live video source. Figure 2 illustrates such a video stream server setup. A video Streaming server application would be running on the Streaming server. The broadcaster would use an live  encoding tool (eg: flash live media encoder). If the client is accessing the video on an html web page </span></span></p>
<p style="margin-bottom: 0in;background: none repeat scroll 0% 0% #e6e6e6;font-weight: normal">
<p style="margin-bottom: 0in;background: none repeat scroll 0% 0% #e6e6e6;font-weight: normal"><span style="font-family: Liberation Serif,serif"><span style="font-size: small">the player might be adobe flash player. Flash offers online broadcasters a platform rich with unmatchable flexibility and superior quality video delivery. Flash has fast become the standard for delivery of rich-media over the internet. TV and Video Broadcasters and a wide variety of content creators around the globe have chosen Flash as their No. 1 streaming format.</span></span></p>
<p style="margin-bottom: 0in;background: none repeat scroll 0% 0% #e6e6e6;font-weight: normal">
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.sparksupport.com/blog/video-streaming/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to install and configure Bacula</title>
		<link>http://www.sparksupport.com/blog/how-to-install-and-configure-bacula</link>
		<comments>http://www.sparksupport.com/blog/how-to-install-and-configure-bacula#comments</comments>
		<pubDate>Fri, 25 Dec 2009 10:34:19 +0000</pubDate>
		<dc:creator>Haridas N</dc:creator>
				<category><![CDATA[general]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[bacula installation]]></category>
		<category><![CDATA[how to configure baccula]]></category>
		<category><![CDATA[setup bacula]]></category>

		<guid isPermaLink="false">http://sparksupport.com/blog/?p=210</guid>
		<description><![CDATA[Bacula : &#8211;   It comes by night and sucks the vital essence from your computers.. Introduction: Bacula is an on-linebased back up tool. Which is used to backup files from different servers into back up server where the bacula is running. For setup this backup tool across network first you have to install bacula [...]]]></description>
			<content:encoded><![CDATA[<h1>Bacula : &#8211;   It comes by night and sucks the vital essence from your computers..</h1>
<h4>Introduction:</h4>
<p><span style="font-size: small"><span style="color: #000000">Bacula is an on-linebased back up tool. Which is used to backup files from different servers into back up server where the bacula is running. For setup this backup tool across network first you have to install bacula server package on backup server machine where you are storing your backup contents ,and install bacula client daemon on all other servers from where we are going to backup data.</span></span></p>
<p><span style="font-size: small"><span style="color: #000000"><br />
</span></span></p>
<h3>Bacula has five main components.</h3>
<h4>1.Director daemon</h4>
<p>This daemon co-ordinate all working of backup,and through its  configuration file we can specify all these things.</p>
<h4>2.File daemon</h4>
<p>This daemon works in all clients from that client we are backup data.  Director daemon connect to this daemon after authentication and backup  the files from this client.</p>
<h4>3.Storage daemon</h4>
<p>This daemon is for store the backup data from client in to hard disk  of backup server,usually this daemon and director daemon works in the  same backup server. director works as intermediate between the file  daemon and storage daemon.</p>
<h4>4.Console daemon</h4>
<p>This is a terminal to control all works.This console connect to  director daemon and using its commands we can define all things related  with backup .</p>
<h4>5.Catalog Database</h4>
<p><strong> </strong>The database used here is for store all information related  to the backup, including the file indexing.Commonly used database for  bacula is Mysql.</p>
<p><span style="font-size: small"><span style="color: #000000"><br />
</span></span></p>
<p>This figure shows how the different bacula daemon configuration files were linked together.</p>
<p style="text-align: center"><img class="size-full wp-image-162 aligncenter" src="http://sparksupport.com/blog/wp-content/uploads/2009/12/bacula.png" alt="bacula" width="460" height="547" /></p>
<h2>Install and Configure Bacula Server</h2>
<p>You can install bacula from rpm packages or from Source compilation. Here we are focusing on the source method,which is tested and is working fine.</p>
<p>* Download latest version of bacula from bacula.org site .</p>
<p>Here we are using following versions</p>
<pre class="brush: plain;">

1. bacula-3.0.3.tar.gz (http://sourceforge.net/projects/bacula/files/bacula/3.0.3/bacula-3.0.3.tar.gz/download)

2. depkgs-18Feb09.tar.gz or later versions (http://sourceforge.net/projects/bacula/files/depkgs/18Feb09/depkgs-18Feb09.tar.gz/download)
</pre>
<p>This two packages are used to setup a bacula,In which you have to install depkgs-18Feb09.tar.gz first to solve remaining dependency problems before starting bacula-3.0.3.tar.gz. You should not hesitate to install depkgs-18Feb09.tar.gz ,it  contains different packages ,in which you can install &#8220;mtx and qwt&#8221;. you need not install sqlite database because mysql is the default database.</p>
<pre class="brush: bash;">
tar -xzf depkgs-18Feb09.tar.gz
cd depkgs
make qwt
make mtx
gmake mtx-instal
</pre>
<p>Then Enter in to the bacula source directory and Use the following configurations settings to install bacula (Or You can use system default configuration)</p>
<pre class="brush: bash;">

 CFLAGS=&quot;-g -O2&quot; \
./configure \
--sbindir=/usr/local/bacula/bin \
--sysconfdir=/usr/local/bacula/bin \
--with-pid-dir=/usr/local/bacula/bin/working \
--with-subsys-dir=/usr/local/bacula/bin/working \
--enable-smartalloc \
--with-mysql \
--with-working-dir=/usr/local/bacula/ \
 --with-dump-email=user.name=@????.se \     #The mail addresses is to mail all activities of your backup in to your inbox.
--with-job-email=user.name@????.se \
--with-smtp-host=localhost \
--enable-bat \
--with-qwt=/usr/local/qwt-5.0.2/        #path to qwt source folder( usually it is inside depkg folder that you are installed previously)&lt;/pre&gt;
</pre>
<pre class="brush: bash;">

make

make install

make install-autostart   #only supported for the officially supported systems (Redhat/Fedora...).This will put all startup script into the /etc/init.d/ folder and corresponding syslinks , so automatically start corresponding daemon at  startup.

make distclean  # type this to clear all configuration settings if you are starting ./configure from beginning.
</pre>
<p><span style="font-size: small">Now you are successful completed the installation of bacula server , then type</span></p>
<p>Then we have to setup the Database to store the catalog information.Most commonly used database is Mysql,and setup the corresponding users,databases and privileges for the bacula application.</p>
<pre class="brush: bash;"> /etc/init.d/mysqld start </pre>
<p>Bacula installation has included some scripts to complete the initial database and other server setups, these scripts are under your <strong>bin</strong> folder of the installed directory.</p>
<pre class="brush: bash;">
cd &lt;Installed path&gt;/bin

./grant_mysql_privileges -u root -p
</pre>
<p><strong>Create database</strong></p>
<pre class="brush: bash;">
./create_mysql_database -u root -p
./make_mysql_tables -u root -p
</pre>
<p><span style="font-size: small">create a directory called <strong>working</strong> under /usr/local/bacula/bin/</span></p>
<p>Afrer installation of bacula. navigate to installed folder and run bacula by typing</p>
<pre class="brush: bash;">
./bacula start
</pre>
<p>This will start all three daemons ( bacula-dir,bacula-sd and bacula-fd)</p>
<div><span style="font-size: small">And then check ports where these daemons are listening.</span></div>
<pre class="brush: plain;">

default case:

daemon    |  port
===================
bacula-dir   9101
bacula-fd    9102
bacula-sd    9103

make sure that the above mentioned ports are added and opened in the csf.conf file of the server or in some other firewall settings
</pre>
<p>After successful installation to start the sample backup from same system where you installed all three daemons . Follow this simple tutorial :</p>
<p>http://www.bacula.org/en/rel-manual/Brief_Tutorial.html#TutorialChapter</p>
<p>To administrate  bacula it  provide a console or terminal named as bconsole . Using this console we can do all work from back end.</p>
<p>NB: For installation from source package, after detar you should read the README and INSTALL files. Most of the time this will  helps you to        complete installation.</p>
<h2>Install and Configure Bacula Client</h2>
<p>After downloading the source and depkgs  do the depkgs installation as mentioned  above<br />
Use these following  configuration to install client  :</p>
<pre class="brush: bash;">
CFLAGS=&quot;-g -O2&quot; ./configure  --bindir=/usr/local/bacula/bin --sysconfdir=/usr/local/bacula/bin --with-pid-dir=/usr/local/bacula/bin/working --with-subsys-dir=/usr/local/bacula/bin/working --enable-smartalloc --with-working-dir=/usr/local/bacula/ --with-dump-email=user@yourdomain.com --with-job-email=user@yourdomain.com  --with-smtp-host=localhost  --with-qwt=../depkgs/qwt-5.0.2/(here path to qwt source) --enable-client-only
</pre>
<p>If your system is 64-bit(To know it use the command <em>arch</em> ) then add &#8211;libdir=/usr/local/lib64</p>
<pre class="brush: bash;">
make

make install

make install-autostart-fd     //It helps start client daemon at start up.
</pre>
<p><span style="font-size: small">create a directory called <strong>working</strong> under /usr/local/bacula/bin/</span></p>
<p>start the file daemon using</p>
<pre class="brush: bash;">
/etc/init.d/bacula-fd start
</pre>
<p>add a new &#8220;client&#8221;and &#8220;job&#8221; in to the bacula-dir.conf</p>
<p>and set the password in the in the conf&#8217;s as shown in the above figure (Use above tutorial also)</p>
<h4>Use Follwing configuration checking if you have any problems with the bacula setup</h4>
<pre class="brush: plain;">
a) Client bacula-fd daemon listening to 9102
b) Edit bacula-fd.conf ,Change the Director name and password to Director name and client resource password in the  bacula-dir.conf
    file of the Server.
c) Add server hostname to the /etc/hosts of the client system, inorder to ensure correct resolution.

d) Also check the ports 9102 to listen server request and 9103 to contact server storage daemon by typing

telnet server-hostname 9103 (from client )
telnet client-hostname 9102  (from server)
</pre>
<p>========================================================================================<br />
Above procedure is the standard installation steps ; You can download and use the documentation (*.gz) package  from bacula.org  for more details.<br />
========================================================================================</p>
<h4>SET UP WEB BASED INTERFACE TO MONITOR BACULA( php and perl based)</h4>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
( Install this package in your backup server where your bacula-server is installed)</p>
<p><strong>1.Bweb web based comprehensive admin tool</strong></p>
<p>Bweb developed up on perl,so in order to  install bweb we need to install some perl dependencies files.<br />
you can use cpan.<br />
You can install this tool just following the INSTALL file under bacula-gui-XXX/bweb/. This file is more than enough to complete the  installation of bweb.</p>
<p><strong>2. bacula-gui-3.0.3.tar.gz</strong></p>
<p>Download this package to setup web interface .</p>
<p>Detar this package and Read README to complete installtaion [in this package You need not type &#8216;make or make install&#8217; , just</p>
<pre class="brush: bash;">
 ./configure --with-bacula=(path to bacula source folder)
</pre>
<p>Then copy the bacula-web  from this source folder and place it in your document root of the apache.</p>
<p>NB: This gui was only tested with php 4.3.4 and php-5.0.4,later. you may get blank page while you are using later versions.check the error log and correct it (may be some permission error ). If you have any problem to install php 4.3.4 with your latest apache 2.2.* then go for apache 2.0.* versions.</p>
<p>Here we tested the following versions.<br />
1.Install pear DB by typing &#8220;#pear install DB &#8221;<br />
2.apache 2.0.63<br />
3.php-4.3.4</p>
<p>After installation web-servercopy copy folder bacula-web to its document root , then type : http://system-ip:/bacula-web</p>
<h4>Some Error Fixes:</h4>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>1.If your configuration of server and clients seems to be correct, but you still receiving   this error</p>
<p>eg:&#8221;: Fatal error: bsock.c:135 Unable to connect to Client: server.client.com-fd on server.client.com:9102. ERR=Interrupted system call &#8221;</p>
<p>*  Please check the firewall configurations,whether ports 9102 not blocked at client server  and 9101or 9102 are not blocked at server .<br />
* To check this telnet to destination port. If the system is installed with csf ,then check the TCP IN and OUT allowed ports.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sparksupport.com/blog/how-to-install-and-configure-bacula/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>How to install nagios</title>
		<link>http://www.sparksupport.com/blog/how-to-install-nagios</link>
		<comments>http://www.sparksupport.com/blog/how-to-install-nagios#comments</comments>
		<pubDate>Mon, 07 Dec 2009 08:30:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[general]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[how to install nagios]]></category>

		<guid isPermaLink="false">http://sparksupport.com/blog/?p=151</guid>
		<description><![CDATA[Below we give a brief description of how to install and configure Nagios. To install Nagios make sure the following are installed and working properly in your machine * httpd * php * gcc * glibc * glibc-common * gd * gd-devel * png * png-devel * jpeg * jpeg-devel * zlib * zlib-devel Install [...]]]></description>
			<content:encoded><![CDATA[<p>Below we give a brief description of how to install and configure Nagios.</p>
<p>To install Nagios make sure the following are installed and working properly in your machine</p>
<pre><code>
* httpd
* php
* gcc
* glibc
* glibc-common
* gd
* gd-devel
* png
* png-devel
* jpeg
* jpeg-devel
* zlib
* zlib-devel
</code></pre>
<p>Install Steps</p>
<p>1) Create a new user and group as root</p>
<p>Create a new user nagios.</p>
<pre><code>useradd -m nagios

passwd nagios </code></pre>
<p>Create a new nagcmd group for allowing external commands to be submitted through the web interface. Add both the nagios user and the apache user to the group.</p>
<pre><code>/usr/sbin/groupadd nagcmd

/usr/sbin/usermod -a -G nagcmd nagios

/usr/sbin/usermod -a -G nagcmd apache </code></pre>
<p>2) Download Nagios and the Nagios Plugins</p>
<p>Download the source code tarballs of both Nagios and the Nagios plugins.</p>
<pre><code>
wget http://sourceforge.net/projects/nagios/files/nagios-3.x/nagios-3.2.0/nagios-3.2.0.tar.gz/download
wget http://sourceforge.net/projects/nagiosplug/files/nagiosplug/1.4.14/nagios-plugins-1.4.14.tar.gz/download
</code></pre>
<p>3) Compile and Install Nagios</p>
<p>Extract the Nagios source code.</p>
<pre><code>
tar xzf nagios-3.2.0.tar.gz
cd nagios-3.2.0
</code></pre>
<p>make sure that these libraries are already installed in the system .Otherwise install them using YUM</p>
<pre><code>
   * gd
    * gd-devel
    * png
    * png-devel
    * jpeg
    * jpeg-devel
    * zlib
    * zlib-devel </code></pre>
<p>Run the Nagios configure script, passing the name of the group:</p>
<pre><code> ./configure --with-command-group=nagcmd </code></pre>
<p>Compile the Nagios source code.</p>
<pre><code> make all </code></pre>
<p>Install binaries, init script, sample config files and set permissions on the external command directory.</p>
<pre><code>make install

make install-init

make install-config

make install-commandmode </code></pre>
<p>4) Customize Configuration</p>
<p>After installation the default configuration file can be found in the directory /usr/local/nagios/etc/. Also edit your contact information</p>
<pre><code> vi /usr/local/nagios/etc/objects/contacts.cfg</code></pre>
<p>5) Configure the Web Interface</p>
<p>Install the Nagios web config file in the Apache conf.d directory.</p>
<pre><code> make install-webconf </code></pre>
<p>Create a nagiosadmin account for logging into the Nagios web interface.</p>
<pre><code> htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin </code></pre>
<p>Restart Apache to make the new settings take effect.</p>
<pre><code> /etc/init.d/httpd restart </code></pre>
<p>6) Compile and Install the Nagios Plugins</p>
<p>Extract the Nagios plugins source code.</p>
<pre><code> tar xzf nagios-plugins-1.4.14.tar.gz

cd nagios-plugins-1.4.14 </code></pre>
<p>Compile and install the plugins.</p>
<pre><code> ./configure --with-nagios-user=nagios --with-nagios-group=nagios
make

make install</code></pre>
<p>7) Start Nagios</p>
<p>Add Nagios to the list of system services and have it automatically start when the system boots.</p>
<pre><code> chkconfig --add nagios

chkconfig nagios on </code></pre>
<p>Verify the default Nagios configuration files.</p>
<pre><code> /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg </code></pre>
<p>If there are no errors, start Nagios.</p>
<pre><code> service nagios start
</code></pre>
<p> <img src='http://www.sparksupport.com/blog/wp-includes/images/smilies/icon_cool.gif' alt='8)' class='wp-smiley' /> Modify SELinux Settings</p>
<p>This step is important if the Selinux is not in the Permissive mode it shows error like this</p>
<p>See if SELinux is in Enforcing mode.</p>
<pre><code>getenforce</code></pre>
<p>Put SELinux into Permissive mode.</p>
<pre><code>setenforce 0</code></pre>
<p>To make this change permanent, you&#8217;ll have to modify the settings in /etc/selinux/config and reboot.</p>
<p>9) Login to the Web Interface<br />
You should now be able to access the Nagios web interface at the URL below. You&#8217;ll be prompted for the username (nagiosadmin) and password(nagios) you specified earlier.</p>
<pre><code>http://localhost/nagios/ </code></pre>
<p>10) Add hosts to be monitored</p>
<p>There are object configuration files in which you can define hosts, host groups, contacts, contact groups, services, etc. You can split your object definitions across several config files if you wish, or keep them all in a single config file.</p>
<p>For convinience we created two files hosts.cfg and services.cfg under the directory /usr/local/nagios/etc/objects/ and add the file path to /usr/local/nagios/etc/nagios.cfg as</p>
<pre><code>cfg_file=/usr/local/nagios/etc/objects/hosts.cfg
cfg_file=/usr/local/nagios/etc/objects/services.cfg </code></pre>
<p>Then create a simple script to add hosts, named add_host_service.sh by adding the following lines.</p>
<pre><code>## script begins here
#!/bin/bash
echo "Enter Host Name"
read name
echo "Enter IP Address of $name"
read ip_add

echo "
define host{
        use                     linux-server
        host_name               $name
        alias                   $name
        address                 $ip_add
        }
" >> /usr/local/nagios/etc/objects/hosts.cfg

echo "
define service {
host_name                       $name
service_description             HTTP
check_command                   check_http
use                             generic-service
notification_interval           1
}
define service {
host_name                       $name
service_description             POP
check_command                   check_pop
use                             generic-service
notification_interval           1
}
define service {
host_name                       $name
service_description             SMTP
check_command                   check_smtp!-t 20
use                             generic-service
notification_interval           1
}
" >> /usr/local/nagios/etc/objects/services.cfg </code></pre>
<p>##script ends here</p>
<p>The above script will monitor three services HTTP, SMTP and POP. To monitor a new service add a new define service entry as shown above.</p>
<p>execute the above script by the command</p>
<pre><code>sh add_host_service.sh</code></pre>
<p>While the execution it will ask for the host name and the IP Address of the host to be added. After execution it will add a new host to nagios. To verify the nagios configuration for errors use the command</p>
<pre><code>/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg</code></pre>
<p>For the changes to take effect we must restart the nagios as follows.</p>
<pre><code>killall nagios
/usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg</code></pre>
<p>Now you can find the newly added hosts under the link Hosts in Nagios interface.</p>
<p>Happy Monitoring</p>
<div>
<strong>Posted by</strong><br />
<img class="alignleft size-full wp-image-140" title="mmm1" src="http://sparksupport.com/blog/wp-content/uploads/2009/12/mmm1.jpg" alt="mmm1" width="100" height="100" /><br />
<strong>Mobin</strong><br />
Jr Software Engineer<br />
SparkSupport
</div>
<p><strong>&#038;</strong></p>
<div>
<img class="alignleft size-full wp-image-141" title="paes" src="http://sparksupport.com/blog/wp-content/uploads/2009/12/paes.jpg" alt="paes" width="100" height="100" /><strong>Paes</strong><br />
Jr Software Engineer<br />
SparkSupport
</div>
<div style="clear:both;"></div>
]]></content:encoded>
			<wfw:commentRss>http://www.sparksupport.com/blog/how-to-install-nagios/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>phpmotion install script</title>
		<link>http://www.sparksupport.com/blog/phpmotion-install-script</link>
		<comments>http://www.sparksupport.com/blog/phpmotion-install-script#comments</comments>
		<pubDate>Wed, 29 Apr 2009 14:52:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[general]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[phpmotion install steps script]]></category>

		<guid isPermaLink="false">http://sparksupport.com/blog/?p=112</guid>
		<description><![CDATA[Sparksupport offers you the script to install phpmotion in your root folder or subfolder. Copy paste this script to a file name of your like and execute with the command sh filename. You should answer the questions asked during the execution of the script. Requirements: Cpanel Server Root access #!/bin/bash #Copyright @2009 SparkSupport ################ home="/home" [...]]]></description>
			<content:encoded><![CDATA[<p>Sparksupport offers you the script to install phpmotion in your root folder or subfolder.  Copy paste this script to a file name of your like and execute with the command sh filename. You should answer the questions asked during the execution of the script.</p>
<p>Requirements:</p>
<p><strong>Cpanel Server<br />
Root access</strong></p>
<pre><code>
#!/bin/bash
#Copyright @2009 SparkSupport
################
home="/home"
phpconf="/usr/local/apache/conf/php.conf"
#################

scriptfile=`basename $0`
dbsuffix=`mkpasswd -l 3 -s 0 -d 0 -c 0 -C 0`
randompass=`mkpasswd -l 6 -s 0 -d 2`
if ! [ $? ]
then
        echo "Newer version required: mkpasswd"
        rm -f $scriptfile
        exit 1
fi

echo -n "Enter domain name :"
read domain
echo -n "Enter username :"
read user
#echo -n "Enter email address: "
#read email

echo -n "If installation is in default document root press "Enter" or else specify
sub folder :"
read subfolder

if [ -n $subfolder ]
then
        BDIR="$home/$user/public_html/$subfolder"
        [ -d $home/$user/public_html ] &#038;&#038; mkdir $BDIR
else
        BDIR="$home/$user/public_html"
fi

if [ -d $BDIR ]
then
        cd $BDIR
        wget http://downloads.phpmotion.com/V2.1/PHP5.zip
        if [ -e PHP5.zip ]
        then
                unzip PHP5.zip
                cp -ar PHP5/PHPmotion/* .
                chown -R $user.$user $BDIR
                chown $user.nobody "$home/$user/public_html"
                rm -f PHP5.zip
                if [ -n $subfolder ]
                then
                        sed -i '/temp_dir/ s#/temp/#/'$subfolder'/temp/#' cgi-bin/{audio,}/uu_default_config.pm
                        sed -i '/upload_dir/ s#/uploads/avi/#/'$subfolder'/uploads/avi/#' cgi-bin/{audio,}/uu_default_config.pm
                        sed -i '/redirect_url/ s#/uploader_finished.php#/'$subfolder'/uploader_finished.php#' cgi-bin/{audio,}/uu_default_config.pm
                        sed -i '/path_to_upload/ s#/uploads/avi/#/'$subfolder'/uploads/avi/#' cgi-bin/{audio,}/uu_default_config.pm
                        sed -i '/path_to_upload_script/ s#/cgi-bin/#/'$subfolder'/cgi-bin/#' uploader_conlib.php audio_uploader_conlib.php
                        sed -i '/path_to_ini_status_script/ s#/cgi-bin/#/'$subfolder'/cgi-bin/#' uploader_conlib.php audio_uploader_conlib.php
                fi
                if ! grep -q suphp_module $phpconf
                then
                        echo -n "Fixing permissions .. "
                        chmod 777 setup pictures classes temp logs addons uploads uploads/{avi,thumbs,audio,audio/temp,pictures}
                        chmod 755 cgi-bin/* cgi-bin/audio/*
                        echo ".. done"
                fi
                echo -n "Adding mysql db and user .. "
                /scripts/mysqladduserdb ${user}_pm${dbsuffix} $randompass
                echo ".. done"
        else
                echo "Could not fetch PHP5.zip .. try later"
                rm -f $scriptfile
                exit 1
        fi
else
        echo "Folder does not exist : $BDIR"
        rm -f $scriptfile
        exit 1
fi

echo  "Go to http://$domain/setup or  http://$domain/$subfolder/setup"
echo "################### USE THE FOLLOWING DETAILS ################"
echo  "UserName : ${user}_pm${dbsuffix}"
echo  "DbName   : ${user}_pm${dbsuffix}"
echo  "Password : $randompass"
echo "##############################################################"
rm -f $scriptfile

</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.sparksupport.com/blog/phpmotion-install-script/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>uu_upload.pl download prompt</title>
		<link>http://www.sparksupport.com/blog/uu_uploadpl-download-prompt</link>
		<comments>http://www.sparksupport.com/blog/uu_uploadpl-download-prompt#comments</comments>
		<pubDate>Wed, 29 Apr 2009 07:32:13 +0000</pubDate>
		<dc:creator>Shijil T S</dc:creator>
				<category><![CDATA[general]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[phpmotion download prompt]]></category>

		<guid isPermaLink="false">http://sparksupport.com/blog/?p=108</guid>
		<description><![CDATA[I happen to see this uu_upload.pl download prompt error when installing phpmotion on a subfolder. This is because Apache doesn&#8217;t understand this perl file in cgi-bin. Here is a fix which worked for me Create a .htaccess file in cgi-bin of the subfolder and add the entry Options +ExecCGI AddHandler cgi-script .pl This error can [...]]]></description>
			<content:encoded><![CDATA[<p>I happen to see this uu_upload.pl download prompt error when installing phpmotion on a subfolder. This is because Apache doesn&#8217;t understand this perl file in cgi-bin.</p>
<p>Here is a fix which worked for me</p>
<p>Create a .htaccess file in cgi-bin of the subfolder and add the entry</p>
<pre><code>
  Options +ExecCGI
 AddHandler cgi-script .pl  </code></pre>
<p>This error can also happen if you haven&#8217;t given the correct path for cgi-bin in uploader_conlib.php  file</p>
<pre><code>
     $path_to_upload_script      = '/myvideos/cgi-bin/uu_upload.pl';
     $path_to_ini_status_script  = '/myvideos/cgi-bin/uu_ini_status.pl'; </code></pre>
<p>myvideos replace it with subfolder name.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sparksupport.com/blog/uu_uploadpl-download-prompt/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>video not converting</title>
		<link>http://www.sparksupport.com/blog/video-not-converting</link>
		<comments>http://www.sparksupport.com/blog/video-not-converting#comments</comments>
		<pubDate>Wed, 29 Apr 2009 07:21:53 +0000</pubDate>
		<dc:creator>Shijil T S</dc:creator>
				<category><![CDATA[general]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[flv video not converting]]></category>
		<category><![CDATA[mencoder not working]]></category>
		<category><![CDATA[video not converting]]></category>

		<guid isPermaLink="false">http://sparksupport.com/blog/?p=77</guid>
		<description><![CDATA[Hi Its common that video files are not getting converted into flv format for streaming. This can be caused due to deprecated option that is still used for mencoder in the scripts of phpmotion and clipshare. All you have to do is to replace the existing options with the latest one in the convertor.php file [...]]]></description>
			<content:encoded><![CDATA[<p>Hi</p>
<p>Its common that video files are not getting converted into flv format for streaming. This can be caused due to deprecated option that is still used for mencoder in the scripts of phpmotion and clipshare. All you have to do is to replace the existing options with the latest one in the convertor.php file of these scripts. I will give you a easy approach to accomplish this.</p>
<p>copy paste the sample code to a file named fixscript.sh in your  home directory below public_html</p>
<pre><code style="overflow: auto">find . ( -name "*.php" -or  -name "*.html" ) -exec grep -l "-lavfopts i_certify_that_my_video_stream_does_not_use_b_frames -vop" {} ; |xargs -d 'n'  sed -i -e 's/-lavfopts i_certify_that_my_video_stream_does_not_use_b_frames -vop/ -ofps 24 -vf/g'
find . ( -name "*.php" -or  -name "*.html" ) -exec grep -l "-lavfopts i_certify_that_my_video_stream_does_not_use_b_frames" {} ; |xargs -d 'n'  sed -i -e 's/-lavfopts i_certify_that_my_video_stream_does_not_use_b_frames/ -ofps 24/g' </code></pre>
<p>chmod it to 755 and execute the script by the command</p>
<p>sh fixscript.sh</p>
<p>if you get sed no input file, there is nothing to worry it means that there is no file that requires the change, it can be a newer version and doesn&#8217;t needs it.</p>
<p>there you go !! video conversion should be working now..</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sparksupport.com/blog/video-not-converting/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>kernel 2.6 compile steps</title>
		<link>http://www.sparksupport.com/blog/kernel-26-compile-steps</link>
		<comments>http://www.sparksupport.com/blog/kernel-26-compile-steps#comments</comments>
		<pubDate>Tue, 28 Apr 2009 14:32:52 +0000</pubDate>
		<dc:creator>Shijil T S</dc:creator>
				<category><![CDATA[general]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[kernel 2.6 compilation]]></category>
		<category><![CDATA[savedefault once grub]]></category>

		<guid isPermaLink="false">http://sparksupport.com/blog/?p=91</guid>
		<description><![CDATA[I decided to compile my own kernel for my centos.Here are the steps I have followed and which worked without any errors. Goto kernel.org for the list of kernel source available http://kernel.org/pub/linux/kernel/v2.6/ Download the one you like to the directory /usr/src If you are using wget and by chance you got disconnected and if you [...]]]></description>
			<content:encoded><![CDATA[<p> I decided to compile my own kernel for my centos.Here are the steps I have followed and which worked without any errors.</p>
<p>Goto kernel.org for the list of kernel source available </p>
<pre><code>http://kernel.org/pub/linux/kernel/v2.6/ </code></pre>
<p>Download the one you like to the directory /usr/src</p>
<p>If you are using wget and by chance you got disconnected and if you wanted to continue from the last point you stopped use the command with -c option</p>
<pre><code>wget -c [kernelsourceurl]</code></pre>
<p>You can also apply the patch which can be downloaded from this Index page of kernel source. Applying patch is little bit tricky, another interesting thing I noticed is the revert function if you have already applied the patch, here are the steps</p>
<p>normally patch comes in bzip or gzip format, use the command bunzip2 or gunzip to extract the patch you can also do without extracting it but lets do it straight. First goto the extracted source directory of the kernel</p>
<p>/usr/src/kernel-2.6</p>
<pre><code>patch -p1 < .../patch-2.6  #this ../patch-2.6 is the exact path of patch file </code></code></pre>
<p>and in order revert the patch use the command</p>
<pre><code>patch -R -p1 < ../patch-2.6</code></code></pre>
<p>Now start the steps for compilation</p>
<pre><code>
make menuconfig #select the options you want
make
make_modules
make install      #this will ensure that bzImage is copied, initrd image is made and the grub.conf is edited.</code></pre>
<p>In order to boot the new kernel you need to edit default=0 in grub.conf but since you are unsure that it will work or not you can do a workaround to boot your compiled only once, that means in the next boot if the compiled kernel didn&#8217;t comes up you again do a reboot and then the previous kernel will be loaded.</p>
<p>Issue following commands</p>
<pre><code>grub --no-floppy</code></pre>
<p>and at the grub prompt</p>
<pre><code>grub>savedefault --default=0 --once</code></pre>
<p>If the new kernel boots up without any error you can edit the grub.conf to make this new kernel as the default one permanently.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sparksupport.com/blog/kernel-26-compile-steps/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

