文档章节

Cobbler安装手册

jeff-qq
 jeff-qq
发布于 2017/05/11 18:24
字数 964
阅读 340
收藏 0

什么是Cobbler,请查看Cobbler官网操作手册

安装环境CentOS_6.8_x86_64(Desktop),Cobbler 2.8.0

由于不具备外网环境,采用rpm安装包的方式。

rpm包下载地址:cobbler-2.8.0 ,cobbler-web-2.8.0

1、配置yum本地源安装依赖

mkdir /media/CentOS
mount -t iso9660 /dev/cdrom  /media/CentOS

2、配置repo文件

cd /etc/yum.repos.d
mv  CentOS-Base.repo     CentOS-Base.repo.bak
mv  CentOS-Vault.repo     CentOS-Vault.repo.bak
mv  CentOS-Vault.repo     CentOS-Vault.repo.bak
cp  CentOS-Media.repo     CentOS-Media.repo.bak

修改CentOS-Media.repo,设置enabled=1

清除缓存

yum clean all
yum makecache

2、安装依赖

rpm -i cobbler-2.8.0-17.1.noarch.rpm cobbler-web-2.8.0-17.1.noarch.rpm 

运行以上命令会报错,显示缺少依赖,例如:

error: Failed dependencies:
	redhat-rpm-config is needed by cobbler-2.8.0-17.1.noarch
	python-simplejson is needed by cobbler-2.8.0-17.1.noarch
	syslinux is needed by cobbler-2.8.0-17.1.noarch
	python-cheetah is needed by cobbler-2.8.0-17.1.noarch
	PyYAML is needed by cobbler-2.8.0-17.1.noarch
	mod_wsgi is needed by cobbler-2.8.0-17.1.noarch
	Django >= 1.4 is needed by cobbler-web-2.8.0-17.1.noarch
	mod_wsgi is needed by cobbler-web-2.8.0-17.1.noarch

根据提示缺失的依赖进行安装。

例如:

sudo yum install redhat-rpm-config
sudo yum install createrepo
sudo yum install python-simplejson
sudo yum install syslinux
sudo yum install python-cheetah 
sudo yum install PyYAML
sudo yum install mod_wsgi 

cobbler-web需要依赖Django,如果你不需要web界面,可以不安装Django。

由于yum仓库里没有Django,需要手动安装。推荐使用Django-1.5.12,点此下载Django-1.5.12。(不推荐使用高版本的Django,需要升级python2.7,CentOS 6.8默认的python版本为2.6.6)。

解压Django。

tar xzvf Django-1.5.12.tar.gz

加压后的目录里有个INSTALL文件,根据里面的说明进行安装。

python setup.py install

检查django是否安装成功:

#进入python命令界面
>>> import django
>>> print(django.get_version())
1.5.12

所有依赖安装完毕后,安装cobbler和cobbler-web。

rpm -i cobbler-2.8.0-17.1.noarch.rpm
rpm -i --force --nodeps cobbler-web-2.8.0-17.1.noarch.rpm 

设置SElinux

sudo setsebool -P httpd_can_network_connect true

如果没设置SElinux,可能后面会遇到一下错误信息:

ProtocolError: <ProtocolError for x.x.x.x:80/cobbler_api: 503 Service Temporarily Unavailable>

启动cobblerd,httpd,并设置成开机启动。

service cobblerd start
chkconfig cobblerd on

service httpd start
service httpd on

检查是否启动

service cobblerd status
service http status

检查cobbler是否安装成功

$ 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 : missing /etc/xinetd.d/tftp, install tftp-server?
5 : missing configuration file: /etc/xinetd.d/tftp
6 : 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.
7 : change 'disable' to 'no' in /etc/xinetd.d/rsync
8 : Apache (httpd) is not installed and/or in path
9 : debmirror package is not installed, it will be required to manage debian deployments and repositories
10 : ksvalidator was not found, install pykickstart
11 : 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
12 : fencing tools were not found, and are required to use the (optional) power management features. install cman or fence-agents to use them

Restart cobblerd and then run 'cobbler sync' to apply changes.

出现一下提示,安装成功。

进一步设置cobbler-web。

