Cobbler安装配置手册.docx

上传人:飞****2 文档编号:52203461 上传时间:2022-10-21 格式:DOCX 页数:8 大小:79.32KB
返回 下载 相关 举报
Cobbler安装配置手册.docx_第1页
第1页 / 共8页
Cobbler安装配置手册.docx_第2页
第2页 / 共8页
点击查看更多>>
资源描述

《Cobbler安装配置手册.docx》由会员分享,可在线阅读,更多相关《Cobbler安装配置手册.docx(8页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。

1、目录1.Cobbler的安装42.Cobbler的配置43.配置Cobbler_web64.导入光盘及建立Profile75.配置Kickstart的启动文件76.安装系统91. Cobbler的安装1. 下载rpmforge的repository RPM# wget http:/pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.i686.rpm2. 安装rpmforge-release-0.5.2-2.el6.rf.i686.rpm# rpm -ivh rpmforge-release-0.5.2-2.el

2、6.rf.i686.rpm3. 安装semanage命令的包 policycoreutils-python# yum -y install policycoreutils-python4. 安装pykickstart#yum -y install pykickstart5. 执行cobbler check# cobbler check6. 如果报下面错误,则先择selinux关闭# cobbler checkhttpd does not appear to be running and proxying cobbler# setenforce 07. 再执行cobbler check,并按照提

3、示下的项进行配置# cobbler check2. Cobbler的配置执行cobbler check,并按照提示下的项进行配置,通常的配置项如下:# cobbler check1. 启动cobbler,httpd,xinetd,dhcpd服务# service httpd start# service xinetd start# service cobblerd start2. 执行cobbler check并按照提示下的项进行配置,通常的配置项如下从第3项开始:# cobbler check1 : The server field in /etc/cobbler/settings must

4、 be set to something other than localhost, or kickstarting features will not work. This should be a resolvable hostname or IP for the boot server as reachable by all machines that will use it.2 : For PXE to be functional, the next_server field in /etc/cobbler/settings must be set to something other

5、than 127.0.0.1, and should match the IP of the boot server on the PXE network.3 : Must enable a selinux boolean to enable vital web services components, run: setsebool -P httpd_can_network_connect true4 : you need to set some SELinux content rules to ensure cobbler serves content correctly in your S

6、ELinux 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/.*5 : you need to set some SELinux rules if you want to use cobbler-web (an optional package), run the following

7、: /usr/sbin/semanage fcontext -a -t httpd_sys_content_rw_t /var/lib/cobbler/webui_sessions/.*6 : some network boot-loaders are missing from /var/lib/cobbler/loaders, you may run cobbler get-loaders to download them, or, if you only want to handle x86/x86_64 netbooting, you may ensure that you have i

8、nstalled a *recent* version of the syslinux package installed and can ignore this message entirely. Files in this directory, should you want to support all architectures, should include pxelinux.0, menu.c32, elilo.efi, and yaboot. The cobbler get-loaders command is the easiest way to resolve these r

9、equirements.7 : change disable to no in /etc/xinetd.d/rsync8 : since iptables may be running, ensure 69, 80, and 25151 are unblocked9 : debmirror package is not installed, it will be required to manage debian deployments and repositories10 : ksvalidator was not found, install pykickstart11 : The def

10、ault password used by the sample templates for newly installed machines (default_password_crypted in /etc/cobbler/settings) is still set to cobbler and should be changed, try: openssl passwd -1 -salt random-phrase-here your-password-here to generate new oneRestart cobblerd and then run cobbler sync

11、to apply changes.3. 编辑/etc/cobbler/settings,修改如下项:server: 172.16.3.1此处IP改为cobbler服务器的本机IPnext_server: 172.16.3.1此处IP改为cobbler服务器的本机IPmanage_dhcp: 1此处原本为0,修改为1打开DHCP服务4. 编辑/etc/xinetd.d/tftp,修改disable = no此处原本为“yes”,修改为“no”5. 编辑/etc/xinetd.d/rsync,修改disable = no此处原本为“yes”,修改为“no”6. 编辑/etc/cobbler/dhc

12、p.template,修改subnet部分如下:配置两个subnet 172.16.3.0/24和172.16.1.0/24,如有其它subnet的主机需要使用cobbler安装OS,则增加此subnet。subnet 172.16.3.0 netmask 255.255.255.0 option routers 172.16.3.254; option domain-name-servers 172.16.3.1; option subnet-mask 255.255.255.0; range dynamic-bootp 172.16.3.100 172.16.3.120; filename

13、 /pxelinux.0; default-lease-time 21600; max-lease-time 43200; next-server 172.16.3.1;subnet 172.16.1.0 netmask 255.255.255.0 option routers 172.16.1.254; option domain-name-servers 172.16.3.1; option subnet-mask 255.255.255.0; range dynamic-bootp 172.16.1.100 172.16.1.120; filename /pxelinux.0; defa

14、ult-lease-time 21600; max-lease-time 43200; next-server 172.16.3.1;7. 把上面的配置复制到/etc/dhcp/dhcpd.conf中。8. 编辑/etc/sysconfig/iptables,添加下面几行以打开端口80,69和25151-A INPUT -m state -state NEW -m tcp -p tcp -dport 80 -j ACCEPT-A INPUT -m state -state NEW -m tcp -p tcp -dport 69 -j ACCEPT-A INPUT -m state -state

15、 NEW -m udp -p udp -dport 69 -j ACCEPT-A INPUT -m state -state NEW -m tcp -p tcp -dport 25151 -j ACCEPT然后再重启iptables# service iptables restart9. 如果selinux开启,则根据cobbler check的提示,执行相应的命令以开启selinux相关权限。10. 执行cobbler get-loaders以下载OS的加载工具# cobbler get-loaders11. 所有项配置完毕后,执行cobbler sync。# cobbler sync3.

16、配置Cobbler_web1. 安装依赖组件Django和mod_ssl# yum -y install Django# yum -y install mod_ssl2. 安装cobbler_web# yum -y install cobbler_web3. 重启httpd以让ssl服务生效# service httpd restart4. 为Cobbler用户修改密码# htdigest /etc/cobbler/users.digest Cobbler cobbler5. 为Cobbler Web增加新用户# htdigest /etc/cobbler/users.digest Cobbl

17、er new_name6. 然后使用http:/your_cobbler_ip/cobbler_web访问,登录后界面如下:4. 导入光盘及建立Profile1. 如果是ISO,先挂载到/mnt# mount -t iso9660 CentOS-6.2-i386-bin-DVD1.iso /mnt -o loop2. 如果是光盘,先挂载到/mnt# mount /dev/cdrom /mnt3. 使用cobbler命令导入镜像# cobbler import -path=/mnt -name=CentOS6.2 -arch=i3864. 编辑profile,修改kickstart启动文件为Ce

18、ntOS6.2-i386.ks# cobbler profile edit -name=CentOS6.2-i386 -distro=CentOS6.2-i386 -kickstart=/var/lib/cobbler/kickstarts/CentOS6.2-i386.ks5. 执行cobbler sync# cobbler sync5. 配置Kickstart的启动文件模板如下,根据实际情况修改,后面红色字样为注释。#platform=x86, AMD64, or Intel EM64T#version=DEVEL# Firewall configurationfirewall -enab

19、led -ssh-开启firewall,并启用ssh端口# Install OS instead of upgradeinstall# Use CDROM installation media#cdrom# Use network installationurl -url=$tree#Root passwordrootpw -iscrypted $default_password_crypted-使用default_password_crypted为新# System authorization information-装OS的root密码,在settings中修改auth -useshado

20、w -passalgo=sha512# Use text mode installtext-文字安装模式# System keyboardkeyboard us-美式键盘# System languagelang en_US-默认语方为英文# SELinux configurationselinux -enforcing-开启selinux# Do not configure the X Window Systemskipx# Installation logging levellogging -level=info# Reboot after installationreboot# Clea

21、r the Master Boot Recordzerombr# System timezonetimezone Asia/Shanghai# If any cobbler repo definitions were referenced in the kickstart profile, include them here.$yum_repo_stanza# Network information$SNIPPET(network_config)# System bootloader configurationbootloader -location=mbr# Partition cleari

22、ng informationclearpart -all -initlabel# Run the Setup Agent on first bootfirstboot -disable# Disk partitioning information-配置partitionpart /boot -fstype=ext4 -size=200part swap -fstype=swap -size=8192part pv.01 -fstype=ext4 -size=30000volgroup vg_root pv.01logvol / -vgname=vg_root -name=lv_root -fs

23、type=ext4 -size=1024logvol /home -vgname=vg_root -name=lv_home -fstype=ext4 -size=10240logvol /var -vgname=vg_root -name=lv_var -fstype=ext4 -size=4096logvol /usr -vgname=vg_root -name=lv_usr -fstype=ext4 -size=4096logvol /tmp -vgname=vg_root -name=lv_tmp -fstype=ext4 -size=4096logvol /opt -vgname=v

24、g_root -name=lv_opt -fstype=ext4 -size=4096part pv.02 -fstype=ext4 -size=100 -growvolgroup vg_data pv.02%pre$SNIPPET(log_ks_pre)$SNIPPET(kickstart_start)$SNIPPET(pre_install_network_config)# Enable installation monitoring$SNIPPET(pre_anamon)%packages$SNIPPET(func_install_if_enabled)$SNIPPET(puppet_i

25、nstall_if_enabled)chinese-support-需要安装的包emacsfontssystem-management-snmpx11%post$SNIPPET(log_ks_post)# Start yum configuration$yum_config_stanza# End yum configuration$SNIPPET(post_install_kernel_options)$SNIPPET(post_install_network_config)$SNIPPET(func_register_if_enabled)$SNIPPET(puppet_register_

