站長資訊網
最全最豐富的資訊網站

centos7.5+cobbler2.8.4實戰圖文攻略

一、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

centos7.5+cobbler2.8.4實戰圖文攻略

7、導入光盤鏡像文件

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

centos7.5+cobbler2.8.4實戰圖文攻略

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

%packages@^minimal
br>@core
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

二、cobbler配置

1、編輯profile
cobbler profile edit –name=c75-x86_64 –kickstart=/var/lib/cobbler/kickstarts/c75.ks
cobbler profile edit –name=c75-x86_64 –kopts='net.ifnames=0 biosdevname=0 ipv6.disable=1'

2、客戶端默認local啟動

vim /etc/cobbler/pxe/pxedefault.template
DEFAULT menu
PROMPT 0
MENU TITLE Cobbler | http://cobbler.github.io/
TIMEOUT 1
TOTALTIMEOUT 6000
ONTIMEOUT $pxe_timeout_profile

LABEL local
MENU LABEL (local)
MENU DEFAULT
LOCALBOOT -1

$pxe_menu_items

MENU end

cobbler system add –name=default –profile=c75-x86_64

cobbler sync

3、配置IP信息及主機名

cobbler system add –name=lbmaster –profile=c75-x86_64 –kickstart=/var/lib/cobbler/kickstarts/c75.ks
–interface=eth0 –static=1 –mac=00:50:56:20:38:C8 –ip-address=192.168.100.10 –subnet=255.255.255.0 –gateway=192.168.100.1
–name-servers="192.168.100.100" –hostname=lbmaster.stu.com

4、配置YUM倉庫

(1)同步網絡YUM倉庫
cobbler repo add –name=openstack –mirror=https://mirrors.aliyun.com/centos/7.5.1804/cloud/x86_64/openstack-ocata/ –arch=x86_64 –breed=yum
cobbler repo add –name=zabbix –mirror=https://mirrors.aliyun.com/zabbix/zabbix/3.5/rhel/7/x86_64/ –arch=x86_64 –breed=yum

cobbler reposync

cobbler profile edit –name=c75-x86_64 –kickstart=/var/lib/cobbler/kickstarts/c75-cobbler.ks –repos="openstack"
crontab -e
cobbler reposync –tries=3 –no-fail

(2)修改默認YUM倉庫配置文件

vim /var/www/cobbler/ks_mirror/config/c75-x86_64.repo

[core-0]name=core-0
baseurl=http://@@http_server@@/cobbler/ks_mirror/c75-x86_64<br "="" rel="nofollow">br>name=core-0
baseurl=http://@@http_server@@/cobbler/ks_mirror/c75-x86_64
gpgcheck=0
priority=$yum_distro_priority

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

systemctl start cobblerd
systemctl enable cobblerd

cobbler sync

贊(0)
分享到: 更多 (0)
網站地圖   滬ICP備18035694號-2    滬公網安備31011702889846號
国内精品伊人久久久久影院对白| 日韩精品无码一区二区三区| 精品无人区一区二区三区| 国产一区麻豆剧传媒果冻精品| 亚洲av综合日韩| 国产69精品久久久久妇女| 国产精品国产三级国产AV麻豆| 国产精品视频分类一区| 久久99国产精品尤物| 久久久久久久久久国产精品免费 | 久久免费99精品国产自在现线| 亚洲日韩中文字幕天堂不卡| 揄拍成人国产精品视频| 免费精品人在线二线三线区别| 国产精品福利尤物youwu| 久久精品aⅴ无码中文字字幕不卡| 亚洲AV永久青草无码精品| 中文字幕日韩精品无码内射| 久草热久草热线频97精品 | 久久91亚洲精品中文字幕| 日韩精品无码免费专区午夜不卡| 精品午夜国产人人福利| 国产高清在线精品一区二区三区| 牛牛在线精品观看免费正| 久久久久久久久无码精品亚洲日韩| 日韩在线观看视频网站| 国产三级精品三级在线专区| 国产精品亚洲精品爽爽| 国产自偷在线拍精品热| 精品国产不卡在线电影| 精品国产AV色欲果冻传媒| 青青青亚洲精品国产| 国产精品无码一区二区在线| 另类国产精品一区二区 | 99热在线日韩精品免费| 四虎永久在线精品视频| 日韩在线观看网站| 欧美日韩精品乱国产| 精品乱人伦一区二区| 男女男精品网站免费观看| 亚洲精品第一国产综合精品99|