RPM 관리

1. *.src.rpm
   소스  RPM을 리빌드 하는 방법이다.
   # rpmbuild --rebuild ./bridge-utils-1.2-8.fc12.src.rpm --target=x86_64
   # cd /root/rpmbuild/RPMS/x86_64
   # ls
  bridge-utils-1.2-8.fc12.x86_64.rpm

yum 에 있는 RPM 다운 받기 Linux

가끔 yum에 있는 RPM을 다운 받기를 원하는 경우가 있다.
이 경우 yumdownloader를 이용하면 편리하다.

# yumdownloader udev
# rpm2cpio udev*.rpm | cpio -imdv                       // 이렇게 하면 rpm을 풀 수 있다.

linux console로 부팅할때 필요한것 Linux

1. /etc/grub.conf

boot=/dev/sda
default=0
timeout=0
serial --unit=0 --speed=115200
terminal --timeout=3 serial console
#splashimage=(hd0,0)/boot/grub/splash.xpm.gz

hiddenmenu
title Fedora (2.6.31.5-127.fc12.x86_64)
        root (hd0,0)
        kernel /boot/vmlinuz-2.6.31.5-127.fc12.x86_64 ro root=UUID=d8ecc96a-c27ee
-4401-9ee4-df64c16e3648 console=ttyS0,115200 LANG=ko_KR.UTF-8 KEYBOARDTYPE=pc KEEYTABLE=us rhgb quiet
        initrd /boot/initramfs-2.6.31.5-127.fc12.x86_64.img

2. vim /etc/securetty
tty11
ttyS0

브릿지 설정 brctl 사용법 Linux

리눅스에서 브리지를 추가하는 명령어이다.
사용법은 다음과 같다.

eth0와 eth1을 br0로 묶는 방법이다.

1. #brctl addbr br0                   : br0 인터페이스를 추가한다.
2. #brctl addif eth0                   : eth0 추가
3. #brctl addif eth1                   : eth1 추가
4. #ifconfig eth0 0.0.0.0             : eth0 down
5. #ifconfig eth1 0.0.0.0             : eth1 down
6. #ifconfig br0 10.10.10.10 netmask 255.255.255.0

설정 완료
7. sysctl -a | grep forward       : forward 설정 확인
8. sysctl -w 항목=1                  : forward enable

ifcfg 파일 설정
9. ifcfg-br0
  DEVICE=br0
  ONBOOT=on
  TYPE=Bridge
  BOOTPROTO=static
  IPADDR=10.10.10.10
  NETMASK=255.255.255.0
  USRCTL=no

10. ifcfg-eth0
  DEVICE=eth5
  HWADDR=00:30:DB:43:62:1B
  ONBOOT=yes
  BOOTPROTO=none
  BRIDGE=br0
  USRCTL=no

11. DEVICE=eth1
  HWADDR=00:30:DB:43:62:1C
  ONBOOT=yes
  BOOTPROTO=none
  BRIDGE=br0
  USRCTL=no


date와 timezone Linux

date 명령어를 사용하면 아래와 같이 시간이 표시된다.

Wed Jun  9 16:57:40 KST 2010

여기서 KST는 표준시간 timezone을 의미한다.
date에서 사용하는 timezone은 어떤 값을 참조할까?

/etc/localtime 바로 이 값이다.
이 값을 ls -al /etc/localtime을 해보면 심볼릭 링크로 설정되어 있음을 알 수 있다.
timezone을 변경 하고 싶으면 이 심볼릭 링크를 변경 하면된다

lrwxrwxrwx 1 root root 30 2009-12-10 17:19 /etc/localtime -> /usr/share/zoneinfo/Asia/Seoul


1 2 3