本文共 3412 字,大约阅读时间需要 11 分钟。
安装Django1.4
wgetrpm -ivf Django14-1.4.14-1.sdl6.noarch.rpm
安装命令
root@master ~]# yum install cobbler cobbler-web dhcp tftp-server pykickstart httpd -y重启httpd/etc/init.d/httpd restart启动cobbler/etc/init.d/cobblerd start检查cobbler check报错1 : The 'server' field in /etc/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.2 : For PXE to be functional, the 'next_server' field in /etc/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.3 : change 'disable' to 'no' in /etc/xinetd.d/tftp4 : some network boot-loaders are missing from /var/lib/cobbler/loaders, you may run 'cobbler get-loaders' to download them, or, if you only want to handle x86/x86_64 netbooting, you may ensure that you have installed a recent version of the syslinux package installed and can ignore this message entirely. Files in this directory, should you want to support all architectures, should include pxelinux.0, menu.c32, elilo.efi, and yaboot. The 'cobbler get-loaders' command is the easiest way to resolve these requirements.5 : change 'disable' to 'no' in /etc/xinetd.d/rsync6 : file /etc/xinetd.d/rsync does not exist7 : debmirror package is not installed, it will be required to manage debian deployments and repositories8 : The default password used by the sample templates for newly installed machines (default_password_crypted in /etc/cobbler/settings) is still set to 'cobbler' and should be changed, try: "openssl passwd -1 -salt 'random-phrase-here' 'your-password-here'" to generate new one9 : fencing tools were not found, and are required to use the (optional) power management features. install cman or fence-agents to use them解决报错vi /etc/cobbler/settingsnext_server: 10.0.0.8server: 10.0.0.8配置接管dhcpmanage_dhcp: 1default_password_crypted: "$1$oldboy$fXF8f078vI9J/q9XyXA8e/"生成密码的方法openssl passwd -1 -salt 'oldboy' 'oldboy'执行命令cobbler get-loaders修改配置vi /etc/xinetd.d/rsyncdisable = no/etc/init.d/xinetd restart配置dhcpvim /etc/cobbler/dhcp.template subnet 10.0.0.0 netmask 255.255.255.0 { option routers 10.0.0.2;option domain-name-servers 10.0.0.2;option subnet-mask 255.255.255.0;range dynamic-bootp 10.0.0.100 10.0.0.200;刷新cobbler syncmount光盘
mount /dev/cdrom /mnt导入iso.# cobbler import --path=/mnt/ --name=CentOS-7-x86_64-DVD-1708 --arch=x86_64cobbler import --path=/mnt/ --name=CentOS-6.5-x86_64 --arch=x86_64会把镜像放到
/var/www/cobbler/ks_mirror把my.cfg上传到一下目录
/var/lib/cobbler/kickstarts修改配置文件.# kickstarts]# cobbler profile edit --name=CentOS-7-DVD-1708-x86_64 --kickstart=/var/lib/cobbler/kickstarts/my.cfgkickstarts]# cobbler profile edit --name=CentOS-6.5-x86_64 --kickstart=/var/lib/cobbler/kickstarts/my.cfg修改内核参数cobbler profile edit --name=CentOS-7-DVD-1708-x86_64 --kopts='net.ifnames=0 biosdevname=0'同步
cobbler sync修改cobbler配置文件
开启虚拟机就会自动安装为某个网卡添加ip和主机名cobbler system add --name=oldboy --mac=00:0C:29:BA:67:1C --profile=CentOS-6.5-x86_64 --ip-address=10.0.0.111 --subnet=255.255.255.0 --gateway=10.0.0.2 --interface=eht0 --static=1 --hostname=oldboy.example.com --name-servers="114.114.114.114 8.8.8.8"修改安装时候的文字提示
vi /etc/cobbler/pxe/pxedefault.template查看指定的PC
cobbler system list转载于:https://blog.51cto.com/13491150/2051691