Simple is IT, 누구나 보고 누구나 깨닫는 IT

Redhat(CentOS)_Kickstart 본문

Simple is IT/Server

Redhat(CentOS)_Kickstart

currenjin 2020. 5. 7. 10:09

Kickstart (킥스타트, PXE 서버)

: 네트워크 부팅을 통해 OS를 자동으로 설치하는 설치 방법

Kickstart 예시

Kickstart를 구성하는 서버

tftp server : 부팅 시 부팅 관련 파일을 공유하기 위함

dhcp server : 부팅 시 네트워크 설정을 위함

NFS, FTP 등 : kickstart 설정 파일과 이미지 파일을 공유하기 위함

실습

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

KICKSTART를 위한 설정들

TFTP

yum install tftp tftp-server.x86_64 xinetd.x86_64 -y // tftp server를 위한 관련 패키지 설치

vi /etc/xinetd.d/tftp

disable = no 로 변경 // tftp Enable 상태

server_args = -s /tftpboot // 부팅 시 클라이언트가 가져갈 파일 지정

systemctl restart xinetd

yum install syslinux // 부팅 시 공유할 파일 설치

cp /usr/share/syslinux/menu.c32 /tftpboot/

cp /usr/share/syslinux/pxelinux.0 /tftpboot/

cd /tftpboot/

1. mkdir CentOS7 // CentOS7 boot code 실행 후 ks의 내용을 불러오게

- CentOS boot code copy

2. mkdir ks

- anaconda-ks.cfg copy

3. mkdir pxelinux.cfg // pxelinux.0의 설정에서 cfg디렉토리의 내용을 불러들여 CentOS7로 가게끔

- vi default에서 pxelinux.cfg 설정

CentOS boot code copy)

cd /run/media/jeong/CentOS\ 7\ x86_64/isolinux/

cp vmlinuz /tftpboot/CentOS7/

cp initrd.img /tftpboot/CentOS7/

anaconda-ks.cfg copy)

cp /root/anaconda-ks.fg /tftpboot/ks/ks.cfg

vi /tftpboot/ks/ks.cfg


ks.cfg.txt


!! 자신의 환경에 맞게 설정필요

pxelinux.cfg)

DEFAULT menu.c32

timeout 100

menu title ### OS Installer Boot Menu ###

LABEL CentOS7

kernel CentOS7/vmlinuz

append ksdevice=link load_ramdisk=1 initrd=CentOS7/initrd.img unsupported_hardware text network ks=nfs:192.168.10.10:/tftpboot/ks/ks.cfg text

DHCP

yum install dhcp -y

vi /etc/dhcp/dhcpd.conf


dhcpd.conf.txt


자신의 환경에 맞게 설정필요 !!

NFS

cp -r /run/media/jeong/CentOS\ 7\ x86_64/* /iso/

vi /etc/exports

/tftpboot/ks 192.168.10.* (ro)

/iso 192.168.10.* (ro)

권한 및 방화벽 설정

chmod -R 777 /tftpboot

systemctl stop firewalld.service

setenforce 0

최종 테스트

kickstart test

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////


'Simple is IT > Server' 카테고리의 다른 글

DnsServer_BindOptions (RedHat, CentOS)  (0) 2020.05.07
Linux_DNS(Domain Name System, BIND)  (0) 2020.05.07
Linux_DHCP (CentOS)  (0) 2020.05.07
Linux Part 12. 메모리 관리 (SWAP)  (0) 2020.05.07
Linux_NFS (Network File System)  (0) 2020.05.06
Comments