Adventures of a Sysadmin, Fun With cPanel Edition

Oh, how I loathe cPanel. It completely takes over your linux
servers. Once installed, there is no uninstalling it, it has hooks
into every part of the OS. Once infected by the cPanel virus, you
must make all changes to the server configuration through cPanel, or
cPanel's highly intuitive collection of command line utilities.
Everything.


                       *~*~*~


I have a client for whom I assist in maintaining a cPanel-infected
server. He has about 25 hosted accounts, and since cPanel has made
it oh-so-easy for him to perform common administrative tasks
himself, he felt the need to buy a shell domain just to use as a DNS
zone for a handful of other domains - all on the same server (right,
it doesn't make sense to me, either). In effect he's only using this
dummy zone's NS records to get traffic to the server itself.


                       *~*~*~


So anyway, the other day he asks me to transfer one of his websites
to a new server. No problem, cPanel provides a web-gui just for
that! It first backs up the entire account, then, instead of just
transferring it, it helpfully compresses it all and transfers the
tarball to the new server. Of course, this is his biggest account,
with 4GB of website. And holy fuck, this thing is the slowest
compression utility I have ever seen, somehow it is gzipping at like
1MB every 20 seconds. It must be using some native perl interface to
zlib. I'll let it run, why not? I've got time to kill. Two hours
later...sigh, kill the web page, which is spinning aimlessly, kill
the backup process. Delete the 270MB partial backup tarball (270MB
in 2 hours...). Delve into the cPanel docs for that obscure command
line switch not exposed to the web gui that will fix things.



Aha! --skiphomedir. Re-run backup from command line, which now takes
10 seconds. Install it on the new server, another 10 seconds. Rsync
the home directory to the new server - a minute or two via a fast
LAN connection. Phew.



Now my client says we MUST use the exact same DNS servers for this
domain. "Problem," I say. "You're using the nameservers for this
domain in six other domains. If we move the nameserver IPs, those
other six sites will break. I'll just change the host records for
this website to point to the new server...it will take a few
seconds." This works, but I guess is not what he wants as it is far
too easy. I should have intuited that moving a website meant also
moving the DNS server. I change the IPs back, he buys a new domain
name, I create a new dummy domain on the new server, and give its
zone two NS records that point to...you guessed it, itself. Now he
has to change the delegation at the registrar. And create the glue
records. And this just became a whole lot harder to undo if there is
a problem.


                       *~*~*~


Ah, cPanel's so-called easyapache. Re-compile apache and PHP, and
choose all the addon modules you need. It's easy! Just don't think
of using older versions of PHP. Or perhaps the older versions using
deprecated functions still in use on a website you just transferred
to a new server. Shit. . "Hmm, cPanel has old versions of PHP I can
install, they are unsupported, but who cares! Sweet!" . Website now
showing a blank page. . Apparently, enabling an old version of PHP
as an addon module to easyapache helpfully ignores all other addon
modules. I mean, it's old and unsupported, why would you need that
pesky GD API?


                       *~*~*~