ubuntu 下cobbler 安装调试与系统自动化部署

  本文是在ubuntu 12.0.4.2的基础上,使用cobbler服务,自动化部署ubuntu服务器,希望对大家有帮助

  安装相关软件

  sudo apt-get install -y ubuntu-orchestra-server cobbler-web mc htop nload debmirror

  sudo apt-get install -y cobbler-web

  安装过程中,建议不下载iso,然后让cobbler管理dns和dhcp,还是相对比较方便的

  给登录cobbler-web的用户修改密码

  htdigest /etc/cobbler/users.digest “Cobbler” cobbler

  导入系统

  方法一:

  从网上导入12.0.4的最小安装包(64位),32位直接改成precise-i386就行

  cobbler-ubuntu-import precise-x86_64

  cobbler check

  root@cobbler:~# cobbler check

  The following are potential configuration items that you may want to fix:

  1 : One or more repos need to be processed by cobbler reposync for the first time before kickstarting against them: ubuntu-mini-x86_64-security, ubuntu-server-x86_64, ubuntu-mini-x86_64, ubuntu-server-x86_64-security

  Restart cobblerd and then run ‘cobbler sync’ to apply changes.

  cobbler reposync执行一次之后就没有这个提示了

  其实不用管它,如果我们有个稳定的源,这个错误可以忽略不计

  方法二:

  iso镜像导入

  mount -t auto -o loop ubuntu-12.04.2-server-amd64.iso /mnt

  cobbler import –name=ubuntu-server-12.0.4 –path=/mnt –breed=ubuntu

  修改profile文件

  cobbler profile edit –name=ubuntu-server-x86_64 –kopts=”auto=true netcfg/choose_interface=auto” –kickstart=/var/lib/cobbler/kickstarts/ubuntu.preseed

  如果你想用iso的内容做为本地安装源,你还可以用apache做镜像源

  apt-get install apache2

  ln -sv /var/www/cobbler/ks_mirror/ubuntu-server/ /var/www/ubuntu/

  cobbler sync

  记住,每次更改完配置文件,都要运行上面的命令,否则不会生效

 

发表评论

邮箱地址不会被公开。 必填项已用*标注