requiretty

Some cron didn’t work well after move to CentOS5

New to disable requiretty

May 19 10:40:01 xxx sudo:     root : sorry, you must have a tty to run sudo ; TTY=unknown ; PWD=/www/xxx/bin ; USER=xxx ; COMMAND=/bin/sh moviepagechmod.sh
vi /etc/sudoers
#Defaults    requiretty

LVM

Setup lvm

combine /dev/sdb and /dev/sdc

if there’s partition on /dev/sdb, /dev/sdc, need to clear them first using fdisk

fdisk /dev/sdb -> d (delete partition) ->w

fdisk /dev/sdc

pvcreate /dev/sdb

pvcreate /dev/sdc

vgcreate vgrp /dev/sdb /dev/sdc

vgchange -a y vg

vgdisplay vg|grep ‘Total PE’
lvcreate -i2 -I8 -l 70006 vg -n lv

vgdisplay vg|grep ‘Total PE

‘lvcreate -i2 -I8 -l 70006 vg -n lv

mkfs.ext3 /dev/vg/lv

tune2fs -r 128000 /dev/vg/lv

mount /dev/vg/lv /backup

Remove lvm

#lvremove /dev/vg/lv
#vgremove vg
#fdisk /dev/sdb
#mkfs.ext3 /dev/sdb1
#tune2fs -r 128000 /dev/sdb1
(do same to /dev/sdc)
#mount /dev/sdb1 /www

Logrotate

Some logrotate  are not working properly

added “/var/log/xxx/*/errors” into /etc/logrotate.d/xxx
and change to weekly

/usr/local/zeus/web/log/errors /var/log/xxx/*/errors {
weekly
rotate 8
missingok
create 0644 nobody nobody
compress
}