cobbler网络自动装机

本文介绍了如何使用cobbler进行网络自动装机,包括cobbler的主配置文件设置、dhcp配置、镜像文件准备及装机过程。通过修改cobbler管理的dhcp配置文件并同步,可以实现服务重启。同时,提供了访问cobbler_web的两种方法,即默认配置和pam认证登录。
摘要由CSDN通过智能技术生成


需要两台centos7,一台cobbler服务器,一台裸机网络安装系统,均使用NAT模式

cobbler配置

主配置文件

安装软件包

[root@localhost ~]# yum -y install epel-release.noarch   ##有这个才可以安装cobbler
[root@localhost ~]# yum -y install cobbler
[root@localhost ~]# yum -y install cobbler-web dhcp tftp-server pykickstart httpd rsync xinetd
[root@localhost ~]# openssl passwd -1 -salt '123456' '123456'   ##产生装机root密码,复制到cobbler主配置文件setting中
$1$123456$wOSEtcyiP2N/IfIl15W6Z0
[root@localhost ~]# vim /etc/cobbler/settings 
...
next_server: 20.0.0.91    ##服务器都指向自己
...
server: 20.0.0.91
...
manage_dhcp: 1         ##管理dhcp功能

# and put the output between the "" below.
default_password_crypted: "$1$123456$wOSEtcyiP2N/IfIl15W6Z0"

# the default template type to use in the absence of any
# other detected template. If you do not specify the template 
[root@localhost ~]# vim /etc/xinetd.d/tftp       ##开启TFTP 
#       workstations, download configuration files to network-aware printers, \
#       and to start the installation process for some operating systems.
service tftp
{
        socket_type             = dgram
        protocol                = udp
        wait                    = yes
        user                    = root
        server                  = /usr/sbin/in.tftpd
        server_args             = -s /var/lib/tftpboot
        disable                 = no    ###yes->no
        per_source              = 11
        cps                     = 100 2
        flags                   = IPv4
}
~    
[root@localhost ~]# systemctl enable rsyncd    ##开启同步,后面用于同步dhcp文件
Created symlink from /etc/systemd/system/multi-user.target.wants/rsyncd.service to /usr/lib/systemd/system/rsyncd.service.
[root@localhost ~]#
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值