cobbler 批量安装linux推荐

三、安装cobbler# rpm -ivh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm# yum -y install tftp-server httpd dhcp yum-utils# yum -y install cobbler# yum -y install cmanyum-utils 编译安装 make make install四、修改配置文件1.修改cobbler配置文件# vi /etc/cobbler/settings[code]server: ‘192.168.1.3’ #cobbler服务器地址next_server: ‘192.168.1.3’ manage_dhcp: 1[/code]2.更改tftp启动方式# vi /etc/xinetd.d/tftp[code]disable = no #默认开启tftp[/code]3.编辑dhcp配置模板# vi /etc/cobbler/dhcp.template 改为相应的网段和ipsubnet 192.168.2.0 netmask 255.255.255.0 { option routers 192.168.2.5; option domain-name-servers 192.168.2.1; option subnet-mask 255.255.255.0; range dynamic-bootp 192.168.2.100 192.168.2.254; filename /pxelinux.0 default-lease-time 21600; max-lease-time 43200; next-server $next_server;五、导入CentOS 光盘映像文件# mkdir /home/CentOS# mount /home/src/CentOS-5.4-x86_64-bin-DVD.iso /home/CentOS/ -o loop#cobbler import –path=/home/CentOS –name=CentOS5.4_x86_64# cobbler sync 应用配置模板六、cobbler check 根据提示解决问题#2: Must enable selinux boolean to enable Apache and web services components, run: setsebool -P httpd_can_network_connect trueNice to see that it has good instructions for selinux#3: you need to set some SELinux content rules to ensure cobbler works correctly in your SELinux environment, run the following: /usr/sbin/semanage fcontext -a -t public_content_t /var/lib/tftpboot/.* /usr/sbin/semanage fcontext -a -t public_content_t /var/www/cobbler/images/.* Detailed command to enable http server to reed content from /var/www/cobbler and have tfpboot find its files#4: service cobblerd is not runningObviously this isn’t running because we did not start it yet#5: change ‘disable’ to ‘no’ in /etc/xinetd.d/tftp#6: service httpd is not running#7: since iptables may be running, ensure 69 (dhcp), 80(http), 25150(cobbler api), and 25151(cobbler api R/W) are unblocked 关闭防火墙#8: reposync is not installed, need for cobbler reposync, install/upgrade yum-utils?Easy to solve with: yum install yum-utils#9: yumdownloader is not installed, needed for cobbler repo add with –rpm-list parameter, install/upgrade yum-utils? 安装yum-utils#10: fencing tools were not found, and are required to use the (optional) power management features. install cman to use them 安装cman七、启动cobbler服务service dhcpd startservice httpd startservice xinetd restartservice cobbler start八、kickstart配置文件实例# vi /etc/cobbler/sample.ks#platform=x86, AMD64, or Intel EM64T# System authorization informationauth –useshadow –enablemd5# System bootloader configurationbootloader –location=mbr# Partition clearing informationclearpart –all –initlabel# Use text mode install# Firewall configurationfirewall –disable# Run the Setup Agent on first bootfirstboot –enabled# System keyboardkeyboard us# System languagelang en_US# Use network installationurl –url=$tree# If any cobbler repo definitions were referenced in the kickstart profile, include them here.$yum_repo_stanza# Network informationnetwork –bootproto=dhcp –device=eth0 –onboot=on# Reboot after installationreboot#Root passwordrootpw –iscrypted $1$65XOJkdK$SA2J.kVLiTZ6V1GAhFl/Z1# SELinux configurationselinux –disabled# Do not configure the X Window Systemskipx# System timezonetimezone Asia/Shanghai# Install OS instead of upgradeinstall# Clear the Master Boot Recordzerombr# Magically figure out how to partition this thing#SNIPPET::main_partition_selectpart / –asprimary –bytes-per-inode=4096 –fstype= ext3 –grow –size=1part swap –asprimary –bytes-per-inode=4096 –fstype= swap –size=2048part /boot –asprimary –bytes-per-inode=4096 –fstype= ext3 –size=100$kickstart_start#SNIPPET::pre_partition_select%packages@server-cfg@development-tools@base@development-libs@system-tools@admin-toolscertmaster%postchkconfig NetworkManager offchkconfig NetworkManagerDispatcher offchkconfig acpid offchkconfig anacron offchkconfig atd offchkconfig autofs offchkconfig avahi-daemon offchkconfig avahi-dnsconfd offchkconfig bluetooth offchkconfig conman offchkconfig cups offchkconfig dhcdbd offchkconfig dund offchkconfig firstboot offchkconfig funcd onchkconfig gpm offchkconfig haldaemon offchkconfig hidd offchkconfig httpd offchkconfig ibmasm offchkconfig ip6tables offchkconfig ipmi offchkconfig iptables offchkconfig irda offchkconfig irqbalance offchkconfig kdump offchkconfig kudzu offchkconfig lvm2-monitor offchkconfig mcstrans offchkconfig mdmpd offchkconfig microcode_ctl offchkconfig multipathd offchkconfig netconsole offchkconfig netfs offchkconfig netplugd offchkconfig nfs offchkconfig nfslock offchkconfig nscd offchkconfig ntpd offchkconfig oddjobd offchkconfig pand offchkconfig pcscd offchkconfig portmap offchkconfig psacct offchkconfig rdisc offchkconfig restorecond offchkconfig rpcgssd offchkconfig rpcidmapd offchkconfig rpcsvcgssd offchkconfig saslauthd offchkconfig sendmail offchkconfig setroubleshoot offchkconfig winbind offchkconfig wpa_supplicant offchkconfig xfs offchkconfig ypbind offchkconfig yum-updatesd offchkconfig certmaster onchkconfig funcd oncat EOFM /etc/func/minion.conf[main]log_level = INFOacl_dir = /etc/func/minion-acl.dcat EOCM /etc/certmaster/minion.conf[main]certmaster = node3.le8le.comlog_level = DEBUGcert_dir = /etc/pki/certmastercat EODM /etc/hosts192.168.1.3 node3.le8le.com$yum_config_stanzaSNIPPET::post_install_kernel_options$kickstart_done[/code]九、利用cobbler重装系统# rpm -Uhv koan-1.2.5-1.el5.noarch.rpm# koan -server=192.168.1.3 -list-profiles# koan -replace-self -server=192.168.1.3 -profile=CentOS_5.2-i386# reboot 没有创造的生活不能算生活,只能算活着。

cobbler 批量安装linux推荐

相关文章:

你感兴趣的文章:

标签云: