Month: February 2010

What is a journaling filesystem?

A journaling file system is a file system that logs changes that you make to a ‘journal’. The journal itself is like a circular log that tracks, records and maintains the changes it is going to make ahead of time and places them in a separate area of the file system on your hard drive….


Run a cron more than once per minute

Since a cron job lists the timeframe in which a task will run incrementally using the minute, hour, day, month and day of the week settings, it seems difficult to process a task more than once a minute. This can be overcome by using a simple shell script that repeatedly runs the task, with a…


RDNS

Here is a short how-to for PTR/RDNS 1. You must have reverse authority delegated to you from your hosting provider. Though common wisdom in forums says most providers do not delegate authority, I have found this to be untrue. I don’t recommend asking for it if you don’t feel confident you can handle the technical…


MYSQL tuning-primer

MySQL Performance Tuning Primer Script This script takes information from “SHOW STATUS LIKE…” and “SHOW VARIABLES LIKE…” to produce sane recommendations for tuning server variables. It is compatible with all versions of MySQL 3.23 and higher (including 5.1). Currently it handles recommendations for the following: # Slow Query Log # Max Connections # Worker Threads…


Use DD to create empty test file

This dd command allows you to create an “empty” file of a specifically desired size. Creating these arbitrary heavy files, may be useful for testing purposes. Use the command below: dd if=/dev/zero of=testfile.test bs=1k count=1000 This command results in the creation of an empty 1GB file named testfile.test (1000 represents 1000 blocks of 1Kb)


Quick phpinfo from CLI

This will give you a quick look at the php.ini file echo “< ?php phpinfo(); ?>” |php |less also, if you need to check if a specific module is installed or compiled in, you can use echo “< ?php phpinfo(); ?>” |php |less|grep -i GD of course, you can also do that via php -i…


http://thelinuxreport.com

I check my favorite blogs and sites nightly for new information and other shtuff regarding linux. One of the first sites I go to for news is popurls.com . I like this site because it is an news aggregator and it is easy to get everything in one spot. I was thinking to myself why…


Modsec: no ID in error message

If you are receiving a modsec error in the apache error log; [Wed Feb 10 02:02:32 2010] [error] [client 192.168.0.1] ModSecurity: Access denied with code 500 (phase 2). Pattern match “\\.php\\?.*loc=(http|https|ftp)\\:\\/” at REQUEST_URI. [file “/usr/local/apache/conf/modsec2.user.conf”] [line “302”] [hostname “domain.com”] [uri “/folder/file.php”] [unique_id “S3JaCEPjyqQAAAOO2foAAAAY”] and it does not give an ID number allowing you to whitelist…


Setup dns clustering in WHM

This info comes direct from cPanel. A DNS cluster is a number of nameservers that share records. This allows you to physically separate your nameservers so that in the event of, for instance, a power outage, you still have DNS functionality. This way, visitors can reach websites on your server more quickly after the web…


Error “Could not instantiate mail function”

If you are running a CMS like Joomla or Drupal and you are using the Mail function, you may run across this error from time to time; ‘Could not instantiate mail function’ This can happen for the following reasons; * PHP function mail() has been disabled or not working. * You are running an older…