【Linux】部署cobbler

环境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配置

[root@localhost yum.repos.d]# 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.
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 : SELinux is enabled. Please review the following wiki page for details on ensuring cobbler works correctly in your SELinux environment:https://github.com/cobbler/cobbler/wiki/Selinux
4 : 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/rsync
6 : debmirror package is not installed, it will be required to manage debian deployments and repositories
7 : ksvalidator was not found, install pykickstart
8 : 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
9 : fencing tools were not found, and are required to use the (optional) power management features. install cman or fence-agents to use themRestart cobblerd and then run 'cobbler sync' to apply changes.

View Code

上面这段信息大意就是:

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之类的系统,此提示可以忽略,如果需要安装,下载地址为:

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

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

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

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

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

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

/etc/init.d/cobblerd restart

再次cobbler check后提示

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

View Code

执行cobbler sync出现报错

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

修改DHCP配置文件

[root@localhost log]# vim /etc/cobbler/dhcp.template
subnet 192.168.123.0 netmask 255.255.255.0 {option routers             192.168.123.1;option domain-name-servers 10.12.96.17;option subnet-mask         255.255.255.0;range dynamic-bootp        192.168.123.105 192.168.123.199;default-lease-time         21600;max-lease-time             43200;next-server                192.168.123.100;filename                   "/pxelinux.0";
}

View Code

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

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

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

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

如果出现以下报错

[root@localhost ~]# cobbler check
Traceback (most recent call last):File "/usr/bin/cobbler", line 35, in <module>sys.exit(app.main())File "/usr/lib/python2.6/site-packages/cobbler/cli.py", line 644, in mainrc = cli.run(sys.argv)File "/usr/lib/python2.6/site-packages/cobbler/cli.py", line 270, in runself.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 __requestverbose=self.__verboseFile "/usr/lib64/python2.6/xmlrpclib.py", line 1253, in requestreturn self._parse_response(h.getfile(), sock)File "/usr/lib64/python2.6/xmlrpclib.py", line 1392, in _parse_responsereturn u.close()File "/usr/lib64/python2.6/xmlrpclib.py", line 838, in closeraise Fault(**self._stack[0])
xmlrpclib.Fault: <Fault 1: "<class 'cobbler.cexceptions.CX'>:'login failed'">

View Code

可以尝试

1、service cobblerd restart

2、cobbler get-loaders

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

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

posted on 2014-04-24 18:15 poorX 阅读(...) 评论(...) 编辑 收藏

转载于:https://www.cnblogs.com/jiangxu67/p/3686489.html

【Linux】部署cobbler相关推荐

  1. linux运行dock打包的镜像,Linux部署之Docker方式部署项目

    Linux部署之Docker方式部署项目 1. 使用Docker对前端vue项目进行部署 1.1 环境准备 服务器或者虚拟机上先安装好Nginx和相关配置 docker pull nginx 拉去最新 ...

  2. Linux 部署ftp报530 错误解决方案

    Linux 部署ftp报530 错误解决方案 参考文章: (1)Linux 部署ftp报530 错误解决方案 (2)https://www.cnblogs.com/austinspark-jessyl ...

  3. Linux部署Node.js应用

    Linux部署Node.js应用 文章目录 Linux部署Node.js应用 一.背景描述 二.环境准备 三.添加守护进程 四.参考链接 一.背景描述 将基于Node.js开发的应用部署到Linux系 ...

  4. pycharm创建django项目linux部署

    大家好,我是烤鸭: pytho部署web项目比java简单一点,虽然springboot内置了tomcat. 环境: pycharm专业版python3.6 1.安装python python下载: ...

  5. linux部署jenkins,tomcat9

    大家好,我是烤鸭: 今天分享的是    linux部署jenkins,tomcat9 安装环境: linux centos7.2 tomcat 9.1 Jenkins 2.73 JDK 1.8 mav ...

  6. Linux部署Apache ActiveMQ 5.14.1

    Linux部署Apache ActiveMQ 5.14.1 简单记一下,下载地址 http://activemq.apache.org/download.html 一.安装JDK7以上,官方说明:ht ...

  7. 记录第一次使用linux部署springbootweb项目

    记录第一次使用linux部署springbootweb项目 收获感受 经过一下午的安装虚拟机.Linux系统.JDK1.8,项目打包,解决bug,终于项目部署成功!哈哈哈哈哈哈哈哈哈 收获还是不错的, ...

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

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

  9. Linux部署Oracle

    Linux部署Oracle 一. 实验环境 VMware+CentOS 5.8(32位) 二.操作步骤 1. 配置IP地址.修改主机名 [root@localhost ~]# vim /etc/sys ...

最新文章

  1. MySQL修改和查看表类型
  2. 基于深度卷积神经网络进行人脸识别的原理是什么?
  3. 【转】每天一个linux命令(50):crontab命令
  4. python 任务计时器 apscheduler.schedulers
  5. firefox 接受post 不完整_HTTP中GET与POST的区别,99 %的人都理解错了
  6. 对话面板,发送对话之后滚动至最新内容处
  7. jQuery 写的简单打字游戏
  8. seo优化之如何选择产品
  9. 评价类问题中的模糊综合评价法
  10. cuteftp pro 3.2多线程下载导致文件MD5校验值改变
  11. service mysql启动失败 提示unit not found 解决办法
  12. destoon新增模块
  13. python怎么保留整数输出_python怎么保留整数
  14. 数据库错误代码:1055(Error Number: 1055) 解决方法
  15. oracle如何在月份前面加0,时间怎么把月份数字前面添加0
  16. 为了摸鱼,我开发了一个工具网站
  17. 【算法分析】回溯法解数独(九宫格)算法
  18. 那年的中秋——杂乱无章篇 2011年9月10日 阴
  19. EXCEL的几个取整函数对比,int() round() ceiling() ceiling.math()等
  20. 补码 符号数的二进制 整数

热门文章

  1. 读书笔记_打开量化投资的黑箱06
  2. 10份数据中台资料分享(附下载)
  3. 你的旧船票能否搭上这艘巨轮?——解读近5年大数据产业发展规划
  4. 在Flex组件外观实施中使用Scale9
  5. flex4.5的DataGrid
  6. 虚拟环境virtualenv
  7. win10 mysql登录密码忘了_64位 windows10,MYSQL8.0.13重置密码(忘记密码或者无法登录)...
  8. P7 P8:训练神经网络
  9. 计算机算法设计与分析 大整数乘法
  10. Numpy高级操作大全!!!