利用Cobbler批量快速网络安装CentOS
利用Cobbler批量快速网络安装CentOS
Cobbler是什么?
Cobbler(补鞋匠)集成了PXE、DHCP、DNS、Kickstart服务管理和yum仓库管理工具,相对之前的 Kickstart 更加快捷、方便的批量布署Red Hat、CentOS类系统
测试环境:
VMware® Workstation : 9.0.0 build-812388
操作系统 : CentOS 5.6 32位
一.安装epel源
- [root@server1 ~]# wget http://dl.Fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
- [root@server1 ~]# rpm -ivh epel-release-5-4.noarch.rpm
- warning: epel-release-5-4.noarch.rpm: Header V3 DSA signature: NOKEY, key ID 217521f6
- Preparing... ########################################### [100%]
- 1:epel-release ########################################### [100%]
- [root@server1 ~]#
- [root@server1 ~]# yum -y install cobbler httpd rsync tftp-server xinetd dhcp python-ctypes pykickstart cman
- ...
- cobbler-2.2.2-1.el5.rf.noarch from rpmforge has depsolving problems
- --> Missing Dependency: python-netaddr is needed by package cobbler-2.2.2-1.el5.rf.noarch (rpmforge)
- cobbler-2.2.2-1.el5.rf.noarch from rpmforge has depsolving problems
- --> Missing Dependency: mod_wsgi is needed by package cobbler-2.2.2-1.el5.rf.noarch (rpmforge)
- Error: Missing Dependency: python-netaddr is needed by package cobbler-2.2.2-1.el5.rf.noarch (rpmforge)
- Error: Missing Dependency: mod_wsgi is needed by package cobbler-2.2.2-1.el5.rf.noarch (rpmforge)
- You could try using --skip-broken to work around the problem
- You could try running: package-cleanup --problems
- package-cleanup --dupes
- rpm -Va --nofiles --nodigest
- [root@server1 ~]# wget ftp://rpmfind.net/linux/epel/5/i386/python-netaddr-0.5.2-1.el5.noarch.rpm
- [root@server1 ~]# rpm -ivh python-netaddr-0.5.2-1.el5.noarch.rpm
- warning: python-netaddr-0.5.2-1.el5.noarch.rpm: Header V3 DSA signature: NOKEY, key ID 217521f6
- Preparing... ########################################### [100%]
- 1:python-netaddr ########################################### [100%]
- [root@server1 ~]# wget ftp://rpmfind.net/linux/epel/5/i386/mod_wsgi-3.2-2.el5.i386.rpm
- [root@server1 ~]# rpm -ivh mod_wsgi-3.2-2.el5.i386.rpm
- warning: mod_wsgi-3.2-2.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 217521f6
- Preparing... ########################################### [100%]
- 1:mod_wsgi ########################################### [100%]
- [root@server1 ~]# yum -y install cobbler httpd rsync tftp-server xinetd dhcp python-ctypes pykickstart cman
- ...中间省略
- [root@server1 ~]# chkconfig httpd on
- [root@server1 ~]# chkconfig cobblerd on
- [root@server1 ~]# chkconfig dhcpd on
- [root@server1 ~]# chkconfig xinetd on
- [root@server1 ~]#/etc/init.d/iptables stop
- [root@server1 ~]#chkconfig --level 35 iptables off
- [root@server1 ~]#chmod +x /etc/init.d/cobbler_all
- 用法:/etc/init.d/cobbler_all start|stop|startus|sync
- #!/bin/bash
- 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
|
评论暂时关闭