码迷,mamicode.com
首页 > 其他好文 > 详细

centos7.5+cobbler2.8.4实战图文攻略--2019持续更新

时间:2019-02-28 13:14:06      阅读:473      评论:0      收藏:0      [点我收藏+]

标签:obb   -name   图片   swap   serve   tools   systemctl   phi   pass   

一、cobbler安装部署

1、修改YUM仓库

vim /etc/yum.repos.d/my.repo

[epel]
name=epel
baseurl=https://mirrors.aliyun.com/epel/7Server/x86_64/
enabled=1
gpgcheck=0

2、安装cobbler

yum install dhcp httpd xinetd tftp cobbler cobbler-web -y

3、修改cobbler配置文件

生成加密密码:openssl passwd -1 -salt bw.com 123456

vim /etc/cobbler/settings

server: 192.168.100.100
next_server: 192.168.100.100
default_password_crypted: "$1$stu.com$Pp0HQwZhSF...mXIxjJAH." #root管理员密码

4、配置DHCP

vim /etc/dhcpd/dhcp.conf

option domain-name "stu.com";
option domain-name-servers 192.168.100.100;
default-lease-time 36000;
max-lease-time 72000;
log-facility local7;

subnet 192.168.100.0 netmask 255.255.255.0 {
range 192.168.100.110 192.168.100.150;
option routers 192.168.100.1;
option broadcast-address 192.168.100.255;
next-server 192.168.100.100;
filename "pxelinux.0";
}

systemctl start dhcpd
systemctl enable dhcpd

5、配置tftp

vim /etc/xinetd.d/tftp

disable= no

systemctl start xinetd
systemctl enable xinetd

6、下载启动引导文件

cobbler get-loaders

技术图片

7、导入光盘镜像文件

cobbler import --path=/mnt/cdrom --name=c75 --arch=x86_64

技术图片

8、生成自动应答文件

vim /var/lib/cobbler/kickstarts/c75.ks

#platform=x86, AMD64, Intel EM64T
#version=DEVEL
#Install OS instead of upgrade
install
#Keyboard layouts
keyboard ‘us‘
#Root password
rootpw --iscrypted $default_password_crypted #见第3步
#System timezone
timezone Asia/Shanghai
#Use network installation
url --url=$tree
#System language
lang en_US.UTF-8
#Firewall configuration
firewall --disabled
#System authorization information
auth --useshadow --enablemd5
#Use graphical install
text
firstboot --disable
#SELinux configuration
selinux --disabled
#Reboot after installation
reboot
#System bootloader configuration
bootloader --location=mbr
#Clear the Master Boot Record
zerombr
#Partition clearing information
clearpart --all --initlabel
#Disk partitioning information
part /boot --fstype="xfs" --size=256
part swap --fstype="swap" --size=1024
part / --fstype="xfs" --ondisk=sda --size=1 --grow #使用全部剩余空间
#Network information
$SNIPPET(‘network_config‘)
%pre
$SNIPPET(‘log_ks_pre‘)
$SNIPPET(‘kickstart_start‘)
$SNIPPET(‘pre_install_network_config‘)
#Enable installation monitoring
$SNIPPET(‘pre_anamon‘)
%end

%packagesbr/>@^minimal
@compat-libraries
br/>@core
@development
bash-completion
vim
net-tools
bind-utils
tree
lrzsz
wget
telnet
-postfix
%end

%addon com_redhat_kdump --disable --reserve-mb=‘auto‘
%end

%post
#Start yum configuration
$yum_config_stanza
#End yum configuration
%end

%post
sed -i "1s/5/0/" /etc/default/grub
grub2-mkconfig -o /boot/grub2/grub.cfg
rm -f /etc/yum.repos.d/CentOS*
yum remove NetworkManager -y
%end

centos7.5+cobbler2.8.4实战图文攻略--2019持续更新

标签:obb   -name   图片   swap   serve   tools   systemctl   phi   pass   

原文地址:https://blog.51cto.com/72932/2356046

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!