<?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>Sniptools &#187; cpanel</title> <atom:link href="http://sniptools.com/tag/cpanel/feed/" rel="self" type="application/rss+xml" /><link>http://sniptools.com</link> <description>Design &#38; Technology Observations</description> <lastBuildDate>Tue, 15 May 2012 09:23:41 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.2</generator> <xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" /> <item><title>Increase size of /tmp folder on CentOS Linux under Cpanel</title><link>http://sniptools.com/hosting/increase-size-of-tmp-folder-on-centos-linux-under-cpanel</link> <comments>http://sniptools.com/hosting/increase-size-of-tmp-folder-on-centos-linux-under-cpanel#comments</comments> <pubDate>Sat, 30 Apr 2011 09:28:23 +0000</pubDate> <dc:creator>Shanx</dc:creator> <category><![CDATA[Hosting]]></category> <category><![CDATA[Unix]]></category> <category><![CDATA[centos]]></category> <category><![CDATA[cpanel]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[unix]]></category><guid
isPermaLink="false">http://sniptools.com/?p=590</guid> <description><![CDATA[Any dedicated server hosting some websites that get meaningful traffic will quickly ourgrow Cpanel's default /tmp folder size of 512MB. It houses PHP session files, temporary file uploads, your database temporary files, your web server's cache including the one from caches such as APC or eAccelerator, and other such stuff. With the tmp partition full, [...]]]></description> <content:encoded><![CDATA[<p>Any dedicated server hosting some websites that get meaningful traffic will quickly ourgrow Cpanel's default <code>/tmp</code> folder size of 512MB. It houses PHP session files, temporary file uploads, your database temporary files, your web server's cache including the one from caches such as APC or eAccelerator, and other such stuff.</p><p>With the tmp partition full, the server will experience many random issues such as server crashes. Your sites will quickly go down and leave you head-scratching.</p><p>Fortunately, it's quite easy to resize the /tmp partition on cPanel servers — especially if it is the default one created by cPanel installs. There's a handy script at <code>/scripts/securetmp</code>.</p><p>Open this file:</p><blockquote><p><code>pico /scripts/securetmp<br
/> </code></p></blockquote><p>And find this line:</p><blockquote><p><code>my $tmpdsksize     = 512000;    # Must be larger than 250000<br
/> </code></p></blockquote><p>Change it to a larger number than 512 MB. Say you want it to be 2 GB:</p><blockquote><p><code>my $tmpdsksize     = 2097152;   # 2GB for the /tmp folder<br
/> </code></p></blockquote><p>Now close and save the file.</p><p>We need to stop all services that may be using this folder. For me, this includes MySQL, Apache and Nginx.</p><blockquote><p><code>service mysql stop<br
/> service nginx stop<br
/> service httpd stop<br
/> </code></p></blockquote><p>Now we will simply unmount the /tmp folder and recreate it. Here's the sequence of commands to create it:</p><blockquote><p><code>lsof /tmp<br
/> umount -l /tmp<br
/> umount -l /var/tmp<br
/> rm -fv /usr/tmpDSK<br
/> /scripts/securetmp<br
/> </code></p></blockquote><p>Done. You can verify the size of the /tmp folder among others:</p><blockquote><p><code>df -h<br
/> </code></p></blockquote><p>This should show you something like this:</p><blockquote><p><code>...<br
/> /usr/tmpDSK   ext3    2.0G  996M  1.1G  51%   /tmp<br
/> ...<br
/> </code></p></blockquote><p>NOTE: If you have any problems, for instance, the size of the recreated /tmp folder is not really 2GB despite that code in the /scripts/securetmp we changed, it may be because of some settings you have in the /etc/fstab file. Take a look at it and comment out any lines that interfere with the LABEL for /tmp mount.</p> ]]></content:encoded> <wfw:commentRss>http://sniptools.com/hosting/increase-size-of-tmp-folder-on-centos-linux-under-cpanel/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Upgrade Zend Optimizer on Cpanel WHM</title><link>http://sniptools.com/system-maintenance/upgrade-zend-optimizer-on-cpanel-whm</link> <comments>http://sniptools.com/system-maintenance/upgrade-zend-optimizer-on-cpanel-whm#comments</comments> <pubDate>Sat, 12 May 2007 05:22:32 +0000</pubDate> <dc:creator>Shanx</dc:creator> <category><![CDATA[System Maintenance]]></category> <category><![CDATA[cpanel]]></category> <category><![CDATA[PHP]]></category> <category><![CDATA[SSH]]></category> <category><![CDATA[Tips/Tricks]]></category> <category><![CDATA[Zend]]></category><guid
isPermaLink="false">http://sniptools.com/cms/?p=147</guid> <description><![CDATA[upgrade zend optimizer on cpanel
]]></description> <content:encoded><![CDATA[<p>Simple little trick to get to the latest version.</p><p>Most <a
href="http://www.cpanel.net/products/cPanelandWHM/linux/try_cp_whm.htm">Cpanel/WHM</a> servers come with <a
href="http://www.php.net">PHP</a> and <a
href="http://www.zend.com">Zend</a> installed. With the recent (and important) update of PHP 5.2.1, the <a
href="http://www.zend.com/products/zend_optimizer">Zend Optimizer</a> that is installed by default (version 3.0.1 as of this writing) breaks.</p><p>You might begin to see a message like this:</p><div
class="code">[26-Apr-2007 10:32:49] PHP Warning: Zend Optimizer does not support this version of PHP — please upgrade to the latest version of Zend Optimizer in Unknown on line</div><p>To fix this, simply login to your SSH as root and execute the following command to upgrade Zend Optimiser:</p><blockquote><p><code>/scripts/installzendopt <span
style="color: #ee0000;">3.2.8</span></code></p></blockquote><p>Note that if you skip the version number, Zend Optimizer 3.0.1 will be installed by default. The trick is to specify the version as above. This will also work in the future, so as long as you know the latest released version of Zend Optimizer, just replace the red text above with that number.</p> ]]></content:encoded> <wfw:commentRss>http://sniptools.com/system-maintenance/upgrade-zend-optimizer-on-cpanel-whm/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>Fix for Cpanel update that breaks mysqlhotcopy</title><link>http://sniptools.com/hosting/fix-mysqlhotcopy-broken-by-cpanel-upgrade</link> <comments>http://sniptools.com/hosting/fix-mysqlhotcopy-broken-by-cpanel-upgrade#comments</comments> <pubDate>Mon, 02 Apr 2007 11:10:00 +0000</pubDate> <dc:creator>Shanx</dc:creator> <category><![CDATA[Hosting]]></category> <category><![CDATA[Unix]]></category> <category><![CDATA[cpanel]]></category> <category><![CDATA[database]]></category> <category><![CDATA[Databases]]></category> <category><![CDATA[mysql]]></category> <category><![CDATA[SSH]]></category> <category><![CDATA[Tips/Tricks]]></category><guid
isPermaLink="false">http://sniptools.com/cms/?p=135</guid> <description><![CDATA[fix mysqlhotcopy broken by cpanel upgrade
]]></description> <content:encoded><![CDATA[<p>The recent upgrades of Cpanel have been a pain because they've broken mysqlhotcopy. Not kosher. Fortunately fixing this is pretty straightforward by simply downgrading the DBD module of Perl, on which mysqlhotcopy relies.</p><p><span
id="more-135"></span></p><h3>The recent upgrades of Cpanel have been a pain because they've broken <code>mysqlhotcopy</code>. Not kosher. Fortunately fixing this is pretty easy, by simply downgrading the DBD module of Perl, which <code>mysqlhotcopy</code> relies on.</h3><p>Usually the error is something like this:</p><div
class="code">Invalid db.table name 'DBNAME.USERNAME`.`campaign' at /usr/bin/mysqlhotcopy line 854.</div><p>To solve this, simply downgrade the DBD to version 4.001. Create a script anywhere on your root folder as, say, <code>dbd-downgrade.sh</code>:</p><div
class="wp_syntax"><table><tr><td
class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
</pre></td><td
class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh</span>
<span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src
<span style="color: #c20cb9; font-weight: bold;">wget</span> <span style="color: #660033;">-O</span> dbd.tar.gz  <span style="color: #ff0000;">&quot;http://search.cpan.org/CPAN/authors/id/C/CA/CAPTTOFU/DBD-mysql-4.001.tar.gz&quot;</span>
<span style="color: #c20cb9; font-weight: bold;">gzip</span> <span style="color: #660033;">-cd</span> dbd.tar.gz <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">tar</span> xf -
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-rf</span> dbd.tar.gz
<span style="color: #7a0874; font-weight: bold;">cd</span> DBD-mysql-<span style="color: #000000;">4.001</span>
<span style="color: #c20cb9; font-weight: bold;">perl</span> Makefile.PL
<span style="color: #c20cb9; font-weight: bold;">make</span>
<span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span></pre></td></tr></table></div><p>Then of course <code>chmod</code> the file to executable (644) and run it:</p><div
class="code">./dbd-downgrade.sh</div><p>Then try your <code>mysqlhotcopy</code> command again. It should work. The only thing to consider is that if your Cpanel is setup to upgrade automatically, it may rebuild DBD. You may need to downgrade the DBD again, until this thing is fixed!</p><p>If after this update, you see the error for RELOAD privileges, like this…</p><pre>DBD::mysql::db do failed: Access denied; you need the RELOAD privilege for this operation at /usr/bin/mysqlhotcopy line 472.</pre><p>…then simply login to mysql as "root" user through the root SSH terminal, and execute the following command:</p><pre class="bash" >mysql&gt;  grant all privileges on *.* to root@localhost;
mysql&gt;  flush privileges;</pre><p>Done. That should do it. Let me know if it doesn't.</p><h3>A more long term fix</h3><p>MySQL bug list has a <a
href="http://bugs.mysql.com/bug.php?id=27303">couple of suggested fixes</a>. If you are comfortable with Perl, you can edit the code in <code>/usr/bin/mysqlhotcopy</code> and have it solved in a better way.</p> ]]></content:encoded> <wfw:commentRss>http://sniptools.com/hosting/fix-mysqlhotcopy-broken-by-cpanel-upgrade/feed/</wfw:commentRss> <slash:comments>4</slash:comments> </item> <item><title>Movable Type Workaround for Cpanel update woes</title><link>http://sniptools.com/vault/mt-cpanel-issue-dbd-downgrade</link> <comments>http://sniptools.com/vault/mt-cpanel-issue-dbd-downgrade#comments</comments> <pubDate>Sat, 02 Jul 2005 22:55:37 +0000</pubDate> <dc:creator>Shanx</dc:creator> <category><![CDATA[Miscellaneous]]></category> <category><![CDATA[cpanel]]></category> <category><![CDATA[Databases]]></category> <category><![CDATA[movable type]]></category> <category><![CDATA[mysql]]></category> <category><![CDATA[Tips/Tricks]]></category><guid
isPermaLink="false">http://sniptools.com/cms/?p=112</guid> <description><![CDATA[mt cpanel issue dbd downgrade
]]></description> <content:encoded><![CDATA[<p>Latest Cpanel updates are breaking Movable type installations, wreaking havoc with 500 Server Error messages and causing core dumps all over the place. Here's the kludgish workaround, that, well, works.</p><h3>Latest <a
href="http://forums.cpanel.net/showthread.php?t=40896">Cpanel</a> updates are <a
href="http://www.movabletype.org/support/index.php?act=ST&amp;f=9&amp;t=52920&amp;st=0">breaking Movable type</a> installations, wreaking havoc with 500 Server Error messages and causing core dumps all over the place. Here's the kludgish workaround, that, well, works.</h3><p>A user on MT forums <a
href="http://www.movabletype.org/support/index.php?s=7aea697cfc90b5359fcb0f9716479639&amp;act=ST&amp;f=9&amp;t=52920&amp;st=16">suggested</a> that downgrading to DBD::Mysql 2.9007 should do the trick. It does. Six Apart seems to be <a
href="http://www.sixapart.com/pronet/weblog/2005/07/cpanel_updates_.html">aware of it</a>.</p><p>Here's a little script for Cpanel/WHM users to execute on their SSH shells. Save it as, say, "dbidowngrade.sh" in your root folder, CHMOD it to 755, and execute it with "./dbidowngrade.sh" at the command prompt.</p><h3>Important Note:</h3><p>Yes, some people will have problems with Cpanel updating their DBD::Mysql with the /upcp script, in which case you should probably set up a cron job to execute the above script on a regular basis. I have it up as hourly and it takes just a few seconds. I have commented out the lines in green because you don't need to download the file from CPAN more than once.</p><p>Please remember, this is merely a temporary solution. Movable Type should of course have an update soon, and Cpanel should shortly start providing the 3.0001 version in the near future.</p><h3>Update: July 8, 2005</h3><p>The latest update of <a
href="http://search.cpan.org/dist/DBD-mysql/">DBD::Mysql, 3.0001_3</a>, works for me. So here's the new code:</p><div
class="wp_syntax"><table><tr><td
class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
</pre></td><td
class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh</span>
<span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">wget</span> <span style="color: #660033;">-O</span> dbd.tar.gz <span style="color: #ff0000;">&quot;http://search.cpan.org/CPAN/authors/id/C/CA/CAPTTOFU/DBD-mysql-3.0001_3.tar.gz&quot;</span>
<span style="color: #c20cb9; font-weight: bold;">gzip</span> <span style="color: #660033;">-cd</span> dbd.tar.gz <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">tar</span> xf -
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-rf</span> dbd.tar.gz
&nbsp;
<span style="color: #7a0874; font-weight: bold;">cd</span> DBD-mysql-<span style="color: #000000;">3.0001</span>_3
<span style="color: #c20cb9; font-weight: bold;">perl</span> Makefile.PL
<span style="color: #c20cb9; font-weight: bold;">make</span>
<span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span></pre></td></tr></table></div><h3>Update: July 6, 2005</h3><p>Looks like the DBD::Mysql author has <a
href="http://search.cpan.org/dist/DBD-mysql/">released a 3.0001_2 developer update</a>. I haven't been able to install it, it gives me a bunch of errors but that's par for the course from 'developer' versions of software. YMMV. I'll stick with the 2.9007 for now.</p><h3>Original method: Downgrading surely works</h3><div
class="wp_syntax"><table><tr><td
class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
</pre></td><td
class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh</span>
<span style="color: #666666; font-style: italic;">#---------------------------------------------</span>
<span style="color: #666666; font-style: italic;"># Script to downgrade to DBD::mysql 2.9007</span>
<span style="color: #666666; font-style: italic;">#---------------------------------------------</span>
<span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src
<span style="color: #c20cb9; font-weight: bold;">wget</span> <span style="color: #660033;">-O</span> dbd.tar.gz <span style="color: #ff0000;">&quot;http://www.cpan.org/modules/by-module/DBD/DBD-mysql-2.9007.tar.gz&quot;</span>
<span style="color: #c20cb9; font-weight: bold;">gzip</span> <span style="color: #660033;">-cd</span> dbd.tar.gz <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">tar</span> xf -
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-rf</span> dbd.tar.gz
<span style="color: #7a0874; font-weight: bold;">cd</span> DBD-mysql-<span style="color: #000000;">2.9007</span>
<span style="color: #c20cb9; font-weight: bold;">perl</span> Makefile.PL
<span style="color: #c20cb9; font-weight: bold;">make</span>
<span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Clean up</span>
<span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-rf</span> DBD-mysql-<span style="color: #000000;">2.9007</span></pre></td></tr></table></div>]]></content:encoded> <wfw:commentRss>http://sniptools.com/vault/mt-cpanel-issue-dbd-downgrade/feed/</wfw:commentRss> <slash:comments>9</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced (User agent is rejected)
Database Caching 4/9 queries in 0.002 seconds using disk: basic
Object Caching 770/779 objects using disk: basic

Served from: sniptools.com @ 2012-05-17 20:03:55 -->
