Centos_cobbler安裝步驟

1.         CentOS5.4默認的Repository裏找不到Cobbler,先安裝rpmforce這個Repositorylinux

#32位:   服務器

wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.i386.rpm    koa

rpm -ivh rpmforge-release-0.5.2-2.el5.rf.i386.rpm   ide

#64位:   oop

wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm    spa

rpm -ivh rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm  orm

 

2.         安裝相關軟件: server

yum -y install cobbler dhcp httpd xinetd tftp-server  ci

# cobbler的配置文件在/var/lib/cobbler//etc/cobbler下(不一樣版本可能不一樣)
# xinetd tftp-server
用來作tftp服務器,pxe啓動須要。
# httpd
服務器主要存放ks文件和安裝光盤。注意 /var/www/cobbler 目錄必須具備足夠容納 Linux 安裝文件的空間(移動,建軟連接)get

 

3.         檢查 cobbler 配置:

cobbler check  

#0: The 'server' field in /var/lib/cobbler/settings must be set to something other than localhost, or kickstarting features will not work.  This should be a resolvable hostname or IP for the boot server as reachable by all machines that will use it.
#1: For PXE to be functional, the 'next_server' field in /var/lib/cobbler/settings must be set to something other than 127.0.0.1, and should match the IP of the boot server on the PXE network.
#2: change 'disable' to 'no' in /etc/xinetd.d/tftp
按提示解決相關問題,把 /var/lib/cobbler/settings 中的 server next_server 設爲本服務器的 IP 地址,manage_dhcp 設爲 1, /etc/xinetd.d/tftpdisable = no以便管理 DHCP

 

4.         導入 CentOS 5 安裝 DVD ISO 中的文件:

mount -o loop /dev/hdc/CentOS-5.4-x86_64-bin-DVD.iso /media/cdrom

cobbler import --mirror=/media/cdrom --name=CentOS-5.4-i386

# /media/cdrom目錄導入全部安裝文件,命名爲 CentOS-5-4-x86-64

 

5.         修改 DHCP Kickstart 配置模板:

vi /etc/cobbler/dhcp.template

# DHCP 配置模板,注意你本服務器的 IP 地址要和dhcp配置的subnet一個網段,不然會啓動失敗。

修改ks配置文件,生成的配置文件在:/var/www/cobbler/kickstarts/ CentOS-5.4-i386 /ks.cfg

能夠經過查看tftp文件:/tftpboot/pxelinux.cfg/default  這個文件是cobbler 本身生成,很是的方便。不過最用都是同樣的,就是DHCP引導的時候讀取cobbler的配置文件,能夠看到ks的路徑

 

6.         生成並同步全部配置: 

cobbler sync

 

 

7.         啓動相關服務:

service httpd start

service xinetd start

service dhcpd start

service cobblerd start

設置相關服務開機啓動

ntsysv

 

8.         安裝服務器:

啓動另外一臺新服務器,經過 PXE 啓動進入,提示"boot:"時輸入"menu"便可進入藍色的 Cobbler 安裝界面,選擇安裝項,幾分鐘以內就能一鼓作氣,自動完成系統安裝。

 能夠經過編輯/tftpboot/pxelinux.cfg/default,取消輸入menu,直接進入安裝界面

DEFAULT menu
PROMPT 0

 

9.         重裝系統:

在要重裝的機器安裝koan   

yum install koan   

#查看cobbler服務器有哪些安裝盤   

koan --list-profiles --server=192.168.1.2  

#選擇要重裝的系統並重啓   

koan --replace-self --server=192.168.1.2 --profile=CentOS-5-4-x86-64  

reboot  

相關文章
相關標籤/搜索