需要两台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 ~]#