Archive for December, 2007

Log in as root

su postgres
psql -d template1 -U postgres
alter user postgres with password 'newpassword';
\q

Then as root run ‘passwd postgres’ and reset the password there as well in order to enable the login from command line.

A while back Vanessa posted a script on her site that allows site administrators to automate cPanel backups via cron job:

“This is a simple script derived from the cPanel process that generates full account backups, only in PHP form. This makes the task of backing up your site easier and more reliable by allowing you to generate and maintain your own full site backups.

  • Automatic backup via Cron job
  • Generates an actual cPanel backup in tar.gz format
  • Very easy to set up, and executable with only one simple command
  • Email notification when the backup is complete
  • FTP option to transfer the backup file to a specified FTP server
  • Compatible with monsoon, x, x2, and x3 themes”

You can download the script here:

http://www.v-nessa.net/2007/01/03/cpanel-automated-backup-script/

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

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 successfully run ClamAV on your system.

cd /usr/local/cpanel/modules-install/clamavconnector-Linux-i686
wget http://freshmeat.net/redir/clamav/29355/url_tgz/clamav-0.92.tar.gz
wget http://downloads.sourceforge.net/clamav/clamav-0.92.tar.gz.sig
tar -xvzf clamav-0.92.tar.gz
wget http://missysadmin.com/files/clamav/install2
chmod 755 install2

You’ll need to check the 2nd and 3rd line in the install2 script to make sure they match the old and new versions of ClamAV.  To find the old version, run clamd –version.

AVV=0.92
AVVOLD=0.91.2

From here, just run ./install2 and let the installation run. You can confirm the upgrade by calling the binary with the version switch:

root@server [~]# clamd –version
ClamAV 0.91.2/5186/Wed Dec 19 22:38:25 2007

At this point it’s also a good idea to uncheck the ‘install and keep updated’ box for ClamAV in WHM.



Site Navigation