<?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>Sohail Riaz, Linux and Open Source Blog &#187; Linux</title>
	<atom:link href="http://www.sohailriaz.com/tag/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sohailriaz.com</link>
	<description>Sohail Riaz, Linux and Open Source Blog</description>
	<lastBuildDate>Sat, 17 Jul 2010 07:38:36 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>HowTo Add Multiple Bonding Interface</title>
		<link>http://www.sohailriaz.com/howto-add-multiple-bonding-interface/</link>
		<comments>http://www.sohailriaz.com/howto-add-multiple-bonding-interface/#comments</comments>
		<pubDate>Sun, 18 Apr 2010 10:56:38 +0000</pubDate>
		<dc:creator>Sohail Riaz</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.sohailriaz.com/?p=261</guid>
		<description><![CDATA[<a href="http://www.sohailriaz.com/howto-add-multiple-bonding-interface/"><img src=""  alt="" title="" /></a>
In this howto i will describe how to add multiple bonding interface (teaming multiple ethernet interfaces) in LINUX. You can learn more about bonding from
vi /usr/share/doc/kernel-doc-2.6.18/Documentation/networking/bonding.txt
The Linux bonding driver provides a method for aggregating multiple network interfaces into a single logical &#8220;bonded&#8221; interface. The behavior of the bonded interfaces depends upon the mode; generally speaking, [...]]]></description>
			<content:encoded><![CDATA[<p>In this howto i will describe how to add multiple bonding interface (teaming multiple ethernet interfaces) in LINUX. You can learn more about bonding from</p>
<blockquote><p>vi /usr/share/doc/kernel-doc-2.6.18/Documentation/networking/bonding.txt</p></blockquote>
<p>The Linux bonding driver provides a method for aggregating multiple network interfaces into a single logical &#8220;bonded&#8221; interface. The behavior of the bonded interfaces depends upon the mode; generally speaking, modes provide either hot standby or load balancing services. Additionally, link integrity monitoring may be performed.<span id="more-261"></span></p>
<p>We have multiple bonding implementation using two or three ethernet card but with single bonding interface and it can be found on internet. Using multiple bonding interfaces are rear and all of them using different method to implement it because the documentation method isn&#8217;t working now. The document says to load multiple bonding modules for multiple bonding interfaces but using -o option within options in /etc/modprobe.conf and its not support by RHEL 5 and later releases. Therefore we will use BONDING_OPTS options in network scripts of bonding interfaces.</p>
<p>As we are implementing one of the biggest Oracle RAC implementation, we need load balancing with fault tolerance of network to access the storage without any point of failure. Therefore we are using bonding mode 2 (balance-xor), This mode provides load balancing and fault tolerance.</p>
<p>All of our servers are with 4 ethernet cards and we connect 2 ethernet interfaces (eth0 and eth1) with switch1 and 2 interfaces (eth2 and eth3) with switch2 to have multiple paths. We will create two bonding interfaces bond0 (eth0 and eth2) and bond1 (eth1, eth3). So if eth0 (from switch1) fails the bond will continue to use eth2 (from switch2) and load balance between two switches.</p>
<h3>1) Load Bonding Driver/Module</h3>
<p>We need to edit <strong>/etc/modprobe.conf</strong> to load bonding module into linux.</p>
<blockquote><p>vi /etc/modprobe.conf</p></blockquote>
<p>add following lines</p>
<blockquote><p>alias bond0 bonding<br />
alias bond1 bonding</p></blockquote>
<h3>2) Configure ethernet interfaces.</h3>
<p>As we discussed we have 4 ethernet interfaces, so we need to put right configuration to team multiple cards in it to work as bond. You need to edit/add following as it is</p>
<blockquote><p>vi /etc/sysconfig/network-scripts/ifcfg-eth0</p></blockquote>
<blockquote><p>DEVICE=eth0<br />
USERCTL=no<br />
ONBOOT=yes<br />
MASTER=bond0<br />
SLAVE=yes<br />
BOOTPROTO=none</p></blockquote>
<blockquote><p>vi /etc/sysconfig/network-scripts/ifcfg-eth1</p></blockquote>
<blockquote><p>DEVICE=eth1<br />
USERCTL=no<br />
ONBOOT=yes<br />
MASTER=bond1<br />
SLAVE=yes<br />
BOOTPROTO=none</p></blockquote>
<blockquote><p>vi /etc/sysconfig/network-scripts/ifcfg-eth2</p></blockquote>
<blockquote><p>DEVICE=eth2<br />
USERCTL=no<br />
ONBOOT=yes<br />
MASTER=bond0<br />
SLAVE=yes<br />
BOOTPROTO=none</p></blockquote>
<blockquote><p>vi /etc/sysconfig/network-scripts/ifcfg-eth3</p></blockquote>
<blockquote><p>DEVICE=eth3<br />
USERCTL=no<br />
ONBOOT=yes<br />
MASTER=bond1<br />
SLAVE=yes<br />
BOOTPROTO=none</p></blockquote>
<h3>3) Configure bonding</h3>
<p>Create bond0 and bond1 scripts under /etc/sysconfig/network-scripts same as ethernet interfaces.</p>
<blockquote><p>touch /etc/sysconfig/network-scripts/ifcfg-bond0<br />
touch /etc/sysconfig/network-scripts/ifcfg-bond1</p></blockquote>
<blockquote><p>vi /etc/sysconfig/network-scripts/ifcfg-bond0</p></blockquote>
<blockquote><p>DEVICE=bond0<br />
BOOTPROTO=none<br />
ONBOOT=yes<br />
USERCTL=no<br />
BONDING_OPTS=&#8221;max_bonds=2 miimon=100 mode=2 primary=eth0&#8243;<br />
NETMASK=255.255.255.0<br />
IPADDR=192.168.0.1</p></blockquote>
<p>Change IPADDR and NETMASK as per your environment.</p>
<blockquote><p>vi /etc/sysconfig/network-scripts/ifcfg-bond1</p></blockquote>
<blockquote><p>DEVICE=bond1<br />
BOOTPROTO=none<br />
ONBOOT=yes<br />
TYPE=Ethernet<br />
USERCTL=no<br />
BONDING_OPTS=&#8221;max_bonds=2 miimon=100 mode=2 primary=eth1&#8243;<br />
NETMASK=255.255.255.0<br />
IPADDR=192.168.0.2</p></blockquote>
<p>Change IPADDR and NETMASK as per your environment. where</p>
<p><strong>max_bonds</strong> = Specifies the number of bonding devices to create for this instance of the bonding driver</p>
<p><strong>miimon</strong> = Specifies the MII link monitoring frequency in milliseconds. This determines how often the link state of each slave is inspected for link failures.</p>
<p><strong>mode</strong> = Specifies one of the bonding policies, and we are using 2 as defined above</p>
<p><strong>primary</strong> = A string (eth0, eth2, etc) specifying which slave is the primary device.  The specified device will always be the active slave while it is available.  Only when the primary is off-line will alternate devices be used</p>
<h3>4) Test</h3>
<p>Restart network init script, it will first load bonding module and then setup bond0 and bond1 interfaces.</p>
<blockquote><p>/etc/init.d/network restart</p>
<p>/etc/init.d/network restart<br />
Shutting down interface bond0:                             [  OK  ]<br />
Shutting down interface bond1:                             [  OK  ]<br />
Shutting down loopback interface:                          [  OK  ]<br />
Bringing up loopback interface:                            [  OK  ]<br />
Bringing up interface bond0:                               [  OK  ]<br />
Bringing up interface bond1:                                [  OK  ]</p></blockquote>
<p>Check interfaces</p>
<blockquote><p>ifconfig</p>
<p>bond0     Link encap:Ethernet  HWaddr 00:24:E8:4A:F8:77<br />
inet addr:192.168.0.1  Bcast:192.168.0.255  Mask:255.255.255.0<br />
UP BROADCAST RUNNING MASTER MULTICAST  MTU:1500  Metric:1<br />
RX packets:27908 errors:0 dropped:0 overruns:0 frame:0<br />
TX packets:18422 errors:0 dropped:0 overruns:0 carrier:0<br />
collisions:0 txqueuelen:0<br />
RX bytes:23044634 (21.9 MiB)  TX bytes:2218142 (2.1 MiB)</p>
<p>bond1     Link encap:Ethernet  HWaddr 00:24:E8:4A:F8:79<br />
inet addr:192.168.0.2  Bcast:192.168.0.255  Mask:255.255.255.0<br />
UP BROADCAST RUNNING MASTER MULTICAST  MTU:1500  Metric:1<br />
RX packets:70 errors:0 dropped:0 overruns:0 frame:0<br />
TX packets:14 errors:0 dropped:0 overruns:0 carrier:0<br />
collisions:0 txqueuelen:0<br />
RX bytes:15611 (15.2 KiB)  TX bytes:3524 (3.4 KiB)</p>
<p>eth0      Link encap:Ethernet  HWaddr 00:24:E8:4A:F8:77<br />
UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1<br />
RX packets:27474 errors:0 dropped:0 overruns:0 frame:0<br />
TX packets:18422 errors:0 dropped:0 overruns:0 carrier:0<br />
collisions:0 txqueuelen:1000<br />
RX bytes:23013444 (21.9 MiB)  TX bytes:2218142 (2.1 MiB)<br />
Interrupt:106 Memory:d2000000-d2012800</p>
<p>eth1      Link encap:Ethernet  HWaddr 00:24:E8:4A:F8:79<br />
UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1<br />
RX packets:67 errors:0 dropped:0 overruns:0 frame:0<br />
TX packets:14 errors:0 dropped:0 overruns:0 carrier:0<br />
collisions:0 txqueuelen:1000<br />
RX bytes:15419 (15.0 KiB)  TX bytes:3524 (3.4 KiB)<br />
Interrupt:114 Memory:d4000000-d4012800</p>
<p>eth2      Link encap:Ethernet  HWaddr 00:24:E8:4A:F8:77<br />
UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1<br />
RX packets:434 errors:0 dropped:0 overruns:0 frame:0<br />
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0<br />
collisions:0 txqueuelen:1000<br />
RX bytes:31190 (30.4 KiB)  TX bytes:0 (0.0 b)<br />
Interrupt:122 Memory:d6000000-d6012800</p>
<p>eth3      Link encap:Ethernet  HWaddr 00:24:E8:4A:F8:79<br />
UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1<br />
RX packets:3 errors:0 dropped:0 overruns:0 frame:0<br />
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0<br />
collisions:0 txqueuelen:1000<br />
RX bytes:192 (192.0 b)  TX bytes:0 (0.0 b)<br />
Interrupt:130 Memory:d8000000-d8012800</p></blockquote>
<p>Verify bonding actually works</p>
<blockquote><p>cat /proc/net/bonding/bond0<br />
Ethernet Channel Bonding Driver: v3.2.4 (January 28, 2008)</p>
<p>Bonding Mode: fault-tolerance (active-backup)<br />
Primary Slave: eth0<br />
Currently Active Slave: eth0<br />
MII Status: up<br />
MII Polling Interval (ms): 100<br />
Up Delay (ms): 0<br />
Down Delay (ms): 0</p>
<p>Slave Interface: eth0<br />
MII Status: up<br />
Link Failure Count: 0<br />
Permanent HW addr: 00:24:e8:4a:f5:cc</p>
<p>Slave Interface: eth2<br />
MII Status: up<br />
Link Failure Count: 0<br />
Permanent HW addr: 00:24:e8:4a:f5:d0</p></blockquote>
<blockquote><p>cat /proc/net/bonding/bond1<br />
Ethernet Channel Bonding Driver: v3.2.4 (January 28, 2008)</p>
<p>Bonding Mode: fault-tolerance (active-backup)<br />
Primary Slave: eth1<br />
Currently Active Slave: eth1<br />
MII Status: up<br />
MII Polling Interval (ms): 100<br />
Up Delay (ms): 0<br />
Down Delay (ms): 0</p>
<p>Slave Interface: eth1<br />
MII Status: up<br />
Link Failure Count: 0<br />
Permanent HW addr: 00:24:e8:4a:f5:ce</p>
<p>Slave Interface: eth3<br />
MII Status: up<br />
Link Failure Count: 0<br />
Permanent HW addr: 00:24:e8:4a:f5:d2</p></blockquote>
<p>If you have any question please use comments.</p>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 1457px; width: 1px; height: 1px; overflow: hidden;">
<p><!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:TrackMoves /> <w:TrackFormatting /> <w:PunctuationKerning /> <w:ValidateAgainstSchemas /> <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid> <w:IgnoreMixedContent>false</w:IgnoreMixedContent> <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText> <w:DoNotPromoteQF /> <w:LidThemeOther>EN-US</w:LidThemeOther> <w:LidThemeAsian>X-NONE</w:LidThemeAsian> <w:LidThemeComplexScript>AR-SA</w:LidThemeComplexScript> <w:Compatibility> <w:BreakWrappedTables /> <w:SnapToGridInCell /> <w:WrapTextWithPunct /> <w:UseAsianBreakRules /> <w:DontGrowAutofit /> <w:SplitPgBreakAndParaMark /> <w:DontVertAlignCellWithSp /> <w:DontBreakConstrainedForcedTables /> <w:DontVertAlignInTxbx /> <w:Word11KerningPairs /> <w:CachedColBalance /> </w:Compatibility> <w:DoNotOptimizeForBrowser /> <m:mathPr> <m:mathFont m:val="Cambria Math" /> <m:brkBin m:val="before" /> <m:brkBinSub m:val="&#45;-" /> <m:smallFrac m:val="off" /> <m:dispDef /> <m:lMargin m:val="0" /> <m:rMargin m:val="0" /> <m:defJc m:val="centerGroup" /> <m:wrapIndent m:val="1440" /> <m:intLim m:val="subSup" /> <m:naryLim m:val="undOvr" /> </m:mathPr></w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true"   DefSemiHidden="true" DefQFormat="false" DefPriority="99"   LatentStyleCount="267"> <w:LsdException Locked="false" Priority="0" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Normal" /> <w:LsdException Locked="false" Priority="9" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="heading 1" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9" /> <w:LsdException Locked="false" Priority="39" Name="toc 1" /> <w:LsdException Locked="false" Priority="39" Name="toc 2" /> <w:LsdException Locked="false" Priority="39" Name="toc 3" /> <w:LsdException Locked="false" Priority="39" Name="toc 4" /> <w:LsdException Locked="false" Priority="39" Name="toc 5" /> <w:LsdException Locked="false" Priority="39" Name="toc 6" /> <w:LsdException Locked="false" Priority="39" Name="toc 7" /> <w:LsdException Locked="false" Priority="39" Name="toc 8" /> <w:LsdException Locked="false" Priority="39" Name="toc 9" /> <w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption" /> <w:LsdException Locked="false" Priority="10" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Title" /> <w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font" /> <w:LsdException Locked="false" Priority="11" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Subtitle" /> <w:LsdException Locked="false" Priority="22" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Strong" /> <w:LsdException Locked="false" Priority="20" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Emphasis" /> <w:LsdException Locked="false" Priority="59" SemiHidden="false"    UnhideWhenUsed="false" Name="Table Grid" /> <w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text" /> <w:LsdException Locked="false" Priority="1" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="No Spacing" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading Accent 1" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List Accent 1" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid Accent 1" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1 Accent 1" /> <w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision" /> <w:LsdException Locked="false" Priority="34" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="List Paragraph" /> <w:LsdException Locked="false" Priority="29" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Quote" /> <w:LsdException Locked="false" Priority="30" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Intense Quote" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2 Accent 1" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List Accent 1" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading Accent 1" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List Accent 1" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid Accent 1" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading Accent 2" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List Accent 2" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid Accent 2" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1 Accent 2" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2 Accent 2" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List Accent 2" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading Accent 2" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List Accent 2" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid Accent 2" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading Accent 3" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List Accent 3" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid Accent 3" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1 Accent 3" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2 Accent 3" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List Accent 3" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading Accent 3" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List Accent 3" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid Accent 3" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading Accent 4" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List Accent 4" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid Accent 4" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1 Accent 4" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2 Accent 4" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List Accent 4" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading Accent 4" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List Accent 4" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid Accent 4" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading Accent 5" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List Accent 5" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid Accent 5" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1 Accent 5" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2 Accent 5" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List Accent 5" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading Accent 5" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List Accent 5" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid Accent 5" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading Accent 6" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List Accent 6" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid Accent 6" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1 Accent 6" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2 Accent 6" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List Accent 6" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading Accent 6" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List Accent 6" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid Accent 6" /> <w:LsdException Locked="false" Priority="19" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis" /> <w:LsdException Locked="false" Priority="21" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis" /> <w:LsdException Locked="false" Priority="31" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference" /> <w:LsdException Locked="false" Priority="32" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Intense Reference" /> <w:LsdException Locked="false" Priority="33" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Book Title" /> <w:LsdException Locked="false" Priority="37" Name="Bibliography" /> <w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading" /> </w:LatentStyles> </xml><![endif]--><!--  /* Font Definitions */  @font-face 	{font-family:"Cambria Math"; 	panose-1:2 4 5 3 5 4 6 3 2 4; 	mso-font-charset:1; 	mso-generic-font-family:roman; 	mso-font-format:other; 	mso-font-pitch:variable; 	mso-font-signature:0 0 0 0 0 0;} @font-face 	{font-family:Calibri; 	panose-1:2 15 5 2 2 2 4 3 2 4; 	mso-font-charset:0; 	mso-generic-font-family:swiss; 	mso-font-pitch:variable; 	mso-font-signature:-1610611985 1073750139 0 0 159 0;} @font-face 	{font-family:Consolas; 	panose-1:2 11 6 9 2 2 4 3 2 4; 	mso-font-charset:0; 	mso-generic-font-family:modern; 	mso-font-pitch:fixed; 	mso-font-signature:-1610611985 1073750091 0 0 159 0;}  /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal 	{mso-style-unhide:no; 	mso-style-qformat:yes; 	mso-style-parent:""; 	margin:0in; 	margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:11.0pt; 	font-family:"Calibri","sans-serif"; 	mso-ascii-font-family:Calibri; 	mso-ascii-theme-font:minor-latin; 	mso-fareast-font-family:Calibri; 	mso-fareast-theme-font:minor-latin; 	mso-hansi-font-family:Calibri; 	mso-hansi-theme-font:minor-latin; 	mso-bidi-font-family:Arial; 	mso-bidi-theme-font:minor-bidi;} p.MsoPlainText, li.MsoPlainText, div.MsoPlainText 	{mso-style-noshow:yes; 	mso-style-priority:99; 	mso-style-link:"Plain Text Char"; 	margin:0in; 	margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:10.5pt; 	font-family:Consolas; 	mso-fareast-font-family:Calibri; 	mso-fareast-theme-font:minor-latin; 	mso-bidi-font-family:Arial; 	mso-bidi-theme-font:minor-bidi;} span.PlainTextChar 	{mso-style-name:"Plain Text Char"; 	mso-style-noshow:yes; 	mso-style-priority:99; 	mso-style-unhide:no; 	mso-style-locked:yes; 	mso-style-link:"Plain Text"; 	mso-ansi-font-size:10.5pt; 	mso-bidi-font-size:10.5pt; 	font-family:Consolas; 	mso-ascii-font-family:Consolas; 	mso-hansi-font-family:Consolas;} .MsoChpDefault 	{mso-style-type:export-only; 	mso-default-props:yes; 	mso-ascii-font-family:Calibri; 	mso-ascii-theme-font:minor-latin; 	mso-fareast-font-family:Calibri; 	mso-fareast-theme-font:minor-latin; 	mso-hansi-font-family:Calibri; 	mso-hansi-theme-font:minor-latin; 	mso-bidi-font-family:Arial; 	mso-bidi-theme-font:minor-bidi;} @page Section1 	{size:8.5in 11.0in; 	margin:1.0in 1.0in 1.0in 1.0in; 	mso-header-margin:.5in; 	mso-footer-margin:.5in; 	mso-paper-source:0;} div.Section1 	{page:Section1;} --><!--[if gte mso 10]> <mce:style><!   /* Style Definitions */  table.MsoNormalTable 	{mso-style-name:"Table Normal"; 	mso-tstyle-rowband-size:0; 	mso-tstyle-colband-size:0; 	mso-style-noshow:yes; 	mso-style-priority:99; 	mso-style-qformat:yes; 	mso-style-parent:""; 	mso-padding-alt:0in 5.4pt 0in 5.4pt; 	mso-para-margin:0in; 	mso-para-margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:11.0pt; 	font-family:"Calibri","sans-serif"; 	mso-ascii-font-family:Calibri; 	mso-ascii-theme-font:minor-latin; 	mso-fareast-font-family:"Times New Roman"; 	mso-fareast-theme-font:minor-fareast; 	mso-hansi-font-family:Calibri; 	mso-hansi-theme-font:minor-latin;} --> <!--[endif]--></p>
<p class="MsoPlainText">BONDING_OPTS=&#8221;max_bonds=2 miimon=100 mode=1 primary=eth0&#8243;</p>
</div>
<img src="http://www.sohailriaz.com/wp-content/plugins/pixelstats/trackingpixel.php?post_id=261&amp;ts=1284150614" style="display:none;" alt="pixelstats trackingpixel"/>]]></content:encoded>
			<wfw:commentRss>http://www.sohailriaz.com/howto-add-multiple-bonding-interface/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To Install memcached with memcache PHP Extension on CentOS 5.x</title>
		<link>http://www.sohailriaz.com/how-to-install-memcached-with-memcache-php-extension-on-centos-5x/</link>
		<comments>http://www.sohailriaz.com/how-to-install-memcached-with-memcache-php-extension-on-centos-5x/#comments</comments>
		<pubDate>Sun, 23 Aug 2009 09:22:18 +0000</pubDate>
		<dc:creator>Sohail Riaz</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Add new tag]]></category>

		<guid isPermaLink="false">http://www.sohailriaz.com/?p=209</guid>
		<description><![CDATA[<a href="http://www.sohailriaz.com/how-to-install-memcached-with-memcache-php-extension-on-centos-5x/"><img src=""  alt="" title="" /></a>
In this how to i will describe how to install memcached on your server with PHP Extension.  memcached is a high-performance, distributed memory object caching system, generic in nature, but intended for use in speeding up dynamic web applications by alleviating database load.  My server is running CentOS 5.3 with CPanel.
1) Install memcached.
Enable rpmforge [...]]]></description>
			<content:encoded><![CDATA[<p>In this how to i will describe how to install memcached on your server with PHP Extension.  <a href="http://www.danga.com/memcached/" target="_blank"><strong>memcached </strong></a>is a high-performance, distributed memory object caching system, generic in nature, but intended for use in speeding up dynamic web applications by alleviating database load.  My server is running CentOS 5.3 with CPanel.<span id="more-209"></span></p>
<h3>1) Install memcached.</h3>
<p>Enable rpmforge respository to install latest memcached rpm using yum.</p>
<p>For i386 / i686</p>
<blockquote><p>rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm</p></blockquote>
<p>For x86_64</p>
<blockquote><p>rpm -Uhv http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS//rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm</p></blockquote>
<p>Use yum to install memcached</p>
<blockquote><p>yum -y install memcached</p></blockquote>
<p>As soon as memcached installation completed, edit options for memcached in /etc/sysconfig/memcached to meet your need.</p>
<blockquote><p>vi /etc/sysconfig/memcached</p></blockquote>
<blockquote><p>PORT=&#8221;11211&#8243;                #define on which port to urn<br />
USER=&#8221;nobody&#8221;           #same as apache user<br />
MAXCONN=&#8221;1024&#8243;     #maximum number of connections allowed<br />
CACHESIZE=&#8221;64&#8243;         #memory used for caching<br />
OPTIONS=&#8221;"                   #use for any custom options</p></blockquote>
<p>Save the file. All options can be seen by using following command</p>
<blockquote><p>memcached -h</p></blockquote>
<p>Start memcached</p>
<blockquote><p>/etc/init.d/memcached start<br />
Starting Distributed memory caching (memcached):           [  OK  ]</p></blockquote>
<p>to check the running status of memcached</p>
<blockquote><p>/etc/init.d/memcached status<br />
memcached (pid 6475) is running&#8230;</p></blockquote>
<p>and</p>
<blockquote><p>netstat -anp | grep 11211<br />
tcp  0  0 :::11211    :::*  LISTEN      6475/memcached<br />
udp 0  0 0.0.0.0:11211  0.0.0.0:* 6475/memcached</p></blockquote>
<p>2) Install PHP Extension.</p>
<p>Download and install latest stable memcache version from PECL.</p>
<blockquote><p>cd /usr/src<br />
wget http://pecl.php.net/get/memcache-2.2.5.tgz<br />
tar zxvf memcache-2.2.5.tgz<br />
cd memcache-2.2.5<br />
phpize<br />
./configure<br />
make<br />
make install</p></blockquote>
<p>memcache.so will be install in php modules directory, now enable memcache.so extension in php.ini</p>
<p>To find out your php.ini location, execute following command</p>
<blockquote><p>php -i | grep php.ini<br />
Configuration File (php.ini) Path =&gt; /usr/local/lib<br />
Loaded Configuration File =&gt; /usr/local/lib/php.ini</p></blockquote>
<blockquote><p>vi /usr/local/lib/php.ini</p></blockquote>
<blockquote><p>extension = &#8220;memcache.so&#8221;</p></blockquote>
<p>save the file and restart httpd server.</p>
<blockquote><p>/etc/init.d/httpd restart</p></blockquote>
<p>To check is memcache extension loaded in php, execute following command.</p>
<blockquote><p>php -i | grep memcache<br />
memcache<br />
memcache support =&gt; enabled<br />
memcache.allow_failover =&gt; 1 =&gt; 1<br />
memcache.chunk_size =&gt; 8192 =&gt; 8192<br />
memcache.default_port =&gt; 11211 =&gt; 11211<br />
memcache.default_timeout_ms =&gt; 1000 =&gt; 1000<br />
memcache.hash_function =&gt; crc32 =&gt; crc32<br />
memcache.hash_strategy =&gt; standard =&gt; standard<br />
memcache.max_failover_attempts =&gt; 20 =&gt; 20<br />
Registered save handlers =&gt; files user sqlite memcache<br />
PWD =&gt; /usr/src/memcache-2.2.5<br />
_SERVER["PWD"] =&gt; /usr/src/memcache-2.2.5<br />
_ENV["PWD"] =&gt; /usr/src/memcache-2.2.5</p></blockquote>
<p>This information can also be seen using phpinfo().</p>
<p>If you have question please comment.</p>
<img src="http://www.sohailriaz.com/wp-content/plugins/pixelstats/trackingpixel.php?post_id=209&amp;ts=1284150614" style="display:none;" alt="pixelstats trackingpixel"/>]]></content:encoded>
			<wfw:commentRss>http://www.sohailriaz.com/how-to-install-memcached-with-memcache-php-extension-on-centos-5x/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>How To Install RED5 Server on Centos 5.3</title>
		<link>http://www.sohailriaz.com/how-to-install-red5-server-on-centos-53/</link>
		<comments>http://www.sohailriaz.com/how-to-install-red5-server-on-centos-53/#comments</comments>
		<pubDate>Sun, 16 Aug 2009 20:23:09 +0000</pubDate>
		<dc:creator>Sohail Riaz</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[RED5]]></category>

		<guid isPermaLink="false">http://www.sohailriaz.com/?p=180</guid>
		<description><![CDATA[<a href="http://www.sohailriaz.com/how-to-install-red5-server-on-centos-53/"><img src="http://www.sohailriaz.com/wp-content/uploads/2009/08/red5_1-150x150.jpg" title="" alt="" /></a>
In this how to i will describe how to install RED5 server on Centos 5.3. This how to can be used to install RED5 server on Centos 4 and Fedora 8 &#8211; 11 as well. RED5 is open source flash server written in java supports streaming audio/video, recording client streams, shared objects, live stream publishing [...]]]></description>
			<content:encoded><![CDATA[<p>In this how to i will describe how to install RED5 server on Centos 5.3. This how to can be used to install RED5 server on Centos 4 and Fedora 8 &#8211; 11 as well. RED5 is open source flash server written in java supports streaming audio/video, recording client streams, shared objects, live stream publishing etc.<span id="more-180"></span></p>
<h3>1) Download and Install Java</h3>
<p>RED5 server depends on Java. CentOS 5.3 comes with OpenJDK 1.6 and install it using yum.</p>
<blockquote><p>yum -y install java-1.6.0-openjdk java-1.6.0-openjdk-devel</p></blockquote>
<h3>2) Download and Install Ant (Apache Project)</h3>
<p>Ant will need to compile RED5 server code. Ant comes in binary form, so just download and install it in /usr/local directory.</p>
<blockquote><p>cd /usr/src<br />
wget http://mirrors.kahuki.com/apache/ant/binaries/apache-ant-1.8.0-bin.tar.bz2<br />
tar jxvf apache-ant-1.8.0-bin.tar.bz2<br />
mv apache-ant-1.8.0 /usr/local/ant</p></blockquote>
<h3>3) Export Variables for Ant and Java</h3>
<blockquote><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></blockquote>
<p>Also export these variables in /etc/bashrc to become available for every user login or for any terminal opens.</p>
<blockquote><p>echo &#8216;export ANT_HOME=/usr/local/ant&#8217; &gt;&gt; /etc/bashrc<br />
echo &#8216;export JAVA_HOME=/usr/lib/jvm/java&#8217; &gt;&gt; /etc/bashrc<br />
echo &#8216;export PATH=$PATH:/usr/local/ant/bin&#8217; &gt;&gt; /etc/bashrc<br />
echo &#8216;export CLASSPATH=.:$JAVA_HOME/lib/classes.zip&#8217; &gt;&gt; /etc/bashrc</p></blockquote>
<h3>4) Download and Install RED5 Server</h3>
<p>Here the latest version available for RED5 is 0.7 on site but download from google code using svn as the tarball of 0.7 on site is missing some of the files.</p>
<blockquote><p>cd /usr/src<br />
svn checkout http://red5.googlecode.com/svn/java/server/trunk/ red5<br />
mv red5 /usr/local/<br />
cd /usr/local/red5<br />
ant prepare<br />
ant dist</p></blockquote>
<p>you will see a ton of lines, but you should get at last</p>
<p><strong>BUILD SUCCESSFUL</strong></p>
<p>that&#8217;s mean its install and now copy the conf directory from dist/ and test the red5 installation.</p>
<blockquote><p>cp -r dist/conf .<br />
./red5.sh</p></blockquote>
<p>If it shows Installer service created in the last then everything is fine here, press ctrl+c and move to next step to create init script.</p>
<h3>5) Init Script</h3>
<p>Now we will create init script for red5 to start, stop and restart easily.</p>
<blockquote><p>vi /etc/init.d/red5</p></blockquote>
<p>download <a href="http://www.sohailriaz.com/downloads/red5.txt" target="_blank">http://www.sohailriaz.com/downloads/red5.txt</a> and copy / paste code in it. The init script code also be viewed below.</p>
<blockquote><p>#!/bin/sh<br />
# For RedHat and cousins:<br />
# chkconfig: 2345 85 85<br />
# description: Red5 flash streaming server<br />
# processname: red5</p>
<p>PROG=red5<br />
RED5_HOME=/usr/local/red5<br />
DAEMON=$RED5_HOME/$PROG.sh<br />
PIDFILE=/var/run/$PROG.pid</p>
<p># Source function library<br />
. /etc/rc.d/init.d/functions</p>
<p>[ -r /etc/sysconfig/red5 ] &amp;&amp; . /etc/sysconfig/red5</p>
<p>RETVAL=0</p>
<p>case &#8220;$1&#8243; in<br />
start)<br />
echo -n $&#8221;Starting $PROG: &#8221;<br />
cd $RED5_HOME<br />
$DAEMON &gt;/dev/null 2&gt;/dev/null &amp;<br />
RETVAL=$?<br />
if [ $RETVAL -eq 0 ]; then<br />
echo $! &gt; $PIDFILE<br />
touch /var/lock/subsys/$PROG</p>
<p>fi<br />
[ $RETVAL -eq 0 ] &amp;&amp; success $&#8221;$PROG startup&#8221; || failure $&#8221;$PROG startup&#8221;<br />
echo<br />
;;<br />
stop)<br />
echo -n $&#8221;Shutting down $PROG: &#8221;<br />
killproc -p $PIDFILE<br />
RETVAL=$?<br />
echo<br />
[ $RETVAL -eq 0 ] &amp;&amp; rm -f /var/lock/subsys/$PROG<br />
;;<br />
restart)<br />
$0 stop<br />
$0 start<br />
;;<br />
status)<br />
status $PROG -p $PIDFILE<br />
RETVAL=$?<br />
;;<br />
*)<br />
echo $&#8221;Usage: $0 {start|stop|restart|status}&#8221;<br />
RETVAL=1<br />
esac</p>
<p>exit $RETVAL</p></blockquote>
<p>Now start the service</p>
<blockquote><p>/etc/init.d/red5 start</p></blockquote>
<p>check status</p>
<blockquote><p>/etc/init.d/red5 status<br />
red5 (pid  XXXXX) is running&#8230;</p></blockquote>
<p>again you can do stop, restart.</p>
<h3>6) Test</h3>
<p>Now test the RED5 installation by opening following URL in browser</p>
<p>http://yourip:5080/</p>
<p>you will see red5 page like this</p>
<p style="text-align: center;"><img class="size-full wp-image-185 aligncenter" title="red5_11" src="http://www.sohailriaz.com/wp-content/uploads/2009/08/red5_11.jpeg" alt="red5_11" width="450" height="269" /></p>
<p>and demos can be find here.</p>
<p>http://yourip:5080/demos/</p>
<p style="text-align: center;"><img class="size-full wp-image-191 aligncenter" title="red5_21" src="http://www.sohailriaz.com/wp-content/uploads/2009/08/red5_21.jpeg" alt="red5_21" width="400" height="239" /></p>
<p>You can use simple port tester tool that determines which ports the Flash Player is able to connect through to the Red5 server. Put your server address or IP in HOST when using port tester. You should get SUCCESS on RTMP or port 1935. If not please check your firewall.</p>
<p>http://yourip:5080/demos/port_tester.html</p>
<p style="text-align: center;"><img class="size-full wp-image-192 aligncenter" title="red5_3" src="http://www.sohailriaz.com/wp-content/uploads/2009/08/red5_3.jpeg" alt="red5_3" width="400" height="239" /></p>
<h3>7) ISSUE</h3>
<p>When you run ./red5.sh, it will show you <strong>Installer service created</strong>. Thats mean everything runs fine and red5 server is up. But if you went to port_tester.swf using demos above or your application shows connections FAILS, this is an issue of RTMPT and RTMPTS. You can see it by running</p>
<blockquote><p>/usr/local/red5/red5.sh</p>
<p>output trancated</p>
<p>[INFO] [main] org.red5.server.tomcat.TomcatLoader &#8211; RTMPT server bean was not found<br />
[INFO] [main] org.red5.server.tomcat.TomcatLoader &#8211; RTMPS server bean was not found</p>
<p>output truncated</p></blockquote>
<p>If you see this you have to uncomment the RTMPT and RTMPTS TomcatLoader in<strong>/usr/local/red5/conf/red5-core.xml</strong></p>
<blockquote><p>vi /usr/local/red5/conf/red5-core.xml</p></blockquote>
<p>Search for a lines</p>
<blockquote><p>&lt;!&#8211; RTMPT &#8211;&gt;<br />
&lt;!&#8211;<br />
&lt;bean id=&#8221;rtmpt.server&#8221; class=&#8221;org.red5.server.net.rtmpt.TomcatRTMPTLoader&#8221; init-method=&#8221;init&#8221; lazy-init=&#8221;true&#8221;&gt;</p></blockquote>
<p>Remove the &lt;!&#8211; from start of &lt;bean and &#8211;&gt; from end of &lt;/bean&gt;</p>
<p>Same goes for RTMPS</p>
<blockquote><p>&lt;!&#8211; RTMPS &#8211;&gt;<br />
&lt;!&#8211;<br />
&lt;bean id=&#8221;rtmps.server&#8221; class=&#8221;org.red5.server.net.rtmps.TomcatRTMPSLoader&#8221; init-method=&#8221;init&#8221; lazy-init=&#8221;true&#8221;&gt;</p></blockquote>
<p>Remove the &lt;!&#8211; from start of &lt;bean and &#8211;&gt; from end of &lt;/bean&gt;</p>
<p>Restart the red5 services and connection fails problem will be fixed.</p>
<p>If you any question please use comments.</p>
<img src="http://www.sohailriaz.com/wp-content/plugins/pixelstats/trackingpixel.php?post_id=180&amp;ts=1284150614" style="display:none;" alt="pixelstats trackingpixel"/>]]></content:encoded>
			<wfw:commentRss>http://www.sohailriaz.com/how-to-install-red5-server-on-centos-53/feed/</wfw:commentRss>
		<slash:comments>258</slash:comments>
		</item>
		<item>
		<title>How To Install MyTOP &#8211; a top clone for MySQL</title>
		<link>http://www.sohailriaz.com/how-to-install-mytop-a-top-clone-for-mysql/</link>
		<comments>http://www.sohailriaz.com/how-to-install-mytop-a-top-clone-for-mysql/#comments</comments>
		<pubDate>Tue, 02 Jun 2009 08:57:54 +0000</pubDate>
		<dc:creator>Sohail Riaz</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[YUM]]></category>

		<guid isPermaLink="false">http://www.sohailriaz.com/?p=112</guid>
		<description><![CDATA[<a href="http://www.sohailriaz.com/how-to-install-mytop-a-top-clone-for-mysql/"><img src=""  alt="" title="" /></a>
In this howto i will describe how to install mytop package on CentOS 5.3. MyTOP is top command clone to monitor mysql performance including queries, threads etc. You can get source of it from here to build or you can use rpmforge repositories for pre-build rpms. The machine i used to demonstrte is in production [...]]]></description>
			<content:encoded><![CDATA[<p>In this howto i will describe how to install mytop package on CentOS 5.3. MyTOP is top command clone to monitor mysql performance including queries, threads etc. You can get source of it from <a title="MyTOP Website" href="http://jeremy.zawodny.com/mysql/mytop/" target="_blank">here</a> to build or you can use rpmforge repositories for pre-build rpms. The machine i used to demonstrte is in production and getting very high mysql access, its running on CentOS 5.3.<span id="more-112"></span></p>
<h3>1 Setting Up RPMForge Repository</h3>
<p>RPMForge repository (http://dag.wieers.com) is the biggest rpm respository for RHEL, CentOS for all versions. To enable RPMForge respository run following command. The following command directly install rpm from http://dag.wieers.com site.</p>
<blockquote><p>rpm -Uhv <a href="http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm">http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm</a></p></blockquote>
<p>This rpm will add necessary files in our repository configuration and can be viewed at <strong>/etc/yum.repos.d/rpmforge.repo</strong></p>
<h3>2 Install MyTOP</h3>
<p>Use yum to install mytop on your machine</p>
<blockquote><p>yum -y install mytop</p></blockquote>
<p>It will install mytop with all necessary pre-requisite to run mytop.</p>
<h3>3 Running MyTOP</h3>
<p>To run use</p>
<blockquote><p>mytop</p></blockquote>
<p>if you have restricted access using password then</p>
<blockquote><p>mytop -u root -p &lt;password&gt; -h localhost</p></blockquote>
<p><strong><span style="color: #ff0000;">NOTE</span></strong>: You may get following error in CentOS 5.3<br />
<strong>Error in option spec: “long|!”</strong></p>
<p>To fix this do following.</p>
<blockquote><p>chmod 755 /usr/bin/mytop<br />
vi /usr/bin/mytop</p></blockquote>
<p>Search for the line</p>
<blockquote><p>&#8220;long|!&#8221;              =&gt; \$config{long_nums},</p></blockquote>
<p>Change it to by commenting using #</p>
<blockquote><p>#&#8221;long|!&#8221;              =&gt; \$config{long_nums},</p></blockquote>
<p>Now run the command again and it will run fine and you can see mytop giving all the information about you mysql server.</p>
<blockquote><p>mytop</p></blockquote>
<img src="http://www.sohailriaz.com/wp-content/plugins/pixelstats/trackingpixel.php?post_id=112&amp;ts=1284150614" style="display:none;" alt="pixelstats trackingpixel"/>]]></content:encoded>
			<wfw:commentRss>http://www.sohailriaz.com/how-to-install-mytop-a-top-clone-for-mysql/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>How To Bind MAC with IP in SQUID</title>
		<link>http://www.sohailriaz.com/how-to-bind-mac-with-ip-in-squid/</link>
		<comments>http://www.sohailriaz.com/how-to-bind-mac-with-ip-in-squid/#comments</comments>
		<pubDate>Sat, 30 May 2009 07:35:21 +0000</pubDate>
		<dc:creator>Sohail Riaz</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[SQUID]]></category>

		<guid isPermaLink="false">http://www.sohailriaz.com/?p=103</guid>
		<description><![CDATA[<a href="http://www.sohailriaz.com/how-to-bind-mac-with-ip-in-squid/"><img src=""  alt="" title="" /></a>
In this how to i describe how to bind MAC with IP to restrict users in your network to change their IP&#8217;s to bypass filtering. To ease the setup i will create small scripts to simplify our work. Here i will not describe how to config squid and how to run it. I assume you [...]]]></description>
			<content:encoded><![CDATA[<p>In this how to i describe how to bind MAC with IP to restrict users in your network to change their IP&#8217;s to bypass filtering. To ease the setup i will create small scripts to simplify our work. Here i will not describe how to config squid and how to run it. I assume you have already configure it. <span id="more-103"></span></p>
<h3>1) Grep MAC Addresses</h3>
<p>Let suppose we have 10 machines with IPs range 192.168.0.1 &#8211; 192.168.0.10, you have to get mac address for them using following command.</p>
<p>Besure your machines are up and pingable, else you will get empty lines and you have to remove them manually.</p>
<blockquote><p>for i in `seq 1 10`; do ping -c 1 192.168.0.$i; arp -n 192.168.0.$i | grep -v Address | grep -v incomplete | awk &#8216;{print $1 &#8221; &#8220;  $3}&#8217; &gt;&gt; ip-mac.txt; done</p></blockquote>
<p>This command will get required mac address with IP in a file named ip-mac.txt</p>
<blockquote><p>cat ip-mac.txt<br />
192.168.0.1 00:1D:09:6B:3C:28<br />
192.168.0.2 00:1D:09:6A:EA:02<br />
192.168.0.3 00:1D:09:71:2C:34<br />
192.168.0.4 00:1D:09:6A:CB:85<br />
192.168.0.5 00:1D:09:6A:C3:15<br />
192.168.0.6 00:1D:09:6A:CA:8B<br />
192.168.0.7 00:1D:09:6A:CB:DA<br />
192.168.0.8 00:1D:09:6A:CC:34<br />
192.168.0.9 00:1D:09:6B:11:76<br />
192.168.0.10 00:1D:09:6B:36:6F</p></blockquote>
<h3>2) Create ACL For SQUID.</h3>
<p>I will create a small bash script to easy my work.</p>
<p>To get acl for mac</p>
<blockquote><p>i=1<br />
cat ip-mac.txt | while read a; do b=`echo $a | cut -f 2 -d &#8221; &#8220;`; echo &#8220;acl mac$i arp $b&#8221; &gt;&gt; squid-mac-filter.txt; i=`expr $i + 1`; done</p></blockquote>
<blockquote><p>cat squid-mac-filter.txt<br />
acl mac1 arp 00:1D:09:6B:3C:28<br />
acl mac2 arp 00:1D:09:6A:EA:02<br />
acl mac3 arp 00:1D:09:71:2C:34<br />
acl mac4 arp 00:1D:09:6A:CB:85<br />
acl mac5 arp 00:1D:09:6A:C3:15<br />
acl mac6 arp 00:1D:09:6A:CA:8B<br />
acl mac7 arp 00:1D:09:6A:CB:DA<br />
acl mac8 arp 00:1D:09:6A:CC:34<br />
acl mac9 arp 00:1D:09:6B:11:76<br />
acl mac10 arp 00:1D:09:6B:36:6F</p></blockquote>
<p>To get acl for ip</p>
<blockquote><p>i=1<br />
cat ip-mac.txt | while read a; do b=`echo $a | cut -f 1 -d &#8221; &#8220;`; echo &#8220;acl ip$i src $b&#8221; &gt;&gt; squid-ip-filter.txt; i=`expr $i + 1`; done</p></blockquote>
<blockquote><p>cat squid-ip-filter.txt<br />
acl ip1 arp 192.168.0.1<br />
acl ip2 arp 192.168.0.2<br />
acl ip3 arp 192.168.0.3<br />
acl ip4 arp 192.168.0.4<br />
acl ip5 arp 192.168.0.5<br />
acl ip6 arp 192.168.0.6<br />
acl ip7 arp 192.168.0.7<br />
acl ip8 arp 192.168.0.8<br />
acl ip9 arp 192.168.0.9<br />
acl ip10 arp 192.168.0.10</p></blockquote>
<p>To generate http_access allow lines, you have to get the max number of your list of IP&#8217;s and MAC&#8217;s. Here i have is 10, sure both will be the same <img src='http://www.sohailriaz.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<blockquote><p>for i in `seq 1 10`; do echo &#8220;http_access allow mac$i ip$i&#8221; &gt;&gt; http-access-squid.txt; done</p></blockquote>
<blockquote><p>cat http-access-squid.txt<br />
http_access allow mac1 ip1<br />
http_access allow mac2 ip2<br />
http_access allow mac3 ip3<br />
http_access allow mac4 ip4<br />
http_access allow mac5 ip5<br />
http_access allow mac6 ip6<br />
http_access allow mac7 ip7<br />
http_access allow mac8 ip8<br />
http_access allow mac9 ip9<br />
http_access allow mac10 ip10</p></blockquote>
<p>Now concatinate three files i.e squid-ip-filter.txt, squid-mac-filter.txt and http_access_squid.txt</p>
<blockquote><p>cat squid-mac-filter.txt squid-ip-filter.txt http-access-squid.txt &gt;&gt; acl-final.txt</p></blockquote>
<p>and copy from acl-final.txt to paste on appropriate location in squid.conf, dont forget to put http_access deny all on the last <img src='http://www.sohailriaz.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<p>To get more help on it please use comments.</p>
<img src="http://www.sohailriaz.com/wp-content/plugins/pixelstats/trackingpixel.php?post_id=103&amp;ts=1284150614" style="display:none;" alt="pixelstats trackingpixel"/>]]></content:encoded>
			<wfw:commentRss>http://www.sohailriaz.com/how-to-bind-mac-with-ip-in-squid/feed/</wfw:commentRss>
		<slash:comments>77</slash:comments>
		</item>
		<item>
		<title>How To Create RPM Using Source RPM</title>
		<link>http://www.sohailriaz.com/how-to-create-rpm-using-source-rpm/</link>
		<comments>http://www.sohailriaz.com/how-to-create-rpm-using-source-rpm/#comments</comments>
		<pubDate>Sun, 24 May 2009 08:20:26 +0000</pubDate>
		<dc:creator>Sohail Riaz</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[WGET]]></category>
		<category><![CDATA[YUM]]></category>
		<category><![CDATA[ffmpeg]]></category>
		<category><![CDATA[RPM]]></category>

		<guid isPermaLink="false">http://www.sohailriaz.com/?p=99</guid>
		<description><![CDATA[<a href="http://www.sohailriaz.com/how-to-create-rpm-using-source-rpm/"><img src=""  alt="" title="" /></a>
In this how to i will describe how to create binary rpm (installable) using source rpm i.e *.src.rpm. Source rpm is collection of source files in tar.gz, patches and spec file. Spec file defines how the source code will compile with current machine, defining depencies and generate rpm from source rpm. Usually we do this [...]]]></description>
			<content:encoded><![CDATA[<p>In this how to i will describe how to create binary rpm (installable) using source rpm i.e *.src.rpm. Source rpm is collection of source files in tar.gz, patches and spec file. Spec file defines how the source code will compile with current machine, defining depencies and generate rpm from source rpm. Usually we do this when we need to have some custom changes to be made in required software.<span id="more-99"></span></p>
<h3>1) Pre-requisite</h3>
<p>First of all you should have install rpm-devel and rpm-build rpms from your distro repository. Confirm it using following command</p>
<blockquote><p>rpm -qa | grep rpm</p>
<p>rpm-4.3.3-26<br />
rpm-devel-4.3.3-26<br />
rpm-python-4.3.3-26<br />
redhat-rpm-config-8.0.32.1-4<br />
rpmdb-CentOS-4.7-0.20080805<br />
rpm-libs-4.3.3-26<br />
rpm-build-4.3.3-26</p></blockquote>
<p>If you see required rpms in the list then you are good to go with source rpm compilation, else you have to install required rpms.</p>
<blockquote><p>yum -y install rpm-build rpm-devel</p>
<p>or</p>
<p>rpm -ivh /path/rpm-build* /path/rpm-devel*</p></blockquote>
<p>The rpm-build and rpm-devel also build following directories for source rpm compilations.</p>
<p>/usr/src/redhat/{BUILD,RPMS,SOURCES,SPECS,SRPMS}</p>
<h3>2) Compiling the source</h3>
<p>Get your source rpm which you need to compile.  Here i will get the ffmpeg source rpm from http://dag.wieers.com/rpm/packages/ffmpeg/ because i need to add libamr-nb and libamr-wb support for converting 3gp clips.</p>
<blockquote><p>wget http://dag.wieers.com/rpm/packages/ffmpeg/ffmpeg-0.4.9-0.9.20070530.rf.src.rpm</p>
<p>rpm -ivh ffmpeg-0.4.9-0.9.20070530.rf.src.rpm</p></blockquote>
<p>It will install source files tar.gz, patch files in</p>
<p>/usr/src/redhat/SOURCES</p>
<p>and spec file in</p>
<p>/usr/src/redhat/SPECS</p>
<p>I have to add &#8211;with-libamrnb and &#8211;with-libamrwb in ./configure command specified in ffmpeg.spec and you can edit whatever you are going to change/edit.</p>
<p>After editing now compile the sources and generate rpm using spec file.</p>
<blockquote><p>cd /usr/src/redhat/SPECS</p>
<p>rpmbuild -bb ffmpeg.spec</p></blockquote>
<p>The above command will apply patches if any and compile the source and generate rpm under /usr/src/redhat/RPMS sub-directories regarding to your architecture i.e</p>
<p>/usr/src/redhat/RPMS/i386 for i386,i686</p>
<p>/usr/src/redhat/RPMS/x86_64 for x86_64 etc.</p>
<p>While compiling you will see the verbose output of compilation and you should see clean compilation with notifying of generating rpm at the end.</p>
<img src="http://www.sohailriaz.com/wp-content/plugins/pixelstats/trackingpixel.php?post_id=99&amp;ts=1284150614" style="display:none;" alt="pixelstats trackingpixel"/>]]></content:encoded>
			<wfw:commentRss>http://www.sohailriaz.com/how-to-create-rpm-using-source-rpm/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>How To Install FFmpeg, Mplayer, Mencoder, FFmpeg-PHP on CentOS 5.x</title>
		<link>http://www.sohailriaz.com/how-to-install-ffmpeg-mplayer-mencoder-ffmpeg-php-on-centos-5x/</link>
		<comments>http://www.sohailriaz.com/how-to-install-ffmpeg-mplayer-mencoder-ffmpeg-php-on-centos-5x/#comments</comments>
		<pubDate>Thu, 21 May 2009 10:11:45 +0000</pubDate>
		<dc:creator>Sohail Riaz</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[ffmpeg]]></category>

		<guid isPermaLink="false">http://www.sohailriaz.com/?p=93</guid>
		<description><![CDATA[<a href="http://www.sohailriaz.com/how-to-install-ffmpeg-mplayer-mencoder-ffmpeg-php-on-centos-5x/"><img src=""  alt="" title="" /></a>
In this how to i will describe how to install ffmpeg, mplayer, mencoder, flvtool2, ffmpeg-php with all supported codecs to convert / manipulate videos easily on CentOS 5.x. If you want to run sites like youtube e.g www.indianpad.in, www.danceindiadance.in this howto will help you to install the base for your software. There are many other [...]]]></description>
			<content:encoded><![CDATA[<p>In this how to i will describe how to install ffmpeg, mplayer, mencoder, flvtool2, ffmpeg-php with all supported codecs to convert / manipulate videos easily on CentOS 5.x. If you want to run sites like youtube e.g www.indianpad.in, www.danceindiadance.in this howto will help you to install the base for your software. There are many other way to perform this but this works for me, so i want to share.<span id="more-93"></span></p>
<h3>1 Setting Up RPMForge Respository.</h3>
<p>RPMForge repository (http://dag.wieers.com) is the biggest rpm respository for RHEL, CentOS for all versions. To enable RPMForge respository run following command to install all necessary files for getting RPMForge repository. The following command directly install rpm from http://da.wieers.com site.</p>
<blockquote><p>rpm -Uhv <a href="http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm">http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm</a></p></blockquote>
<p>This rpm will add necessary files in our repository configuration and can be viewed at <strong>/etc/yum.repos.d/rpmforge.repo</strong></p>
<h3>2 Install ffmpeg, mplayer, mencoder with all supported modules.</h3>
<p>Now we have rpmforge repository, so we will use yum to install ffmpeg, mplayer, mencoder as well as all dependent software.</p>
<blockquote><p>yum -y install ffmpeg ffmpeg-devel mplayer mencoder flvtool2</p></blockquote>
<p>This command will some time to download and install all packages depends on your internet speed.</p>
<h3>3 Install FFMPEG-PHP</h3>
<p>ffmpeg-php is an extension for <a href="http://www.php.net/">PHP</a> that adds an easy to use, object-oriented API for accessing and retrieving information from video and audio files. ffmpeg-devel and php-devel is needed to compile ffmpeg-php from source code. Use following steps to install ffmpeg-php</p>
<blockquote><p>cd /usr/src<br />
wget http://garr.dl.sourceforge.net/sourceforge/ffmpeg-php/ffmpeg-php-0.6.0.tbz2<br />
tar jxvf ffmpeg-php-0.6.0.tbz2<br />
cd ffmpeg-php-0.6.0<br />
phpize<br />
./configure<br />
make<br />
make install</p></blockquote>
<p>It will copy the ffmpeg.so module in php default module location. Now you have to edit php.ini file to enable ffmpeg-php support in it by using ffmpeg.so module.</p>
<blockquote><p>vi /etc/php.ini</p></blockquote>
<p>and append following line</p>
<blockquote><p>extension=ffmpeg.so</p></blockquote>
<p>Restart apache service to take effect of php.ini</p>
<blockquote><p>/etc/init.d/httpd restart</p></blockquote>
<p>Run following command to ffmpeg module listing in php.</p>
<blockquote><p>php -m | grep ffmpeg</p></blockquote>
<p>Have a nice streaming. <img src='http://www.sohailriaz.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<img src="http://www.sohailriaz.com/wp-content/plugins/pixelstats/trackingpixel.php?post_id=93&amp;ts=1284150614" style="display:none;" alt="pixelstats trackingpixel"/>]]></content:encoded>
			<wfw:commentRss>http://www.sohailriaz.com/how-to-install-ffmpeg-mplayer-mencoder-ffmpeg-php-on-centos-5x/feed/</wfw:commentRss>
		<slash:comments>45</slash:comments>
		</item>
		<item>
		<title>How To Add DomainKeys and SPF Records on CPanel Servers</title>
		<link>http://www.sohailriaz.com/how-to-add-domainkeys-and-spf-records-on-cpanel-servers/</link>
		<comments>http://www.sohailriaz.com/how-to-add-domainkeys-and-spf-records-on-cpanel-servers/#comments</comments>
		<pubDate>Mon, 27 Apr 2009 11:34:42 +0000</pubDate>
		<dc:creator>Sohail Riaz</dc:creator>
				<category><![CDATA[CPanel / WHM]]></category>
		<category><![CDATA[DNS]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.sohailriaz.com/?p=67</guid>
		<description><![CDATA[<a href="http://www.sohailriaz.com/how-to-add-domainkeys-and-spf-records-on-cpanel-servers/"><img src=""  alt="" title="" /></a>
This how to describe how to add domainkeys and SPF (Sender Policy Framework) records on CPanel Servers. Whenever you create a domain on CPanel server using WHM, it wont add domainkeys and SPF records for particular domains. To add domainkeys and SPF records please use following steps.
We consider here we have a domain sohailriaz.com with [...]]]></description>
			<content:encoded><![CDATA[<p>This how to describe how to add domainkeys and SPF (Sender Policy Framework) records on CPanel Servers. Whenever you create a domain on CPanel server using WHM, it wont add domainkeys and SPF records for particular domains. To add domainkeys and SPF records please use following steps.<span id="more-67"></span></p>
<p>We consider here we have a domain <strong>sohailriaz.com</strong> with cpanel username <strong>sohailri</strong></p>
<p>Please note on CPanel servers most of the work is done using cpanel username which then reflect setting on particular domains. If you have several domains / sub domains under one username, it will add domainkeys and SPF records for all domains / subdomains.</p>
<p>Execute the following command on your CPanel server using root.</p>
<h3>1 DomainKeys</h3>
<h3>1.1 Add DomainKeys for single user</h3>
<blockquote><p>/usr/local/cpanel/bin/domain_keys_installer sohailri</p></blockquote>
<p>where <strong>sohailri</strong> is a username</p>
<h3>1.2 Add DomainKeys for all CPanel users.</h3>
<p>If you wish to add DomainKeys for all Cpanel users on your server, execute following command.</p>
<blockquote><p>ls /var/cpanel/users | while read a; do<br />
/usr/local/cpanel/bin/domain_keys_installer $a<br />
done</p></blockquote>
<h3>2 SPF (Sender Policy Framework)</h3>
<h3>2.1 Add SPF for single account.</h3>
<blockquote><p>/usr/local/cpanel/bin/spf_installer sohailri</p></blockquote>
<h3>2.2 Add SPF for all Cpanel accounts.</h3>
<p>If you want to add SPF records for all cpanel accounts exist on your server then use the following command.</p>
<blockquote><p>ls /var/cpanel/users | while read a; do<br />
/usr/local/cpanel/bin/spf_installer $a<br />
done</p></blockquote>
<h3>3 Enable DomainKeys and SPF for every new CPanel account.</h3>
<p>If you want to add DomainKeys and SPF for every new account created on Cpanel, then do the following.</p>
<blockquote><p>vi /scripts/postwwwacct</p></blockquote>
<p>postwwwacct is a file which execute after wwwacct (used to create account), paste following lines in the file</p>
<blockquote><p>#!/usr/bin/perl</p>
<p>my %OPTS = @ARGV;<br />
$ENV{USER} = &#8220;$OPTS{&#8216;user&#8217;}&#8221;;<br />
system q(/usr/local/cpanel/bin/domain_keys_installer $USER);<br />
system q(/usr/local/cpanel/bin/spf_installer $USER);</p></blockquote>
<p>Happy Mailing <img src='http://www.sohailriaz.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>If you have any question / suggestion please comment.</p>
<img src="http://www.sohailriaz.com/wp-content/plugins/pixelstats/trackingpixel.php?post_id=67&amp;ts=1284150614" style="display:none;" alt="pixelstats trackingpixel"/>]]></content:encoded>
			<wfw:commentRss>http://www.sohailriaz.com/how-to-add-domainkeys-and-spf-records-on-cpanel-servers/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Mod_GeoIP Custom Module for CPanel WHM</title>
		<link>http://www.sohailriaz.com/mod_geoip-custom-module-for-cpanel-whm/</link>
		<comments>http://www.sohailriaz.com/mod_geoip-custom-module-for-cpanel-whm/#comments</comments>
		<pubDate>Tue, 10 Feb 2009 07:23:46 +0000</pubDate>
		<dc:creator>Sohail Riaz</dc:creator>
				<category><![CDATA[CPanel / WHM]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mod_GeoIP]]></category>

		<guid isPermaLink="false">http://www.sohailriaz.com/?p=42</guid>
		<description><![CDATA[<a href="http://www.sohailriaz.com/mod_geoip-custom-module-for-cpanel-whm/"><img src=""  alt="" title="" /></a>
I have created first mod_geoip custom module for CPanel WHM using CPanel Easy Framework POD.
which will be then install using /scripts/easyapache on command line or Apache Update using WHM on your choice whether to install it or not.
I wroted it in february and published on my site, but after few days CPanel Developer DAN contacted [...]]]></description>
			<content:encoded><![CDATA[<p>I have created first mod_geoip custom module for CPanel WHM using CPanel Easy Framework POD.</p>
<p>which will be then install using /scripts/easyapache on command line or Apache Update using WHM on your choice whether to install it or not.</p>
<p>I wroted it in february and published on my site, but after few days CPanel Developer DAN contacted me to enhance with there requirements that it can be added to CPanel Custom Module Listing. I made several changes to first version as suggested by CPanel Developers and alhamdulillah succeeded in it and now its listing in CPanel Custom Module. <img src='http://www.sohailriaz.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  You can install it by using following steps</p>
<h3>1) Download</h3>
<blockquote><p>wget http://easyapache.cpanel.net/optmods/custom_opt_mod-mod_geoip.tar.gz</p></blockquote>
<p>or</p>
<blockquote><p>wget http://www.sohailriaz.com/downloads/custom_opt_mod-mod_geoip.tar.gz</p></blockquote>
<h3>2) Installation</h3>
<blockquote><p>tar -C /var/cpanel/easy/apache/custom_opt_mods  custom_opt_mod-mod_geoip.tar.gz</p></blockquote>
<p>Thats it, now you can run</p>
<blockquote><p>/scripts/easyapache</p></blockquote>
<p>or</p>
<p style="font-size: 12px;"><strong>Login into WHM and go to EasyApache Update</strong></p>
<p>It will show you the Mod_GeoIP included in it and you can install it by checking the box.</p>
<img src="http://www.sohailriaz.com/wp-content/plugins/pixelstats/trackingpixel.php?post_id=42&amp;ts=1284150614" style="display:none;" alt="pixelstats trackingpixel"/>]]></content:encoded>
			<wfw:commentRss>http://www.sohailriaz.com/mod_geoip-custom-module-for-cpanel-whm/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>HowTo SSH outside using Authenticated Proxy</title>
		<link>http://www.sohailriaz.com/howto-ssh-outside-using-authenticated-proxy/</link>
		<comments>http://www.sohailriaz.com/howto-ssh-outside-using-authenticated-proxy/#comments</comments>
		<pubDate>Sun, 04 Jan 2009 07:19:43 +0000</pubDate>
		<dc:creator>Sohail Riaz</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Proxy]]></category>
		<category><![CDATA[SSH]]></category>

		<guid isPermaLink="false">http://www.sohailriaz.com/?p=40</guid>
		<description><![CDATA[<a href="http://www.sohailriaz.com/howto-ssh-outside-using-authenticated-proxy/"><img src=""  alt="" title="" /></a>
This howto describe how to ssh outside another network / server using authenticated proxy. SSH (Secure Shell) is typically used to log into a remote machine and execute commands, but it also supports tunneling, forwarding TCP ports and X11 connections; it can transfer files using the associated SFTP or SCP protocols.
Normally we use NetCat to [...]]]></description>
			<content:encoded><![CDATA[<p>This howto describe how to ssh outside another network / server using authenticated proxy. SSH (Secure Shell) is typically used to log into a remote machine and execute commands, but it also supports tunneling, forwarding TCP ports and X11 connections; it can transfer files using the associated SFTP or SCP protocols.<span id="more-40"></span></p>
<p>Normally we use NetCat to ssh outside using proxy server but if its not support proxy user / pass to authenticate by proxy server and then ssh outside. Here we will use a package called connect.c.</p>
<p><strong>connect.c</strong> is the simple relaying command to make network connection via SOCKS and https proxy. It is mainly intended to be used as <strong>proxy command</strong> of OpenSSH. You can make SSH session beyond the firewall with this command.</p>
<p>This can be achieved by other methods too but this works for me.</p>
<h3>1) Download connect.c software.</h3>
<blockquote><p>wget http://www.meadowy.org/~gotoh/ssh/connect.c</p></blockquote>
<h3>2) Compile connect.c Using GCC</h3>
<blockquote><p>gcc connect.c -o connect</p></blockquote>
<p>and then copy to directory in your PATH i.e /usr/bin or /usr/local/bin</p>
<blockquote><p>cp connect /usr/bin</p></blockquote>
<h3>3) Congiure ssh_config</h3>
<p>append following line</p>
<blockquote><p>ProxyCommand /usr/bin/connect -H proxy01.sohailriaz.com:8080 %h %p</p></blockquote>
<h3>4) Export Proxy User / Pass as variable</h3>
<p>It is insecure but we have to used it. If your proxy doesnt use user/pass for authenticatio, you can skip this.</p>
<blockquote><p>export HTTP_PROXY_USER=your_username<br />
export HTTP_PROXY_PASSWORD=your_password</p></blockquote>
<p>Thats it now you can ssh outside without any restriction <img src='http://www.sohailriaz.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<img src="http://www.sohailriaz.com/wp-content/plugins/pixelstats/trackingpixel.php?post_id=40&amp;ts=1284150614" style="display:none;" alt="pixelstats trackingpixel"/>]]></content:encoded>
			<wfw:commentRss>http://www.sohailriaz.com/howto-ssh-outside-using-authenticated-proxy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
