Archive for the ‘Linux’ Category

SpamAssassin site wide spam learning

Monday, August 13th, 2007
No Gravatar

SpamAssassin is great. I wouldn’t run a mail server without it. Obviously it isn’t 100% from day one, thats where Bayes learning comes in. Yes, it auto-learns, but some times we want to convince it a little more.

(more…)

Bookmark it del.icio.us | Reddit | Slashdot | Digg | Facebook | Technorati | Google | StumbleUpon | Window Live | Tailrank | Furl | Propeller | Yahoo


Anonymous apache & PHP

Thursday, August 9th, 2007
No Gravatar

Like to be conspicuous? Like me.

Then use theĀ  ServerTokens and expose_php options. On a production web server I generally set these two options, pretty much stops and zero day hack attempts and other such nonsense

(more…)

Bookmark it del.icio.us | Reddit | Slashdot | Digg | Facebook | Technorati | Google | StumbleUpon | Window Live | Tailrank | Furl | Propeller | Yahoo


bash - Argument List Too Long

Sunday, July 29th, 2007
No Gravatar

I’ve got several scripts that have been failing recently due to the high number of files in a directory.

Say for example, my site wide spamassassin Bayes learning script that runs nightly, it has started failing sometimes when a lot of spam has been caught by users.

I’d see

bash: /bin/rm: Argument list too long

A fix would look like this

for i in /your/directory
do
rm -rvf $i
done

find would probably also do the same job.

Bookmark it del.icio.us | Reddit | Slashdot | Digg | Facebook | Technorati | Google | StumbleUpon | Window Live | Tailrank | Furl | Propeller | Yahoo


Reset MySQL password on Ubuntu in about 1 second*

Tuesday, July 17th, 2007
No Gravatar

* It may take a little longer depending on your server and finger speeds!

dpkg-reconfigure mysql-server-5.0

Bookmark it del.icio.us | Reddit | Slashdot | Digg | Facebook | Technorati | Google | StumbleUpon | Window Live | Tailrank | Furl | Propeller | Yahoo


System Monitoring on Ubuntu in 30 seconds

Tuesday, July 17th, 2007
No Gravatar

Installing munin has to be the fastest and simplest way of installing a visual system monitor on Linux.

Website Blurb:
Munin the monitoring tool surveys all your computers and remembers what it saw. It presents all the information in graphs through a web interface. Its emphasis is on plug and play capabilities. After completing a installation a high number of monitoring plugins will be playing with no more effort. (more…)

Bookmark it del.icio.us | Reddit | Slashdot | Digg | Facebook | Technorati | Google | StumbleUpon | Window Live | Tailrank | Furl | Propeller | Yahoo


MySQL Tuning Server Parameters

Friday, July 13th, 2007
No Gravatar

These are some of the handy MySQL 5.0 tweaks I do to get the most out a MySQL database;
I adjust the following to suit my server, I try to give MySQL as much resource as possible.

(more…)

Bookmark it del.icio.us | Reddit | Slashdot | Digg | Facebook | Technorati | Google | StumbleUpon | Window Live | Tailrank | Furl | Propeller | Yahoo


Ubuntu sources.list Generatror

Friday, July 13th, 2007
No Gravatar

I had a problem with some slow Ubuntu sources today, instead of changing the whole sources.list manually, I stumbled over Ubuntu Nederland’s Source-O-Matic.

Slam in the country you want and it generates you a nice new file. Saves at least 30 seconds!

Bookmark it del.icio.us | Reddit | Slashdot | Digg | Facebook | Technorati | Google | StumbleUpon | Window Live | Tailrank | Furl | Propeller | Yahoo


Converting XLS to CSV. Simple, eh? Well, sorta.

Tuesday, July 3rd, 2007
No Gravatar

I hate problems that can be solved really easily. (With a totally different set of tools). I needed to open Excel (XLS) files in PHP. Simple enough you think, IF you are using Windows.

IF I was using Windows, I would have a bunch of options open to me, I could use PHP’s COM & .NET functions. Or PHP’s ODBC functions. Or a selection of classess from PHP Classes. (more…)

Bookmark it del.icio.us | Reddit | Slashdot | Digg | Facebook | Technorati | Google | StumbleUpon | Window Live | Tailrank | Furl | Propeller | Yahoo


NTLM Authentication (Active Directory) on Apache (Linux)

Tuesday, July 3rd, 2007
No Gravatar

Here is a quick guide to enabling NTLM authentication for Apache 2.
I generally use Ubuntu, so I am a heavy apt-get’er, but I prefer to build my apache from source. (more…)

Bookmark it del.icio.us | Reddit | Slashdot | Digg | Facebook | Technorati | Google | StumbleUpon | Window Live | Tailrank | Furl | Propeller | Yahoo


Apache2 mod_deflate

Tuesday, July 3rd, 2007
No Gravatar

The mod_deflate module provides the DEFLATE output filter that allows output from your server to be compressed before being sent to the client over the network.

Lazy man’s description, your pages load quicker. (more…)

Bookmark it del.icio.us | Reddit | Slashdot | Digg | Facebook | Technorati | Google | StumbleUpon | Window Live | Tailrank | Furl | Propeller | Yahoo