配置本地yum
配置阿里云 6epel源
https://mirrors.aliyun.com/epel/6Server/x86_64/epel-release-6-8.noarch.rpm
yum -y install cobbler dhcp tftp-server pykickstart httpd
vim /etc/cobbler/settings
384行
##server: (ip)
272行
next_server: (ip)
242行
##manage_dhcp: 1
292行
##pxe_just_once: 1
openssl passwd -1 -salt ‘redhat‘ ‘redhat‘
复制
vim /etc/cobbler/settings
101行
##default_password_crypted: "$1$redhat$9yxjZID8FYVlQzHGhasqW/"
service cobbler restart
下载
cobbler get-loaders
查看下载
ls /var/lib/cobbler/loaders/
vim /etc/xinetd.d/rsync
6行
##disable = no
service xinetd restart
service cobblerd restart
cobbler check
#1 : debmirror package is not installed, it will be required to manage debian deployments and repositories # 和debian系统相关,不需要
#2 : fencing tools were not found, and are required to use the (optional) power management features. install cman or fence-agents to use them # fence设备相关,不需要
vim /etc/cobbler/dhcp.template
(仅修改ip部分即可)
##subnet 10.0.0.0 netmask 255.255.255.0 {
option routers 10.0.0.2;
option domain-name-servers 10.0.0.2;
option subnet-mask 255.255.255.0;
range dynamic-bootp 10.0.0.100 10.0.0.200
cobbler sync
查看dhcp配置文件
less /etc/dhcp/dhcpd.conf
配置服务
chkconfig httpd on
chkconfig xinetd on
chkconfig cobblerd on
chkconfig dhcpd on
/etc/init.d/httpd restart
/etc/init.d/xinetd restart
/etc/init.d/cobblerd restart
/etc/init.d/dhcpd restart
mount -o loop /dev/sr0 /mnt/iso/
导入iso文件
cobbler import --path=/mnt/iso/ --name=rhel6.9 --arch=x86
查看
cobbler distro list
iso文件目录
ls /var/www/cobbler/ks_mirror/
cobbler check
service cobblerd restart
cobbler sync
此时即可使用用默认ks文件自动安装部署。
(此文章仅为个人部署笔记。如有不足之处,还请各位前辈多多指教~~)
Redhat6.9中配置安装cobbler自动化部署(精简)
原文地址:http://blog.51cto.com/12256367/2089679