一:Cobbler的安装
yum-y install cobbler httpd rsync tftp-server xinetd dhcp python-ctypes cmanpykickstart
2.配置cobbler
2.1配置cobbler主配置文件
vim /etc/cobbler/settings #cobbler主配置文件 manage_dhcp: 1 #启用cobbler dhcp功能 manage_rsync: 1 #启用cobbler rsync功能 next_server: 192.168.40.145 #dhcp服务地址 server: 192.168.40.145 #cobbler 服务地址 default_kickstart:/var/lib/cobbler/kickstarts/default.ks #默认ks文件
2.1 检查,关闭selinuxiptable
/etc/init.d/iptables stop chkconfig iptables off setenforce 0
2.2 配置tftp ,rsync
vim/etc/xinetd.d/rsync vim/etc/xinetd.d/rsync disable= no
2.3 启用wsgi模块
vim/etc/httpd/conf.d/wsgi.conf LoadModulewsgi_module modules/mod_wsgi.so
2.4 生成Cobbler安装系统初始密码
openssl passwd -1 -salt ‘zuoliao‘ ‘mima‘ $1$zuoliao$ucZsjnNnYeC1ddo9O19ei0 加入Cobbler设置 vim/etc/cobbler/settings default_password_crypted:"$1$zuoliao$ucZsjnNnYeC1ddo9O19ei0"
2.5 配置HDCP
vim/etc/cobbler/dhcp.template subnet 192.168.40.0 netmask 255.255.255.0{ option routers 192.168.40.145; option domain-name-servers 219.141.136.10; option subnet-mask 255.255.255.0; range dynamic-bootp 192.168.40.100192.168.40.150; #分配的IP地址 default-lease-time 600; #默认租约时间 max-lease-time 1200; #最大租约时间 next-server $next_server; class "pxeclients" { match if substring (optionvendor-class-identifier, 0, 9) = "PXEClient"; if option pxe-system-type = 00:02 { filename"ia64/elilo.efi"; } else if option pxe-system-type =00:06 { filename"grub/grub-x86.efi"; } else if option pxe-system-type =00:07 { filename"grub/grub-x86_64.efi"; } else { filename"pxelinux.0"; } } }
2.6 设置相关服务启动及开机自启动
/etc/init.d/httpdstart /etc/init.d/xinetdstart /etc/init.d/cobblerdstart chkconfighttpd on chkconfigxinetd on chkconfigcobblerd on
2.7 下载引导操作系统软件
cobblerget-loaders
2.8 配置debmirror
Yum –yinstall debmirror vim/etc/debmirror.conf #@dists="sid"; #@arches="i386";
2.9 检查Cobbler 配置
Cobbler check
根据提示解决错误
2.91同步设置
cobblersync
3.导入系统镜像
cobblerimport --path=/var/os/Linux/Centos/x86_64/Centos6.4/dvd --name=centos6.5--arch=x86_64
列出导入后的配置
cobblerlist
列出详细信息
cobblerreport
4.创建PXE菜单密码
opensslpasswd -1 -salt 111 womai.123 $1$111$NguSK02gcD9XFcrcw4Hww. vim/etc/cobbler/pxe/pxedefault.template MENUTITLE co-mall | Auto Install System #设置装系统标题 MENUMASTER PASSWD $1$111$NguSK02gcD9XFcrcw4Hww. #设置密码文件
5. Cobbler web管理
5.1 yum安装cobbler_web
Yum –y install cobbler-web
htdigest /etc/cobbler/users.digest"yuanbinbin" cobbler #创建新用户
5.2 重启cobbler与http
时间: 2024-10-12 22:35:22