resend all mails in sendmail queue

As root you can redeliver all mail in the mail server queue via:

sendmail -v -q

Installing WordPress 3.0 on Ubuntu 10.04 (Lucid Lynx)

(via www.ubuntugeek.com)

WordPress is a state-of-the-art, semantic, personal publishing platform with a focus on aesthetics, Web standards, and usability. It was born out of a desire for an elegant, well-architected personal publishing system. While primarily geared towards functioning as a Weblog, WordPress is also a flexible CMS capable of managing many types of Web sites.

mismatch_cnt is not 0

Mismatch_cnt (/sys/block/md#/md/mismatch_cnt) is the number of unsynchronized blocks in the raid.

Not much of an issue if this is reported on raid-0 or raid-1 and can be ignored. See bugzilla report: Bug 566828.

The repair is to rebuild the raid:

echo repair >/sys/block/md#/md/sync_action

This does not reset the count, but if you force a check after the rebuild is complete:

echo check >/sys/block/md#/md/sync_action

Count should return to zero. Verify with:

cat /sys/block/md#/md/mismatch_cnt

Upgrade CentOS 5.4 to 5.5 for OpenVZ containers

Edit "/vz/template/centos/5/{ARCH}/config/yum.conf", and change the base and updates repositories as below:

[base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

#released updates
[updates]
name=CentOS-$releasever - Updates
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

Do a `vzyum {VEID} clean all`.

List updates:

vzyum {VEID} list updates

Update:

vzyum {VEID} update

Confirm that all VEs' have been updated to 5.5 with:

cat /vz/root/{VEID}/etc/redhat-release

You should see "CentOS release 5.5 (Final)".

Macchanger – Utility for manipulating the MAC address of network interfaces (Included GUI Utilit

(via www.ubuntugeek.com)

macchanger is a Linux utility for viewing/manipulating the MAC address for network interfaces.This tutorial will explain how to change mac address from command line and using GUI tool.

Know when your drives are failing, with smartd

(via www.linuxjournal.com)

“Ka-chunk... ka-chunk... ka-chunk... tick... tick... tick... Ka-chunk... ka-chunk...” That's just not a sound you ever want to hear coming from a hard drive. It's the sound of a hard drive trying to move it's read/write heads into a position that they don't seem to want to go to or its trying to read a sector that just isn't there anymore. Of course, modern hard drives have come a long way and are amazingly reliable, but if you work with computers long enough, you're bound to have one fail on you.

Bad block HOWTO for smartmontools

(via smartmontools.sourceforge.net)

This article describes what actions might be taken when smartmontools detects a bad block on a disk. It demonstrates how to identify the file associated with an unreadable disk sector, and how to force that sector to reallocate.

Tutorial on Software Programming

(via www.herongyang.com)

A collection of 30 free tutorial books by Herong Yang on latest programming technologies. Tutorials in all books are based on Herong's personal experience and ideal for developers to learn new programming technologies.

Change server timezone

To change the server timezone, just create a link to the respective zone you're on.

ln -sf /usr/share/zoneinfo/US/Eastern /etc/localtime

Check with the `date` command.

lighttpd redirect to external url if file not found

Below is a rewrite/redirect rule using url.rewrite-[repeat]-if-not-file similar to Apaches' "!-f" RewriteRule.

# Redirect to external url if image file not found
url.rewrite-if-not-file = ( "^\/images\/.*\.jpg$" => "/redirect$0" )
url.redirect = ( "^\/redirect\/(.*)$" => "http://other.domain.tld/$1" )

Syndicate content
Comment