<?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>EZ Linux Admin &#187; Linux Tricks</title>
	<atom:link href="http://www.ezlinuxadmin.com/category/linux-tricks/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ezlinuxadmin.com</link>
	<description>Making Linux Easier</description>
	<lastBuildDate>Fri, 03 Feb 2012 18:43:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>kill a linux process that won’t die</title>
		<link>http://www.ezlinuxadmin.com/2012/02/kill-a-linux-process-that-wont-die/</link>
		<comments>http://www.ezlinuxadmin.com/2012/02/kill-a-linux-process-that-wont-die/#comments</comments>
		<pubDate>Fri, 03 Feb 2012 18:43:39 +0000</pubDate>
		<dc:creator>EZ linux</dc:creator>
				<category><![CDATA[Linux Commands]]></category>
		<category><![CDATA[Linux Operating Systems]]></category>
		<category><![CDATA[Linux Security]]></category>
		<category><![CDATA[Linux Software / Scripts]]></category>
		<category><![CDATA[Linux Tricks]]></category>

		<guid isPermaLink="false">http://www.ezlinuxadmin.com/?p=561</guid>
		<description><![CDATA[kill -s 9 [PID] Also try it without the -s if it won&#8217;t go.]]></description>
			<content:encoded><![CDATA[<p>kill -s 9 [PID]</p>
<p>Also try it without the -s if it won&#8217;t go.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ezlinuxadmin.com/2012/02/kill-a-linux-process-that-wont-die/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to search a directory for a certain search string.</title>
		<link>http://www.ezlinuxadmin.com/2012/01/how-to-search-a-directory-for-a-certain-search-string/</link>
		<comments>http://www.ezlinuxadmin.com/2012/01/how-to-search-a-directory-for-a-certain-search-string/#comments</comments>
		<pubDate>Mon, 23 Jan 2012 09:48:09 +0000</pubDate>
		<dc:creator>EZ linux</dc:creator>
				<category><![CDATA[Linux Commands]]></category>
		<category><![CDATA[Linux Software / Scripts]]></category>
		<category><![CDATA[Linux Tricks]]></category>
		<category><![CDATA[find]]></category>
		<category><![CDATA[grep]]></category>
		<category><![CDATA[search]]></category>

		<guid isPermaLink="false">http://www.ezlinuxadmin.com/?p=558</guid>
		<description><![CDATA[Pretty simple, this takes minimal load and delivers the data as it&#8217;s found.]]></description>
			<content:encoded><![CDATA[<p>Pretty simple, this takes minimal load and delivers the data as it&#8217;s found.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ezlinuxadmin.com/2012/01/how-to-search-a-directory-for-a-certain-search-string/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Manually changing an IP in Linux</title>
		<link>http://www.ezlinuxadmin.com/2011/12/manually-changing-an-ip-in-linux/</link>
		<comments>http://www.ezlinuxadmin.com/2011/12/manually-changing-an-ip-in-linux/#comments</comments>
		<pubDate>Sun, 18 Dec 2011 00:01:52 +0000</pubDate>
		<dc:creator>EZ linux</dc:creator>
				<category><![CDATA[Cpanel and WHM]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Linux Drivers]]></category>
		<category><![CDATA[Linux Operating Systems]]></category>
		<category><![CDATA[Linux Security]]></category>
		<category><![CDATA[Linux Software / Scripts]]></category>
		<category><![CDATA[Linux Tricks]]></category>
		<category><![CDATA[Ports]]></category>
		<category><![CDATA[ifcfg-eth0]]></category>
		<category><![CDATA[linux change ip]]></category>

		<guid isPermaLink="false">http://www.ezlinuxadmin.com/?p=549</guid>
		<description><![CDATA[It&#8217;s pretty easy actually. Just go to this directory: /etc/sysconfig/network-scripts Then you will see a file for eachnetwork port, for example my server is: ifcfg-eth0 and ifcfg-eth1 I already have the ifcfg-eth0 set up from the install but I want to use the second one for back ups so I just opened the file and [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s pretty easy actually.</p>
<p>Just go to this directory:</p>
<p>/etc/sysconfig/network-scripts</p>
<p>Then you will see a file for eachnetwork port, for example my server is:</p>
<p>ifcfg-eth0</p>
<p>and</p>
<p>ifcfg-eth1</p>
<p>I already have the ifcfg-eth0 set up from the install but I want to use the second one for back ups so I just opened the file and added the IP to it. Then I made sure the rest of the setting smatched the first one other then the:</p>
<p>HWADDR=</p>
<p>That line is specific to the network port.</p>
<p>So that is how you configure a eth0 or eth1 port.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ezlinuxadmin.com/2011/12/manually-changing-an-ip-in-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tracking down the biggest folders</title>
		<link>http://www.ezlinuxadmin.com/2011/08/tracking-down-the-biggest-folders/</link>
		<comments>http://www.ezlinuxadmin.com/2011/08/tracking-down-the-biggest-folders/#comments</comments>
		<pubDate>Thu, 11 Aug 2011 19:17:00 +0000</pubDate>
		<dc:creator>EZ linux</dc:creator>
				<category><![CDATA[Cheat Sheets]]></category>
		<category><![CDATA[Cpanel and WHM]]></category>
		<category><![CDATA[Linux Commands]]></category>
		<category><![CDATA[Linux Security]]></category>
		<category><![CDATA[Linux Software / Scripts]]></category>
		<category><![CDATA[Linux Tricks]]></category>
		<category><![CDATA[finding a folder]]></category>
		<category><![CDATA[folder size]]></category>
		<category><![CDATA[folder size search]]></category>
		<category><![CDATA[list folder size]]></category>

		<guid isPermaLink="false">http://www.ezlinuxadmin.com/?p=540</guid>
		<description><![CDATA[du -ax --max-depth 1 /var/cpanel &#124; sort -n &#124; tail This is a great command to simply find what folders are the biggest in a directory. You can replace the /var/cpanel with any folder and it will list everything in there and how big they are in order. Once you find the big folder then [...]]]></description>
			<content:encoded><![CDATA[<pre>du -ax --max-depth 1 /var/cpanel | sort -n | tail</pre>
<p>This is a great command to simply find what folders are the biggest in a directory. You can replace the /var/cpanel with any folder and it will list everything in there and how big they are in order.</p>
<p>Once you find the big folder then search inside of that to find the biggest folder in there and so on.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ezlinuxadmin.com/2011/08/tracking-down-the-biggest-folders/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cleaning up /var</title>
		<link>http://www.ezlinuxadmin.com/2011/08/cleaning-up-var/</link>
		<comments>http://www.ezlinuxadmin.com/2011/08/cleaning-up-var/#comments</comments>
		<pubDate>Thu, 11 Aug 2011 18:53:38 +0000</pubDate>
		<dc:creator>EZ linux</dc:creator>
				<category><![CDATA[Cheat Sheets]]></category>
		<category><![CDATA[Cpanel and WHM]]></category>
		<category><![CDATA[Linux Operating Systems]]></category>
		<category><![CDATA[Linux Security]]></category>
		<category><![CDATA[Linux Software / Scripts]]></category>
		<category><![CDATA[Linux Tricks]]></category>
		<category><![CDATA[cleaning var partition]]></category>
		<category><![CDATA[moving data]]></category>
		<category><![CDATA[symlink]]></category>
		<category><![CDATA[var full]]></category>

		<guid isPermaLink="false">http://www.ezlinuxadmin.com/?p=537</guid>
		<description><![CDATA[Cpanel and linux leaves a lot of log files in /var After several years these can add up, especially in the cpanel/bandwidth folder. So a couple quick folder moves and symlinks can clean things up. This is assuming you have a /backup partition and some room in it. Moving the log folder mv /var/log /backup/ [...]]]></description>
			<content:encoded><![CDATA[<p>Cpanel and linux leaves a lot of log files in /var<br />
After several years these can add up, especially in the cpanel/bandwidth folder. So a couple quick folder moves and symlinks can clean things up. This is assuming you have a /backup partition and some room in it.</p>
<p><strong>Moving the log folder</strong></p>
<p>mv /var/log /backup/<br />
ln -s /backup/log /var/log</p>
<p><strong>Moving the cpanel bandwidth folder</strong></p>
<p>mv /var/cpanel/bandwidth /backup/<br />
ln -s /backup/bandwidth /var/cpanel/bandwidth</p>
<p>Also just removing some of the log files in the log folder can help you for a quick fix.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ezlinuxadmin.com/2011/08/cleaning-up-var/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Steps to Secure SSH Server</title>
		<link>http://www.ezlinuxadmin.com/2011/05/steps-to-secure-ssh-server/</link>
		<comments>http://www.ezlinuxadmin.com/2011/05/steps-to-secure-ssh-server/#comments</comments>
		<pubDate>Thu, 19 May 2011 09:42:40 +0000</pubDate>
		<dc:creator>EZ linux</dc:creator>
				<category><![CDATA[Linux Security]]></category>
		<category><![CDATA[Linux Tricks]]></category>
		<category><![CDATA[Secure SSH]]></category>
		<category><![CDATA[ssh server]]></category>

		<guid isPermaLink="false">http://www.ezlinuxadmin.com/?p=517</guid>
		<description><![CDATA[SSH attacks are normally happened if you are running SSH on comman Port 22 . If you have simple or weak root password then chances of your server get compromised . We can secure SSH server with two methods : Method 1: A best option to secure your SSH is to run SSH on the [...]]]></description>
			<content:encoded><![CDATA[<p>SSH attacks are normally happened if you are running SSH on comman Port 22 . If you have simple or weak root password then chances of your server get compromised .</p>
<p>We can secure SSH server with two methods :</p>
<p>Method 1:</p>
<p>A best option to secure your SSH is to run SSH on the different port instead of default port 22 .</p>
<p>Disable Root Logins<br />
Disable password authentication<br />
Disable Port 22 and use any other port to run SSH (like Port 59122). Aslo block port 22 using firewall.</p>
<p>You have to take following steps before you harden the SSH, first make sure you create a user name and password. If you are running cpanel, then you want to add the username to cpanel wheel group.</p>
<p>use commaands as follows</p>
<p>#adduser &lt;username&gt; -G wheel</p>
<p>#passwd &lt;username&gt;</p>
<p>Once the user has been created and added to Wheel group, edit the ssh configuration file /etc/ssh/sshd_conf</p>
<p>Change the default port 22 to any port number, say 2199 and set the protocol to just Protocol 2 which is a more secure protocol</p>
<p>#vi /etc/ssh/sshd_config</p>
<p>Port 59122<br />
Protocol 2<br />
#ListenAddress 0.0.0.0<br />
#ListenAddress ::</p>
<p>#LoginGraceTime 2m<br />
IgnoreRhosts yes<br />
X11Forwarding no</p>
<p>Disable root login</p>
<p>Locate the line # PermitRootLogin yes in the configuration file and change it to no</p>
<p>PermitRootLogin no</p>
<p>save configuration and restart your SSH . Now you won&#8217;t be able to login as root and will be able to login only at Port 59122</p>
<p>method 2: SSH Public/Private Key Authentication</p>
<p>SSH with public key authentication the best proven method to safeguard your SSH server. You have to put the private key in your putty (ssh client) and put the public key on your server</p>
<p>PrivateKey -&gt; It should be Stored in Client and used by Putty</p>
<p>PublicKey -&gt; It should be Stored in Remote Server ( in /home/&lt;username&gt;/.ssh/authorized_keys file)</p>
<p>The required tools as</p>
<p>Putty (SSH Login client)<br />
PuttyGen (Putty Key Generator Tool to save Private key)</p>
<p>1 Enable the public key authentication you have to enable it in the SSH config file /etc/ssh/sshd_config. Look for the following lines and uncomment them</p>
<p>[HTML]RSAAuthentication yes<br />
PubkeyAuthentication yes<br />
AuthorizedKeysFile .ssh/authorized_keys<br />
[/HTML]</p>
<p>2<br />
we generate both public and private keys in the server.</p>
<p>[HTML][tux@localhost ~]$ ssh-keygen -t dsa<br />
Generating public/private dsa key pair.<br />
Enter file in which to save the key (/home/&lt;username&gt;/.ssh/id_dsa):<br />
Enter passphrase (empty for no passphrase):<br />
Enter same passphrase again:<br />
Your identification has been saved in /home/&lt;username&gt;/.ssh/id_dsa.<br />
Your public key has been saved in /home/&lt;username&gt;/.ssh/id_dsa.pub.<br />
The key fingerprint is:<br />
a9:22:30:c5:ed:df:2c:e7:7b:34:53:b4:82:bb:33:17 tux@localhost[/HTML]</p>
<p>id_dsa -&gt; private key stored at /home/&lt;username&gt;/.ssh/</p>
<p>id_dsa.pub -&gt; is the public key /home/&lt;username&gt;/.ssh/</p>
<p>3. copy Private Key to Putty (SSH client)</p>
<p>Here we need copy the private key from server to our putty in the form of .ppk file (putty private key file). private key must be stored in the client side and the public key in the server side</p>
<p>inside /home/&lt;username&gt;/.ssh/authorized_keys file</p>
<p>Open the file id_dsa and copy the contents of the file. On client side paste it into a notepad file (say privkey.txt). Make sure that there is no new line at the top or else you will get &#8220;invalid private key&#8221; from puttygen.</p>
<p>Start puttygen.exe &gt; &gt; Load Existing Private Key &gt; &gt; privkey.txt &gt;&gt; Save Private Key</p>
<p>Save the private key as privkey.ppk</p>
<p>4 Copying Public Key to Server</p>
<p>Create new file called authorized_keys inside .ssh folder within the users home directory as /home/&lt;username&gt;/.ssh/authorized_keys and store the public key there.<br />
OR rename the existing id_dsa.pub to authorized_keys as we wont be needing the ida_dsa.pub file.</p>
<p>mv /home/&lt;user&gt;/.ssh/ida_dsa.pub authorized_keys</p>
<p>To connect ssh use putty</p>
<p>Start Putty &gt; Enter servers IP address &gt; New Port, then load the private key SSH &gt; Auth &gt; Browse Private Key for Authentication</p>
<p>Now connect and enter the user name the putty would authenticate yourself with public key authentication.</p>
<p>In this way you can secure your SSH .</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ezlinuxadmin.com/2011/05/steps-to-secure-ssh-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Optimize MySQL DataBases</title>
		<link>http://www.ezlinuxadmin.com/2010/06/optimize-mysql-databases/</link>
		<comments>http://www.ezlinuxadmin.com/2010/06/optimize-mysql-databases/#comments</comments>
		<pubDate>Tue, 29 Jun 2010 19:37:50 +0000</pubDate>
		<dc:creator>EZ linux</dc:creator>
				<category><![CDATA[Linux Software / Scripts]]></category>
		<category><![CDATA[Linux Tricks]]></category>
		<category><![CDATA[myisamchk]]></category>
		<category><![CDATA[mysqlcheck]]></category>
		<category><![CDATA[optimize mysql]]></category>

		<guid isPermaLink="false">http://www.ezlinuxadmin.com/?p=491</guid>
		<description><![CDATA[If you are online then you should run: mysqlcheck mysqlcheck -o &#8211;all-databases If you are offline then you can run myisamchk which is a little more thorough. myisamchk &#8211;sort-index myisamchk -r tbl_name]]></description>
			<content:encoded><![CDATA[<p>If you are online then you should run: mysqlcheck</p>
<blockquote><p>mysqlcheck -o &#8211;all-databases</p></blockquote>
<p>If you are offline then you can run myisamchk which is a little more thorough.</p>
<blockquote><p>myisamchk &#8211;sort-index<br />
myisamchk -r tbl_name</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.ezlinuxadmin.com/2010/06/optimize-mysql-databases/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>When asking about a networking issue, get these details from the server</title>
		<link>http://www.ezlinuxadmin.com/2010/04/asking-networking-issue-server/</link>
		<comments>http://www.ezlinuxadmin.com/2010/04/asking-networking-issue-server/#comments</comments>
		<pubDate>Mon, 05 Apr 2010 20:14:04 +0000</pubDate>
		<dc:creator>EZ linux</dc:creator>
				<category><![CDATA[Cheat Sheets]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Linux Commands]]></category>
		<category><![CDATA[Linux Tricks]]></category>
		<category><![CDATA[lan]]></category>
		<category><![CDATA[networking issue]]></category>
		<category><![CDATA[nic]]></category>

		<guid isPermaLink="false">http://www.ezlinuxadmin.com/?p=460</guid>
		<description><![CDATA[Kernal version uname -a Nic / Lan driver version dmesg &#124; grep r8169 Internet controller lspci -nn &#124; grep Ethernet Details on etho nic card sudo ethtool eth0 Module size lsmod &#124; grep r8169 Module versions cat /proc/modules &#124; grep r8169 Don&#8217;t worry all these commands are safe and just for reporting.]]></description>
			<content:encoded><![CDATA[<p>Kernal version</p>
<blockquote><p><span><span style="font-family: Courier New;">uname -a </span></span></p></blockquote>
<p>Nic / Lan driver version</p>
<blockquote><p><span><span style="font-family: Courier New;">dmesg | grep r8169</span></span></p></blockquote>
<p>Internet controller</p>
<blockquote><p><span><span style="font-family: Courier New;">lspci -nn | grep Ethernet</span></span></p></blockquote>
<p>Details on etho nic card</p>
<blockquote><p><span><span style="font-family: Courier New;">sudo ethtool eth0</span></span></p></blockquote>
<p>Module size</p>
<blockquote><p><span><span style="font-family: Courier New;">lsmod | grep r8169</span></span></p></blockquote>
<p>Module versions</p>
<blockquote><p><span><span style="font-family: Courier New;">cat /proc/modules | grep r8169</span></span></p></blockquote>
<p><span><span style="font-family: Courier New;"><strong>Don&#8217;t worry all these commands are safe and just for reporting.</strong><br />
</span></span></p>
<p><span><span style="font-family: Courier New;"><br />
</span></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ezlinuxadmin.com/2010/04/asking-networking-issue-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mod_cband the new Mod_Bandwidth</title>
		<link>http://www.ezlinuxadmin.com/2010/03/mod_cband-the-new-mod_bandwidth/</link>
		<comments>http://www.ezlinuxadmin.com/2010/03/mod_cband-the-new-mod_bandwidth/#comments</comments>
		<pubDate>Tue, 30 Mar 2010 02:52:12 +0000</pubDate>
		<dc:creator>EZ linux</dc:creator>
				<category><![CDATA[Cheat Sheets]]></category>
		<category><![CDATA[Cpanel and WHM]]></category>
		<category><![CDATA[Linux Security]]></category>
		<category><![CDATA[Linux Software / Scripts]]></category>
		<category><![CDATA[Linux Tricks]]></category>
		<category><![CDATA[limit server bandwidth]]></category>
		<category><![CDATA[mod_bandwidth]]></category>
		<category><![CDATA[mod_cband]]></category>

		<guid isPermaLink="false">http://www.ezlinuxadmin.com/?p=453</guid>
		<description><![CDATA[I spent hours trying to get mod_bandwidth to work simply because I have used it for years. But now with Apache 2.0 times have changed and there is a better option for Linux and it&#8217;s free. The new mod to regulate bandwidth and more is called Mod_cband I&#8217;m not sure what cband means but I [...]]]></description>
			<content:encoded><![CDATA[<p>I spent hours trying to get mod_bandwidth to work simply because I have used it for years. But now with Apache 2.0 times have changed and there is a better option for Linux and it&#8217;s free. The new mod to regulate bandwidth and more is called Mod_cband I&#8217;m not sure what cband means but I can guess channel bandwidth.</p>
<p>Here is how to get it set up with Cantos 5.3 easily.</p>
<p>I wanted to host for my brother the latest WoW patch, but at a hefty 450 MB, I didn’t want to blow all my bandwidth on it either. I am setting a limit for the download at 2.5 TB of bandwidth, and limiting it to 5mbs at 10 connections a second. My hardware is RHEL 4 running on a P4 with Plesk 8. In the guide to follow, you’ll see a few steps that wouldn’t be needed on a non-plesk system. To setup bandwidth limiting for the host, we need to be able to compile a new apache module against our system, and then install and configure it.</p>
<p>Step 1: The prereqs</p>
<p>First I needed to setup a yum repository for FC4. This can be accomplished by issuing an RPM command:</p>
<p>rpm -ivh http://rpm.livna.org/livna-release-4.rpm</p>
<p>Now that you can access the RPM packages, we need to install http-devel using yum:</p>
<p>yum install httpd-devel</p>
<p>If all went well, we can now extract, compile, and install mod_cband for apache:</p>
<p>cd /tmp<br />
wget http://cband.linux.pl/download/mod-cband-0.9.7.4.tgz<br />
tar xzvf mod-cband-0.9.7.4.tgz<br />
cd mod-cband-0.9.7.4<br />
./configure<br />
make<br />
make install</p>
<p>If all went well, restart apache with the new module (you can check httpd.conf to make sure the module is going to be loaded):</p>
<p>/etc/init.d/httpd restart</p>
<p>Step 2: Configuration</p>
<p>Here’s where the Plesk part gets annoying. We can’t just edit our vhosts file, because plesk writes over it all the time. Instead, we edit a /home/httpd/vhosts/*/subdomains/*/conf/vhost.conf file. Mine looks like this:</p>
<p>CBandScoreboard /var/www/scoreboard<br />
CBandPeriod 4W<br />
CBandDefaultExceededCode 509<br />
CBandLimit 2500G<br />
CBandSpeed 5000 5 10<br />
CBandRemoteSpeed 1600 3 1<br />
&lt;Location /cband-status&gt;<br />
SetHandler cband-status<br />
&lt;/Location&gt;<br />
&lt;Location /cband-status-me&gt;<br />
SetHandler cband-status-me<br />
&lt;/Location&gt;</p>
<p>What does this mean? (1) Use /var/www/scoreboard to log usage and limits (2) Reset the limit count every 4 weeks (3) Throw a 509 error when the limits are exceeded (4) Allow 2.5TB per period (5) Allow 5mbs with 5 requests a second and 10 connections at a time oeverall (6) Allow 1.6mbs with 3 requests a second and 1 connections at a time per client (7) Allow us to access a page at /cband-status to view the status.</p>
<p>You’ll also need to issue commands to make the scoreboard directory, and to allow apache to own it:</p>
<p>mkdir /var/www/scoreboard<br />
chown apache:apache /var/www/scoreboard</p>
<p>Finally, Plesk requires you to inform it of your work:</p>
<p>/usr/local/psa/admin/sbin/websrvmng -u &#8211;vhost-name=yourdomain.com</p>
<p>If you restart Apache now, everything should work!</p>
<p>/etc/init.d/httpd restart</p>
<p>Step 3: An Example</p>
<p>You can take a peek at my status page right now if you’d like. It looks a bit like this:</p>
<p><a href="http://www.ezlinuxadmin.com/wp-content/uploads/2010/03/cband-panel.jpg"><img class="alignnone size-full wp-image-454" title="cband-panel" src="http://www.ezlinuxadmin.com/wp-content/uploads/2010/03/cband-panel.jpg" alt="" width="450" height="209" /></a></p>
<p>A quick note, I simply just added:</p>
<blockquote><p>CBandPeriod 4W<br />
CBandLimit 10000G<br />
CBandSpeed 12000 40 80<br />
CBandRemoteSpeed 6400 12 4</p></blockquote>
<p>Now this set the limit to about 12 megs (MPS) a second which is a lot, but this customer is paying $250 a month to cover it. Most websites should max at about 5 MPS. I left out the other options because I didn&#8217;t need them and it&#8217;s less load on the server without them.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ezlinuxadmin.com/2010/03/mod_cband-the-new-mod_bandwidth/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Raise apache 2.0 max clients hard limit in cpanel</title>
		<link>http://www.ezlinuxadmin.com/2010/03/raise-apache-2-0-hard-limit-cpanel-max-client/</link>
		<comments>http://www.ezlinuxadmin.com/2010/03/raise-apache-2-0-hard-limit-cpanel-max-client/#comments</comments>
		<pubDate>Tue, 23 Mar 2010 16:42:44 +0000</pubDate>
		<dc:creator>EZ linux</dc:creator>
				<category><![CDATA[Cpanel and WHM]]></category>
		<category><![CDATA[Linux Software / Scripts]]></category>
		<category><![CDATA[Linux Tricks]]></category>
		<category><![CDATA[apache 2.0 hard limit raise]]></category>
		<category><![CDATA[apche 2.0 raise limit]]></category>
		<category><![CDATA[raise hard limit]]></category>
		<category><![CDATA[raise max clients]]></category>

		<guid isPermaLink="false">http://www.ezlinuxadmin.com/?p=444</guid>
		<description><![CDATA[Apache 2.0 makes raising the max client from the default 256 hard limit a little harder now. If you have cpanel then it&#8217;s even a little harder or I should you just need to know what to do, figuring it out is a shot in the dark. One main difference is you have raise the [...]]]></description>
			<content:encoded><![CDATA[<p>Apache 2.0 makes raising the max client from the default 256 hard limit a little harder now. If you have cpanel then it&#8217;s even a little harder or I should you just need to know what to do, figuring it out is a shot in the dark.</p>
<p>One main difference is you have raise the server limit if you want to raise the max client limit.</p>
<p>The easiest way to do this is to go to:</p>
<ol>
<li>Web Hosting Manager</li>
<li>Then click Apache Configuration</li>
<li>Then click Include Editor</li>
<li>Then click the apache version under the pre-main include</li>
<li>Then add this to the input section:</li>
</ol>
<blockquote><p>ServerLimit 512</p>
<p>StartServers 32<br />
MinSpareServers 5<br />
MaxSpareServers 20<br />
MaxClients 512<br />
MaxRequestsPerChild 1000</p></blockquote>
<p>Then save and it will ask to restart apache you click yes there.</p>
<p>Now your apache limit is set to 512 and cpanel will not mess with it.</p>
<p>Here is the explanation for each derivative in the above code:</p>
<p><strong>MaxClients:</strong></p>
<p>The MaxClients sets the limit on maximum simultaneous requests that can be supported by the server; no more than this number of child processes are spawned. It shouldn&#8217;t be set too low; otherwise, an ever-increasing number of connections are deferred to the queue and eventually time-out while the server resources are left unused. Setting this too high, on the other hand, will cause the server to start swapping which will cause the response time to degrade drastically. The appropriate value for MaxClients can be calculated as:</p>
<p>If there are more concurrent users than MaxClients, the requests will be queued up to a number based on ListenBacklog directive. Increase ServerLimit to set MaxClients above 256.</p>
<p><strong>MinSpareServers, MaxSpareServers, and StartServers:</strong></p>
<p>MaxSpareServers and MinSpareServers determine how many child processes to keep active while waiting for requests. If the MinSpareServers is too low and a bunch of requests come in, Apache will have to spawn additional child processes to serve the requests. Creating child processes is relatively expensive. If the server is busy creating child processes, it won&#8217;t be able to serve the client requests immediately. MaxSpareServers shouldn&#8217;t be set too high: too many child processes will consume resources unnecessarily.</p>
<p>Tune MinSpareServers and MaxSpareServers so that Apache need not spawn more than 4 child processes per second (Apache can spawn a maximum of 32 child processes per second). When more than 4 children are spawned per second, a message will be logged in the ErrorLog.</p>
<p>The StartServers directive sets the number of child server processes created on startup. Apache will continue creating child processes until the MinSpareServers setting is reached. This doesn&#8217;t have much effect on performance if the server isn&#8217;t restarted frequently. If there are lot of requests and Apache is restarted frequently, set this to a relatively high value.</p>
<p><strong>MaxRequestsPerChild:</strong></p>
<p>The MaxRequestsPerChild directive sets the limit on the number of requests that an individual child server process will handle. After MaxRequestsPerChild requests, the child process will die. It&#8217;s set to 0 by default, the child process will never expire. It is appropriate to set this to a value of few thousands. This can help prevent memory leakage, since the process dies after serving a certain number of requests. Don&#8217;t set this too low, since creating new processes does have overhead.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ezlinuxadmin.com/2010/03/raise-apache-2-0-hard-limit-cpanel-max-client/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

