2013年11月28日 星期四

yum repository setup for yum

After invoking system-config-kickstart, system will try to pull available package information from repository.
If your machine does not have internet capability, it will hang all the time.
Simply create a local repository to /etc/yum.yum.repos.d/folder for system-config-kickstart to build package list.
Please note, repository id must be named as [base] and all system default repository config file need to be moved out of /etc/yum.repo.d to speed up package load process.
[base]
name=CentOS 5.8 x86_64
baseurl=file:///nfs/centos-5.10-x86_64
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

copy repodata from cdrom to local drive
#cp -dpR /mnt/cdrom/repodata /nfs/centos-5.10-x86_64/

use following command to clear cache data
#yum clean all 

use following command to read package information from repository
#yum repolist

Please note, repodata folder need to placed underneath baseurl folder. 
And then you are good to go with system-config-kickstart.

2013年11月24日 星期日

non-interactive fdisk

#!/bin/sh
hdd="/dev/hda /dev/hdb /dev/hdc"
for i in $hdd;do
echo "n
p
1


w
"|fdisk $i;mkfs.ext3 $i;done 
http://xmodulo.com/2012/11/how-to-run-fdisk-in-non-interactive-batch-mode.html

speed up SSH login

1: disable UseDNS from /etc/ssh/sshd_config from remote server
2: specify authentication method when connecting --> -o PreferredAuthentications=password

2013年10月24日 星期四

smbus statement

SMBUS is disabled by default. Need to manully enable it at FD(function disable register) bit 3(count from 0 to 31). When bit is set to 1, system will disable that device, vice versa.

FD is located at RCBA+3418h in memory.
In PCH spec, FD is defined in D1Fh,F3 (device 1h,function 3)

linux pci bus rescan

After enabling smbus, PCI rescan is required to enable system to find the new added device.

echo 1 > /sys/bus/pci/rescan

all the hardware configurations can be found at /sys.

2013年10月2日 星期三

perl


This is perl, v5.8.9 built for x86_64-linux-thread-multi

Copyright 1987-2008, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl".  If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.

[root@mytxlin51 bin]# ./perl -V
Summary of my perl5 (revision 5 version 8 subversion 9) configuration:
  Platform:
    osname=linux, osvers=2.6.9-55.elsmp, archname=x86_64-linux-thread-multi
    uname='linux dev 2.6.9-55.elsmp #1 smp fri apr 20 16:36:54 edt 2007 x86_64 x86_64 x86_64 gnulinux '
    config_args=''
    hint=previous, useposix=true, d_sigaction=define
    usethreads=define use5005threads=undef useithreads=define usemultiplicity=define
    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=define use64bitall=define uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DDEBUGGING -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm',
    optimize='-O2 -g -pipe -m64',
    cppflags='-fno-strict-aliasing -pipe -I/usr/local/include -I/usr/include/gdbm -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -D_REENTRANT -D_GNU_SOURCE -DDEBUGGING -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -D_REENTRANT -D_GNU_SOURCE -DDEBUGGING -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -D_REENTRANT -D_GNU_SOURCE -DDEBUGGING -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm'
    ccversion='', gccversion='3.4.6 20060404 (Red Hat 3.4.6-8)', gccosandvers=''
    intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib /lib64 /usr/lib64 /usr/local/lib64
    libs=-lresolv -lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lpthread -lc
    perllibs=-lresolv -lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
    libc=/lib/libc-2.3.4.so, so=so, useshrplib=true, libperl=libperl.so
    gnulibc_version='2.3.4'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E -Wl,-rpath,/usr/apps/perl/rhel4.x/lib/5.8.9/x86_64-linux-thread-multi/CORE'
    cccdlflags='-fPIC', lddlflags='-shared -O2 -L/usr/local/lib'


Characteristics of this binary (from libperl):
  Compile-time options: DEBUGGING MULTIPLICITY PERL_IMPLICIT_CONTEXT
                        PERL_MALLOC_WRAP USE_64_BIT_ALL USE_64_BIT_INT
                        USE_FAST_STDIO USE_ITHREADS USE_LARGE_FILES
                        USE_PERLIO USE_REENTRANT_API

2013年10月1日 星期二

acl support for glusterfs

ACL test
setfacl -m -u:kido:rw /home/
getfacl /home/

If ACL does not take effect under glusterfs, please disable stat-prefetch
gluster volume set NTCGFS stat-prefetch disable