topleft topright

Tranquil Hosting Blog

Archive for the ‘cpanel’ Category

cPanel Conference 2008

Monday, February 25th, 2008

For the third year running the cPanel will be holding its annual conference in Houston, Texas from June 11 to 13. This year’s conference promises to be more in depth, with more advanced topics then the previous years. There will be guest speakers, in addition to cPanel developers cPanel techs will be on hand to provide live, in person technical support. Also taking place will be a panel discussion with some cPanel’s developers and techs. With the upcoming release of cPanel Server Suite for Windows scheduled for April, the conference will have several sessions geared towards the new product and how it will significantly enhance Windows based hosting operations.

Conference registration is once again very reasonable at $60.00 USD per attendee. Attendees will be able to meet vendors and producers of software plugins that work with cPanel as well as service providers that deploy cPanel. As the host of the conference, cPanel will be providing a cocktail reception with a top shelf open bar on the evening of the 11th as well as a sumptuous dinner for all attendees and vendors on the 12th. Lunch and breakfast will also be provided both days.

For more information, please visit the conference site located at http://conference.cpanel.net/

Cpanel presentation on MySQL Clustering

Monday, December 3rd, 2007

The Cpanel team has published this presentation from their training similar that addresses how to use remote MySQL servers and the basics of MySQL clustering and replication:

http://trainingseminar.cpanel.net/slides/trackb/MySQL%20Remote%20Server.pdf

Cpanel’s support for remote MySQL servers is not very robust, but most web hosts should consider it if they are running highly dense shared hosting servers. The presentation outlines the modifications necessary to point Cpanel and its related applications to the remote MySQL server.

Parse exim logs for large attachments

Wednesday, November 14th, 2007

This Python script can be used for parsing exim mail logs to find messages that are over a certain filesize. In this case we were looking for senders of messages over 10MB (10000000 bytes). You can change that in the second to last line of the script.

example usage: cat /var/log/exim_mainlog | grep domain.com | msgsizefilter.py

Here it is:


#!/usr/bin/env python

import sys
for line in sys.stdin.readlines():
if line.find("S=") != -1:
s = int(line.split("S=")[1].split(" ")[0])
d = " ".join( line.split(" ")[0:2])
e = line.split(" <= ")[1].split(" ")[0]
if s > 10000000:
print “%s \t %d \t (%s)” % (d, s, e)

Yum error: unable to open database file

Wednesday, September 5th, 2007

We have seen a problem with several Cpanel Linux VPS systems recently. It pops up in several places and is related to yum, the update tool that comes with CentOS and is relied upon by Cpanel.

For example, running a basic command like “yum list” results in a Python trackback error with some ugly error message like:

File “/usr/lib/python2.4/site-packages/yum/repos.py”, line 200, in populateSack
sack.populate(repo, with, callback, cacheonly)
File “/usr/lib/python2.4/site-packages/yum/yumRepo.py”, line 91, in populate
dobj = repo.cacheHandler.getPrimary(xml, csum)
File “/usr/lib/python2.4/site-packages/yum/sqlitecache.py”, line 100, in getPrimary
return self._getbase(location, checksum, ‘primary’)
File “/usr/lib/python2.4/site-packages/yum/sqlitecache.py”, line 93, in _getbase
self.updateSqliteCache(db, parser, checksum, metadatatype)
File “/usr/lib/python2.4/site-packages/yum/sqlitecache.py”, line 382, in updateSqliteCache
cur.execute(”DELETE FROM “+table+ ” where pkgKey in %s” % delpkgs)
File “/usr/lib64/python2.4/site-packages/sqlite/main.py”, line 244, in execute
self.rs = self.con.db.execute(SQL)
_sqlite.DatabaseError: unable to open database file

Some people say its a SQLite issue, the lightweight sql-like database used by yum for the local rpm database. The error message “unable to open database file” made me think this problem was related to the rpm database files in /var/lib/rpm. I tried rebuilding the rpm database but no luck.

It turns out the problem is much simpler:

[root@host1 ~]# df
Filesystem 1K-blocks Used Available Use% Mounted on
vzfs 83886080 3671424 80214656 5% /
df: `(deleted) /var/tmp’: No such file or directory

Notice anything wrong? Yikes! we don’t have a working /tmp or /var/tmp directory. Apparently the problem was inadvertendly caused by some Cpanel scripts which try to help us by securing those directories, making them noexec so that attackers can’t run rogue scripts directly from the tmp directories.

The fix

Wipe out the tmp dir stuff that cpanel had setup:

/bin/umount -l /tmp
/bin/umount -l /var/tmp
/bin/rm -fv /usr/tmpDSK

Now reset it:

/scripts/securetmp –auto

Cpanel License Check Plugin for Nagios

Tuesday, July 3rd, 2007

We wrote a plugin for Nagios which will check the status of a Cpanel server license. The plugin uses the Cpanel license web server (http://verify.cpanel.net) to verify the license status of a server. If the plugin cannot verify the license, or if the license has expired, it generates a critical error.

The plugin was written in Python and has been tested extensively here.

Download version 1 of this plugin: check_cpanel.py

Cpanel 11 Preview

Wednesday, May 23rd, 2007

For the past few years I haven’t seen any huge changes in WHM/Cpanel although they keep putting out new versions of their software. Recently we upgraded a customer to Cpanel 11 and have seen that this version has some significant changes and new features to watch out for.

Right now you have to be running the EDGE release series to get all of these new bells and whistles:

New LAMP stack

Cpanel 11 has a overhauled version of its Apache building tool, easyapache. The newest easyapache lets you choose between Apache 1.3, 2.0, and 2.2. Native support of Apache 2.0 and 2.2 is brand new to Cpanel despite years of the software being available and stable. The latest stack now is:

  • Apache 2.2.4
  • PHP 5.2.2
  • MySQL 5.0.27

Notwithstanding the newer versions, the easyapache tool is much more powerful. You can choose from a huge variety of Apache server modules as well as PHP modules to build.


easyapache 2

easyapache 1

New x3 theme

The basic x or x2 theme in WHM/Cpanel has always been very basic and functional with a grab bag of spelling and grammatical errors thrown in. Most shared web hosting providers would quickly replace it, thanks to Cpanel’s extensive theme support. The Cpanel team finally did something about it, releasing their new x3 theme with Cpanel 11. To their credit, a lot of the wording has been cleaned up and improved but I know I still spotted one spelling error in just a few minutes of digging around in WHM.

The WHM theme is functionally the same, just cleaned up and spruced up a bit:


whm-1.gif

The new Cpanel x3 theme is more impressive. When a new user first logs in to their account, they are presented with a “welcome to cpanel” wizard, designed to bring them up to speed on the control panel:


x3 welcome

The welcome wizard is a great idea. It offers basic info on how to upload your website, the concept of paths and the public_html folder, etc. It goes through several steps including e-mail account setup and setting up a catch-all. Personally I think the beginning user shouldn’t be offered the option of a catch-all because of the amount of spam it can let in. The wizard also prompts the user to setup ssh keys for password-less authentication. I was scratching my head wondering who thought that should go into the new user setup wizard.

Web disk via WebDAV

Another new feature that is also included in the wizard allows users to easily setup a folder on their desktop computer to drag and drop files to their hosting account. The wizard in cpanel does a pretty good job of explaining this. Cpanel is using WebDAV with SSL support to make this happen.


x3 user

Links

Copyright © 2007, Tranquil Hosting, Inc.
Managed Dedicated Servers | Managed Virtual Private Servers | Raleigh Datacenter Colocation
Raleigh, North Carolina Premium Hosting Provider
Terms of Service