Archive for the ‘RedHat’ Category

MySQL binary log rotation

We are running a MySQL replication setup, and find that the binary logs get very large, very quickly. Since MySQL didn’t come with a log rotation script, we rolled our own. Usage is simple:
At the top of the script are some definitions that you need to change for your setup:

MYSQL_USER MYSQL_PASS - You [...]

Preventing Apache DOS attacks

We’ve recently come under attack from denial-of-service (DOS) attacks. In order to alleviate this situation, we are currently testing out the mod_evasive Apache module.
mod_evasive v1.10.1
The install was simple. After downloading and unpacking the source code…
/usr/sbin/apxs -i -a -c mod_evasive20.c
This will compile the module, copy it to the correct directory and enable the module [...]

Optimizing MailScanner

Our MailScanner installation is pretty heavily utilised, scanning 20,000+ messages a day. I’m always looking for ways of improving it’s performance, so the following document has proved useful:
Optimization tips

Use a ramdisk (tmpfs) for MailScanner’s working directory.
Make sure you have enough ram
Set the noatime flag on your spool and log partitions
Use a local DNS caching [...]