linux下配置cobbler批量安装系统
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了linux下配置cobbler批量安装系统,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含4851字,纯文字阅读大概需要7分钟。
内容图文
![linux下配置cobbler批量安装系统](/upload/InfoBanner/zyjiaocheng/1049/826de82d4fa9498f8e056a570c9df600.jpg)
1、安装准备
yum install -y cobbler tftp dhcp httpd cman pykickstart debmirroryum install -y ed patch perl perl-Compress-Zlib perl-Digest-SHA1 perl-LockFile-Simple perl-libwww-perlyum install -y syslinux
2、启动httpd和cobbler
[root@node6 ~]# service httpd start [root@node6 ~]# service cobblerd start
3、cobbler检查
[root@node6 ~]# cobbler checkTraceback (most recent call last): File "/usr/bin/cobbler", line 36, in <module> sys.exit(app.main()) File "/usr/lib/python2.6/site-packages/cobbler/cli.py", line 655, in main rc = cli.run(sys.argv) File "/usr/lib/python2.6/site-packages/cobbler/cli.py", line 270, in run self.token = self.remote.login("", self.shared_secret) File "/usr/lib64/python2.6/xmlrpclib.py", line 1199, in __call__ return self.__send(self.__name, args) File "/usr/lib64/python2.6/xmlrpclib.py", line 1489, in __request verbose=self.__verbose File "/usr/lib64/python2.6/xmlrpclib.py", line 1253, in request return self._parse_response(h.getfile(), sock) File "/usr/lib64/python2.6/xmlrpclib.py", line 1392, in _parse_response return u.close() File "/usr/lib64/python2.6/xmlrpclib.py", line 838, in close raise Fault(**self._stack[0])xmlrpclib.Fault: <Fault 1: "<class ‘cobbler.cexceptions.CX‘>:‘login failed‘">
此处需要重新启动cobblerd服务,再次检查就会正常
-
[ root@node6 ~]# service cobblerd restart
-
[ root@node6 ~]# cobbler check
-
-
The following are potential configuration items that you may want to fix :
-
-
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 . 将/etc/cobbler/setting中的server改为cobbler主机的地址
-
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 .
-
##
将/etc/cobbler/setting中的next-server改为cobbler主机的地址 -
3 : 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 .
-
##此处可通过命令cobbler get-loaders修复,需要联网下载
-
4 : change ‘disable‘ to ‘no‘ in / etc / xinetd . d / rsync 修改
/ etc / xinetd . d / rsync中的disable为no -
5 : comment out ‘dists‘ on / etc / debmirror . conf for proper debian support
-
6 : comment out ‘arches‘ on / etc / debmirror . conf for proper debian support ##注释掉
/ etc / debmirror . conf中@distshearches开头的行 -
7 : 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 one 使用openssl passwd -1 -salt `openssl rand -hex 4` ‘你的密码‘,然后将生成的密码替换/etc/cobbler/setting文件中default_passwd_crypted后面的密码
650) this.width=650;" src="http://linuxu.qiniudn.com/wp-content/uploads/2015/02/wpid-f740dca7f0a415e5b3b5d50c28b2e721_15366359.png" border="0" />
如果显示一下图片所示则表示一切正常
650) this.width=650;" src="http://linuxu.qiniudn.com/wp-content/uploads/2015/02/wpid-f740dca7f0a415e5b3b5d50c28b2e721_33973d79-4504-4ddd-9a32-4948f145eb15.png" border="0" />
650) this.width=650;" src="http://linuxu.qiniudn.com/wp-content/uploads/2015/02/wpid-f740dca7f0a415e5b3b5d50c28b2e721_2c275129-9498-4429-9437-fe72e6b5b2f2.png" border="0" />i
配置dncp服务器,此为最简单配置,172.16.30.6为本机地址
650) this.width=650;" src="http://linuxu.qiniudn.com/wp-content/uploads/2015/02/wpid-f740dca7f0a415e5b3b5d50c28b2e721_18119093.png" border="0" />
启动dhcpd服务
sevice dhcpd start
导入光盘内容
[root@node5 ~]# mkdir /media/cdrom
[root@node5 ~]# mount /dev/cdrom1 /media/cdrom/
[root@node5 media]# cobbler import –path=/media/cdrom/ –name=’centos6.6′
同步
cobbler sync
新建虚拟机测试
650) this.width=650;" src="http://linuxu.qiniudn.com/wp-content/uploads/2015/02/wpid-f740dca7f0a415e5b3b5d50c28b2e721_c70dad9d-54e4-4500-8afe-cb8c7bd64319.png" border="0" />
cobbler命令
cobbler distro list显示当前共有多少个发行版,每一个发行版可以有多个profile,可通过cobbler profile add添加profile,上图安装界面的名称便是profile的名字,可设置不同的kickstart来共用一个distro,每一个不同的 kickstart可实现不同用途的安装,可使用如下命令来通过不同的kickstart添加不同作用的profile
cobbler profile add –name=’centos-web’ –distro=’centos6.6-x86_64′ –kickstart=/root/kickstart.cfg ##绝对路径
可通过命令cobbler distro list查看现有的distro的名字。
本文出自 “LINUXU” 博客,请务必保留此出处http://linuxu.blog.51cto.com/9471357/1613456
原文:http://linuxu.blog.51cto.com/9471357/1613456
内容总结
以上是互联网集市为您收集整理的linux下配置cobbler批量安装系统全部内容,希望文章能够帮你解决linux下配置cobbler批量安装系统所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。