1. #platform=x86, AMD64, Intel EM64T

    # Install OS instead of upgrade
    # upgrade
    install

    # Installation logging level
    #logging –level=info

    # Use network installation
    # method : ftp, nfs, http, cdrom
    url –url=ftp://192.168.50.100/

  2. #harddrive
  3. #harddrive –partition=sda1 –dir=
  4. # Network information
    # Static
    # network –device eth0 –bootproto static –ip 192.168.50.110 –netmask 255.255.255.0 –gateway 192.168.50.100 –nameserver 168.126.63.1 –hostname mirr4u.com
     
    network –bootproto=dhcp –device=eth0 –onboot=on
    network –bootproto=dhcp –device=eth1 –onboot=no
    network –bootproto=dhcp –device=eth2 –onboot=no

    # Use graphical/text install
    # graphical, text
    text

    # X Window System configuration information
    xconfig  –defaultdesktop=GNOME –depth=32 –resolution=1024×768 –startxonboot

    # System keyboard and Mouse
    keyboard us
    mouse none

    # System language and Installation Language
    lang en_US
    langsupport –default=en_US.UTF-8 en_US.UTF-8 ko_KR.UTF-8

    #root passwd
    rootpw redhat

    # System authorization information
    auth  –useshadow  –enablemd5

    # System timezone
    timezone –utc Asia/Seoul

    # Clear the Master Boot Record
    #zerombr

    # Firewall, Selinux
    # ex) firewall –enable –ftp –ssh –port=portnum:tcp or udp
    # ex) selinux –enforcing, –target, –disabled
    firewall –disabled
  5. selinux –disabled

    # System bootloader configuration
  6. # –location (mbr, partition), –append, –driveoder
    bootloader –location=mbr –append="rhgb quiet"

    # Partition clearing information
    # –linux, –all, –dirves=sdX.., –initlabel
    clearpart –all –initlabel

    # Making Partition Tables
    # –fstype (fs type:ext2,ext3…), –size (partition size)
    # –asprimary (sector position), –onpart (Disk position), –grow (Full size) –ondisk (disks)
    part /boot –fstype ext3 –size=100 –asprimary –ondisk=/dev/sda
    part / –fstype ext3 –size=1 –grow –asprimary –ondisk=/dev/sda
    part swap –size=14336 –asprimary –ondisk=/dev/sda
    part /app –fstype ext3 –size=20480 –ondisk=/dev/sda
    part /data –fstype ext3 –size=20480 –ondisk=/dev/sda
  7. # Make LVM
  8. part /boot –fstype ext3 –size=100 –ondisk=/dev/sda
    part pv.2 –size=0 –grow –ondisk=/dev/sda
  9. part pv.10000 –size=0 –grow –ondisk=/dev/sdb
    volgroup VolGroup00 –pesize=32768 pv.2 pv.10000
    logvol swap –fstype swap –name=LogVol01 –vgname=VolGroup00 –size=1024 –grow –maxsize=2000
    logvol / –fstype ext3 –name=LogVol00 –vgname=VolGroup00 –size=1024 –grow

  10. # Make Raid
  11. part raid.68 –size=200 –ondisk=sda
    part raid.70 –size=200 –ondisk=sdb –asprimary
    part raid.72 –size=32000 –ondisk=sdb –asprimary
    part raid.69 –size=32000 –ondisk=sda –asprimary
    part raid.75 –size=100 –grow –ondisk=sdb –asprimary
    part raid.74 –size=100 –grow –ondisk=sda –asprimary
    raid /boot –fstype ext3 –level=RAID1 –device=md0 raid.68 raid.70
    raid swap –fstype swap –level=RAID1 –device=md1 raid.69 raid.72
    raid / –fstype ext3 –level=RAID1 –device=md2 raid.74 raid.75
  12. # Install Packages
    # @ is Group, – is Not install
    # Full install is @ * or @ everything
    %packages
    @ korean-support
    @ everything
    kernel-smp-devel
    kernel-devel
    kernel-smp
    e2fsprogs

    # Scripting after Installation ( Service Optimize and Bonding Make )
    %post
    #!/bin/bash
  13. #chroot /mnt/sysimages
  14. SERVICES=(`ls /etc/init.d/ /etc/xinetd.d/ | egrep -v "/etc/init.d|/etc/xinetd.d" | egrep -v "rpmsave|rpmnew" | \
               egrep -v 'auth|functions|halt|killall|single'`)

    for (( i=0; i<${#SERVICES[@]}; i++ ))
    do
        /sbin/chkconfig –level 345 ${SERVICES[$i]} off
    done

    SERVICES=(crond network messagebus sshd syslog sysstat telnet vsftpd xfs xinetd)

    for (( i=0; i<${#SERVICES[@]};i++ ))
    do
        /sbin/chkconfig –level 345 ${SERVICES[$i]} on
    done

    HOSTNAME=""
    LOCALNAME="localhost.localdomain"

    # Hostname /etc/hosts
    if [ ! -z $HOSTNAME ]
    then
        echo "127.0.0.1       localhost.localdomain localhost $HOSTNAME" > /etc/hosts
    fi

    # Init Bonding
    # Default Value is 0
    # 0 is Do Not Make Bonding
    BOND=0

    #Server IP, NETMASK
    IP=""
    SUBNET=""

    if [ ! $BOND -eq 0 ]
    then
        for (( i=0; i<$BOND; i++ ))
        do
            echo "install bond${i} /sbin/modprobe bonding -o bond${i} miimon=100 mode=1" >> /etc/modprobe.conf
            cat <<-EOF > /etc/sysconfig/network-scripts/ifcfg-bond${i}
            DEVICE=bond${i}
            BOOTPROTO=none
            ONBOOT=yes
            IPADDR=$IP
            NETMASK=$SUBNET
            USERCTL=no
            EOF
        done
    fi

  15. # permition
  16. chmod 750 /usr/bin/ftp
    chmod 750 /usr/bin/telnet
    chmod 750 /usr/bin/ssh
    chmod 750 /usr/bin/rsh
    chmod 750 /usr/bin/rusers
    chmod 750 /usr/bin/rlogin
    chmod 750 /usr/bin/wget
    chmod 750 /usr/bin/rcp
    chmod 750 /usr/bin/scp
    chmod 750 /bin/rpm /etc/rpm
    chmod 750 /usr/bin/rwho
    chmod 750 /usr/bin/gcc
    chmod 750 /usr/bin/nmap
    chmod 750 /bin/ping
    chmod 750 /bin/mail
    chmod 4700 /bin/su

    # Reboot after Installation
    reboot


설정예2)


install
nfs –server=certbuild1-52 –dir=/exports/images/fedora4
lang en_US.UTF-8
langsupport –default=en_US.UTF-8
keyboard us
xconfig –card "ATI Mach64" –videoram 8128 –hsync 31.5-37.9 –vsync 50-70 –resolution 800×600 –depth 16 –startxonboot
network –bootproto dhcp
rootpw –iscrypted MD5HASHHERE
firewall –disabled
selinux –disabled
authconfig –enableshadow –enablemd5
timezone America/New_York
bootloader –location=mbr –driveorder=cciss/c0d0 –append="rhgb quiet"
# The following is the partition information you requested
# Note that any partitions you deleted are not expressed
# here so unless you clear all partitions first, this is
# not guaranteed to work
clearpart –all
part / –fstype ext3 –size=2048
part /var –fstype ext3 –size=4000
part swap –size=2048
part /usr –fstype ext3 –size=100 –grow
reboot

%packages
@ editors
@ system-tools
@ text-internet
@ x-software-development
@ dialup
@ java
@ base-x
@ server-cfg
@ language-support
@ admin-tools
@ development-tools
kernel-smp-devel
kernel-smp
grub
e2fsprogs

%pre
/usr/sbin/useradd user
chfn -f 'user' user
/usr/sbin/usermod -p '$1MD5HASHHERE' user
~

킥스타트 설정예

댓글 남기기

이메일은 공개되지 않습니다. 필수 입력창은 * 로 표시되어 있습니다