To mount a disc first: centos-7-x86_64-dvd-1503-01
[Email protected] ~]# mount/dev/cdrom/mnt
[[email protected] ~]# yum install cobbler cobbler-web DHCP Tftp-server pykickstart httpd-y
[Email protected] ~]#/etc/init.d/httpd restart
[[email protected] ~]#/etc/init.d/cobblerd start
[Email protected] ~]# Cobbler Check
The following is potential configuration items and that's want to fix:
..............
Restart Cobblerd and then run ' Cobbler Sync ' to apply changes.
[Email protected] ~]# vim/etc/cobbler/settings
server:10.0.0.7
next_server:10.0.0.7
Manage_dhcp:1
[Email protected] ~]# Cobbler Get-loaders
[Email protected] ~]# Vim/etc/xinetd.d/rsync
Change ' disable ' to ' no '
[Email protected] ~]#/etc/init.d/xinetd restart
[email protected] ~]# OpenSSL passwd-1-salt ' Oldboy ' Oldboy '
[Email protected] ~]# vim/etc/cobbler/settings
default_password_crypted: "$1$oldboy$fxf8f078vi9j/q9xyxa8e/"
[email protected] ~]# Yum install-y debmirror yum-utils fence-agents
[Email protected] ~]#/etc/init.d/cobblerd restart
[Email protected] ~]# Cobbler Check
[Email protected] ~]# vim/etc/cobbler/dhcp.template
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;
[[email protected] ~]# Cobbler Sync
[Email protected] ~]# Cobbler import--path=/mnt/--name=centos-7.1-x86_64--arch=x86_64/var/www/cobbler/ks_mirror/
[Email protected] ~]# cd/var/lib/cobbler/kickstarts/
Upload the KS file to this directory:
[email protected] kickstarts]# cat cobbler-centos-7.1-x86_64.cfg
#Kickstart Configurator by Jason Zhao
#platform =x86, AMD64, or Intel EM64T
#System language
Lang en_US
#System keyboard
Keyboard US
#Sytem timezone
TimeZone Asia/shanghai
#Root Password
ROOTPW--iscrypted $default _password_crypted
#rootpw--iscrypted $1$OPS-NODE$7HQDPGEMIE7Z0RBTQKXW20
#Use Text Mode Install
Text
#Install OS instead of upgrade
Install
#Use NFS Installation Media
URL--url= $tree
#url--url=http://192.168.56.11/centos-7.1-x86_64
#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 1024x768--ondisk SDA
Part swap--size 16384--ondisk SDA
Part/--fstype XFS--size 1--grow--ondisk SDA
#System Authorization Infomation
Auth--useshadow--enablemd5
#Network Information
$SNIPPET (' Network_config ')
#network--bootproto=dhcp--device=eth0--onboot=on
# Reboot after installation
Reboot
#Firewall Configuration
Firewall--disabled
#SELinux Configuration
SELinux--disabled
#Do not configure Xwindows
Skipx
%pre
$SNIPPET (' Log_ks_pre ')
$SNIPPET (' Kickstart_start ')
$SNIPPET (' Pre_install_network_config ')
# Enable Installation Monitoring
$SNIPPET (' Pre_anamon ')
%end
#Package Install information
%packages
@ Base
@ Core
Sysstat
Iptraf
Ntp
Lrzsz
Ncurses-devel
Openssl-devel
Zlib-devel
Openipmi-tools
Mysql
Nmap
Screen
%end
%post
Systemctl Disable Postfix.service
%end
[Email protected] kickstarts]# MV Cobbler-centos-7.1-x86_64.cfg centos-7.1-x86_64.cfg
[Email protected] kickstarts]# Cobbler profile Edit--name=centos-7.1-x86_64--kickstart=/var/lib/cobbler/kickstarts /centos-7.1-x86_64.cfg
[Email protected] kickstarts]# Cobbler profile edit--name=centos-7.1-x86_64--kopts= ' net.ifnames=0 biosdevname=0 '
Then open a new virtual machine and let it get it automatically
Root Oldboy
This article is from the "Linux" blog, so be sure to keep this source http://chenjisong.blog.51cto.com/7858025/1718128
Cobbler Installing the CentOS 7 system