cobbler批量部署客户机

本文详细介绍了cobbler的批量部署过程,包括服务端的YUM源搭建、cobbler及其相关软件的安装、配置DHCP、导入Redhat镜像以及创建kickstart自动安装脚本。同时,还讲解了客户端的设置,并提到了如何定制安装cobbler。
摘要由CSDN通过智能技术生成

cobbler批量部署客户机

  1. cobbler介绍
  2. 服务端部署
  3. 客户端

1.cobbler介绍

2.服务端部署

搭建YUM源:

[root@localhost yum.repos.d]#wget http://mirrors.163.com/.help/CentOS7-Base-163.repo
[root@localhost yum.repos.d]# sed -i 's/\$releasever/7/g' /etc/yum.repos.d/CentOS7-Base-163.repo
[root@localhost yum.repos.d]# sed -i 's/^enabled=.*/enabled=1/g' /etc/yum.repos.d/CentOS7-Base-163.repo

安装cobbler以及相关软件:

[root@localhost yum.repos.d]# yum -y install httpd dhcp tftp python-ctypes cobbler  xinetd cobbler-web pykickstart

启动服务并设置开机自启:

[root@localhost yum.repos.d]# systemctl start httpd cobblerd;systemctl enable httpd cobblerd
ln -s '/usr/lib/systemd/system/httpd.service' '/etc/systemd/system/multi-user.target.wants/httpd.service'
ln -s '/usr/lib/systemd/system/cobblerd.service' '/etc/systemd/system/multi-user.target.wants/cobblerd.service'
[root@localhost yum.repos.d]# 

修改配置文件

[root@localhost ~]# vim /etc/cobbler/settings 
next_server: 192.168.100.200  //改成本地IP
server: 192.168.100.200          //改成本地IP
manage_dhcp: 1  开启DHCP

开启FTP

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,表示开启ftp
        per_source              = 11
        cps                     = 100 2
        flags                   = IPv4
[root@localhost ~]# systemctl start tftp
[root@localhost ~]# systemctl enable tftp

下载缺失文件:

[root@localhost ~]# cobbler get-loaders
task started: 2020-01-05_231204_get_loaders
task started (id=Download Bootloader Content, time=Sun Jan  5 23:12:04 2020)
path /var/lib/cobbler/loaders/README already exists, not overwriting existing content, use --force if you wish to update
path /var/lib/cobbler/loaders/COPYING.elilo already exists, not overwriting existing content, use --force if you wish to update
path /var/lib/cobbler/loaders/COPYING.yaboot already exists, not overwriting existing content, use --force if you wish to update
path /var/lib/cobbler/loaders/COPYING.syslinux already exists, not overwriting existing content, use --force if you wish to update
path /var/lib/cobbler/loaders/elilo-ia64.efi already exists, not overwriting existing content, use --force if you wish to update
path /var/lib/cobbler/loaders/yaboot already exists, not overwriting existing content, use --force if you wish to update
path /var/lib/cobbler/loaders/pxelinux.0 already exists, not overwriting existing content, use --force if you wish to update
path /var/lib/cobbler/loaders/menu.c32 already exists, not overwriting existing content, use --force if you wish to update
path /var/lib/cobbler/loaders/grub-x86.efi already exists, not overwriting existing content, use --force if you wish to update
path /var/lib/cobbler/loaders/grub-x86_64.efi already exists, not overwriting existing content, use --force if you wish to update
*** TASK COMPLETE ***   //表示成功

启动rsync服务并设置开机自启:

[root@localhost ~]# systemctl start rsyncd;systemctl enable rsyncd

生成加密密码:

[root@localhost ~]# openssl passwd -1 -salt "$RANDOM" 'peiyf'
$1$31583$SIsNm8gXL4fTPm5cmYdT90                     //将加密后的密码复制到配置文件里
[root@localhost ~]# vim /etc/cobbler/settings 
101 default_password_crypted: "$1$31583$SIsNm8gXL4fTPm5cmYdT90"
[root@localhost ~]# systemctl restart cobblerd              //重启cobbler服务
[root@localhost ~]# netstat -ntpl                          //查看读物端口
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 0.0.0.0:47867           0.0.0.0:*               LISTEN      1201/rpc.statd      
tcp        0      0 127.0.0.1:25151         0.0.0.0:*       
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值