Recently the machine room to go online several cabinets of machines, must realize the automation installed.
First, installation
The system environment is centos6.4 and is installed with Yum:
RPM-UVH http://mirrors.hustunique.com/epel/6/x86_64/epel-release-6-8.noarch.rpmyum-y Install Cobbler Cobbler-web httpd rsync tftp-server xinetd DHCP python-ctypes debmirror pykickstart
Second, the configuration
1. Restart the system after shutting down the firewall and SELinux:
/etc/init.d/iptables Stop #关闭防火墙chkconfig iptables offsed-i '/selinux=/d '/etc/selinux/config && Echo ' S Elinux=disabled ">>/etc/selinux/config #关闭SELINUX
2, modifying the Cobbler configuration file:
' next_server: 127.0.0.1 ' Replace with ' next_server:172.28.26.188 ' #DHCP服务地址 ' server: 127.0.0.1 ' Replace with ' server: 172.28.26.188 ' #cobbler服务地址 ' manage_dhcp: 0 ' Replace with ' manage_dhcp: 1 ' #cobbler管理dhcp ' Manage_rsync: 0 ' Replace with ' manage_rsync: 1 ' #cobbler管理rsync功能default_password_ crypted: "$1$cobber$yv9xfouaaivdvimopk7o.1" sed -i ' S/NEXT_SERVER: 127.0.0.1/ Next_server: 172.28.26.188/g ' /etc/cobbler/settingssed -i ' s/server: 127.0.0.1/server : 172.28.26.188/g ' /etc/cobbler/settingssed -i ' s/manage_dhcp: 0/manage_dhcp: 1/ G ' /etc/cobbler/settingssed -i ' s/manage_rsync: 0/manage_rsync: 1/g ' /etc/ cobbler/settingssed -i ' s/http_port: 80/http_port: 9080/g ' /etc/cobbler/ settingsopenssl passwd -1 -salt "Cobber" "123456 #把生成的密码填到/etc/cobbler/settings configuration default_password_crypted: New password generated, This password is the root password after the system is loaded.
3. Modify the TFTP service and rsync service configuration:
Sed-i '/disable/c disable = no '/etc/xinetd.d/tftp #设置 ' disable ' for ' no ' sed-i-e ' s/= yes/= no/g '/etc/xinetd.d/rsync #设置 ' disable ' for ' no '
4. Modify the DHCP Template:
subnet 192.168.66.0 netmask 255.255.255.0 { option routers 192.168.66.87; option domain-name-servers 202.106.0.20; option subnet-mask 255.255.255.0; range dynamic-bootp 192.168.66.100 192.168.66.102; default-lease-time 21600; max-lease-time 43200; next-server $next _server; class "Pxeclients" {
5. Modify Cobbler-web Configuration
Sed-i ' s/module = Authn_denyall/module = Authn_configfile/g '/etc/cobbler/modules.conf #修改认证htdigest/etc/cobbler/user S.digest "Cobbler" Cobbler #修改cobbler Web page admin password
6, start the related services
/ETC/INIT.D/HTTPD start/etc/init.d/xinetd start/etc/init.d/dhcpd start/etc/init.d/cobblerd startchkconfig--level 35 httpd onchkconfig--level xinetd onchkconfig--level/dhcpd onchkconfig--level cobblerd on
7, the validation cobbler installation conditions:
Service Cobblerd Restartcobbler get-loaders error message when a check is #修复cobbler cobbler check
Third, the introduction of the mirror configuration:
1: Mount the ISO image to the/MNT directory using disc mirroring Mount-o loop/data/centos_6.4_vm.iso/mnt/Import the ISO and set it to "x86_64" and name it centos6.4cobbler Import-- path=/mnt/--name=centos_6.4--arch=x86_642: Mount Linux CD: Mount/dev/cdrom/media/cobbler import--path=/media/centos_ 6.4_final--name=centos6.4 View Import Results cobbler distro list complete sync all configurations Cobbler Sync
At this point, we have access to the Cobbler Web interface:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/5C/0F/wKioL1UaPMeB0UR_AAE4FSQnQ28068.jpg "style=" float: none; "title=" QQ picture 20150331141500-5.png "alt=" Wkiol1uapmeb0ur_aae4fsqnq28068.jpg "/>
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/5C/15/wKiom1UaO4uh5gRiAAIhsgVZUWg234.jpg "style=" float: none; "title=" QQ picture 20150331141508-6.jpg "alt=" Wkiom1uao4uh5griaaihsgvzuwg234.jpg "/>
Four, the system needs to install the machine from the network card boot:
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/5C/19/wKiom1UaYyiS5hygAADwcRx9fsA643.jpg "title=" QQ picture 20150331170313-1.png "alt=" Wkiom1uayyis5hygaadwcrx9fsa643.jpg "/>
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/5C/0E/wKioL1UaNbOzsjuyAAFWPOaiudY852.jpg "style=" float: none; "title=" QQ picture 20150331134323-3.png "alt=" Wkiol1uanbozsjuyaafwpoaiudy852.jpg "/>
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/5C/14/wKiom1UaNHeg6ZalAACHHIvk30I402.jpg "style=" float: none; "title=" QQ picture 20150331134343-4.png "alt=" Wkiom1uanheg6zalaachhivk30i402.jpg "/>
Ks.cfg:
#set $swap = $getVar (' $swap ', ' 12000 ') autostep --autoscreenshotinstallurl --url= $tree # If any cobbler repo definitions were referenced in the Kickstart profile, include them here. $yum _repo_stanzatextskipxlang en_us. utf-8keyboard usnetwork --onboot yes --bootproto dhcp --noipv6 -- Nodnsrootpw --iscrypted \$6\ $Qz 7fvhtwfc2ytdb1\ $qNF 1o.fpe44l/ F1rozj.bxrkeb4ovq.maycy3tmzkds7tdlrhthiarexzfvw1g08toqptklmxfvyw4wa.vpoz1firewall --disabledfirstboot --disabledauthconfig --enableshadow --passalgo=sha512selinux --disabled#timezone -- isutc asia/shanghaitimezone --utc asia/shanghai# the following is the Partition information you requested# note that any partitions you deleted are not expressed# here so unless&nbSp;you clear all partitions first, this is# not guaranteed to worklogging --level=info#bootloader --append= "Nohz=off" --location=mbrbootloader -- Location=mbr --driveorder=sda --append= "biosdevname=0 nohz=off thash_entries=1048576 Rhash_entries=1048576 selinux=0 "zerombr yes# clearpart --all --initlabel -- Drives=sdaclearpart --all --initlabel# ignoredisk --only-use=sdapart / --fstype= Ext4 --asprimary --size=50000 --maxsize=50000 --label=/part swap --asprimary --size= $swap --maxsize= $swap --label=swappart /data --fstype=xfs --grow -- Asprimary --size=12000 --label=/data%pre$snippet (' Pre_install_network_config ') # Add pre-installation script heredate%end%packages --excludedocs -- Ignoremissing@base@core@development@server-policyftpnctelnEtcmakecompat-gcc-34compat-gcc-34-c++ Sgpiolibxtstyum-plugin-prioritieskoanopenssltengine-lvm2-acpid-biosdevname-hunspell-en-abrt-cli-man-pages-overrides-blktr Ace-words-abrt-addon-kerneloops-abrt-addon-ccpp-bridge-utils-nano-mtr-hunspell-abrt-addon-python-man-pages-byacc-indent-d Iffstat-doxygen-intltool-git-ctags-cscope-iptables-system-config-firewall-base-iptables-ipv6-system-config-firewall-tui-s Ubversion%end$snippet (' services_disable_enable ')%post$snippet (' Post_install_network_config ') $SNIPPET (' Env_init ') $SNIPPET (' Kis_cobbler_api ') $SNIPPET (' Cactirelease ') $SNIPPET (' Kisyum_install ') #/usr/sbin/eject -rv /dev/sr* # eject p cdromecho ' v1.3 ' > ~root/VERSION%end# Finishreboot
Cobbler Installation Deployment