26、if_enabled)$SNIPPET(download_config_files)$SNIPPET(koan_environment)$SNIPPET(redhat_register)$SNIPPET(cobbler_register)# Enable post-install boot notification$SNIPPET(post_anamon)# Start final steps$SNIPPET(kickstart_done)# End final steps%end6. 安装系统6.1安装操作系统1. 把需要安装操作系统的机器连到内网,保证此机器与cobbler服务器之间连通性

27、正常。如经过防火墙,必须保证能访问80,69端口。2. 修改BIOS为PXE启动,重启。之后就可以看到启动界面如下,选择相应的OS profile(这里为CentOS6.2-i386)就可以开始安装了。6.2重装操作系统1. 在需要重装操作系统的服务器上安装koan# wget http:/pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.i686.rpm# rpm -ivh rpmforge-release-0.5.2-2.el6.rf.i686.rpm# yum -y install koan2. 执行下面命令以拿到所有的profiles# koan -server=172.16.3.1 -list=profiles- looking for Cobbler at http:/172.16.3.1:80/cobbler_apiRHEL6.0-i386CentOS6.2-i3863. 执行下面命令以初始化重装# koan -server=172.16.3.1 -profile= CentOS6.2-i386 -replace-self4. 然后执行reboot重启当前机器以重装# reboot

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 教育专区 > 教案示例

本站为文档C TO C交易模式,本站只提供存储空间、用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。本站仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知淘文阁网,我们立即给予删除!客服QQ:136780468 微信:18945177775 电话:18904686070

工信部备案号:黑ICP备15003705号© 2020-2023 www.taowenge.com 淘文阁