Missing MySQL Socket (mysql.sock) Error

If you get some variation of the error below: error: ‘Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ You need to recreate the MySQL socket symlink in /tmp: ln -s /var/lib/mysql/mysql.sock /tmp/ If you have magically disappearing mysql.sock file, it could point to a memory issue or disk space issue on the /tmp partition.

Missing libmysqlclient.so.14 Error

This is a common error when dealing with command line software that uses MySQL: error while loading shared libraries: libmysqlclient.so.14: cannot open shared object file: No such file or directory Usually this simple command will correct the problem: cp /usr/lib/mysql/libmysqlclient.so.14 /usr/lib

Quick PEAR Usage Tutorial

To find out what packages are installed, you can run a list: pear list-all To update the PEAR repositories: pear channel-update pear.php.net To install a package, for instance, XML_RPC: pear download XML_RPC pear install XML_RPC Note on installations: you don’t always have to download the module first, but, on dedicated server environments where /tmp is… Continue reading Quick PEAR Usage Tutorial

Installing Ruby on cPanel

Here’s how to install Ruby on Rails on a cPanel system: Update: These instructions were modified for Ruby 1.8.6, since 1.8.5 is no longer available! First install Ruby: wget ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.6.tar.gz tar -xvzf ruby-1.8.6.tar.gz cd ruby-1.8.6 ./configure make make install Now, install the Gems and Rails: wget http://rubyforge.org/frs/download.php/11289/rubygems-0.9.0.tgz tar -xvzf rubygems-0.9.0.tgz cd rubygems-0.9.0 ruby setup.rb gem… Continue reading Installing Ruby on cPanel

cPanel PEAR Installer Errors

A new feature in cPanel 11/x3 is the PEAR module installer that allows users to install their own PEAR modules locally in their account.  I’ve heard that a lot of servers with existing PHP installations have had problems getting this to work, and instead are prompted with this error: X-Powered-By: PHP/5.2.3 Content-type: text/html Parse error:… Continue reading cPanel PEAR Installer Errors

Disable Stats Programs for a User

There are some cases where you may want to disable stats programs from running for certain users. To do so, open up their user file in /var/cpanel/users and add these lines: STATGENS=WEBALIZER,AWSTATS,ANALOG skipanalog=0 skipawstats=1 skipwebalizer=0 Of course, 1=yes and 0=no, and if the stats program is not enabled in the server it won’t run at… Continue reading Disable Stats Programs for a User

Remove All Spam and Trash from Server

A buildup of spam and trash in user accounts can occupy several gigs worth of space. To easily remove spam and trash from your users’ accounts, you can use the following commands: Maildir/Courier-IMAP: rm -rf /home/*/mail/*/*/.spam/* rm -rf /home/*/mail/.spam/* rm -rf /home/*/mail/*/*/.Trash/cur/* rm -rf /home/*/mail/*/*/.Trash/new/* CPPOP: rm -rf /home/*/mail/*/*/spam rm -rf /home/*/mail/spam rm -rf /home/*/mail/INBOX.Trash… Continue reading Remove All Spam and Trash from Server

Upgrading ClamAV – cPanel

Sometimes cPanel can be late with pushing out critical updates for third-party software. At the time of this writing, cPanel’s latest release of ClamAV is 0.91 which was determined to have a major security exploit, so all users are encouraged to update to 0.92. This upgrade guide assumes that you used cPanel’s plugin installer to… Continue reading Upgrading ClamAV – cPanel

Upgrading to Perl 5.8.8 – cPanel

Perl 5.8.8 has a lot of improvements over 5.8.7, and is highly recommended for use on cPanel 11.  Upgrading is simple: wget http://layer1.cpanel.net/perl588installer.tar.gz tar xfvz perl588installer.tar.gz cd perl588installer ./install