Debian amd64 and i386 apt woes

If you ever see something similar to: [email protected]:/# apt-get install rbenv Reading package lists… Done Building dependency tree Reading state information… Done You might want to run ‘apt-get -f install’ to correct these: The following packages have unmet dependencies: libc6 : Breaks: libc6:i386 (!= 2.13-38+deb7u8) but 2.13-38 is to be installed libc6:i386 : Depends: libc-bin:i386 (= 2.13-38) Recommends: libc6-i686:i386 but it is not going to be installed Breaks: libc6 (!=…

Trim the eximstats database (cPanel)

If you’re using cPanel and have noticed you have a large eximstats database, you can clear it using one of these two methods: Method one: use eximstats; delete from sends; delete from smtp; delete from failures; delete from defers;   Method two: mysqladmin drop eximstats mysqladmin create eximstats mysql eximstats < /usr/local/cpanel/etc/eximstats_db.sql

Switching from systemd to upstart on Ubuntu

We’ve been seeing a few issues with systemd in virtual servers, switching back to upstart almost always fixes these issues. but what IS systemd? upstart? Short answer – the boot scripts for the operating system. Long answer – Check out https://wiki.ubuntu.com/SystemdForUpstartUsers it will explain it far better than I ever could. 🙂 To switch to upstart: sudo apt-get install upstart-sysv sudo apt-get remove ubuntu-standard systemd-sysv sudo update-initramfs -u sudo reboot…

Disable cPHulk from the shell

If you’ve ever found yourself blocked by cphulk (typically this occurs because there have been too many failed logins by username or IP) and are still able to access the system the following will disable cphulk: /usr/local/cpanel/etc/init/stopcphulkd /usr/local/cpanel/bin/cphulk_pam_ctl –disable   another method is to clear the cphulk database (please note this will remove ALL current blocked usernames and IP addresses so I do not recommend it): mysql -u root use cphulkd;…

cPanel webmail woes

If you’re having issues with any webmail application that is included with cPanel have no fear! Just run the following command from ssh or a command line terminal as root or escalated user: For Roundcube /usr/local/cpanel/bin/update-roundcube –force For Horde /usr/local/cpanel/bin/update-horde –force For SquirrelMail /usr/local/cpanel/bin/update-squirrelmail –force   that will fix most issues, including with the databases themselves.

Quickly change a files encoding using vi

Ever needed to change a files encoding? One example would be to display characters in other languages properly on a website. Here’s a simple vi trick to do just that: vi filename.php :set bomb :set fileencoding=utf-8 :wq   Note: to find the encoding of a file: file -bi <file name>