[iyunv@localhost Desktop]# cp /etc/cobbler/zone.template /var/named/wudang
[iyunv@localhost Desktop]# named-checkzone "wudang.com" /var/named/wudang
zone wudang.com/IN: loaded serial 2016081401
OK
[iyunv@localhost Desktop]# named-checkconf /etc/named.conf
Systemclt start named
所有服务一切正常工作,万事俱备,只欠东风,只差distro和ks文件,先用cobbler-web 来管理。(python写的动态网站程序)
Vim /etc/httpd/conf.d/cobbler_web.conf
# SSLRequireSSL
# NSSRequireSSL
# SSLRequireSSL
# NSSRequireSSL
注释掉上述四行,不能提示没有权限。(Centos6.7,不用注释)
Cobbler-web的管理账号:
[iyunv@localhost Desktop]# htdigest -c /etc/cobbler/users.digest Cobbler lili
Adding password for lili in realm Cobbler.
New password:
Re-type new password:
Systemctl restart httpd http://10.0.0.10/cobbler_web (脚本路径别名)
Yum -y install system-config-kickstart
Systemctl-config-kickstarts(在gui下运行),生成kickstart文件
生成Centos6.7的ks文件:/var/lib/cobbler/kickstarts/centos6ks.cfg
#platform=x86, AMD64, or Intel EM64T
#version=DEVEL
# Firewall configuration
firewall --disabled
# Install OS instead of upgrade
install
# Use network installation
url --url="http://www.wudang.com/cobbler/links/centos6.7-x86_64"
# Root password
rootpw --iscrypted $1$xVtPuisx$X3B4rqKlzJKYLO7JiceSG1
# System authorization information
auth --useshadow --passalgo=sha512
# Use graphical install
text
firstboot --disable
# System keyboard
keyboard us
# System language
lang en_US
# SELinux configuration
selinux --disabled
# Installation logging level
logging --level=info
# Reboot after installation
Reboot# System timezone
timezone Africa/Abidjan
# System bootloader configuration
bootloader --location=mbr --md5pass="$1$ipBQVdC5$.8/AhDSGAzf10urvR6rcm."
# Clear the Master Boot Record
zerombr
# Partition clearing information
clearpart --all --initlabel
# Disk partitioning information
part / --fstype="ext4" --size=10240
part swap --fstype="swap" --ondisk=sda --size=1024
%post
useradd tom
echo '11qq```' | passwd --stdin tom
%end
%packages
@base
@basic-desktop
@x11
1,1 Top
生成centos7.2的ks文件:/var/lib/cobbler/kickstarts/centos7ks.cfg
#platform=x86, AMD64, or Intel EM64T
#version=DEVEL
# Install OS instead of upgrade
install
# Keyboard layouts
keyboard 'us'
# Root password
rootpw --iscrypted $1$LYe2x3i4$n/fkJEqo//QaFYUQAYvmk/
# System timezone
timezone Africa/Abidjan
# Use network installation
url --url="http://www.wudang.com/cobbler/links/centos7.2-x86_64"
# System language
lang en_US
# Firewall configuration
firewall --disabled
# System authorization information
auth --useshadow --passalgo=sha512
# Use graphical install
#graphical
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
autopart --type=lvm