检查配置:/etc/cobbler/modules.conf中一下两项配置

[authentication]
module = authn_configfile

[authorization]
module = authz_allowall

设置web界面登录用户名cobbler,运行命令后输入密码。

htdigest /etc/cobbler/users.digest "Cobbler" cobbler

打开浏览器,访问127.0.0.1:80/cobbler_web,出现登录页面,输入用户名cobbler,密码。(上一部设置的)

如果你登录后,遇到下面的错误

[Errno 13] Permission denied: '/var/lib/cobbler/webui_sessions/sessionid4r8yzmavdexechcw0mta277g5kcfnov3'

解决方法如下:

chcon -R -t httpd_cobbler_rw_content_t /var/lib/cobbler/webui_sessions

重新登录后,进入操作界面。

 

 

© 著作权归作者所有

jeff-qq
粉丝 2
博文 16
码字总数 15215
作品 0
济南
高级程序员
私信 提问
cobbler之蟒蛇监控实现监控系统安装进度

本文翻译至cobbler用户手册2.6X,详情页面见:http://cobbler.github.io/manuals/2.6.0/Appendix/E-AnacondaMonitoring.html 蟒蛇监控(Anaconda Monitoring) 本页面详细介绍了cobbler提供的...

码上中国博客
2016/03/09
150
0
racadm环境之多线程并发(一)

本人习惯通过cobbler部署物理机系统,那我就来说说部署系统前需要做哪些准备。 1.BIOS设置是否符合标准。比如F1/F2错误提示、系统启动顺序、是否有开启PXE启动等。 2.你从哪个网卡进行pxe引导...

吾言
2016/09/23
0
0
cobbler 全自动安装

cobbler简介 cobbler是实现自动化安装操作系统的工具。它解决了PXE安装时的弊端(只能实现单一操作系统的安装)。实际上,cobbler是对PXE二次封装可实现多版本,多环境操作系统安装的高级抽象...

5431039
2016/04/12
0
0
Linux 利用cobbler实现自动化安装CentOS6和7

Linux cobbler实现自动化安装CentOS6和7 背景: 在学习Linux自动化安装时,接触到了cobbler工具来实现自动化安装CentOS系统,这里将实现过程记录在此,为以后使用做参考作用。 实验设备: 在...

657188918
2017/09/15
0
0
菜鸟学Linux 第106篇笔记 cobbler

菜鸟学Linux 第106篇笔记 cobbler 内容总览 cobbler概述 Cobbler Commands cobbler 安装 cobbler 配置 cobbler web配置 cobbler 它是一个应用软件,可以使用它来进行批量安装linux系统,而且...

Winthcloud
2018/06/29
0
0

没有更多内容

加载失败,请刷新页面

加载更多

设计模式-简介

设计模式简介 设计模式(Design pattern)代表了最佳的实践,通常被有经验的面向对象的软件开发人员所采用。设计模式是软件开发人员在软件开发过程中面临的一般问题的解决方案。这些解决方案...

HOT_POT
11分钟前
0
0
SpringBoot版

使用外部Tomcat来启动程序,而不是用默认的Application的main()来启动。 因为,使用Application的main()来启动,修改页面的时候,刷新不会立即有反应。而是要make一下(Ctrl+F5) 而且还要加入...

流小文
16分钟前
0
0
Disable Autostart of MySQL Server on Ubuntu

OSC Markdown Editer 真香,笔记一篇,懒得转中文,如有表述问题,请不吝指出,先谢为敬! OS: Ubuntu 19.04 When the MySQL server is installed, it automatically started with the OS. I...

Iridium
37分钟前
2
0
OpenStack RDO + S3

Packstack(RDO) installation "sync db timeout" issue version: openstack-packstack-13.0.0-0.1.0rc1.el7.noarchopenstack-packstack-puppet-13.0.0-0.1.0rc1.el7.noarch add timeout =>......

Firxiao
40分钟前
2
0
java运算符的优先级

https://www.cnblogs.com/zjfjava/p/5996666.html

南桥北木
45分钟前
2
0

没有更多内容

加载失败,请刷新页面

加载更多

返回顶部
顶部