Kickstart(킥스타트) 설치
[참고] 킥스타트 설치
https://access.redhat.com/site/documentation/ko-KR/Red_Hat_Enterprise_Linux/6/html/Installation_Guide/ch-kickstart2.html#s1-kickstart2-whatis
1. TFTP(Trivial File Transfer Protocol) 설치
2. DHCP(Dynamic Host Configuration Protocol) 설치
3. NFS(Network File System) 설치
4. SYSLINUX 설치
5. 기타 추가 설정
6. 서비스 시작
시스템 구축 환경
[root@kss ~]# cat /etc/redhat-release
CentOS release 6.4 (Final)
[root@kss ~]# getconf LONG_BIT
64
IP ADD : 192.168.1.105
SubMask : 255.255.255.0
GateWay : 192.168.0.1
1. TFTP 설치
[root@kss ~]# yum -y install tftp tftp-server
[root@kss ~]# rpm -qa | grep tftp
tftp-0.49-7.el6.x86_64
tftp-server-0.49-7.el6.x86_64
[root@kss ~]# cat /etc/xinetd.d/tftp
# default: off # description: The tftp server serves files using the trivial file transfer \ # protocol. The tftp protocol is often used to boot diskless \ # workstations, download configuration files to network-aware printers, \ # and to start the installation process for some operating systems. service tftp { socket_type = dgram protocol = udp wait = yes user = root server = /usr/sbin/in.tftpd server_args = -s /tftpboot disable = no per_source = 11 cps = 100 2 flags = IPv4 } |
[root@kss ~]# service xinetd start
xinetd (을)를 시작 중: [ OK ]
2. DHCP 설치
[root@kss ~]# yum install -y dhcp dhcp-devel
[root@kss ~]# rpm -qa | grep dhcp
dhcp-4.1.1-34.P1.el6_4.1.x86_64
dhcp-common-4.1.1-34.P1.el6_4.1.x86_64
dhcp-devel-4.1.1-34.P1.el6_4.1.x86_64
[root@kss ~]# cat /usr/share/doc/dhcp-4.1.1/dhcpd.conf.sample >> /etc/dhcp/dhcpd.conf
[root@kickstart01 ~]# vi /etc/dhcp/dhcpd.conf
# # DHCP Server Configuration file. # see /usr/share/doc/dhcp*/dhcpd.conf.sample # see 'man 5 dhcpd.conf' # # dhcpd.conf # # Sample configuration file for ISC dhcpd #
allow bootp;
allow booting;
# option definitions common to all supported networks... option domain-name "sangchul.kr"; option domain-name-servers ns1.sangchul.kr, ns2.sangchul.kr;
default-lease-time 600; max-lease-time 7200;
# Use this to enble / disable dynamic dns updates globally. ddns-update-style none;
# Use this to send dhcp log messages to a different log file (you also # have to hack syslog.conf to complete the redirection). log-facility local7;
# No service will be given on this subnet, but declaring it helps the # DHCP server to understand the network topology. subnet 192.168.1.0 netmask 255.255.255.0 { }
# This is a very basic subnet declaration. subnet 192.168.1.0 netmask 255.255.255.0 { option routers 192.168.1.1; range 192.168.1.150 192.168.1.200; filename "pxelinux.0"; }
# Mac = IP #host mac1 { hardware ethernet 08:00:07:26:c0:a5; fixed-address 192.168.1.200; }; |
[root@kss ~]# service dhcpd start
dhcpd (을)를 시작 중: [ OK ]
3. NFS 설치
[root@kss ~]# yum -y install nfs-utils nfs-utils-lib
[root@kss ~]# rpm -qa | grep nfs
nfs-utils-1.2.3-36.el6.x86_64
nfs-utils-lib-1.1.5-6.el6.x86_64
[root@kss ~]# mkdir /mnt/centos6.4_64
[root@kss ~]# mount -t iso9660 -o loop /home/scbyun/CentOS-6.4-x86_64-bin-DVD1.iso /mnt/centos6.4_64
[root@kss ~]# echo '/mnt/centos6.4_64 192.168.1.0/24(ro)' >> /etc/exports
[root@kss ~]# echo '/tftpboot/kickstart 192.168.1.0/24(ro)' >> /etc/exports
4. syslinux 설치
[root@kss ~]# yum install syslinux
[root@kss ~]# rpm -qa | grep syslinux
syslinux-4.02-8.el6.x86_64
5. 기타 추가 설정
- SELINUX Off
[root@kss ~]# vi /etc/sysconfig/selinux
# This file controls the state of SELinux on the system. # SELINUX= can take one of these three values: # enforcing - SELinux security policy is enforced. # permissive - SELinux prints warnings instead of enforcing. # disabled - No SELinux policy is loaded. SELINUX=disabled # SELINUXTYPE= can take one of these two values: # targeted - Targeted processes are protected, # mls - Multi Level Security protection. SELINUXTYPE=targeted |
- 방화벽 Off
[root@kss ~]# service iptables stop iptables: 방화벽 규칙을 지웁니다: [ OK ] iptables: 체인을 ACCEPT 규칙으로 설정 중: filter [ OK ] iptables: 모듈을 언로드하는 중: [ OK ] |
- TFTP PXE 환경 설정 파일 생성
[root@kss ~]# mkdir -p /tftpboot/{pxelinux.cfg,kickstart,centos6.4}
[root@kss ~]# chmod +r -R /tftpboot
- /etc/inetd.conf 파일에 아래 내용을 추가
[root@kss tftpboot]# echo 'tftp dgram udp wait root /usr/sbin/tcpd in.tftpd /tftpboot' > /etc/inetd.conf
- 부팅 이미지 복사 및 설정
[root@kss ~]# cp /usr/share/syslinux/pxelinux.0 /tftpboot
[root@kss ~]# cp /mnt/centos6.4_64/images/pxeboot/{vmlinuz,initrd.img} /tftpboot/centos6.4
[root@kss ~]# mkdir /home/scbyun/
[root@kss ~]# mount -t iso9660 -o loop /home/scbyun/CentOS-6.4-x86_64-bin-DVD1.iso /mnt/scbyun/
[root@kss ~]# vi /tftpboot/pxelinux.cfg/default[출처] Kickstart 설치후 활용하기|작성자 linuxz
timeout=30 default CentOS6.4 label CentOS6.4 kernel centos6.4/vmlinuz append ksdevice=link load_ramdisk=1 initrd=centos6.4/initrd.img network ks=nfs:192.168.1.105:/tftpboot/kickstart/ks_centos6.4_64.cfg |
- Kickstart 설정 파일 생성
ks_centos6.4_64.cfg
#platform=x86,AMD64,Intel EM64T #version=RHEL6
# Install OS instead of upgrade install
#url --url=http://mirror.cdnetworks.com/centos/6/os/x86_64 nfs --server=192.168.1.105 --dir=/mnt/centos6.4_64
# Reboot the host when the installation is complete reboot
# System language lang ko_KR.UTF-8
# System keyboard keyboard us
# Network information network --bootproto=dhcp --device=eth0 --onboot=yes #network --onboot=yes --device=eth0 --bootproto=static --ip=10.0.2.15 --netmask=255.255.255.0 --gateway=10.0.2.254 --nameserver=10.0.2.1
# Root password rootpw --iscrypted $6$os.IJnUFIbnt3Qjb$i76tetjZXCubPR39pV3i3ixS7EemQTRm.wvX5njkOWVz0TfBxgi13SuwFWjvXf576T2ymsUEJ/EetVhmDsvTe0
# Firewall configuration firewall --disabled
authconfig --enableshadow --passalgo=sha512
# Use text mode install text
# SELinux configuration selinux --disabled
# Do not configure the X Window System skipx
# System timezone timezone --utc Asia/Seoul
# System bootloader configuration bootloader --location=mbr --driveorder=sda --append="nomodeset rhgb crashkernel=auto quiet"
# Installation logging level logging --level=info
# 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 --initlabel
#ignoredisk --drives=sda
part / --fstype=ext4 --grow --asprimary --size=200 part swap --asprimary --size=2048
#repo --name="CentOS" --baseurl=cdrom:sr0 --cost=100 repo --name="CentOS" --baseurl=http://mirror.cdnetworks.com/centos/6/os/x86_64/ --cost=100
# Reboot after installation reboot
# 패키지를 선택 %packages @client-mgmt-tools @core @korean-support @server-policy %end |
[root@kss ~]# chmod 777 /tftpboot/kickstart/ks_centos6.4_64.cfg
http://www.centos.org/docs/4/html/rhel-sag-en-4/s1-kickstart2-options.html
http://www.centos.org/docs/5/html/Installation_Guide-en-US/s1-kickstart2-packageselection.html
6. 서비스 시작
- xinetd
[root@kss kickstart]# service xinetd restart
xinetd 를 정지 중: [ OK ]
xinetd (을)를 시작 중: [ OK ]
- DHCPD
[root@kss kickstart]# service dhcpd restart
dhcpd 종료 중: [ OK ]
dhcpd (을)를 시작 중: [ OK ]
- NFS
[root@kss kickstart]# service nfs restart
NFS 데몬 종료 중: [ OK ]
NFS mountd를 종료 중입니다: [ OK ]
NFS 서비스를 시작하고 있습니다: [ OK ]
NFS mountd를 시작중 입니다. [ OK ]
RPC idmapd 정지 중: [ OK ]
RPC idmapd를 시작 중: [ OK ]
NFS 데몬을 시작함: [ OK ]
참고 URL
http://xinet.kr/tc/69
http://www.yongbok.net/blog/centos-kickstart-%EC%84%A4%EC%A0%95/
https://access.redhat.com/site/documentation/ko-KR/Red_Hat_Enterprise_Linux/6/html/Installation_Guide/ch-kickstart2.html
http://xajax.tistory.com/208
http://www.centos.org/docs/4/html/rhel-sag-en-4/s1-kickstart2-options.html
http://valley.egloos.com/viewer/?url=http://jonnychoe.egloos.com/5537036
'리눅스' 카테고리의 다른 글
CentOS 7에서 Kickstart 파일을 생성하는 가장 간편한 방법(Kickstart Configurator) (0) | 2013.09.16 |
---|---|
[kickstart] 킥스타트 옵션 (0) | 2013.09.15 |
CentOS 6.4에서 SYSLINUX을 설치하는 방법 (0) | 2013.09.15 |
우분투에서 TFTP 서버를 구축하는 방법 (0) | 2013.09.15 |
CentOS 7에서 Kickstart 서버를 구성하는 방법 (0) | 2013.09.15 |