Featured Posts

Using DKIM with Exim and cPanel Similar to the intentions of SPF records and DomainKeys, DKIM is intended to authenticate a sender by using a public/private key pair to digitally sign email, therefore increasing deliverability. At this...

Readmore

Copy Outgoing Email on a cPanel Server with Exim A common request we get is how a user can automatically BCC outgoing email to another address. This is most often requested by law firms that need to be able to retain copies of communication. Forwarding...

Readmore

Do You Care About Your Customers' Data? I was working a case last week for a new client that's been hosting local business websites for over three years. As with all of my case studies, I did a short survey of the client's infrastructure, processes,...

Readmore

Tips to Reduce Your Customer Support Costs When hosting websites, whether as a mainstream hosting provider, a hobby, or to supplement another service, it's your job to make sure your customers have access to technical support in case they need...

Readmore

Roundcube: MySQL or SQLite? cPanel 11.25 introduces a new feature: The ability to have RoundCube use SQLite instead of MySQL. After benchmarking resource usage and performance, I've come to the conclusion that SQLite is definitely...

Readmore

The cPanel Admin Rss

Enhancing Your cPanel SPAM Protection with SpamExperts

Posted by Vanessa | Posted in Misc | Posted on April 11, 2011

0

With spam continuing to be an increasing problem, hosting providers are always looking for ways to filter out junk so their customers remain as spam free as possible.  SpamAssassin, the anti-spam software bundled with cPanel, will do a sufficient job in filtering some spam, but to truly get bragging rights as a spam-free host, you need something stronger.

The people over at SpamExperts provide a valuable service in protecting you from unwanted junk email.  It smoothly integrates with cPanel and communicates with the SpamExperts servers via API to  allow your users to set up and configure their own spam protection.  As with most hosted spam solutions, you will need to set up your domains’ MX records to point to their servers so they can begin filtering your email:

Upon switching our email to use SpamExperts, we noticed that all of our “legitimate” email was delivered, and we received absolutely no spam!  Email delivery was also very fast.  Some of the features we also found useful are:

  • Availability of raw logs tracking every email that was process by their system
  • Quarantine area, for viewing email that was captured as spam
  • Statistics
  • Ability to instantly report spam
  • Extension filtering
  • Sender and recipient blacklists and whitelists
  • API for cPanel integration


Pricing is also very reasonable to fit any hosting provider’s budget – as low as $.41USD per domain per year, with bulk purchase options available. It’s very easy to offer the additional spam protection to your customers as either a paid or free service.

cPanel Integration

The email firewall products come with a cPanel plugin called “ProSpamFilter2″ which allow the administrator to manage the server-wide settings, as well as end users in cPanel to customize spam protection for their own domains:

We at The cPanel Admin fully recommend SpamExperts as an excellent anti-spam addition to your server.  You can offer it as part of your hosting package, or as a value-add upgrade feature.

Setting up a Red5 Flash Media Server

Posted by Vanessa | Posted in Misc | Posted on November 3, 2010

5

This post will explain a simple process for installing a Red5 Flash Media server in a VPS or Dedicated environment.

Install Subversion and Java

yum -y install java-1.6.0-openjdk java-1.6.0-openjdk-devel
yum -y install subversion

Install Ant

cd /opt
wget http://mirrors.kahuki.com/apache/ant/binaries/apache-ant-1.8.1-bin.tar.bz2
tar jxvf apache-ant-1.8.1-bin.tar.bz2
mv apache-ant-1.8.1 ant
ln -s /opt/ant/bin/ant /usr/bin/ant

Result: /opt/ant

Export some variables and add to bashrc:

export ANT_HOME=/opt/ant
export JAVA_HOME=/usr/lib/jvm/java
export PATH=$PATH:/opt/ant/bin
export CLASSPATH=.:$JAVA_HOME/lib/classes.zip

echo 'export ANT_HOME=/opt/ant' >> /etc/bashrc
echo 'export JAVA_HOME=/usr/lib/jvm/java' >> /etc/bashrc
echo 'export PATH=$PATH:/opt/ant/bin' >> /etc/bashrc
echo 'export CLASSPATH=.:$JAVA_HOME/lib/classes.zip' >> /etc/bashrc

Install Red5:

cd /opt
svn co http://red5.googlecode.com/svn/java/server/trunk red5
cd red5
ant prepare
ant dist

Create an init script

By default you have to use red5′s inherent scripts to start/stop, which can be a bit annoying. Create a file called /etc/init.d/red5 and past int he following:

#!/bin/sh
# For RedHat servers
# description: Red5 flash media server
# processname: red5
PROG=red5
RED5_HOME=/opt/red5
DAEMON=$RED5_HOME/$PROG.sh
PIDFILE=/var/run/$PROG.pid
# Source function library
. /etc/rc.d/init.d/functions
[ -r /etc/sysconfig/red5 ] && . /etc/sysconfig/red5
RETVAL=0
case "$1" in
start)
echo -n $"Starting $PROG: "
cd $RED5_HOME
$DAEMON >/dev/null 2>/dev/null &
RETVAL=$?
if [ $RETVAL -eq 0 ]; then
echo $! > $PIDFILE
touch /var/lock/subsys/$PROG
fi
[ $RETVAL -eq 0 ] && success $"$PROG startup" || failure $"$PROG startup"
echo
;;
stop)
echo -n $"Shutting down $PROG: "
killproc -p $PIDFILE
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$PROG
;;
restart)
$0 stop
$0 start
;;
status)
status $PROG -p $PIDFILE
RETVAL=$?
;;
*)
echo $"Usage: $0 {start|stop|restart|status}"
RETVAL=1
esac
exit $RETVAL

