<?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>AcroNOC Inc. Company Blog</title>
	<atom:link href="http://blog.acronoc.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.acronoc.com</link>
	<description>Houston Texas Colocation, Dedicated Servers, VPS Solutions, and cPanel Web Hosting!</description>
	<lastBuildDate>Wed, 09 Dec 2009 01:25:22 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Finding warez to save wasted space on your server.</title>
		<link>http://blog.acronoc.com/2009/12/08/finding-warez-to-save-wasted-space-on-your-server/</link>
		<comments>http://blog.acronoc.com/2009/12/08/finding-warez-to-save-wasted-space-on-your-server/#comments</comments>
		<pubDate>Wed, 09 Dec 2009 01:25:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux Tutorials, Guides and Tips]]></category>

		<guid isPermaLink="false">http://blog.acronoc.com/?p=97</guid>
		<description><![CDATA[If you are in the shared hosting business you know that servers may contain warez or other copyright content stored in client accounts. This data is sometimes uploaded by users and sometimes uploaded by people exploiting one of your client's scripts or weak passwords. Here is a simple command to find such data so you can investigate.]]></description>
			<content:encoded><![CDATA[<p>If you are in the shared hosting business you know that servers may contain warez or other copyright content stored in client accounts. This data is sometimes uploaded by users and sometimes uploaded by people exploiting one of your client&#8217;s scripts or weak passwords. Here is a simple command to find such data so you can investigate.<br />
<span id="more-97"></span></p>
<pre class="brush: php">
find . -iname *.avi -or -iname *.mpg -or -iname *.mpeg -or -iname *.mov -or -iname *.mp3 -or -iname *.cue -or -iname *.bin -or -iname *.iso -or -iname *.rar -or -iname *.exe -or -iname *.zip -or -iname *.arj -or -iname *.r00 -or -iname *.tar -or -iname *.nrg -or -iname *.wmv -or -iname *.ogg -or -iname *.qt -or -iname *.001 -or -iname *.ace -or -iname *.par -or -iname *.par2 -or -iname *.nfo -or -iname *.img -or -iname *.nzb &gt; warez.txt
</pre>
<p>The command may take a long time to finish running. Grab some coffee and take care of other business in the mean time. Once the task is done take a look at warez.txt and see what&#8217;s eating up your space. Notify the clients that their accounts may be compromised or are being used to store copyright materials and reclaim your space.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.acronoc.com/2009/12/08/finding-warez-to-save-wasted-space-on-your-server/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Basic hotlink protection .htaccess mod_rewrite scheme.</title>
		<link>http://blog.acronoc.com/2009/12/08/basic-hotlink-protection-htaccess-mod_rewrite-scheme/</link>
		<comments>http://blog.acronoc.com/2009/12/08/basic-hotlink-protection-htaccess-mod_rewrite-scheme/#comments</comments>
		<pubDate>Wed, 09 Dec 2009 01:18:57 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux Tutorials, Guides and Tips]]></category>

		<guid isPermaLink="false">http://blog.acronoc.com/?p=95</guid>
		<description><![CDATA[Hotlink protection can be very useful if you have a lot of people trying to hotlink to your images or files. Our article will show you a basic .htaccess mod_rewrite setup to block such hotlink protection for your domain.]]></description>
			<content:encoded><![CDATA[<p>Hotlink protection can be very useful if you have a lot of people trying to hotlink to your images or files. Our article will show you a basic .htaccess mod_rewrite setup to block such hotlink protection for your domain.<span id="more-95"></span></p>
<pre class="brush: php">
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?yourdomainnamegoeshere.com [NC]
RewriteRule \.(jpg|jpeg|png|gif|bmp)$ - [NC,F,L]
</pre>
<p>The above script once entered into your <strong>.htaccess</strong> file (usually in your <strong>public_html</strong> or <strong>www</strong> directory) will prevent hotlinking for the listed file types. You can add more file types to block (ie. avi, flv, mov, mpeg, mkv, etc..) by editing the last line. Use pipes &#8216;|&#8217; to separate the different file types.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.acronoc.com/2009/12/08/basic-hotlink-protection-htaccess-mod_rewrite-scheme/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Disable ModSecurity for a domain.</title>
		<link>http://blog.acronoc.com/2009/12/08/disable-modsecurity-for-a-domain/</link>
		<comments>http://blog.acronoc.com/2009/12/08/disable-modsecurity-for-a-domain/#comments</comments>
		<pubDate>Tue, 08 Dec 2009 15:38:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux Tutorials, Guides and Tips]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[httpd]]></category>
		<category><![CDATA[ModSecurity]]></category>
		<category><![CDATA[mod_security]]></category>
		<category><![CDATA[SecFilterEngine]]></category>
		<category><![CDATA[SecFilterScanPOST]]></category>

		<guid isPermaLink="false">http://blog.acronoc.com/?p=90</guid>
		<description><![CDATA[So you need to disable ModSecurity for a customer's site. There are many reasons to do this, but generally it’s because the customer has a script that does not conform to your ModSecurity rules or keyword url matching. Don’t disable ModSecurity for the whole server, because it’s a great tool. Read this article instead!]]></description>
			<content:encoded><![CDATA[<p>So you need to disable ModSecurity (aka mod_security.c) for a customer&#8217;s site. There are many reasons to do this, but generally it’s because the customer has a script that does not conform to your ModSecurity rules or keyword url matching. Don’t disable ModSecurity for the whole server, because it’s a great tool. Read this article instead!<br />
<span id="more-90"></span><br />
First you should login to your server via SSH as the &#8216;root&#8217; user. You should then use <strong>nano</strong> or your favorite text editor (ie. <strong>pico</strong>, <strong>vi</strong>, <strong>emacs</strong>, etc&#8230;) to open the <strong>/etc/httpd/conf/httpd.conf</strong> (sometimes /usr/local/apache/conf/httpd.conf or /etc/apache2/httpd.conf) file. <em>Notice: You may have to edit a different file such as /etc/httpd.conf/conf.d/vhosts.conf if your server is setup to use a separate vhost configuration file. </em>You should then locate the vhost for the domain in question and paste the following code into the vhost:</p>
<pre class="brush: php">
&lt;IfModule mod_security.c&gt;
     SecFilterEngine Off
     SecFilterScanPOST Off
&lt;/IfModule&gt;
</pre>
<p>Now you just have to save, exit and restart apache. Run <strong>service httpd restart</strong> or <strong>/etc/init.d/httpd restart</strong> or whatever script you have to restart Apache.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.acronoc.com/2009/12/08/disable-modsecurity-for-a-domain/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Kill sleeping MySQL connections via shell.</title>
		<link>http://blog.acronoc.com/2009/12/08/kill-sleeping-mysql-connections-via-shell/</link>
		<comments>http://blog.acronoc.com/2009/12/08/kill-sleeping-mysql-connections-via-shell/#comments</comments>
		<pubDate>Tue, 08 Dec 2009 15:25:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux Tutorials, Guides and Tips]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[mysqladmin]]></category>
		<category><![CDATA[sleeping connections]]></category>

		<guid isPermaLink="false">http://blog.acronoc.com/?p=88</guid>
		<description><![CDATA[Some servers may have a bug involving the MySQL version and Linux kernel versions used. In these cases some sites may generate sleeping mysql connections that do not die despite proper my.cnf configuration. There may be thousands of such connections after weeks of use. Eventually the performance is impacted though the connections are sleeping. A temporary solution would be to routinely kill sleeping connections.]]></description>
			<content:encoded><![CDATA[<p>Some servers may have a bug involving the MySQL version and Linux kernel versions used. In these cases some sites may generate sleeping mysql connections that do not die despite proper my.cnf configuration. There may be thousands of such connections after weeks of use. Eventually the performance is impacted though the connections are sleeping. A temporary solution would be to routinely kill sleeping connections.<br />
<span id="more-88"></span></p>
<pre class="brush: bash">
for i in `mysqladmin proc | grep Sleep | awk &#039;{print $2}&#039;`; do mysqladmin kill $i; done
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.acronoc.com/2009/12/08/kill-sleeping-mysql-connections-via-shell/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Update / upgrade Perl on cPanel servers.</title>
		<link>http://blog.acronoc.com/2009/12/05/update-upgrade-perl-on-cpanel-servers/</link>
		<comments>http://blog.acronoc.com/2009/12/05/update-upgrade-perl-on-cpanel-servers/#comments</comments>
		<pubDate>Sat, 05 Dec 2009 17:28:34 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[cPanel / Web Host Manager (WHM)]]></category>
		<category><![CDATA[cpanel]]></category>
		<category><![CDATA[layer1]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[update]]></category>
		<category><![CDATA[upgrade]]></category>

		<guid isPermaLink="false">http://blog.acronoc.com/?p=77</guid>
		<description><![CDATA[When a new version of Perl is available you may wish to upgrade for compatibility or security. Often you will be notified by cPanel of the need to upgrade. Our guide will show you how to do that.]]></description>
			<content:encoded><![CDATA[<p>When a new version of Perl is available you may wish to upgrade for compatibility or security. Often you will be notified by cPanel of the need to upgrade. Our guide will show you how to do that.<br />
<span id="more-77"></span><br />
<strong>First check if you need an update:</strong></p>
<pre class="brush: bash">
perl -v
</pre>
<p><strong>Is the version the latest you need?</strong><br />
You can see what the latest update is by browsing to http://layer1.cpanel.net/ or use lynx on the server. Once you find an upgrade save the link. Then run the following and change the link to the one you just saved: </p>
<pre class="brush: bash">
cd ~
wget http://layer1.cpanel.net/perl588installer.tar.gz
tar xvzpf perl588installer.tar.gz
cd perl588installer
./install
</pre>
<p><strong>Once the process completes cPanel may require an update too:</strong></p>
<pre class="brush: bash">
/scripts/upcp --force
/scripts/checkperlmodules --full | less
</pre>
<p>Check for error messages by running /scripts/checkperlmodules through less.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.acronoc.com/2009/12/05/update-upgrade-perl-on-cpanel-servers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apache &#8220;semget: No space left on device&#8221; Semaphore Error Fix</title>
		<link>http://blog.acronoc.com/2009/12/04/apache-semget-no-space-left-on-device-semaphore-error-fix/</link>
		<comments>http://blog.acronoc.com/2009/12/04/apache-semget-no-space-left-on-device-semaphore-error-fix/#comments</comments>
		<pubDate>Fri, 04 Dec 2009 13:46:52 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux Tutorials, Guides and Tips]]></category>

		<guid isPermaLink="false">http://blog.acronoc.com/?p=66</guid>
		<description><![CDATA[Apache &#8220;semget: No space left on device&#8221;  Semaphore Error Fix:

Some times you may find Apache giving you &#8217;semget&#8217; errors in the error_log and failing to start/function. You can remedy this via the following script:


for i in `ipcs -s &#124; grep nobody &#124; awk &#039;{print $2}&#039;` ; do ipcrm -s $i ; done

That should clear out the semaphores [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Apache &#8220;semget: No space left on device&#8221;  Semaphore Error Fix:<br />
</strong></p>
<p>Some times you may find Apache giving you &#8217;semget&#8217; errors in the error_log and failing to start/function. You can remedy this via the following script:</p>
<p><span id="more-66"></span></p>
<pre class="brush: bash">
for i in `ipcs -s | grep nobody | awk &#039;{print $2}&#039;` ; do ipcrm -s $i ; done
</pre>
<p>That should clear out the semaphores and you should be able to restart Apache.</p>
<p><strong>What is a semaphore?</strong></p>
<p><a title="http://en.wikipedia.org/wiki/Semaphore_(programming)" rel="nofollow" href="http://en.wikipedia.org/wiki/Semaphore_%28programming%29">http://en.wikipedia.org/wiki/Semaphore_(programming)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.acronoc.com/2009/12/04/apache-semget-no-space-left-on-device-semaphore-error-fix/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Connection code for DSN less MySQL connection with ASP pages.</title>
		<link>http://blog.acronoc.com/2009/12/04/connection-code-for-dsn-less-mysql-connection-with-asp-pages/</link>
		<comments>http://blog.acronoc.com/2009/12/04/connection-code-for-dsn-less-mysql-connection-with-asp-pages/#comments</comments>
		<pubDate>Fri, 04 Dec 2009 13:43:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programming Tutorials, Guides & Tips]]></category>

		<guid isPermaLink="false">http://blog.acronoc.com/?p=63</guid>
		<description><![CDATA[Connection code for DSN less MySQL connection with ASP pages
Create a database connection in the .ASP code as follows:


&#60; %
    Set Conn = Server.CreateObject(&#34;ADODB.Connection&#34;)
    Conn.Open &#34;Driver={MySql}; Server=localhost; uid=myLogin; pwd=myPass; database=myDB; option=3; port=3306;&#34;
    Set rsmyTable = Conn.Execute(&#34;SELECT * From myTable&#34;)
% &#62;

Substitute myDomain.com, myDB, myLogin, myPass, myTable with [...]]]></description>
			<content:encoded><![CDATA[<p>Connection code for DSN less MySQL connection with ASP pages</p>
<p>Create a database connection in the .ASP code as follows:<br />
<span id="more-63"></span></p>
<pre class="brush: vb">
&lt; %
    Set Conn = Server.CreateObject(&quot;ADODB.Connection&quot;)
    Conn.Open &quot;Driver={MySql}; Server=localhost; uid=myLogin; pwd=myPass; database=myDB; option=3; port=3306;&quot;
    Set rsmyTable = Conn.Execute(&quot;SELECT * From myTable&quot;)
% &gt;
</pre>
<p>Substitute myDomain.com, myDB, myLogin, myPass, myTable with your own specific details.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.acronoc.com/2009/12/04/connection-code-for-dsn-less-mysql-connection-with-asp-pages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>3Ware CLI, SMART and FSCK Linux Disk Tools</title>
		<link>http://blog.acronoc.com/2009/11/19/3ware-cli-smart-and-fsck-linux-disk-tools/</link>
		<comments>http://blog.acronoc.com/2009/11/19/3ware-cli-smart-and-fsck-linux-disk-tools/#comments</comments>
		<pubDate>Thu, 19 Nov 2009 08:39:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux Tutorials, Guides and Tips]]></category>

		<guid isPermaLink="false">http://blog.acronoc.com/?p=60</guid>
		<description><![CDATA[These are some useful SMART and 3ware RAID commands.
Check SMART attributes for 3ware port:
smartctl -a -d 3ware,0 /dev/twa0
Check 3ware RAID Array Info:
tw_cli info c0
Drop 3ware RAID Port:
tw_cli maint remove c0 p0
FSCK a drive:
fsck -f -C0 /dev/sda7
]]></description>
			<content:encoded><![CDATA[<p><strong>These are some useful SMART and 3ware RAID commands.<span id="more-60"></span></strong></p>
<p>Check SMART attributes for 3ware port:</p>
<pre class="brush: php">smartctl -a -d 3ware,0 /dev/twa0</pre>
<p>Check 3ware RAID Array Info:</p>
<pre class="brush: php">tw_cli info c0</pre>
<p>Drop 3ware RAID Port:</p>
<pre class="brush: php">tw_cli maint remove c0 p0</pre>
<p>FSCK a drive:</p>
<pre class="brush: php">fsck -f -C0 /dev/sda7</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.acronoc.com/2009/11/19/3ware-cli-smart-and-fsck-linux-disk-tools/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Port Bonding on Linux &amp; Network</title>
		<link>http://blog.acronoc.com/2009/11/19/port-bonding-on-linux-network/</link>
		<comments>http://blog.acronoc.com/2009/11/19/port-bonding-on-linux-network/#comments</comments>
		<pubDate>Thu, 19 Nov 2009 08:31:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CISCO Networking, Engineering and Tutorials]]></category>
		<category><![CDATA[Linux Tutorials, Guides and Tips]]></category>

		<guid isPermaLink="false">http://blog.acronoc.com/?p=55</guid>
		<description><![CDATA[Port Bonding Setup
Port bonding allows you to combine two ports to allow more throughput for your server
Setup on CentOS
It is important that the mode and xmit_hash_policy be set correctly.
edit /etc/modprobe.conf
add:
alias bond0 bonding
create /etc/sysconfig/network-scripts/ifcfg-bond0
add:
DEVICE=bond0
ONBOOT=yes
BOOTPROTO=none
IPADDR=
NETMASK=
GATEWAY=
USERCTL=no
BONDING_MASTER=&#34;yes&#34;
BONDING_MODULE_OPTS=&#34;mode=802.3ad xmit_hash_policy=layer3+4 miimon=100&#34;
BONDING_SLAVE0=&#34;eth0&#34;
BONDING_SLAVE1=&#34;eth1&#34;
edit /etc/sysconfig/network-scripts/ifcfg-eth0
change to:
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=none
USERCTL=no
MASTER=bond0
SLAVE=yes
edit /etc/sysconfig/network-scripts/ifcfg-eth1
change to:
DEVICE=eth1
ONBOOT=yes
BOOTPROTO=none
USERCTL=no
MASTER=bond0
SLAVE=yes
Server Side Complete.
Switch Side Setup
 Example Information 
For the Example Below we shall assume:
That there&#8217;s only Portchannel [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Port Bonding Setup</strong></p>
<p>Port bonding allows you to combine two ports to allow more throughput for your server<span id="more-55"></span></p>
<p><strong>Setup on CentOS</strong></p>
<p>It is important that the mode and xmit_hash_policy be set correctly.</p>
<p>edit /etc/modprobe.conf<br />
add:</p>
<pre class="brush: php">alias bond0 bonding</pre>
<p>create /etc/sysconfig/network-scripts/ifcfg-bond0<br />
add:</p>
<pre class="brush: php">DEVICE=bond0
ONBOOT=yes
BOOTPROTO=none
IPADDR=
NETMASK=
GATEWAY=
USERCTL=no
BONDING_MASTER=&quot;yes&quot;
BONDING_MODULE_OPTS=&quot;mode=802.3ad xmit_hash_policy=layer3+4 miimon=100&quot;
BONDING_SLAVE0=&quot;eth0&quot;
BONDING_SLAVE1=&quot;eth1&quot;</pre>
<p>edit /etc/sysconfig/network-scripts/ifcfg-eth0<br />
change to:</p>
<pre class="brush: php">DEVICE=eth0
ONBOOT=yes
BOOTPROTO=none
USERCTL=no
MASTER=bond0
SLAVE=yes</pre>
<p>edit /etc/sysconfig/network-scripts/ifcfg-eth1<br />
change to:</p>
<pre class="brush: php">DEVICE=eth1
ONBOOT=yes
BOOTPROTO=none
USERCTL=no
MASTER=bond0
SLAVE=yes</pre>
<p>Server Side Complete.</p>
<p><strong>Switch Side Setup</strong></p>
<p><em> Example Information </em><br />
For the Example Below we shall assume:<br />
That there&#8217;s only Portchannel 1.<br />
The Switchports are Gi0/1 and Gi0/2.<br />
That Portchannel 2 is currently nonexistent.<br />
Vlan 990</p>
<p><em>Check what is set </em><br />
Check your interfaces &#8211; this also puts in the buffer the older information in case of errors</p>
<pre class="brush: php">show run int Gi0/1
show run int Gi0/2</pre>
<p>Check the Portchannel Summary Information</p>
<pre class="brush: php">show etherchannel summary</pre>
<p>The Above will show you what Portchannels are in place already.</p>
<p><em>Start Configuring </em></p>
<p>Start the Configuration Terminal</p>
<pre class="brush: php">conf t</pre>
<p>Select The First Interface of the Port Channel &#8211; Here it&#8217;s Gi0/1</p>
<pre class="brush: php">int Gi0/1</pre>
<p>Utilize the Channel Group Command -this creates the Port Channel- Using Channel 2 here because 1 is always reserved -and in use!</p>
<pre class="brush: php">channel-group 2 mode on</pre>
<p>&#8220;Creating a port-channel interface Port-channel 2&#8243; YOU SHOULD SEE THIS</p>
<p>Switch over to the second interface of the Port Channel (faster than &#8220;end&#8221; then &#8220;conf t&#8221; then &#8220;int Gi0/2&#8243;)</p>
<pre class="brush: php">int Gi0/2</pre>
<p>Utilize the Channel Group Command Again</p>
<pre class="brush: php">channel-group 2 mode on</pre>
<p>(It shouldn&#8217;t say anything this time)</p>
<p>Switch to your shiny new Portchannel</p>
<pre class="brush: php">int po2</pre>
<p>The Portchannel takes commands. This process overwrites whatever is there. Let&#8217;s use info for Vlan 990</p>
<p>Set the switchport Access to Vlan 990</p>
<pre class="brush: php">switchport access vlan 990</pre>
<p>Set the Switchport Mode to Access</p>
<pre class="brush: php">switchport mode access</pre>
<p>Set the Load interval to 30 (this sets the polling interval to 30 seconds.)</p>
<pre class="brush: php">load-interval 30</pre>
<p>Disable Portfast on bonded ports &#8211; this prevents a spanning tree loop while the port channel negotiates.</p>
<pre class="brush: php">no spanning-tree portfast</pre>
<p>End editing</p>
<pre class="brush: php">end</pre>
<p><em>Verify and Save</em></p>
<p>Before you write one last look at the new configuration for the port channel</p>
<pre class="brush: php">show run int po2
Building configuration...

Current configuration : 125 bytes
!
interface Port-channel2
switchport access vlan 990
switchport mode access
load-interval 30
spanning-tree portfast
end</pre>
<p>And then a last glance at the 2 ports in the portchannel for consistency, then the portchannel summary one last time.</p>
<pre class="brush: php">show run int Gi0/1
Building configuration...

Current configuration : 155 bytes
!
interface GigabitEthernet0/1
switchport access vlan 990
switchport mode access
load-interval 30
channel-group 2 mode on
spanning-tree portfast
end
show run int Gi0/2
Building configuration...

Current configuration : 155 bytes
!
interface GigabitEthernet0/2
switchport access vlan 990
switchport mode access
load-interval 30
channel-group 2 mode on
spanning-tree portfast
end</pre>
<p>Check the Portchannel summary</p>
<pre class="brush: php">show etherchannel summary
Flags:  D - down        P - in port-channel
I - stand-alone s - suspended
H - Hot-standby (LACP only)
R - Layer3      S - Layer2
U - in use      f - failed to allocate aggregator
u - unsuitable for bundling
w - waiting to be aggregated
d - default port

Number of channel-groups in use: 2
Number of aggregators:           2

Group  Port-channel  Protocol    Ports
------+-------------+-----------+-----------------------------------------------
1      Po1(SU)          -        Gi0/21(P)   Gi0/22(P)   Gi0/23(P)
Gi0/24(P)
2      Po2(SD)          -        Gi0/1(D)    Gi0/2(D)</pre>
<p>Here we see that Po2 is down. This is only because the server&#8217;s not attached.</p>
<p>Write your configuration</p>
<pre class="brush: php">write</pre>
<p>Congratulations your Port Channel to Vlan 990 is complete. PXE Installs should be criminally fast.</p>
<p>Switch Side Complete</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.acronoc.com/2009/11/19/port-bonding-on-linux-network/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL Collation/Fonts/Foregin Language Issues</title>
		<link>http://blog.acronoc.com/2009/11/19/mysql-collation-fonts-language-issues/</link>
		<comments>http://blog.acronoc.com/2009/11/19/mysql-collation-fonts-language-issues/#comments</comments>
		<pubDate>Thu, 19 Nov 2009 08:25:53 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux Tutorials, Guides and Tips]]></category>
		<category><![CDATA[cPanel / Web Host Manager (WHM)]]></category>

		<guid isPermaLink="false">http://blog.acronoc.com/?p=51</guid>
		<description><![CDATA[Force Database Dump Restore To UTF-8:
mysql --default-character-set=utf8 database &#60; database.sql
Jumbled Characters or Question Marks For Non-Latin Encoding:
This is a common problem for our international users. They use all kinds of languages which often do not display right when imported from lets say tis620 (thai) into utf8. So this is a step by step guide in [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Force Database Dump Restore To UTF-8:</strong></p>
<pre class="brush: php">mysql --default-character-set=utf8 database &lt; database.sql</pre>
<p><strong>Jumbled Characters or Question Marks For Non-Latin Encoding:</strong></p>
<p>This is a common problem for our international users. They use all kinds of languages which often do not display right when imported from lets say tis620 (thai) into utf8. So this is a step by step guide in getting their site to work:</p>
<p>1. Usually they have already created a database and imported incorrectly. Get them to provide you a backup for their original database off their previous host.</p>
<p>2. Delete all the tables from the database if they have one setup via phpMyAdmin.</p>
<p>3. Now in the database via phpMyAdmin go to operations and change the collation to the proper one, lets say its this620_thai_ci.</p>
<p>4. After having done that you should click the Import tab in phpMyAdmin and make sure you pick the right collation in this case it&#8217;s tis620.</p>
<p>5. The database should now be perfect.</p>
<p>6. Now comes the tricky part, you will generally have to make their php scripts run the proper collation before the queries, for custom scripts this will be their own problem usually as the scripts will be too sloppy to be easy to edit. But with non-custom scripts there is usually a class which uses only one or two calls in the entire script to make all the queries.</p>
<p>7. To find this function you should run a recursive grep:</p>
<pre class="brush: php">cd /home/username/public_html/
grep -R -i &#039;mysql_query&#039; *</pre>
<p>Usually you will get results like database.php for quality scripts.</p>
<p>8. Most quality scripts will give you one or two results, you should then open up those files with your favorite editor and figgure out how the calls are made and have the script run these two queries before the real queries:</p>
<pre class="brush: php">SET NAMES &#039;tis620&#039;
SET CHARACTER SET tis620_thai_ci</pre>
<p>This will often look something like this:</p>
<pre class="brush: php">//edited
$this-&gt;_cursor = mysql_query(&quot;SET NAMES &#039;tis620&#039;&quot;,$this-&gt;_resource);
$this-&gt;_cursor = mysql_query(&quot;SET CHARACTER SET tis620_thai_ci&quot;,$this-&gt;_resource);

//end of edited, below is actual global mysql query in the file
$this-&gt;;_cursor = mysql_query( $this-&gt;_sql, $this-&gt;_resource );</pre>
<p>Another example:</p>
<pre class="brush: php">$this-&gt;query_id = mysql_query(&quot;SET NAMES &#039;cp1251&#039;&quot;, $this-&gt;connection_id);
$this-&gt;query_id = mysql_query(&quot;SET CHARACTER SET cp1251_general_ci&quot;, $this-&gt;connection_id);</pre>
<p>Everything should now start working and the ??? will go away!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.acronoc.com/2009/11/19/mysql-collation-fonts-language-issues/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
