Quick Redirects

JavaScript
<script type=”text/javascript”>
<!–
window.location = “http://sitetogoto.com/”
//–>
</script>

PHP
<?php
Header(“Location: http://sitetogoto.com/”);
?>

HTML
<META http-equiv=”refresh” content=”0;URL=http://sitetogoto/”>

Perl
use CGI qw(:standard);
$cgiobject=new CGI;
print $cgiobject->start_html(-script=>{-language=>’JavaScript’, -code=>’window.location.href = “http://sitetogoto.com/”;’});

Upgrade RH9 to CentOS 3

rpm –import http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-3
cd /etc/
cp yum.conf yum.conf.rh9
vi yum.conf
—————————————
[main]
cachedir=/var/cache/yum
debuglevel=2
logfile=/var/log/yum.log
pkgpolicy=newest
distroverpkg=redhat-release
installonlypkgs=kernel kernel-smp kernel-hugemem kernel-enterprise kernel-debug kernel-unsupported kernel-smp-unsupported kernel-hugemem-unsupported
tolerant=1
exactarch=1

[base]
name=CentOS-$releasever – Base
baseurl=http://mirror.centos.org/centos/3.5/os/$basearch/

#released updates
[update]
name=CentOS-$releasever – Updates
baseurl=http://mirror.centos.org/centos/3.5/updates/$basearch/
——————————————
rpm -vv –rebuilddb
rpm -qa | grep config
yum upgrade rpm kernel
reboot
rpm -vv –rebuilddb
yum install kernel-smp
reboot
yum upgrade
reboot

Software RAID Rebuild

Verify Drive – Fix Errors – through controller utility
or replace with new drive

Check the numbers for the bad drive

cat /proc/scsi/scsi

Remove bad drive

echo “scsi remove-single-device 0 0 2 0” > /proc/scsi/scsi

Check to make sure it’s gone

cat /proc/scsi/scsi

Add good drive

echo “scsi add-single-device 0 0 2 0” > /proc/scsi/scsi

Check to make sure it’s there

cat /proc/scsi/scsi

Fdisk the drive as needed (set type (t) to linux raid auto-detect (fd))

fdisk /dev/sdc

If using an drive from a previous RAID

mdadm –zero-superblock /dev/sdc1

Add the new drive to the software RAID

mdadm –add /dev/md0 /dev/sdc1

Check rebuild progress

cat /proc/mdstat