Plesk root email delivery
Tue, 12/30/2008 - 02:23 — sandipTo receive local root email to an externally monitored email address:
-
Login to plesk control panel and set the admin contact email address for the server which should update "/var/qmail/alias/.qmail-root"
Either add the hostname (FQDN) to the qmail control locals file or to the virtualdomains file located in "/var/qmail/control/".
Also add the hostname (FQDN) to the "/var/qmail/control/rcpthosts"
Restart inetd and qmail:
/etc/init.d/inetd restart
/etc/init.d/qmail restart
/var/qmail/bin/qmail-showctl
This should show:
...
locals:
...
Messages for host.domain.tl are delivered locally.
...
rcpthosts:
...
SMTP clients may send messages to recipients at host.domain.tld.
...
- sandip's blog
- Login or register to post comments
Munin-node Plugin Configurations
Thu, 12/25/2008 - 00:50 — sandipHDD Temperature
You can usually identify which hard disks are on your system by looking in "/proc/ide" and in "/proc/scsi".
# cat /proc/scsi/scsi
Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
Vendor: ATA &nb sp; Model: WDC WD2500YS-01S Rev: 20.0
Type: Direct-Access   ;   ;   ;   ; ANSI SCSI revision: 05
Host: scsi1 Channel: 00 Id: 00 Lun: 00
Vendor: ATA &nb sp; Model: WDC WD2500YS-01S Rev: 20.0
Type: Direct-Access   ;   ;   ;   ; ANSI SCSI revision: 05
`fdisk -l` lists the two drives as "sda" and "sdb".
Drupal 5.14 upgrade fixes
Wed, 12/24/2008 - 00:37 — sandipWith the upgrade to drupal-5.14 and using the SecurePages 5.x-1.7-beta1 module:
Error:
PHP Fatal error: Call to undefined function drupal_urlencode() in /path/to/drupal/sites/all/modu les/securepages/securepages.mo dule on line 323
Solution:
Added the below code to the beginning of the securepages_init function in "securepages.module" so function gets loaded.
if (!function_exists('drupal
_urlencode')) {
include_once 'includes/common.inc';;
}Reference:
http://drupal.org/node/330171
- sandip's blog
- Login or register to post comments
highlight grep search string
Fri, 12/19/2008 - 15:09 — sandipDefault to highlighting search string when using grep by adding the below alias to ~/.bashrc file:
alias grep='grep --color=auto'
- sandip's blog
- Login or register to post comments
Share screen session
Tue, 12/16/2008 - 23:45 — sandip-
Start screen using the command:
$ screen -S <SessionName>
The -S switch gives the session a name, which makes multiple screen sessions easier to manage.
Allow multiuser access in the screen session:CTRL-A
:multiuser on
CTRL-A
:acladd <guest_user>
$ screen -x <host_user>/<SessionN ame>
c-client library version skew with uw-imap
Mon, 11/17/2008 - 11:30 — sandipWith the recent update of uw-imap from epel repository to uw-imap-2007d-1.el5, I was getting the below error which indicated that uw-imap required 2007d version of c-client.
Below was the error message as logged in "/var/log/messages":
IMAP toolkit crash: c-client library version skew, app=2007d library=2007b
Adding "libc-client2007" to the list of "includepkgs" in yum conf for epel repository and doing a `yum update` resolved the issue by updating libc-client2007-2007b to libc-client2007-2007d.
- sandip's blog
- Login or register to post comments
- Read more
Installation of Munin and Munin-Node
Tue, 11/04/2008 - 09:45 — manojMunin is network monitoring tool for servers. It uses RRDTool, an open source used to generate graphics and logging server activities.
I am installing and configuring munin on centos 5 x86_64 using yum.
1)First of all, we need to add a RPMforge repository.
rpm -Uhv http://apt.sw.be/redhat/el5/en /x86_64/rpmforge/RPMS//rpmforg e-release-0.3.6-1.el5.rf.x86_6 4.rpm
2)Installing yum
yum -y install munin
3)chaning the ownership of munin web docroot to munin, as by default it goes to root.
chown -R munin:munin /var/www/munin/
- manoj's blog
- Login or register to post comments
- Read more
Convert / root filesytem to use lvm over raid
Sat, 11/01/2008 - 16:57 — sandipI have outlined below the steps taken to move from a normal single disk system and convert to a raid1 using an additional drive:
Note: /boot cannot be on lvm nor any other raids other than raid1 partition.
Don't forget to make the essential backups prior.
Convert / to raid/lvm
-
fdisk /dev/sdb and make clone of sda (convert partition type to "Linux raid autodetect")
add /dev/sdb1 -- /boot - 13 blocks (100Mb) - type raid
add /dev/sdb2 -- rest - type raid
Create raid partitions:
partprobe
mdadm -C /dev/md0 --auto=yes -l 1 -n 2 missing /dev/sdb1
mdadm -C /dev/md1 --auto=yes -l 1 -n 2 missing /dev/sdb2
pvcreate /dev/md1
vgcreate vg0 /dev/md1
lvcreate -L 4G -n lv0 vg0
mke2fs -j /dev/vg0/lv0
mkdir /mnt/lv0
mount /dev/vg0/lv0 /mnt/lv0
find / -xdev | cpio -pvmd /mnt/lv0
cp -aux /dev /mnt/lv0
/dev/vg0/lv0 /   ;   ;   ;   ; ext3 defaults &nbs p; 1 1
mount --bind /dev /mnt/lv0/dev
chroot /mnt/lv0
mount -t proc /proc /proc
mount -t sysfs /sys /sys
vgscan
vgchange -ay
mkinitrd -v /boot/initrd-`uname -r`.lvm.img `uname -r`
umount /sys
umount /proc
exit
mv /mnt/lv0/boot/initrd-`uname -r`.lvm.img /boot
reboot
Convert /boot to raid1
SATA disks as AHCI
Fri, 10/31/2008 - 00:11 — sandipWhen converting from IDE to AHCI in the BIOS to include additional drives, I would get a kernel panic... as by default the bios was setup with the drives as IDE.
Booted using existing IDE and created a new kernel image with support for AHCI via the --preload option to manually specify modules support:
# mkinitrd --allow-missing --preload=ahci --force-scsi-probe /boot/initrd-`uname -r`-custom.img `uname -r`
Then create a new grub boot option to load the new custom kernel image and select it when grub boots up using AHCI.
Forcing apache to listen to ipv4
Mon, 10/27/2008 - 21:17 — sandipRecently, I've noticed that in ubuntu (6.06) dapper server with apache-2.0.55, apache by default listens to IPv6, thus was causing slow response times. The response times was much improved by having apache listen to IPv4 instead.
Edit /etc/apache2/ports.conf and specify an IPv4 address on all Listen directives:
Listen 0.0.0.0:80
Listen 0.0.0.0:443