If you have named server on rhel and want to install and config slave bind server for backup your dns server, here this a simple step:

install bind (if not install yet), for RHEL it is easy to install bind you have to install this package using "rpm -Uvh" from dvd or using yum
- bind (includes DNS server, named)
- bind-utils (utilities for querying DNS servers about host information)
- bind-libs (libraries used by the bind server and utils package)
- bind-chroot (tree of files which can be used as a chroot jail for bind)
- caching-nameserver (config files for a simple caching nameserver)

edit named.conf and named.rfc1912.zones or copy from your master bind server to /var/named/chroot/etc/named.conf and /var/named/chroot/etc/named.rfc1912.zones

change your zone config to be a slave server for your zone:

zone "example.com" IN {
type slave;
file "slaves/yourzonefile";
masters { your master ip; };
allow-update { your master ip; };

change your named.conf in master server:

zone "example.com" IN {
type master;
file "yourzonefile";
also-notify { your slave server ip1; your slave server ip2; }

restart you bind server, when you edit zonefile you have to edit serial to notify slave server to known that zone data is outdate and refresh it with master server.

If you make raid for boot disk with linux software raid (mdadm) and one disk failed, this is how you have to do for replace failed disk and boot the system.

first if failed disk is first hard drive (sda for example) you have to make sure that mirror disk can boot so you have to setup grub on mirror disk (sdb)

mysystem# grub
Grub>device (hd0) /dev/sdb
Grub>root (hd0,0)
Grub>setup (hd0)

and check /etc/grub.conf on mirror disk (sdb) is set correctly

remove failed disk from raid device.

mysystem#mdadm --manage /dev/md0 --fail /dev/sdb1 (up to your raid configuration)
mysystem#mdadm --manage /dev/md1 --remove /dev/sdb2

remove failed disk from all raid (md0,md1,md2 ..)

now shutdown the system and replace failed disk with new one.

reboot the system, if system is boot up without error you can add new disk to raid array.

make replaced disk (sda) the same partition like boot disk (sdb)

mysystem#sfdisk -d /dev/sdb | sfdisk /dev/sda

then add new disk to raid array

mysystem#mdadm --manage /dev/md0 --add /dev/sda1 (repeat for every partitions)

check raid status

mysystem#cat /proc/mdstat

wait until resync process is finish,if everything ok you can use the system.

This is my memo for quick reference to install SAP Java Connector 3(SAP Jco3) on tomcat in linux system.

I use RHEL5,tomcat6,sapjco3. Here are simple step.

1. Check your java version, SAP Jco3 require JRE 1.5 or 1.6

2. Download latest SAP Java Connector from http://service.sap.com/connectors select package that match your hardware. In my case,package for linux on intel x86 is sapjco3-linuxx86_64-x.x.x.tgz

3. extract file to sapjco-installation-path like /opt/sapjco3

4. add your sapjco-installation-path to environment variable LD_LIBRARY_PATH.

5. add your sapjco-installation-path/sapjco3.jar to environment variable CLASSPATH.

restart tomcat. That's it.

If you migrate from sapjco2 to sapjco3 you have to adapt your code by read this migration guide:


After add new SAN disk to linux system, if you want linux system detect new disk without rebooting system you can execute this command.

for scsi disk
#echo 1 > /sys/class/fc_host/host$host/issue_lip

for fc disk
#echo "- - -" > /sys/class/scsi_host/host$host/scan

you can list your hba wwn in linux by display node_name

#cat /sys/class/fc_host/host$host/node_name

while $host is your hba no.

you can display scsi device in linux system by display scsi that will map to device like /dev/sda, /dev/sdb in sequence.

#cat /proc/scsi/scsi

for example: it will map scsi0 to /dev/sda and scsi1 to /dev/sdb

Host: scsi0 Channel: 00 Id: 00 Lun: 00
Vendor: ATA Model: ST3320620NS Rev: 3.AE
Type: Direct-Access ANSI SCSI revision: 05
Host: scsi1 Channel: 00 Id: 00 Lun: 00
Vendor: ATA Model: ST31000333AS Rev: CC1H
Type: Direct-Access ANSI SCSI revision: 05

to remove single scsi device:

echo "scsi remove-single-device a b c d" > /proc/scsi/scsi

to add single scsi device:

echo "scsi add-single-device a b c d" > /proc/scsi/scsi

a == hostadapter id (first one being 0)
b == SCSI channel on hostadapter (first one being 0)
c == ID
d == LUN (first one being 0)

Because xen virtualization will be replace by kvm on rhel6 so I have to migrate my server that running on xen virtual machine to kvm. after search on internet that have many documents and method to convert xen guest to kvm, I test migrate by manual method which is working well and easy to migrate.

My environment, I am running rhel5 xen kernel 2.6.18-92 guest and migrate to host running on the rhel5 kernel 2.6.18-168

Here are steps to migrate to kvm virtualization

1. comment HWADDR line on /etc/sysconfig/network-scripts/ifcfg-

2. change xvc0 to ttyS0 (if exist) in /etc/inittab, /etc/securetty, /boot/grub/grub.conf

3. change /dev/xvda (xvdb etc..) to /dev/hda (in case no virtio drivers or /dev/vda with virtio) in /boot/grub/device.map, /etc/fstab

if you map device with partition label (LABEL=SWAP-sda2 /swap in fstab for example) you can change partition lable with command "e2label

For change upload limit for php, you have to change upload_max_filesize, memory_limit and post_max_size parameters in php.ini (/etc/php.ini - linux) then restart apache server (service httpd restart).

someone said that post_max_size and memory_limit need to be larger than upload_max_filesize.

Today i testing moodle on my server and try to upload video file about 200MB.

For change upload file size i have to change upload_max_filesize and post_max_size on php.ini.

After that I try to upload avi file and get error and cant login to moodle anymore so i think it has something wrong about session.

after searching ppl say that have to change dbsession in mdl_config table so i try to change it in mysql database but i get error "You probably tried to upload too large file. Please refer to documentation for ways to workaround this limit."

The reason of error is i wrong config in php.ini that i should change 3 parameters upload_max_filesize, post_max_size and memory_limit , so when i change all of parameters my moodle system working fine.