环境Centos 6.3,本地挂载镜像配置本地yum源

yum -y install dhcp httpd xinetd tftp-server

http://dl.fedoraproject.org/pub/epel/6/x86_64/目录下有epel-release-6-8.noarch.rpm

rpm -ivh epel-release-6-8.noarch.rpm

yum update

遇到报错:

[root@localhost ~]# yum update
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again

需要调通网络,然后可执行成功。

yum install cobbler

(http://ftp6.sjtu.edu.cn/fedora/epel/6/x86_64/cobbler-2.4.0-1.el6.noarch.rpm)

启动cobbler

/etc/init.d/cobbler start

启动httpd

/etc/init.d/httpd start

关闭SELinux

/usr/sbin/setenforce 0

配置DHCP

####

检查cobbler配置

  1. [root@localhost yum.repos.d]# cobbler check
  2. The following are potential configuration items that you may want to fix:
  3.  
  4. : 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.
  5. : 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.
  6. : SELinux is enabled. Please review the following wiki page for details on ensuring cobbler works correctly in your SELinux environment:
  7. https://github.com/cobbler/cobbler/wiki/Selinux
  8. : 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., menu.c32, elilo.efi, and yaboot. The 'cobbler get-loaders' command is the easiest way to resolve these requirements.
  9. : change 'disable' to 'no' in /etc/xinetd.d/rsync
  10. : debmirror package is not installed, it will be required to manage debian deployments and repositories
  11. : ksvalidator was not found, install pykickstart
  12. : 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
  13. : fencing tools were not found, and are required to use the (optional) power management features. install cman or fence-agents to use them
  14.  
  15. Restart cobblerd and then run 'cobbler sync' to apply changes.

上面这段信息大意就是:

1,编辑/etc/cobbler/settings文件,找到 server选项,修改为适当的ip地址,本实例配置ip为:192.168.10.1

2,编辑/etc/cobbler/settings文件,找到 next_server选项,修改为适当的ip地址,本实例配置ip为:192.168.10.1

3,SELinux的设置。如果上面已经关闭了SELinux就不用管了

4,执行 cobbler get-loaders,系统将自动下载loader程序,完成提示4的修复工作。

5,编辑/etc/xinetd.d/tftp文件,将文件中的disable字段的配置由yes改为no

6,编辑/etc/xinetd.d/rsync文件,将文件中的disable字段的配置由yes改为no

7,在iptables中将69,80,25151端口打开。如果仅仅只是在内部环境中使用,建议直接将防火墙关掉

8,提示说debmirror没安装。如果不是安装 debian之类的系统,此提示可以忽略,如果需要安装,下载地址为:

  1. http://rpmfind.net/linux/rpm2html/search.php?query=debmirror

CentOS 6使用RHEL 5的包就可以。

9,修改cobbler用户的默认密码,可以使用如下命令生成密码,并使用生成后的密码替换/etc/cobbler/settings中的密码。生成密码命令:

  1. openssl passwd -1 -salt 'random-phrase-here' 'your-password-here'

其中“random-phrase-here”为干扰码

所有提示全部fix之后,执行

/etc/init.d/cobblerd restart

再次cobbler check后提示

  1. [root@localhost ~]# cobbler check
  2. The following are potential configuration items that you may want to fix:
  3.  
  4. : SELinux is enabled. Please review the following wiki page for details on ensuring cobbler works correctly in your SELinux environment:
  5. https://github.com/cobbler/cobbler/wiki/Selinux
  6. : service dhcpd is not running
  7. : debmirror package is not installed, it will be required to manage debian deployments and repositories
  8. : ksvalidator was not found, install pykickstart
  9. : 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
  10. : fencing tools were not found, and are required to use the (optional) power management features. install cman or fence-agents to use them
  11.  
  12. Restart cobblerd and then run 'cobbler sync' to apply changes.

执行cobbler sync出现报错

running: service dhcpd restart
received on stdout: Starting dhcpd: [FAILED]

修改DHCP配置文件

  1. [root@localhost log]# vim /etc/cobbler/dhcp.template
  2. subnet 192.168.123.0 netmask 255.255.255.0 {
  3. option routers 192.168.123.1;
  4. option domain-name-servers 10.12.96.17;
  5. option subnet-mask 255.255.255.0;
  6. range dynamic-bootp 192.168.123.105 192.168.123.199;
  7. default-lease-time ;
  8. max-lease-time ;
  9. next-server 192.168.123.100;
  10. filename "/pxelinux.0";
  11. }

如果启动dhcp服务仍然失败,可以tail -f /var/log/messages 分析原因

不用手动去修改dhcp服务配置文件,因为/etc/cobbler/dhcp.template文件会覆盖过去

报错提示没有kickstart,执行yum install pykickstart

报错提示没有fence-agents,执行yum install fence-agents

如果出现以下报错

  1. [root@localhost ~]# cobbler check
  2. Traceback (most recent call last):
  3. File "/usr/bin/cobbler", line , in <module>
  4. sys.exit(app.main())
  5. File "/usr/lib/python2.6/site-packages/cobbler/cli.py", line , in main
  6. rc = cli.run(sys.argv)
  7. File "/usr/lib/python2.6/site-packages/cobbler/cli.py", line , in run
  8. self.token = self.remote.login("", self.shared_secret)
  9. File "/usr/lib64/python2.6/xmlrpclib.py", line , in __call__
  10. return self.__send(self.__name, args)
  11. File "/usr/lib64/python2.6/xmlrpclib.py", line , in __request
  12. verbose=self.__verbose
  13. File "/usr/lib64/python2.6/xmlrpclib.py", line , in request
  14. return self._parse_response(h.getfile(), sock)
  15. File "/usr/lib64/python2.6/xmlrpclib.py", line , in _parse_response
  16. return u.close()
  17. File "/usr/lib64/python2.6/xmlrpclib.py", line , in close
  18. raise Fault(**self._stack[])
  19. xmlrpclib.Fault: <Fault : "<class 'cobbler.cexceptions.CX'>:'login failed'">

可以尝试

1、service cobblerd restart

2、cobbler get-loaders

对于自动部署的系统可以使用kickstart自动安装,可参考

http://my.oschina.net/lionel45/blog/111618

【Linux】部署cobbler的更多相关文章

  1. 部署cobbler服务器

    部署cobbler服务器 1.准备环境使用nat或者仅主机模式,不要使用桥接模式,方式获取的IP不是自己的 2. 配置yum源[epel]name=epelenabled=1gpgcheck=0bas ...

  2. ASP.NET Linux部署(2) - MS Owin + WebApi + Mono + Jexus

    ASP.NET Linux部署(2) - MS Owin + WebApi + Mono + Jexus 本文承接我的上一篇博文: ASP.NET 5 Linux部署,那篇文章主要是针对最新的ASP. ...

  3. Linux 部署ASP.NET SQLite 应用 的坎坷之旅 附demo及源码

    Linux 部署ASP.NET SQLite 应用 的坎坷之旅.文章底部 附示例代码. 有一台闲置的Linux VPS,尝试着部署一下.NET 程序,结果就踏上了坑之路,不过最后算是完美解决问题,遂记 ...

  4. Linux部署ASP.NET 5 (vNext)

    原文:Linux部署ASP.NET 5 (vNext) ASP.NET 5 (vNext) Linux部署   引言 工欲善其事,必先利其器. 首先,我们先明确下以下基本概念 Linux相关 Ubun ...

  5. Linux tomcat部署War包,Linux在Tomcat部署JavaWeb项目,Linux部署War包

    Linux tomcat部署War包,Linux在Tomcat部署JavaWeb项目,Linux部署War包 >>>>>>>>>>>& ...

  6. Linux部署与基本指令

    把以前写的linux发布一下下吧,写的真的好差劲... Linux部署   chmod:改变一个文件的权限 改变abc的权限为777 常用的权限: 777-644-755 ************** ...

  7. NetCore1.1+Linux部署初体验

    1.环境准备 Centaos7+Win10 虚拟机 Win10安装VS2017 https://www.asp.net/downloads注意勾选下.Net Core 3.Centaos安装netco ...

  8. linux部署服务器遇到tomcat already start

    linux部署服务器遇到tomcat already start 前言,之前做了个汽车停车计费的后端,然后现在需要部署到服务器.正常部署,使用secureFx找到所属webapps目录,将文件上传.然 ...

  9. SpringBoot进阶教程(二十三)Linux部署Quartz

    在之前的一篇文章中<SpringBoot(九)定时任务Schedule>,已经详细介绍了关于schedule框架的配置和使用,有收到一些朋友关于部署的私信,所以抽时间整理一个linux部署 ...

  10. 【Docker】(3)---linux部署Docker、Docker常用命令

    linux部署Docker.Docker常用命令 本次部署Linux版本:CentOS 7.4 64位. 说明: 因为Docker是基于Linux 64bit的 所以Docker要求64位的系统且内核 ...

随机推荐

  1. poj_2421_mst

    D - Constructing Roads Time Limit:2000MS     Memory Limit:65536KB     64bit IO Format:%I64d & %I ...

  2. ORA-30036

    http://blog.sina.com.cn/s/blog_676255e101018d5s.html

  3. 20145305 《Java程序设计》第5周学习总结

    教材学习内容总结 1.设计错误对象都继承自java.lang.Throwable类 2.Throwable有两个子类:java.lang.Error与java.lang.Exception 3.Err ...

  4. .NET中使用Memcached的相关资源整理(转)

    Memcached官方站点:http://www.danga.com/memcached/ Memcached Win32 1.2.6下载:http://code.jellycan.com/memca ...

  5. C++学习21 基类和派生类的赋值

    在C/C++中,经常会发生数据类型转换,例如整型数据可以赋值给浮点型变量,在赋值之前,先把整型数据转换为浮点型:反过来,浮点型数据也可以赋值给整型变量. 数据类型转换的前提是,编译器知道如何对数据进行 ...

  6. 使用 cURL 获取站点的各类响应时间 – dns解析时间,响应时间,传输时间

    http://zhangrenfang8738.blog.163.com/blog/static/95401881201142711450245/ curl监控站点响应时间 2011-05-27 11 ...

  7. console,和自己定义事件

    console.log这个指令是在浏览器控制台输出日志,用来调试程序 跟alert 类似 但不像alert那样会打断程序.

  8. 在MS CRM 4.0中引用JS文件

    引用: http://blog.csdn.net/qzw4549689/article/details/6027987 1.编写好JS代码,在ISV目录下新建一个目录javascripts,将JS文件 ...

  9. 苹果safari浏览器登陆时Cookie无法保存的问题

    Safari浏览器不支持将非ASCII字符存入Cookie,所以中文在保存的时候就会出问题,分号(";")也不能存在Cookie中,所以需要通过方法去除内容中的分号,在Cookie ...

  10. Delphi中自画TStatusBar面板中的文字颜色背景以及图片

    转自 http://www.delphitop.com/html/kongjian/351.html 首先定义:procedure TStatusForm.FormCreate(Sender: TOb ...