利用Cobbler批量布署CentOS(4)

利用Cobbler批量布署CentOS

利用Cobbler批量布署CentOS

10、重装系统
CentOS 5.5默认的Repository里找不到koan,先安装rpmforce这个Repository
cd /opt
wget
rpm -ivh rpmforge-release-0.5.2-2.el6.rf.i686.rpm

#在要重装的机器安装koan 
yum -y install koan 

#查看cobbler服务器有哪些安装盘 
koan --list-profiles --server=192.168.9.230

#选择要重装的系统并重启 
koan --replace-self --server=192.168.9.230 --profile=kerryOS-1.0-i386
reboot 

11、服务控制脚本
vi /etc/init.d/cobbler_all

#!/bin/sh   case $1 in          start)                 /etc/init.d/httpd start                 /etc/init.d/xinetd start                  /etc/init.d/dhcpd start                 /etc/init.d/cobblerd start                  ;;          stop)                 /etc/init.d/httpd stop                 /etc/init.d/xinetd stop                  /etc/init.d/dhcpd stop                 /etc/init.d/cobblerd stop                  ;;          status)                  /etc/init.d/httpd status                  /etc/init.d/xinetd status                   /etc/init.d/dhcpd status                  /etc/init.d/cobblerd status                  ;;                sync)                  cobbler sync                  ;;                                    *)                  echo "Input error,please in put 'start|stop|status|sync'!";                   exit 2>&1 >/dev/null &                  ;;           esac 

chmod +x /etc/init.d/cobbler_all

/etc/init.d/cobbler_all  start|stop|startus|sync

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/pxfgg.html