If, like myself, you have recently upgraded the cPanel control panel system on your Red Hat Enterprise Linux 5.2 server and received the error message “Error: Package system can not be repaired automatically” when upgrading Apache, then it’s probably caused by a problem with either the RedHat Package Manager (RPM) or YUM. To fix it, first ensure that no RPM or yum updates are running: ps auxwww | grep yum ps auxwww | grep rpm If any are running, find out why and kill -9 them if they are zombie processes. Now you just need to rebuild the RPM database: rm /var/lib/rpm/__db.* -rf rpm –rebuilddb This process may take some time (between 1 and 30 minutes depending on your server speed and the number of packages installed). Once it’s completed, you should be able to upgrade without problems.
Category: Net: Techy: cPanel
Posts about the cPanel control panel system
If you are running a reasonably recent version of cPanel (I think v11 or later), you have the ability to run WHM backups over rsync instead of just FTP. This post, if it isn’t obvious, is intended for people with root access to their cPanel server. So how do you do this? Simple, configure the backups as per normal in WHM to backup your secondary hard drive or a set partition on your main hard drive. Then just add a script via the shell command line as “/scripts/postcpbackup” (open PuTTY, connect to the server, login, “su” to root if necessary if you didn’t login as root, type “nano -w /scripts/postcpbackup”) and past the following script: #!/bin/sh rsync -vrplogDth /backup/cpbackup/* username@backupserver:/backuplocation/ Replacing “/backup/cpbackup/” with the location of your “local backups” if you changed it from the default, “username” with the username of your rSync account, “backupserver” with the hostname/IP address of the backup server and “backuplocation” of the place to store the backups. (It’s CTRL+X to exit nano by the way). You then just need to make it executable by running “chmod a+x /scripts/postcpbackup” and you are done! Hope it helps someone!
As some of you may be aware, the new version of cPanel (version 11) now supports a technology called “WebDav” (known as “Web Disks” within cPanel).
Basically this allows you to setup your cPanel web hosting account as an additional drive on your machine – making the uploading and publishing of files a lot easier.
However, server administrators will first need to enable the TCP ports 2077 and 2078 in and outbound for this to work correctly (don’t forget to restart/reload the firewall). Once that’s done, your customers should be able to login to their cPanel control panel and either select the new fancy “Getting Started” wizard or “Web Disks->Access Web Disk” to setup a link.
Using cPanel’s handy “Auto configuration” tool is useful – but you may hit the same problem I did when I downloaded the installer .vbs file to my Windows XP machine via Firefox. Attempting to open the file came up with the error “Windows Script Host access is disabled on this machine. Contact your administrator for details”. Needless to say – I am the administrator and if I’ve disabled something like that in the past, it’s probably for a very good reason!
So – how can we manually configure cPanel’s WebDav uploading tool manually if the automatic method fails?….
Many of you with cPanel web hosting accounts would have needed to upload files to a cPanel server which were in .tar.gz, .gz or .zip files (these are compressed archives). And I bet many of you would like to have been able to upload the archives to the server “as is” (to save decompressing them on your machine and then having to slowly upload each and every file). But did you know there is actually a “cheat” for this? Just upload the files to your webspace via FTP (or via the cPanel File Manager) as per usual. Then login to your cPanel control panel and select “File Manager” (if you are running on the new x3 theme with cPanel 11, it doesn’t matter if you select “File Manager” or “Legacy File Manager”). Select the archive you uploaded, and then click “Decompress” from the top menu (on the new file manager) or “Extract from Archive” from the right hand menu (on the old file manager) and there you go. Your files are now decompressed on the server quickly and simply!
Whilst on the subject of outdated cPanel based things, I’ve just put together a quick little script to scan a cPanel based webserver for outdated Coppermine Photo Gallery installations.
As the notes state, the script isn’t pretty, it isn’t efficient, but it works.
Comments/feedback are appreciated.
Coppermine Gallery Outdated installation checker v0.01
Set $disableandemail to 1 to disable the scripts and email the users.