Redhat6.9中配置安装cobbler自动化部署(精简)

——————redhat 6.9————————

配置本地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

101行
default_password_crypted: "$1$redhat$9yxjZID8FYVlQzHGhasqW/" ####用命令( openssl passwd -1 -salt “密码”)生成
————————————

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文件自动安装部署。

(此文章仅为个人部署笔记。如有不足之处,还请各位前辈多多指教~~)

转载于:https://blog.51cto.com/12256367/2089679

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值