龙空技术网

Cobbler自动化批量部署系统操作指南

黑马程序员 6421

前言:

目前小伙伴们对“xinetd是什么和tftp什么关系”大概比较着重,姐妹们都想要知道一些“xinetd是什么和tftp什么关系”的相关内容。那么小编同时在网摘上汇集了一些对于“xinetd是什么和tftp什么关系””的相关知识,希望大家能喜欢,小伙伴们一起来学习一下吧!

1. 基本环境

硬件环境

软件环境

2. 环境配置

关闭iptables,selinux

service iptables stopchkconfig iptables offsed –i ‘/^SELINUX=/c\SELINUX=disabled’ /etc/selinux/config

配置静态ip

vim /etc/sysconfig/network-scripts/ifcfg-INTERFACE_NAMEDEVICE=INTERFACE_NAMETYPE=EthernetBOOTPROTO=staticONBOOT=yesIPADDR=172.16.15.101GATEWAY=172.16.15.254DNS1=114.114.114.114NETMASK=255.255.255.0

设置主机名

hostname cobbler

配置yum源(本地源和外网源二选一即可)

本地源

mkdir /yum --创建挂载镜像的目录
mountrhel-server-6.5-x86_64-dvd.iso /yum --找到自己的镜像并挂载
vim /etc/yum.repos.d/local.repo[local]name=local yumbaseurl=


yum clean all
yum makecache

外网源

此处使用163源(也可以使用rhel源)

yum clean all
yum makecache

NTP时间同步服务器

yum install –y ntp ntpdate
date --确认时间已同步
3. 安装cobbler

需要的安装包:

cobbler-2.6.3-1.el6.noarch.rpm

koan-2.6.9-1.el6.noarch.rpm

cobbler-web-2.6.3-1.el6.noarch.rpm

libyaml-0.1.4-2.3.x86_64.rpm

django14-1.4.20-1.el6.noarch.rpm

pyYAML-3.10-3.1.el6.x86_64.rpm

将以上安装包放入同一个目录,如:/cobbler_soft

yum install –y createrepo
createrepo /cobbler_soft/ --创建依赖关系
yum clean all
yum makecache
yum install –y cobbler cobbler-web tftp* rsync xinetd http* syslinux dhcp* pykickstart --安装cobbler及其相关包
4. Cobbler配置

需求1、2、8

#vim /etc/cobbler/settings384 server: 172.16.15.1 --换成cobbler服务器端的IP272 next_server: 172.16.15.1 --同上101 default_password_crypted: "$1$werwqerw$.prcfrYFbwuvkD8XspayN." --将密码字符串换成上面生成的随机密码字符串
修改完配置文件以后再重启cobbler服务#/etc/init.d/cobblerd restart
修改完配置文件以后再重启cobbler服务/etc/init.d/cobblerd restart

需求3

之前环境配置已将selinux设置为disabled,但需要重启系统才生效,所以此处临时关闭selinux

setenforce 0

需求5

vim /etc/xinetd.d/rsyncservice rsync{disable = no --将yes改为no,即可打开flags = IPv6socket_type = streamwait = nouser = rootserver = /usr/bin/rsyncserver_args = --daemonlog_on_failure += USERID}

需求6

/etc/init.d/iptables stopchkconfig iptables off
vim /etc/xinetd.d/tftpservice tftp{disable                          = no --将yes改为no,即可打开socket_type                   = dgramprotocol                        = udpwait                               = yesuser                               = rootserver                            = /usr/sbin/in.tftpdserver_args                    = -B 1380 -v -s /var/lib/tftpbootper_source                    = 11cps                                = 100 2flags                              = IPv4} 
需求9
yum install –y fence-agents

解决以上需求后:

cobbler checkThe following are potential configuration items that you may want to fix:1 : 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.2 : debmirror package is not installed, it will be required to manage debian deployments and repositoriesRestart cobblerd and then run 'cobbler sync' to apply changes.

以上两个问题可以忽略


5. 导入镜像

· 方案rhel6.5

 cobbler import --path=/yum/ --name=rhel6.5*** TASK COMPLETE *** --此提示说明导入镜像成功
# ls /var/www/cobbler/ks_mirror/ --在这里可以查看导入的镜像目录config rhel6.5
cobbler distro list --查看导入的镜像rhel6.5
cobbler profile list –-查看自动安装方案列表rhel6.5

方案rhel7.3

mkdir /rhel7.3
#mount CentOS-7-x86_64-DVD-1611 /centos7.3 --导入之前必须要先挂载镜像文件到目录里才可以导入ls /var/www/cobbler/ks_mirror/config rhel6.5
 cobbler import --path=/centos7.3/ --name=centos7.3*** TASK COMPLETE ***
# ls /var/www/cobbler/ks_mirror/config rhel6.5 cnetos7.3
cobbler distro listrhel6.5 cnetos7.3
cobbler profile listrhel6.5 centos7.3
6. 设置dhcp


cobbler sync --同步cobbler配置并初始化
/etc/xinetd.d/xinetd restart
7. 按需定义ks配置文件8. 安装系统

注意:

安装系统的物理机等设备必须与服务器在同一局域网内,才能获取到由cobbler服务器分配的ip然后进行安装。

步骤:

1、 进入需要装机的物理设备的BIOS界面

2、 更改默认启动方式为网络启动后保存离开重启机器

3、 进入选择方案的界面后选择自己想要安装的方案后等待自动完成装机即可

标签: #xinetd是什么和tftp什么关系