*Note that WordPress has a strange way of outputting double quotes, so make sure you address those in the script!
Now, chmod 755 /etc/init.d/red5 and run:

chkconfig red5 on

This will run Red5 on startup. With the init script, you can now start, stop, and restart red5 as needed, ex:

service red5 restart

red5 should now run port 5080 and rtmp service on port 1935. You may need to open these ports in your server’s firewall.

Test:

http://hostname:5080/demos/port_tester.swf

Source: Adapted from http://www.sohailriaz.com/how-to-install-red5-server-on-centos-53/


				

Installing ImageMagick on a cPanel Server

Posted by Vanessa | Posted in Misc | Posted on February 12, 2010

5

Some time in earlier 2009 cPanel added a new script to their repository to allow cPanel admins to easily install ImageMagick without the hassle of finding compatible RPMs for newer versions, or dealing with the the various issues surrounding Perl Magick on CentOS 5/RHEL 5 servers.

First, check to see if you have existing RPM versions installed on your system:

rpm -qa |grep -i magick

If any packages show up, remove them with rpm -e . Then to reinstall ImageMagick, run:

/scripts/installimagemagick

This may take a bit of time, but it will fully install a functional copy of ImageMagick as well as Perl Magick. When it’s done, you can run the following commands to test it:

convert -v

…will show you ImageMagick is installed, and to what version:

Version: ImageMagick 6.4.8 2010-02-11 Q16 OpenMP http://www.imagemagick.org
Copyright: Copyright (C) 1999-2009 ImageMagick Studio LLC

To test Perl Magick (Image::Magick), run:

/scripts/checkimagemagick

Installing PostgreSQL

Posted by Vanessa | Posted in Misc | Posted on January 10, 2010

3

PostgreSQL is an open-source database server similar (but different) than MySQL. cPanel has a built-in installer for setting up PostgreSQL easily. Keep in mind that the actual version of PostgreSQL you get depends on your OS version. For instance, CentOS 4 users will likely get version 7, CentOS 5 will get version 8.

First, run the install script from command line

/scripts/installpostgres

Then in WHM under SQL Services >> Postgres Config Choose Install Config. Once the config has been installed set a root password for PostgreSQL (Only Alphanumerics). If you hav a firewall, you may want to open port 5432.

PostgreSQL is installed now, but PHP is not compiled for it, so you’ll need to run EasyApache and enable PHP with PostgreSQL (pgsql) support. You can do this manually, or through WHM. If doing so manually, here is the configure switch (or use with /var/cpanel/easy/apache/custom/rawopts  [info])

--with-pgsql=/usr

Now when you log into cPanel you’ll see a section for PostgreSQL. You’ll probably notice the phpMyAdmin wannabe phpPgAdmin which is the database management tool for Postgres. If  you don’t see this option, make sure it’s enabled in WHM > Feature Manager.

Now edit /var/lib/pgsql/data/postgresql.conf and edit some settings:

port = 5432

Postgres 7:

tcpip_socket = true

Postgres 8:

listen_addresses='*'

Now restart the postgres service:

service postgres restart

Note that if you’re installing PostgreSQL on a server that already has users on it, privileges will not be added by default for those existing users. To add privileges, run this command:

for user in `ls /var/cpanel/users` ; do su $user -c “createuser -S -D -R $i” postgres; done

cPanel: Installing Mod_Python on Apache 2

Posted by Vanessa | Posted in Misc | Posted on December 31, 2009

1

Mod_python is one of the trickier things to install on cPanel servers. Below are the two methods I’ve used to get mod_python up and running on Apache 2.

yum -y install subversion (IF it’s not already installed)
svn co https://svn.apache.org/repos/asf/quetzalcoatl/mod_python/trunk mod_python
cd mod_python
./configure –with-apxs=/usr/local/apache/bin/apxs
make && make install

Then add to httpd.conf in the top section where the other modules are loaded:

LoadModule python_module modules/mod_python.so

And run the distiller to save the change in the configuration:

/usr/local/cpanel/bin/apache_conf_distiller –update

Using cPanel’s custom mod:

At the time this article was written, this method only worked with Apache 2.0 (not Apache 2.2). It will add a mod_python option to EasyApache so you can enable during the build. Follow the below instructions and then run EasyApache to select mod_python.

cd /var/cpanel/easy/apache/custom_opt_mods
wget http://www.cpanel.net/apps/easyapache/optmods/custom_opt_mod-mod_python.tar.gz
tar -C /var/cpanel/easy/apache/custom_opt_mods -xzf custom_opt_mod-mod_python.tar.gz
rm custom_opt_mod-mod_python.tar.gz

Installing Perl Modules

Posted by Vanessa | Posted in Misc | Posted on December 30, 2009

1

CPanel has a internal script for using CPAN to install Perl modules. Learn it and love it:

/scripts/perlinstaller

Most common Perl modules can be installed from WHM ~> Install a Perl Module, or from command line. If you don’t know the name of the Perl module you’re installing, you may want to use the WHM installer instead, as it has a search feature and its usage is pretty self-explanatory.

For command line installations, pass the name of the perl module (case-sensitive) to the installer like so:

/scripts/perlinstaller MD5

/scripts/perlinstaller IO::Compress::Base

If the module is already installed and you need to update or reinstall it, pass –force:

/scripts/perlinstaller –force MD5

Since cPanel 11, you can now also allow your users to install their own perl modules locally in /home/$user/perl (which is automatically added to their Perl module path) so they don’t have to bug you when they need a Perl module, nor to they need SSH access.  You can enable this in WHM ~> Module Installers ~> Perl Module [Manage] . You do need to have compilers enabled for users though, which can be done in WHM ~> Security Center ~> Compilers Tweak .