Cobbler安装配置手册

合集下载

Cobbler安装配置文档

Cobbler安装配置文档

CentOS Cobbler 服务配置文档批量无人值守安装系统安装环境软件:Linux + apache cobbler rsync tftp-server xinetd dhcp1、安装apache和相关组件#32位:#wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.1-1.el5.rf.i386.rpm#rpm -ivh rpmforge-release-0.5.1-1.el5.rf.i386.rpm///////#64位:///#wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.1-1.el5.rf.x86_64.rpm /////#rpm -ivh rpmforge-release-0.5.1-1.el5.rf.x86_64.rpm#yum install cobbler httpd rsync tftp-server xinetd dhcp2、挂载Linux安装盘,生成安装镜像:#mount /dev/cdrom /mnt/ 或者mount -o loop xxx.iso /mnt#cobbler import --path=/mnt/ --name=CentOS-5-i386#cobbler –list //应该会多个xen3、配置文件修改1)xinet.d配置文件修改#vi /etc/xinetd.d/rsyncdisable = yes 改成no#vi /etc/xinetd.d/tftpdisable = yes 改成no#vi /var/lib/cobbler/settingsnext_server: '127.0.0.1' //改成本机IP:192.168.16.212server: '127.0.0.1' //改成本机IP:192.168.16.212manage_dhcp: 0 // 改成1 //开启管理DHCP服务2)dhcp相关配置文件#vi /etc/cobbler/dhcp.templateddns-update-style interim;allow booting;allow bootp;ignore client-updates;set vendorclass = option vendor-class-identifier;subnet 192.168.16.0 netmask 255.255.255.0 {option routers 192.168.16.1;#option domain-name-server 192.168.0.100;option subnet-mask 255.255.255.0;range dynamic-bootp 192.168.16.185 192.168.16.189;filename "/pxelinux.0";default-lease-time 21600;max-lease-time 43200;next-server 192.168.16.212;}#vi /etc/cobbler/default.ks ////安装自动关键配置文件见最后说明4、关闭防火墙和SElinux#setup5、同步cobbler配置,使修改生效:#cobbler sync//目地是指把/etc/cobble/下面的配置文件,同步到相应的目录下面6、重启各种服务#service xinetd restart#service dhcpd restart#service cobblerd restar#service httpd restart一、客服端新安装的启动另一台新服务器,通过 PXE 启动进入,提示"boot:"时输入"menu"即可进入蓝色的Cobbler 安装界面,选择CentOS-5-i386安装项,自动完成系统安装。

DHCPPXECobbler简单实现

DHCPPXECobbler简单实现

DHCPPXECobbler简单实现DHCP&PXE&Cobbler⼀、DHCP简介(⼀)DHCP⼯作流程DHCP: Dynamic Host Configuration Protocol 简⽽⾔之动态主机配置协议,即然英⽂没有说是IP配置协议,那么就是说除了给客户机配置IP 外它还能⼲点⼉别的。

下⾯来看看⼀个简单的流程说明第⼀步,客户端启动后暂未获得IP地址,向所在局域⽹⼴播⼀个DHCP discover报⽂。

第⼆步,本地局域⽹中的DHCP服务器(可能不⽌⼀台)收到客户端的discover报⽂后,向本地⽹络⼴播(为了让其他服务器也收到)发送DHCP offer报⽂,包含服务器从⾃⼰掌管的IP地址范围内取出的⼀个IP。

第三步,客户端收到服务器的offer后,(如果有多台服务器发送了offer,当然是采⽤最先到达的)。

然后客户端再向本地局域⽹⼴播(让所有服务器收到它已经拟采⽤某个IP)⼀个DHCP request报⽂。

第四步,提供IP的服务器收到客户端发来的request报⽂后,再次向本地⽹络⼴播发送acknowledgement报⽂,即ACK确认。

DHCP协议报⽂格式如下:Op:报⽂类型,分为两⼤类: Request(1)和 Reply(2)HW Type:硬件类型,⼀般是以太⽹:1HW Len:硬件地址长度,单位字节。

对应以太⽹:6(mac地址长度为6字节48bit)**Transaction ID** :事务ID,随机数,由客户端⽣成,服务器Reply时,会把Request中的Transaction拷贝到Reply报⽂中。

Secs:距离第⼀次发送IP请求或Renew请求过去的秒数**Flags** :标志位,⽬前仅第⼀个bit有使⽤,置1 标明⼴播**Client IP Address** :当前客户端的IP地址,客户端初始时没有IP地址,则置0,即0.0.0.0Your IP Address:服务器想客户端提供IP地址时,会把IP地址填⼊本字段**Next Server IP Address**:客户端获取⽹络引导⽂件的服务器,⽐如TFTP的IP地址Gateway (Relay) IP Address:⽹关(中继)IP地址,有DHCP 中继器在转发DHCP报⽂的时候填⼊Server Name: Server名字,有64bytes,⼀般不使⽤,填充为0Boot File name:⽹络启动的引导⽂件名Option:选项,不定长度。

Cobbler安装配置手册

Cobbler安装配置手册

目录1.Cobbler的安装 (2)2.Cobbler的配置 (2)3.配置Cobbler_web (4)4.导入光盘及建立Profile (5)5.配置Kickstart的启动文件 (5)6.安装系统 (7)1.Cobbler的安装1.下载rpmforge的repository RPM# wget /rpmforge-release/rpmforge-release-0.5.2-\2.el6.rf.i686.rpm2.安装rpmforge-release-0.5.2-2.el6.rf.i686.rpm# rpm-ivhrpmforge-release-0.5.2-2.el6.rf.i686.rpm3.安装semanage命令的包policycoreutils-python# yum-y installpolicycoreutils-python4.安装pykickstart#yum -y installpykickstart5.执行cobbler check# cobbler check6.如果报下面错误,则先择selinux关闭# cobbler checkhttpd does not appear to be running and proxying cobbler# setenforce 07.再执行cobbler check,并按照提示下的项进行配置# cobbler check2.Cobbler的配置执行cobbler check,并按照提示下的项进行配置,通常的配置项如下:# cobbler check1.启动cobbler,httpd,xinetd,dhcpd服务# servicehttpd start# servicexinetd start# servicecobblerd start2.执行cobbler check并按照提示下的项进行配置,通常的配置项如下从第3项开始:# cobbler check1 : The 'server' field in /etc/cobbler/settings must 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 tosomething other than 127.0.0.1, and should match the IP of the boot server on the PXE network.3 : Must enable a selinuxboolean 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 correctlyin your SELinux environment, run the following: /usr/sbin/semanagefcontext -a -t public_content_t "/var/lib/tftpboot/.*" && /usr/sbin/semanagefcontext -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 optionalpackage), run the following: /usr/sbin/semanagefcontext -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 installed 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 requirements.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 default 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: "opensslpasswd -1 -salt 'random-phrase-here' 'your-password-here'" to generate new oneRestart cobblerd and then run 'cobbler sync' 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/dhcp.template,修改subnet部分如下:配置两个subnet 172.16.3.0/24和172.16.1.0/24,如有其它subnet的主机需要使用cobbler安装OS,则增加此subnet。

运维自动化之Cobbler安装配置

运维自动化之Cobbler安装配置

运维自动化之Cobbler安装配置Cobbler是一个快速网络安装linux的服务,而且在经过调整也可以支持网络安装windows。

该工具使用python 开发,小巧轻便(才15k行代码),使用简单的命令即可完成PXE网络安装环境的配置,同时还可以管理DHCP,DNS,以及yum包镜像。

Cobbler支持命令行管理,web界面管理,还提供了API接口,可以方便二次开发使用。

和Kickstart不同的是,使用cobbler不会因为在局域网中启动了dhcp而导致有些机器因为默认从pxe启动在重启服务器后加载tftp内容导致启动终止。

一、cobbler的安装部署配置环境准备:1、安装epelrpm -Uvh '/pub/epel/6/i386/epel-release-6-7.noarch.rpm'2、安装dhcp服务yum -y install dhcp3、其他服务的安装额外需要的服务还有tftp,rsync,xinetd,httpd。

所以如果安装系统的时候如果这几个包没装上,请手动安装。

4、关闭selinuxsed -i '/SELINUX/s/enforcing/disabled/' /etc/selinux/config关闭后最好重启一下,让selinux的设置生效cobbler安装配置1、cobbler安装yum -y install cobbler2、cobbler的配置启动cobbler# /etc/init.d/cobblerd start启动httpd服务# /etc/init.d/httpd start检查配置,执行cobbler check检查后会出现类似于这样的日志主要的修改:1,编辑/etc/cobbler/settings文件,找到server选项,修改为适当的ip地址,本实例配置ip为:192.168.10.12,编辑/etc/cobbler/settings文件,找到next_server选项,修改为适当的ip地址,本实例配置ip为:192.168.10.1 3,SELinux的设置。

Cobbler自动化批量部署系统(1)_ks配置文件

Cobbler自动化批量部署系统(1)_ks配置文件

/kissing_hu/article/details/42239111Cobbler 默认的ks 文件是/var/lib/cobbler/kickstarts/sample_end.ks 或者是/var/lib/cobbler/kickstarts/sample.ks 。

不同的版本貌似不同,可以通过cobbler profile 命令来查看和指定ks 文件。

我装的Cobbler 的默认配置文件是sample_end.ks 文件,可以通过cobbler profile report 查看 1 2 3 4 5 6 7 8 9 10 11 12[root@master kickstarts]# cobbler profile reportName : CentOS64-x86_64TFTP Boot Files : {}Comment :DHCP Tag : defaultDistribution : CentOS64-x86_64Enable gPXE? : 0Enable PXE Menu? : 1Fetchable Files : {}Kernel Options : {} Kernel Options (Post Install) : {} Kickstart : /var/lib/cobbler/kickstarts/sample_end.ks 指定ks 文件为自定义的centos64-x86-64.ks ,命令cobbler profile edit1[root@master kickstarts]# cobbler profile edit --name=CentOS64-x86_64--kickstart=/var/lib/cobbler/kickstarts/centos64-x86-64.ks 自定义或修改ks 文件时需要注意的一些问题1、硬盘分区(先清空磁盘然后再分区格式化):12 3 45 6 7 # Partition clearing informationclearpart --all # Disk partitioning information part /boot --fstype="ext4" --size=512part swap --fstype="swap" --size=1024part / --fstype="ext4" --grow --size=12、装好机器后root 密码设置,之前提到过的命令12[root@master ~]#openssl passwd -1 -salt 'random-phrase' 'password' $1$random-p$sFftrCTxKKsDZ.Sdr8mDG0 将生成的哈希值粘帖到以下位置(不需要改密码的话,不用设置)1# Root password2r ootpw --iscrypted $1$random-p$sFftrCTxKKsDZ.Sdr8mDG0 3、指定安装组件或包(如下所示@开头的是功能套件,单独的安装包直接写) 1 2 3 4 5 6 7 8 9%packages @additional-devel @base ...... ...... ...... net-snmp net-snmp-devel ...... ...... ...... python-netaddr %end 4、安装系统完成后指定执行bash 命令(写在最后%post 与%end 标签之间)1 2 3 4 5 6 7 8 9 10 11 12 13%post# service off on bootchkconfig abrt-ccpp offchkconfig abrt-oops offchkconfig abrtd offchkconfig acpid off# service open on bootchkconfig crond onchkconfig haldaemon on chkconfig iptables on chkconfig irqbalance on %end 其实这部分和写脚本差不多,哈哈。

cobbler安装部署

cobbler安装部署

cobbler安装部署一、Cobbler 介绍1、关于CobblerCobbler是一个快速的构建和部署系统的服务,改变了管理员的装机民工身份。

该工具使用python开发,小巧轻便(才15K行代码),使用简单的命令即可完成PXE网络安装环境的配置,同时还可以管理DHCP、DNS、以及yum包镜像,通过配置可以集成越来越多的配置管理系统和远程脚本实用程序,同时可以部署许多不同的操作系统类型。

Cobbler支持命令行管理,Web界面管理,同时还提供了API接口,可以方便二次开发使用。

Cobbler提供以下服务集成:PXE服务支持DHCP服务管理DNS服务管理电源管理Kickstart服务支持yum仓库管理等。

和Kickstart不同的是,使用cobbler不会因为在局域网中启动了dhcp而导致有些机器因为默认从pxe启动在重启服务器后加载tftp内容导致启动终止。

2、系统版本支持Red Hat、CentOS、Debian、Ubuntu、SUSE、FreeBSD、ESXI等3、Cobbler模型摘自:/manuals/2.2.3/1/1_-_How_We_Model_Things.html4、文件系统信息Cobbler 的文件系统信息如下:/var/log/cobbler所有的Cobbler的日志信息的存放位置。

Cobbler的日志信息并不会转存到/var/log/message 文件里面。

/var/www/cobbler这是Cobbler通过http服务实现的管理所拥有的不同内容的服务,This is a directory where modules can be dropped to extend Cobbler without modifying the core. See Modules for more information.二、Cobbler 快速指南1. 系统版本:yum –y install redhat-lsb#lsb_release –aLSBVersion: :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64: graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarchDistributor ID: CentOSDescription: CentOS release 6.2 (Final)Release: 6.2Codename: Final2. 软件版本:Cobbler 版本: Cobbler 2.2.33. 禁用selinux#setenforce 04. 安装Cobbler# yum –y install cobbler5. 修改配置文件在启动Cobbler服务之前,你需要修改一些配置文件. 在修改每一个文件之前最好先备份下当前的文件.Cobblerd的配置文件为/etc/cobbler/settings ,这个文件是YAML信息的格式文件. 1) .默认的加密密码: 设置一个控制kickstart的root 密码default_password_crypted: "$1$mF86/UHC$WvcIcX2t6crBz2onWxyac."# opensslpasswd -1 \\\修改密码(是数字1 不是字母L)2). Server 和Next_Serverserver 选项设置IP用于为cobbler 服务器指定地址,请不要使用0.0.0.0, 设置一个你希望和cobbler服务器通过http和tftp等协议链接的IP.# default, localhostserver: 127.0.0.1next_server选项是DHCP/PXE网络引导文件被下载的TFTP服务器的IP, 它将和server设置为同一个IP# default, localhostnext_server: 127.0.0.13). DHCP Management and DHCP Server Template为了pxe的启动,需要一个DHCP服务器地址,并直接引导系统,它可以在网络中下载的引导文件到TFTP的服务器,cobbler可以通过manage_dhcp的设置来进行管理#default: don’t managemanage_dhcp: 0修改manage_dhcp为1 ,cobbler 将管理dhcp, 可以通过修改dhcp.template来进行管理# vim /etc/cobbler/dhcp.templatesubnet 192.168.0.0 netmask 255.255.255.0 {option routers 192.168.0.1;option domain-name-servers 192.168.0.210,192.168.0.211;option subnet-mask 255.255.255.0;filename "/pxelinux.0";default-lease-time 21600;max-lease-time 43200;next-server $next_server;}4). 开启cobbler开机自动启动,并启动服务chkconfigcobblerd on &&service cobblerd start5). 在第一次执行同步之前,请先执行检查# cobbler check# cobbler sync6). cobbler 导入cobbler import --name=<name> --arch=<x86_64/i386> --path=<path>其它命令可通过cobbler --help 来进行查看三、安装Cobbler1 . 安装cobbler/cobblerd的先决条件:cobbler是基于python ,所以需要版本为2.3+ 的python,和以下软件包的支持: createrepo、httpd、mkisofs、mod_wsgi、python-cheetah、python-netaddr、python-simplejson、python-urlgrabber、vPyYAML(python-yaml)、rsync、tftp-server、yum-utils2 . 安装EPEL源查看系统信息:# uname -r2.6.32-220.el6.x86_64 \\\ 当前系统为X86_64的# lsb_release -rRelease: 6.2 \\\ 当前系统为6.2的系统从/pub/epel/ 这里找到6.X的系统X86_64位epel-release根据此方法查看您的系统所需要下载的EPEL源# rpm -ivh /pub/epel/6/x86_64/epel-release-6-8.noarch.rpm3 . yum 安装Cobbler# yum -y install cobbler httpdrsynctftp-server xinetddhcp python-ctypespykickstartdebmirror 4 . 配置Cobbler4.1 配置cobbler主配置文件# vim /etc/cobbler/settings### 暂且修改以下几项::manage_dhcp: 0 \\ 默认为0 ,表示不进行管理dhcp服务,可以修改为1,对其进行管理manage_rsync: 0 \\ 默认为0,不对rsync进行管理,可以修改为1 进行管理server: 192.168.0.7 \\ cobbler 服务器地址next_server: 192.168.0.7 \\ dhcp服务地址4.2 配置tftp rsync修改rsync和tftp的配置文件:将disable = yes 修改为disable = nocat /etc/xinetd.d/tftpservice tftp{disable = no........ (以下内容省略)cat /etc/xinetd.d/rsyncservice rsync{disable = no........ (以下内容省略)4.3 启用wsgi模块取消/etc/httpd/conf.d/wsgi.conf文件中LoadModulewsgi_module modules/mod_wsgi.so 行的注释4.4 生成Cobbler安装系统root初始密码# openssl passwd -1 -salt ‘root’‘minunix’$1$root$oZ2U5GhxaJ1b4q4tpPQnE0将密码加入cobbler配置vim /etc/cobbler/settingsdefault_password_crypted: “$1$root$oZ2U5GhxaJ1b4q4tpPQnE0”4.5 配置DHCP 及modules模块cp /etc/cobbler/dhcp.template{,.bak}vim /etc/cobbler/dhcp.templatesubnet 192.168.0.0 netmask 255.255.255.0 {option routers 192.168.0.1;option domain-name "";option domain-name-servers 192.168.0.1;option subnet-mask 255.255.255.0;range dynamic-bootp 192.168.0.100 192.168.0.254;filename "/pxelinux.0";default-lease-time 600;max-lease-time 7200;next-server $next_server;}4.6 配置开机启动chkconfig httpd on && service htpd startchkconfig dhcpd on && service dhcpd startchkconfig xinetd on && service xinetd startchkconfig cobblerd on && service cobblerd start4.7 下载引导操作系统文件cobbler get-loaders4.8 配置debmiroryum -y install debmiror修改/etc/debmirror.conf文件, 注释掉:@dists和@arches 两行4.9 检查Cobbler配置cobbler check同步配置: cobbler sync四、配置管理Cobbler至于Cobbler的配置文件、日志文件等的存放位置在前面已经简述过,这里不再啰嗦了!1. 导入系统镜像文件上传ISO 镜像文件到服务器/var/iso/linux目录下mkdir -p /var/iso/linuxmkdir -p /var/Linux/CentOS/X86_64/6.2mkdir -p /var/Linux/CentOS/X86_64/6.0mount -o loop /var/iso/linux/CentOS-6.2-x86_64-bin-DVD1.iso /var/Linux/CentOS/X86_64/6 .22. 从镜像中导入OS数据注: 导入时间较长, 请耐心等待!!!cobbler import --path=/var/Linux/CentOS/X86_64/6.2 –name=CentOS-6.2 --arch=x86_64在正常导完之后会给出如下提示:associating kickstarts*** TASK COMPLETE ***有时可能会出现卡住的现象,如果导入时间过长,可通过比对文件大小来确定是否已经正常导入比对文件大小:du -sh /var/Linux/CentOS/X86_64/6.2du -sh /var/www/cobbler/ks_mirror/centos-6.2-x86_64如果上述两个命令执行过显示的结果出入较大, 则可能文件没有正常导入在重新导入之前最好先把之前的内容删除再导入cobbler [distro] remove --name=[centos6.2] 方括号中的内容根据自己的情况来填写, 更多命令通过cobbler --help 来查看剩下其它系统导入方法类似,只是名字和路径更改下即可,导入完成之后,可通过cobbler list 来查看导入的结果.五、Web界面web 界面的管理是一个非常简便的方法, 只需要安装cobbler_web软件包即可1. yum -y install cobbler_web2. 设置用户名密码为cobbler添加minunix用户,并设置密码htdigest /etc/cobbler/users.digest “cobbler”minunix3. 开启cobbler web 登录vim /etc/cobbler/modules.conf修改authentication 部分中的module,修改后如下:module = authn_configfile4. 重启cobbler 与http5. 访问: https://192.168.0.7/cobbler_web注: 因软件包的依赖关系笔者暂没成功完成web访问, 但步骤就是这样的!六、Cobbler安装操作系统1. 为了增加装机的安全,可设置装机密码openssl passwd -1 -salt ‘root’ minunix$1$root$oZ2U5GhxaJ1b4q4tpPQnE0编辑pxedefault.template , 加入密码部分vim /etc/cobbler/pxe/pxedefault.template在TIMEOUT 上面加入一行MENU MASTER PASSWD $1$root$oZ2U5GhxaJ1b4q4tpPQnE0vim /etc/cobbler/pxe/pxeprofile.template在LABEL 标签中加入一行MENU PASSWD修改完之后记得同步配置, cobbler check && cobbler sync2. 自定义PXE 菜单TITLE修改pxedefault.template文件修改MENU TITLE 后面的内容为自己想要的内容eg: MENU TITLE MinUnix Install System| 修改完之后记得同步配置, cobbler check && cobbler sync3. 自定义安装系统可以通过命令cobbler system add 进行自定义安装某个版本的系统,更多命令可通过cobbler system add --help 获得帮助。

Cobbler介绍及搭载

Cobbler介绍及搭载

Cobbler介绍及搭载Cobbler介绍Cobbler是⼀个Linux服务器安装的服务,可以通过⽹络启动(PXE)的⽅式来快速安装、重装物理服务器和虚拟机,同时还可以管理DHCP,DNSCobbler可以使⽤命令⾏⽅式管理,也提供了基于Web界⾯管理⼯具(cobbler-web),同时提供API接⼝⽤于⼆次开发。

Cobbler是较早前的Kickstart的升级版本,向较与Kickstart优点为更容易配置,且⾃带WEB界⾯。

易于管理。

Cobbler原理Cobbler是通过将DHCP、TFTP、DNS、HTTP等服务进⾏集成,创建⼀个中央管理节点,其可以实现的功能有配置服务,创建存储库,解压缩操作系统媒介,代理或集成⼀个配置管理系统,控制电源管理等。

Cobbler的最终⽬的是实现⽆需进⾏⼈⼯⼲预即可安装机器。

在进⾏进⼀步的操作之前,我们有必要先了解下pxe和kickstart 。

Pxe(预执⾏环境)PXE是让计算机通过⽹卡独⽴地使⽤数据设备(如硬盘)或者安装操作系统。

PXE主要通过⼴播的⽅式发送⼀个包,并请求获取⼀个地址,⽽后交给TFTP程序下载⼀个引导⽂件。

KickstartKickstart 是红帽开发的⼀种⼯具,我们可以简单理解为⼀个⾃动安装应答配置管理程序。

通过读取这个配置⽂件,系统知道怎么去分区,要安装什么包,配什么IP,优化什么内核参数等等原理视图及步骤Server端启动Cobbler及相关服务cobbler check检查错误进⾏配置然后同步 cobbler syncDHCP配置TFTP传输启动⽂件Server端发送ISO镜像与Kickstart给客户端Client端以PXE启动根据DHCP⾃动获取IP地址加载Kickstart⽂件进⾏系统安装Cobbler部署安装cobbler环境[root@localhost ~]# yum install -y httpd dhcp tftp python-ctypes cobbler xinetd cobbler-web pykickstart epel-release......开启并⾃启服务[root@localhost ~]# systemctl enable --now cobblerdCreated symlink from /etc/systemd/system/multi-user.target.wants/cobblerd.service to /usr/lib/systemd/system/cobblerd.service.[root@localhost ~]# systemctl enable --now httpdCreated symlink from /etc/systemd/system/multi-user.target.wants/httpd.service to /usr/lib/systemd/system/httpd.service.修改server IP[root@localhost ~]# vim /etc/cobbler/settings......# (dual homed, etc), you need to read the --server-override section# of the manpage for how that works.server: 192.168.197.144 ## 修改为本地IP......# of the cobbler server here so that PXE booting guests can find it# if you do not set this correctly, this will be manifested in TFTP open timeouts.next_server: 192.168.197.144 ## tftp服务的ip地址也填写为本地IP开启tftp服务[root@localhost ~]# vim /etc/xinetd.d/tftp......service tftp{socket_type = dgramprotocol = udpwait = yesuser = rootserver = /usr/sbin/in.tftpdserver_args = -s /var/lib/tftpbootdisable = no ## 将状态修改为NO ,表⽰开启此服务per_source = 11cps = 100 2flags = IPv4下载cobbler相关缺失⽂件[root@localhost ~]# cobbler get-loaders......path /var/lib/cobbler/loaders/grub-x86_64.efi already exists, not overwriting existing content, use --force if you wish to update*** TASK COMPLETE ***开启rsync共享服务[root@localhost ~]# systemctl enable --now rsyncdCreated symlink from /etc/systemd/system/multi-user.target.wants/rsyncd.service to /usr/lib/systemd/system/rsyncd.service.修改默认密码(默认密码为cobbler)[root@localhost ~]# openssl passwd -1 -salt "$RANDOM" '123456' # 先加密$1$2512$pppPAr0KZoqb.iwWcOVFu0## 写⼊配置⽂件[root@localhost ~]# vim /etc/cobbler/settings......## 重启服务[root@localhost ~]# systemctl restart cobblerdcobbler check 检查是否还有错误[root@localhost ~]# cobbler checkThe following are potential configuration items that you may want to fix:1 : debmirror package is not installed, it will be required to manage debian deployments and repositories2 : fencing tools were not found, and are required to use the (optional) power management features. install cman or fence-agents to use them Restart cobblerd and then run 'cobbler sync' to apply changes.注意:1的错误为需要Debian的必备包,如果安装的客户机的系统没有Debian,则不需要处理。

cobra安装指南——2

cobra安装指南——2

COBRA 安装指南1、安装这一系列软件时,要注意版本之间的兼容性否则...........可能现在的CORBRA版本只能用libSBML3.41及更低的版本,SBMLtoolbox的版本兼容性不知道2、安装软件的时候,先要搞清楚这些软件之间的依赖性。

在Windows XP 环境下,安装过程如下:步骤一,Install your LP solver of choice following the instructions for each solver. Test the functionality of the solver using examples provided with the solver and add the relevant folders to your Matlab path.首先,要下载线性规划(Linear Programing)的解题器(Solver),我是用glpk solver的。

* Download the precompiled version of glpkmex下载glpkmex 网址是/* Unzip the files to a folder of your choice解压下载的文件夹到目的文件夹* Add this folder to your matlab path添加目的文件夹到Matlab路径* Test with the examples that come with glpkmex (glpktest1.m,glpktest2.m)测试glpkmex(有两个demo包括glpktest1,glpktest2)步骤二,Install the SBML Toolbox following the instructions included in the installation package. Test the functionality of the Toolbox and add the relevant folders to your Matlab path.首先要安装libXML,然后安装SBML 工具箱,将文件夹添加到Matlab路径。

Cobbler全自动批量安装部署Linux系统

Cobbler全自动批量安装部署Linux系统

Cobbler全自动批量安装部署Linux系统说明:Cobbler服务器系统:CentOS 5.10 64位IP地址:192.168.21.128需要安装部署的Linux系统:eth0(第一块网卡,用于外网)IP地址段:192.168.21.160-192.168.21.200eth1(第二块网卡,用于内网)IP地址段:10.0.0.160-10.0.0.200子网掩码:255.255.255.0网关:192.168.21.2DNS:8.8.8.8 8.8.4.4所有服务器均支持PXE网络启动实现目的:通过配置Cobbler 服务器,全自动批量安装部署Linux系统具体操作:第一部分:在Cobbler服务器上操作一、关闭SELINUXvi/etc/selinux/config#SELINUX=enforcing #注释掉#SELINUXTYPE=targeted #注释掉SELINUX=disabled #增加:wq! #保存退出setenforce 0 #使配置立即生效二、配置防火墙,开启TCP:80端口、TCP:25151端口、UDP:69端口vi /etc/sysconfig/iptables #编辑-ARH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT #http服务需要此端口-ARH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 69 -j ACCEPT #tftp服务需要此端口-ARH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 25151 -j ACCEPT #cobbler需要此端口:wq! #保存退出/etc/init.d/iptables restart #最后重启防火墙使配置生效三、安装Cobblercd /usr/local/srcwget/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm #CentOS 5.x 64位rpm -ivhepel-release-5-4.noarch.rpm备注:wget/pub/epel/5/i386/epel-release-5-4 .noarch.rpm #CentOS 5.x 32位wget/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm #CentOS6.x 64位wget/pub/epel/6/i386/epel-release-6-8 .noarch.rpm #CentOS6.x 32位yum install cobbler tftptftp-server xinetd dhcp httpd rsync #安装cobbleryum install pykickstart debmirror python-ctypes cman #安装运行cobbler需要的软件包四、配置Cobbler1、设置http服务vi /etc/httpd/conf.d/wsgi.confLoadModule wsgi_module modules/mod_wsgi.so #取消前面的注释:wq! #保存退出chkconfig httpd on #设置开机启动service httpd start #启动2、设置tftp服务开机启动vi /etc/cobbler/tftpd.template #编辑service tftp{disable = no #修改为nosocket_type = dgramprotocol = udpwait = yesuser = rootserver =/usr/sbin/in.tftpdserver_args = -B 1380 -v -s/tftpbootper_source = 11cps = 100 2flags = IPv4}:wq! #保存退出3、设置rsync服务开机启动vi /etc/xinetd.d/rsync #编辑配置文件,设置开机启动rsyncservice rsync{disable = no #修改为nosocket_type = streamwait = nouser = rootserver = /usr/bin/rsyncserver_args = --daemon}:wq! #保存退出/etc/init.d/xinetd start #启动(CentOS中是以xinetd 来管理Rsync和tftp服务的)4、配置cobbler相关参数vi /etc/debmirror.conf #注释掉@dists 和@arches 两行[email protected]="sid";[email protected]="i386";:wq! #保存退出openssl passwd -1 -salt 'osyunwei' '123456' #生成默认模板下系统安装完成之后root账号登录密码$1$osyunwei$sEV8iwXXuR4CqzLXyLnzm0 #记录下这行,下面会用到vi /etc/cobbler/settings #编辑,修改default_password_crypted:"$1$osyunwei$sEV8iwXXuR4CqzLXyLnzm0"next_server: 192.168.21.128server: 192.168.21.128manage_dhcp:1default_kickstart: /var/lib/cobbler/kickstarts/default.ks:wq! #保存退出系统运维 温馨提醒:qihang01原创内容?版权所有,转载请注明出处及原文链接5、配置dhcp服务器vi /etc/cobbler/dhcp.template #编辑,修改subnet 192.168.21.0 netmask 255.255.255.0 { #设置网段option routers 192.168.21.2; #设置网关optiondomain-name-servers 8.8.8.8,8.8.4.4; #设置dns服务器地址option subnet-mask 255.255.255.0; #设置子网掩码range dynamic-bootp 192.168.21.160 192.168.21.200; #设置dhcp服务器IP地址租用的范围default-lease-time 21600; #默认租约时间max-lease-time 43200; #最大租约时间next-server $next_server;class "pxeclients" {match if substring (option vendor-class-identifier, 0, 9) = "PXEClient";if option pxe-system-type = 00:02 {filename "ia64/elilo.efi";} else if option pxe-system-type = 00:06 {filename "grub/grub-x86.efi";} else if optionpxe-system-type = 00:07 {filename "grub/grub-x86_64.efi";} else {filename "pxelinux.0";}}}:wq! #保存退出vi/etc/sysconfig/dhcpd #指定DHCP服务的网络接口DHCPDARGS=eth0:wq! #保存退出dhcpd #测试dhcp服务器配置是否正确chkconfig dhcpd on #设置开机启动chkconfig cobblerd on #设置开机启动cobbler get-loaders #安装cobbler相关工具包,否则检查cobbler配置会报错service cobblerd start #启动cobblercobbler sync #同步配置文件到dhcp服务器service dhcpd start #启动dhcp服务6、设置cobbler相关服务启动脚本vi /etc/rc.d/init.d/cobbler #编辑,添加以下代码#!/bin/sh# chkconfig: - 80 90# description:cobblercase $1 instart)/etc/init.d/httpdstart/etc/init.d/xinetd start/etc/init.d/dhcpdstart/etc/init.d/cobblerd start;;stop)/etc/init.d/httpdstop/etc/init.d/xinetd stop/etc/init.d/dhcpdstop;;restart)/etc/init.d/xinetd restart/etc/init.d/cobblerd restart;;status)/etc/init.d/httpd status/etc/init.d/dhcpdstatus/etc/init.d/cobblerd status;;sync)cobbler sync;;*)echo "Input error,please in put'start|stop|restart|status|sync'!";exit 2&gt;&amp;1&gt;/dev/null &amp;;;esac:wq! #保存退出chmod +x/etc/rc.d/init.d/cobbler #添加脚本执行权限chkconfig cobbler on #添加开机启动service cobbler restart #重启cobblercobbler check #检查cobbler配置,出现下面的提示,SELinux和防火墙前面已经设置过了,不用理会系统运维 温馨提醒:qihang01原创内容?版权所有,转载请注明出处及原文链接============================================ =========================================The following are potential configuration items that you may want to fix:1 : SELinux is enabled. Please review the following wiki page for details on ensuring cobbler works correctly in your SELinuxenvironment:https:///cobbler/cobbler/wiki/Selinu x2 : since iptables may be running, ensure 69, 80/443, and25151 are unblockedRestart cobblerd and then run'cobbler sync' to applychanges===================================== ============================================ ====五、挂载系统安装镜像到http服务器站点目录上传系统安装镜像文件CentOS-5.10-x86_64-bin-DVD-1of2.iso到/usr/local/src/目录mkdir -p/var/www/html/os/CentOS-5.10-x86_64 #创建挂载目录mount -t iso9660 -o loop/usr/local/src/CentOS-5.10-x86_64-bin-DVD-1of2.iso/var/www/html/os/CentOS-5.10-x86_64 #挂载系统镜像vi /etc/fstab #添加以下代码。

Cobar的安装和配置步骤

Cobar的安装和配置步骤

一:环境准备1、软件准备操作系统:Centos6.3数据库:MySQL5.5JDK版本:java7Cobar软件:cobar1.2.72、数据准备MySQL所在服务器IP为192.168.0.1,端口为3306,用户名为test,密码为test。

ERROR1045(28000):Access denied for user'root'@'localhost'(using password:YES)解决:#/etc/init.d/mysql stop#mysqld_safe--user=mysql--skip-grant-tables--skip-networking&#mysql-u root mysqlmysql>UPDATE user SET Password=PASSWORD('root')where USER='root';mysql>FLUSH PRIVILEGES;mysql>quit#/etc/init.d/mysql restart#mysql-uroot-pEnter password:<输入新设的密码newpassword>mysql>GRANT ALL PRIVILEGES ON*.*TO'test'@'localhost'IDENTIFIED BY'test'WITH GRANT OPTION;GRANT ALL PRIVILEGES ON*.*TO'test'@'%'IDENTIFIED BY'test'WITH GRANT OPTION; GRANT ALL PRIVILEGES ON*.*TO'test'@'127.0.0.1'IDENTIFIED BY'test'WITH GRANT OPTION;GRANT ALL PRIVILEGES ON*.*TO'test'@'192.168.0.1'IDENTIFIED BY'test'WITH GRANT OPTION;我们需要创建schema:dbtest1、dbtest2、dbtest3,table:tb1、tb2,脚本如下:#创建dbtest1drop database if exists dbtest1;create database dbtest1;use dbtest1;#在dbtest1上创建tb1create table tb1(id int not null,gmt datetime);#创建dbtest2drop database if exists dbtest2;create database dbtest2;use dbtest2;#在dbtest2上创建tb2create table tb2(id int not null,val varchar(256));#创建dbtest3drop database if exists dbtest3;create database dbtest3;use dbtest3;#在dbtest3上创建tb2create table tb2(id int not null,val varchar(256));二:部署和配置Cobar请确保机器上设置了JAVA环境变量JAVA_HOME1、下载Cobar压缩文件并解压,进入conf目录可以看到schema.xml,rule.xml,server.xml 等相关的配置文件wget/mvn/releases/com/alibaba/cobar/cobar-server/1.2.7/c obar-server-1.2.7.tar.gztar zxf cobar-server-1.2.7.tar.gzcd cobar-server-1.2.7相关说明a、基本目录如果您还没有下载Cobar,请先进入Cobar Release下载最新Cobar压缩包。

cobbler自动化系统安装——详细

cobbler自动化系统安装——详细

Cobbler 安装文档cobbler集成了PXE、DHCP、DNS、Kickstart服务管理和yum仓库管理工具,相对之前的Kickstart 更加快捷、方便的批量布署redhat、centos类系统cobbler 客户端koan支持虚拟机安装和操作系统重装cobbler web界面可以更好的方便用户操作具体安装如下:1、安装rpmforce源:Wgethttp://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS/rpmforge-release-0.3.6-1. el5.rf.x86_64.rpmRpm -ivh rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm可能会报错需要安装python-netaddr相关依赖包wget rpm –ivhftp:///linux/epel/5/x86_64/python-netaddr-0.5.2-1.el5.noarch.rpm Rpm –ivh python-netaddr-0.5.2-1.el5.noarch.rpmwget ftp:///linux/epel/5/x86_64/mod_wsgi-3.2-2.el5.x86_64.rpm rpm -ivh mod_wsgi-3.2-2.el5.x86_64.rpm2、安装semanage命令的包policycoreutils-pythonyum -y install policycoreutils-python3、安装pykickstartyum -y install pykickstart4、开始安装cobbleryum –y install cobbler httpd rsync tftp-server xinetd dhcp/etc/init.d/cobblerd start/etc/init.d/httpd start启动apache的时候报Invalid command 'WSGIScriptAliasMatch', perhaps misspelled or defined by a module not included in the server configuration需要手动开启wsgi模块vim /etc/httpd/conf.d/wsgi.confLoadModule wsgi_module modules/mod_wsgi.so 前面#去掉即可3、检查cobbler配置cobbler check如果出现下面错误检查selinux 是否已被关闭httpd does not appear to be running and proxying cobblersetenforce 01 : The 'server' field in /etc/cobbler/settings must be set to something other thanlocalhost, 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 than 127.0.0.1, and should match the IP of the boot server on the PXE network.3 : 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 installed 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 requirements.4 : debmirror package is not installed, it will be required to manage debian deployments and repositories安装依赖包yum install ed patch perl perl-Compress-Zlib perl-Cwd perl-Digest-MD5 perl-Digest-SHA1 perl-LockFile-Simple perl-libwww-perlrpm -ivh ftp:///linux/epel/5/ppc/debmirror-20090807-1.el5.noarch.rpm需要注销这两行vim /etc/debmirror.conf#@arches="i386"#@dists="sid"5 : ksvalidator was not found, install pykickstart6 : The default 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 oneopenssl passwd -1 -salt '任意字母' '你的密码'生成密码替换/etc/cobbler/settings default_password_crypted: "$1$icifbsa$GlSk4KZPpIscQsOpLkZh0/"默认密码7 : fencing tools were not found, and are required to use the (optional) power management features. install cman or fence-agents to use them 安装cmanwget ftp:///linux/epel/5/ppc/debmirror-20090807-1.el5.noarch.rpm 1)vim /etc/cobbler/settingsserver: 192.168.23.128 设置cobbler server的IPnext_server: 192.168.23.128 设置PXE server的IPmanage_dhcp: 1 开启管理DHCP服务default_kickstart: /var/lib/cobbler/kickstarts/default.ks 设置默认的kickstart配置文件2)关闭防火墙和selinux3)获取启动镜像cobbler get-loaders4)启动tftp和rsyncvim /etc/xinetd.d/tftp将disable=yes 改为disable=novim /etc/xinetd.d/rsync将disable=yes 改为disable=no然后重启xinetd5)修改DHCP模板,确保DHCP分配的地址和cobbler在同一网段注:编辑/etc/cobbler/dhcp.template 在后面执行cobbler sync时会自动同步到/etc/dhcp.confsubnet 192.168.23.0 netmask 255.255.255.0 {option routers 192.168.1.5;# option domain-name-servers 192.168.1.1;option subnet-mask 255.255.255.0;range dynamic-bootp 192.168.23.100 192.168.23.254;filename "/pxelinux.0";default-lease-time 21600;max-lease-time 43200;next-server $next_server;}5、同步cobbler配置,使修改生效:cobbler sync挂载linux 光盘生成安装镜像mount -o loop /dev/cdrom /mnt/cobbler import --path=/mnt/ --name=Centos5.5-i386 这个过程需要一定的时间6、配置Cobbler_web1)安装依赖组件Django和mod_sslyum -y install Djangoyum -y install mod_ssl2)安装cobbler_webyum -y install cobbler_web3)重启httpd以让ssl服务生效service httpd restart4)为Cobbler用户修改密码htdigest /etc/cobbler/users.digest "Cobbler" cobbler5)为Cobbler Web增加新用户htdigest /etc/cobbler/users.digest "Cobbler" new_name设置/etc/cobbler/modules如下:[authentication]module = authn_configfile 这里不设置web页面无法登陆[authorization]module = authz_allowall重启Cobbler服务:service cobblerd restart8、编辑profile文件,修改kickstart启动文件名为CentOS5.5-i386.kscobbler profile edit --name=CentOS6.2-i386 --distro=CentOS6.2-i386 --kickstart=/var/lib/cobbler/kickstarts/CentOS5.5-i386.kscobbler sync 执行同步配置文件9、配置kickstart 脚本,根据需求添加所需参数。

Symantec Backup Exec 2023安装配置文档 - 副本

Symantec Backup Exec 2023安装配置文档 - 副本

目录1.软件安装 (1)1.1.安装前提 (1)1.2.安装主备份服务器 (1)1.3.安装客户端 (10)1.3.1.远程安装(举荐) (10)2.软件配置 (18)2.1.添加许可序列号和组件 (18)2.2.用户登录和创建用户 (23)3.设备配置 (25)3.1.带库(带机)配置 (25)3.2.磁盘 (28)4.备份和复原 (33)4.1.文件备份 (33)4.2.MSSQL备份 (50)4.3.MSSQL复原 (55)4.4.Exchange备份 (65)4.5.Exchange复原 (70)文档信息文档信息版本变更记录1.软件安装1.1.安装前提主备份服务器建议安装Windows 2023 R2 X64操作系统,内存建议4GB(至少2GB),备份软件安装和运用空间25GB;主备份服务器不能安装有SQL Server数据库;备份Exchange,须要在主备份服务器上安装版本一样的Exchange管理工具。

客户端必需是Windows 2023 SP1以上版本(不再支持Windows 2000系列),内存建议1GB以上(至少512MB),备份软件安装和运用空间大约450MB,C盘至少预留4~5GB空间(大约2GB用于虚拟内存缓存,2GB用于VSS备份快照缓存)。

主备份挂载好存储外设,如:磁盘阵列、IPSAN存储、磁带设备等。

并且驱动程序正确安装。

主备份服务器和客户端通讯正常,名称解析正常。

1.2.安装主备份服务器注:安装Backup Exec 2023,须要安装Dotnet 4.1,须要先安装IIS等组件,须要从启服务器。

点击“安装”,安装“Backup Exec”BE服务器软件。

同意许可协议。

选择“典型安装”。

选择要创建存储的设备。

4.备份和复原4.1.文件备份右键选择要备份的服务器,选择“备份”—“备份到磁盘”选择“编辑”选项。

选择要备份的文件夹或文件夹。

选择“编辑”选项。

配置完全备份的周期。

cobbler自动化系统安装——详细

cobbler自动化系统安装——详细

cobbler自动化系统安装——详细一、介绍Cobbler是一个开源的自动化系统安装和配置管理工具,它能够匡助管理员实现快速、高效的操作系统安装、配置和更新。

本文将详细介绍如何安装和配置Cobbler自动化系统安装。

二、环境准备1. 操作系统:CentOS 7.0或者更高版本2. 硬件要求:至少1个物理服务器或者虚拟机,4GB以上内存,30GB以上磁盘空间3. 网络要求:确保服务器能够访问互联网,并且开放80、443、69、25150、25151端口三、安装Cobbler1. 更新系统使用以下命令更新系统软件包:```sudo yum update -y```2. 安装Cobbler使用以下命令安装Cobbler及其依赖包:```sudo yum install cobbler cobbler-web httpd dhcp tftp-server pykickstart -y```3. 配置Cobbler编辑Cobbler的主配置文件`/etc/cobbler/settings`,根据实际情况修改以下配置项:- `server`:设置Cobbler服务器的IP地址或者主机名- `next_server`:设置PXE引导时的TFTP服务器地址- `manage_dhcp`:设置为1,启用Cobbler管理DHCP服务- `manage_dns`:设置为1,启用Cobbler管理DNS服务- `pxe_just_once`:设置为1,确保惟独一个PXE服务器在网络上运行4. 配置DHCP服务编辑DHCP服务配置文件`/etc/cobbler/dhcp.template`,根据实际情况修改以下配置项:- `subnet`:设置子网地址和子网掩码- `option routers`:设置默认网关- `option domain-name-servers`:设置DNS服务器地址5. 配置TFTP服务编辑TFTP服务配置文件`/etc/xinetd.d/tftp`,将`disable`改为`no`,保存并退出。

Cobbler自动化安装部署操作系统

Cobbler自动化安装部署操作系统

Cobbler⾃动化安装部署操作系统备注:Cobbler是快速⽹络安装linux操作系统的服务,⽀持众多的Linux发⾏版:Red Hat、Fedora、CentOS、Debian、Ubuntu和SUSE,也可以⽀持⽹络安装windows。

配置⽹络1、配置主服务器⽹络,设置UP状态⽹卡IP地址,需要连通外⽹。

vi /etc/sysconfig/network-scripts/ifcfg-ens33TYPE=EthernetPROXY_METHOD=noneBROWSER_ONLY=noBOOTPROTO=staticDEFROUTE=yesIPV4_FAILURE_FATAL=noIPV6INIT=yesIPV6_AUTOCONF=yesIPV6_DEFROUTE=yesIPV6_FAILURE_FATAL=noIPV6_ADDR_GEN_MODE=stable-privacyNAME=ens33UUID=8946f2b4-d969-4db0-9f67-c51576b3fd43DEVICE=ens33ONBOOT=yesIPADDR=192.168.88.160NETMASK=255.255.255.0GATEWAY=192.168.88.1关闭防⽕墙1、SELinux默认是SELINUX=enforcing状态,永久有效需要修改vi /etc/sysconfig/selinux,然后reboot重启系统vi /etc/sysconfig/selinux# This file controls the state of SELinux on the system.# SELINUX= can take one of these three values:# enforcing - SELinux security policy is enforced.# permissive - SELinux prints warnings instead of enforcing.# disabled - No SELinux policy is loaded.SELINUX=disabled# SELINUXTYPE= can take one of three values:# targeted - Targeted processes are protected,# minimum - Modification of targeted policy. Only selected processes are protected.# mls - Multi Level Security protection.SELINUXTYPE=targeted2、查看SELinux状态[root@localhost ~]# getenforceDisabled3、查看系统防⽕墙[root@localhost ~]# systemctl status firewalld.service● firewalld.service - firewalld - dynamic firewall daemonLoaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)Active: active (running) since Sun 2019-12-29 16:47:30 CST; 2s agoDocs: man:firewalld(1)Main PID: 18456 (firewalld)Tasks: 2CGroup: /system.slice/firewalld.service└─18456 /usr/bin/python2 -Es /usr/sbin/firewalld --nofork --nopidDec 29 16:47:30 localhost.localdomain systemd[1]: Starting firewalld - dynamic firewall daemon...Dec 29 16:47:30 localhost.localdomain systemd[1]: Started firewalld - dynamic firewall daemon.[root@localhost ~]#4、关闭系统防⽕墙[root@localhost ~]# systemctl stop firewalld.service[root@localhost ~]# systemctl disable firewalld.service[root@localhost ~]# systemctl status firewalld.service● firewalld.service - firewalld - dynamic firewall daemonLoaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)Active: inactive (dead)Docs: man:firewalld(1)Dec 29 16:47:30 localhost.localdomain systemd[1]: Starting firewalld - dynamic firewall daemon...Dec 29 16:47:30 localhost.localdomain systemd[1]: Started firewalld - dynamic firewall daemon.Dec 29 16:50:18 localhost.localdomain systemd[1]: Stopping firewalld - dynamic firewall daemon...Dec 29 16:50:18 localhost.localdomain systemd[1]: Stopped firewalld - dynamic firewall daemon.[root@localhost ~]#系统信息备注:通过查看系统信息,根据系统版本安装对应的RPM安装包。

cobbler部署

cobbler部署

cobbler部署平台:redhat enterprise 6.3 x86_641、删除redhat原有yumrpm -qa | grep yum | xargs rpm -e --nodeps2、安装包名称:/centos/6/os/x86_64/Packages/yum-3.2.27-14.el6.centos.noarch.rpmyum-metadata-parser-1.1.2-14.1.el6.x86_64.rpmyum-plugin-fastestmirror-1.1.26-11.el6.noarch.rpmpython-iniparse-0.3.1-2.1.el6.noarch.rpm同时安装yum-plugin与yumyum clean all3、redhat扩展包epel下载地址:[cobbler包在epel可以yum install安装] /fedora/epel/6/x86_64/epel-release-6-7.noarch.rpm安装dhcp,xinetd,rsync,tftpyum install dhcpyum install xinetdyum install rsyncyum install tftp-server tftp[tftp client]安装cobbleryum install cobbler注:关闭selinux /etc/sysconfig/selinux 临时关闭setenforce 0 关闭防火墙iptables [也可配置,/etc/sysconfig/iptables打开对应端口]4、启动cobbler/etc/init.d/cobblerd start启动httpdcobbler check[检查]根据提示修改相关配置,例:1) /etc/cobbler/settings server更改为对应ip,next-server改为对应ip[tftp-server]2) 更改tftp和rsync [/etc/xinetd.d] disabled为no3) 运行cobbler get-loaders4) 修改cobbler用户的默认密码,可以使用如下命令生成密码,并使用生成后的密码替换/etc/cobbler/settings中的密码。

Cobbler实现基于Linux内核的操作系统自动部署

Cobbler实现基于Linux内核的操作系统自动部署

2017年第10期信息与电脑China Computer&Communication计算机工程应用技术Cobbler实现基于Linux内核的操作系统自动部署罗 波(北京工业职业技术学院,北京 100042)摘 要:当维护机房时,通常需要批量部署几十甚至上百台服务器,实现自动化安装操作系统尤为重要。

虽然使用PXE+Kickstart实现了自动化安装,但只能实现单一版本安装,当需要自动部署不同版本Linux或不同引导模式(BIOS、EFI)时,此种方式就体现出不足。

笔者阐述了Cobbler的工作原理,介绍了Cobbler的安装配置及使用方法。

关键词:Cobbler;自动部署;Linux中图分类号:TP316-4 文献标识码:A 文章编号:1003-9767(2017)10-033-03Cobbler Automates the Deployment of Operating Systems based on the LinuxKernelLuo Bo(Beijing Polytechnic College, Beijing 100042, China)Abstract: When we are in the maintenance of the engine room, it usually needs to batch deployment of dozens or even hundreds of servers, it is particularly important to realize automatic installation and operating system. While using PXE + Kickstart automated installation, but only to realize single version installed, when you need to automatically deploy different versions of Linux boot mode (BIOS, EFI), which is insufficient. The author describes the working principle of Cobbler, introduces the installation and usage of Cobbler.Key words: Cobbler; automatic deployment; LinuxCobbler是一款自动化操作系统部署工具,项目最初在2008年左右发布,使用Python语言开发,小巧轻便,是对PXE的二次封装。

CentOS_6.0安装 Oracle_10g_R2参考手册

CentOS_6.0安装 Oracle_10g_R2参考手册

CentOS 6.0安装Oracle 10g R2参考手册1.查询所需安装包是否完整系统管理员可以使用rpm -qa | grep rpm_name命令来查询某个软件包是否已经安装,若尚未安装,则可以使用rpm -ihv rpm_name命令安装该软件包。

Libaio-devel、unixODBC、unixODBC-devel这三个软件包通常都未安装。

[root@CentOS ~]# rpm -q binutils compat-libstdc++-33 elfutilselfutils-libelf-devel gcc gcc-c++ glibc glibc-common glibc-devel glibc-headers libaio libaio-devel libgcc libstdc++ libstdc++-devel make sysstat unixODBC unixODBC-devel如果提示package rpm_name is not installed,只需要挂载CentOS安装光盘,进入到Packages文件夹中,安装相应缺失包即可,如[root@CentOS ~]# rpm -ihv libaio-devel*.rpm再次运行rpm -qa | grep rpm_name命令,查看包是否全安装好。

2.设置正确的内核参数Kernel Parameter①将以下参数设置加入到/etc/sysctl.conf末尾中,这样每次操作系统启动时,便会自动设置这些内核参数,而不需要每次都人工设置[root@CentOS ~]#vi /etc/sysctl.conf在文件末尾添加如下参数:# Kernel Parameters for Oracle Database 10gfs.file-max = 6553600kernel.shmall = 2097152kernel.shmmax = 2147483648kernel.shmmni = 4096kernel.sem = 250 32000 100 128net.ipv4.ip_local_port_range = 1024 65000net.core.rmem_default = 4194304net.core.rmem_max = 4194304net.core.wmem_default = 262144net.core.wmem_max = 262144②因为默认CentOS 6.0不支持10.2.0需修改配置文件,使CentOS 6.0 支持Oracle 10g .[root@CentOS ~]# vi /etc/redhat-release直接修改内容为CentOS Linux release 4.0 (Final)保存后执行[root@CentOS ~]# sysctl –p使/etc/sysctl.conf设置值生效。

cobbler搭建-按照步骤能成功

cobbler搭建-按照步骤能成功

# mkdir -p /var/lib/libvirt/images# df -h | grep /data/dev/sda4 406G 33G 353G 9% /data <---- 确定设备/data/soft/rhel-server-6.5-x86_64-dvd.iso 3.6G 3.6G 0 100% /yum/data/soft/rhel-server-6.5-x86_64-dvd.iso 3.6G 3.6G 0 100% /data/yum# blkid /dev/sda4/dev/sda4: UUID="ce008959-bf02-4a1e-aa99-每个同学都不一样" TYPE="ext4"# vim /etc/fstab....UUID="ce008959-bf02-4a1e-aa99-84235fdb9f05" /var/lib/libvirt/images ext4 defaults 0 0 # mount -a# df -h..../dev/sda4 406G 33G 353G 9% /var/lib/libvirt/images=================================================================必须先配置好yum源如果不知道怎么配置yum源:# rm -rf /etc/yum.repos.d/*# sed -i 's/gpgcheck=1/gpgcheck=0/' /etc/yum.conf# yum-config-manager --add-repo=http://10.1.1.10/el65/# yum repolist# wget -O /tmp/download.sh http://10.1.1.10:8081/vmimages/download.sh# wget -O /tmp/build-br0.sh http://10.1.1.10:8081/vmimages/build-br0.sh# chmod 755 /tmp/download.sh# chmod 755 /tmp/build-br0.sh# /tmp/build-br0.sh eth0 172.16.?.? 255.255.0.0# vim /etc/sysconfig/network-scripts/ifcfg-br0:1DEVICE=br0:1ONBOOT=yesBOOTPROTO=noneIPADDR=10.1.1.12 <---自己更改IPNETMASK=255.255.0.0# service network restart以后可以使用10.1.1.10 或172.16.2.8访问笔记# wget -O /tmp/download.sh http://172.16.2.8:8081/vmimages/download.sh# chmod 755 /tmp/download.sh# /tmp/download.sh以后电脑就不能直接使用eth0网卡,而是使用br0接口,如果需要配置多个IP,应该给br0设定子接口:br0:1,br0:2 ,绝对不能给eth0设定IP打开虚拟机管理界面# virt-manager# vmctl start server1 如果虚拟机不存在会新建一个,并且启动,如果虚拟机已经存在会自动启动# vmctl reset server1 还原虚拟机# vmctl fullreset server1 彻底还原虚拟机# virt-viewer server2 查看虚拟机屏幕=================================================================Linux操作系统组成:Linux内核+各种上层程序安装系统的本质:把内核、各种程序和配置文件拷贝存储设备(硬盘)系统的启动过程:Bios加电自检(对基础硬件做一个简单检测:cpu,内存,显卡显存等)----> 根据主板的设定,选择一个引导设备(硬盘、光驱、外置块设备、网卡)----> 通过引导设备获得引导代码---> 产生int 19号中断---> 执行引导代码(例如:grub)----> 引导程序读取配置文件,根据设定选择一个将要启动系统---> 加载相应系统对应内核vmlinuz和基础硬件驱动镜像文件initramfs到内存----> grub把执行权限交给内核,内核开始运行(对系统的基础硬件进行驱动,这是系统是存在于内存中)-----> 内核执行第一个真正意义上的程序/sbin/init (来自硬盘的根目录下/sbin/init)----》init进程对系统进行一系列的初始化:让内核把之前运行内存的系统根目录转移到硬盘的系统根目录,生成各种设备文件在/dev/,对selinux 做初始化..... ----> 根据启动级别执行相应服务启动脚本---》---> /etc/rc.d/rc.local ---->通过引导设备获得引导代码:通过硬盘,光驱、外置块设备(U盘、移动硬盘等)的MBR中读取引导代码通过网卡从远端服务器去下载引导代码MBR主引导记录,存放块设备上的第一个扇区(512字节)| 446 字节| 64 字节| 2 字节|| 引导代码| 主分区表| 标记|无人值守自动化安装系统的必要条件:机器要有一个支持pxe(网络引导)的网卡网络中必须存在相应的服务器:dhcp服务器:分配IP和指定下载引导代码的地址信息tftp服务器:提供引导代码的下载、提供安装向导的内核和驱动镜像文件安装源服务器:可以是ftp,http,nfs的形式提供,提供安装所需要的所有文件(来自系统光盘)无人值守的原理:设定机器使用网卡进行引导开机,bois决定使用网卡引导,让网卡广播一个dhcp的请求数据包,期望dhcp服务器给本机分配一个IP(网络通信需要的IP信息/掩码等)并且告诉本机从哪个ip对应tftp服务器去下载引导代码引导代码下载完毕之后,bios就把执行权限交给了引导代码,引导代码开始执行引导代码执行之后:读取引导配置文件去tftp服务器下载安装系统向导界面(其实也是一个专用的操作系统)所需要的内核和驱动镜像引导程序的任务已经完成了,现在开始去执行内核(安装向导界面系统的内核),并且加载相应的驱动可以在执行内核的时候传递一个ks的内核参数,告诉内核去根据该参数指定的配置文件,自动完成剩下安装步骤在安装系统的过程中,所需要所有程序、文件都是来自网络中的服务器(ftp,http,nfs)准备实验环境:安装服务器--没有dhcp功能的隔离网络---> 用于测试网络安装的机器安装服务器的要求:静态IP虚拟机实现的话,最好带一个光驱,这样就可以方便部署安装源一、部署好安装源所需要的所有系统文件本例决定使用http协议提供安装源下载# mkdir -p /var/www/html/os# mount /dev/cdrom /var/www/html/os# vim /etc/fstab.../path/to/rhel6.6.iso /var/www/html/os/ iso9660 defaults,ro,loop 0 0 如果这是一个先生的真实部署的安装服务器,那么建议把光盘挂载到别的目录,然后把光盘里的所有文件拷贝到安装目录里:# mkdir -p /var/www/html/os# mount /path/to/rhel6.6.iso /mnt# cp -a /mnt/* /var/www/html/os# vim /etc/yum.repos.d/rhel-source.repo[Base]name=Basebaseurl=file:///var/www/html/osgpgcheck=0# rm -rf /etc/httpd/# yum install httpd -y 如果以前已经安装过那就yum reinstall httpd -y# chkconfig httpd on# rm -rf /etc/httpd/conf.d/welcome.conf 是为了可以直接把网站根目录下的文件进行列表输出# service httpd restart确保selinux是关闭的# getenforceDisabled 或者Permissive测试:http://IP/os二、准备好一台dhcp服务器# yum install dhcp -y# cp /usr/share/doc/dhcp-4.1.1/dhcpd.conf.sample /etc/dhcp/dhcpd.conf# vim /etc/dhcp/dhcpd.confdefault-lease-time 600;max-lease-time 7200;allow booting; <------ 添加以下两行allow bootp;next-server 192.168.110.2; <---指定tftp服务器的ipfilename "pxelinux.0"; <---- 指定引导代码文件的名字log-facility local7;subnet 192.168.110.0 netmask 255.255.255.0 {range 192.168.110.50 192.168.110.250;option routers 192.168.110.1;}# service dhcpd start三、部署tftp服务器# yum install tftp-server xinetd -y# vim /etc/xinetd.d/tftpservice tftp{socket_type = dgramprotocol = udpwait = yesuser = rootserver = /usr/sbin/in.tftpdserver_args = -s /var/lib/tftpbootdisable = noper_source = 11cps = 100 2flags = IPv4}# chkconfig xinetd on# service xinetd restart# lsof -i:69COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME xinetd 2385 root 5u IPv4 12615 0t0 UDP *:tftp部署tftp上的引导代码以及引导配置文件# yum install syslinux -y# cp /usr/share/syslinux/pxelinux.0 /var/lib/tftpboot/ <---引导代码# cp /var/www/html/os/isolinux/* /var/lib/tftpboot/# ls /var/lib/tftpbootboot.cat initrd.img(安装向导的驱动)memtest splash.jpg vmlinuz(安装向导的内核)boot.msg isolinux.bin pxelinux.0 TRANS.TBLgrub.conf isolinux.cfg pxelinux.cfg vesamenu.c32# mkdir /var/lib/tftpboot/pxelinux.cfg# cp /var/lib/tftpboot/isolinux.cfg /var/lib/tftpboot/pxelinux.cfg/default编辑引导配置文件label mylinux <---标签,与其他条目区分开menu label ^Kickstar install rhel6u5 <---显示的条目的名字menu default <---把其他label条目下的menu default注释掉kernel vmlinuzappend initrd=initrd.img ks=http://192.168.110.2/ks/el6.cfg说明:ks告诉安装向导的内核,去哪里下载无人值守安装脚本编辑kickstar配置文件# yum install system-config-kickstart pykickstart -y确定执行创建配置文件的工具的系统已经配置好相应系统的yum源# mkdir /var/www/html/ks# system-config-kickstart生成配置文件之后,把配置文件保存服务器上,保证可以通过http://192.168.110.2/ks/el6.cfg获得测试:启动一个处于同一个网段的客户机去测试==================================================要求在网络中增加DNS服务器,为了节省实验的机器,我们今天直接在安装服务器上部署DNS# yum install bind-* -y# vim /etc/named.confoptions {directory "/var/named";};zone "" IN {type master;file "data/.zone";};zone "110.168.192.in-addr.arpa" IN {type master;file "data/master.110.168.192.in-addr.arpa";};# vim /var/named/data/.zone$TTL 86400@ IN SOA . admin. (201508040115M10M1D1H )@ IN NS .ns1 IN A 192.168.110.3installer IN CNAME ns1$GENERATE 1-254 node$ IN A 192.168.110.$# vim /var/named/data/master.110.168.192.in-addr.arpa $TTL 86400@ IN SOA 110.168.192.in-addr.arpa. root. (201508040115M10M1D1H )@ IN NS .3 IN PTR .$GENERATE 1-254 $ IN PTR node$. # service named start# chkconfig named on建议修改DNS服务器本机的解析文件# vim /etc/resolv.confnameserver 192.168.110.3 <---这是本机的IPnameserver 114.114.114.114测试# dig A @192.168.110.3 # dig A @192.168.110.3 # dig @192.168.110.3 -x 192.168.110.4 测试反向解析============================================================================== 为了让处在隔离网络的虚拟机可以联网:1)在宿主机添加地址映射规则# iptables -t nat -F# iptanles -F# iptables -t nat -A POSTROUTING -s 192.168.110.0/24 -o br0 -j SNAT --to-source 172.16.2.8 @@@ 必须把上面的172.16.2.8替换成自己宿主机的br0的IP(172.16.?.?)@@@2) 宿主机必须打开路由转发功能# vim /etc/sysctl.confnet.ipv4.ip_forward = 1# sysctl -p3)虚拟机里必须这定网关为宿主机的192.168.110.1,设定DNS为114.114.114.114http://cobbler.github.io/manuals/quickstart/# rpm -ivh rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm epel-release-6-8.noarch.rpm# yum install cobbler cobbler-web -y# service cobblerd start# service httpd start# chkconfig httpd on# vim /etc/cobbler/dhcp.template <---修改dhcp管理的网段# vim /etc/cobbler/settingsmanage_dhcp: 1 <---把0修改成1 代表cobbler帮我们自动维护dhcp ,但是dhcp的软件包要自己提前安装# service cobblerd restart 修改了配置文件就重启服务# cobbler check会提示tftp,dhcp没有安装保证tftp启动# chkconfig xinetd on ;service xinted restart只需要把dhcp安装完毕,让他在其中一个有效的网段去分配IP,然后启动起来,后面cobbler会自动应用模板覆盖配置要下载loader,如果机器不能联网,可以同笔记目录下载http://10.1.1.10:8081/soft/Cobbler/loader ---> /var/lib/cobbler/loaders按照所有的提示修正之后,一般还有一些提示可以不解决1 : SELinux is enabled. Please review the following wiki page for details on ensuring cobbler works correctly in your SELinux environment:https:///cobbler/cobbler/wiki/Selinux2 : debmirror package is not installed, it will be required to manage debian deployments and repositories3 : fencing tools were not found, and are required to use the (optional) power management features. install cman or fence-agents to use them最后重启cobblerd# service cobblerd restart输入以下命令应用配置:根据之前的设定去自动完成配置# cobbler synchttp://192.168.110.3/cobbler_web默认帐号cobbler:cobbler如果要更改web界面登录密码# htdigest /etc/cobbler/users.digest "Cobbler" cobbler最后一个参数就是代表默认为cobbler,该命令表示要给用户cobbler更改密码# htdigest /etc/cobbler/users.digest "Cobbler" admin 添加一个新用户admin,并且设定密码# service cobblerd restart# service httpd restart把一个需要引导安装系统光盘iso镜像手工挂载到cobbler服务器上的某个临时目录# mount /dev/sr0 /mnt 《---- 本例子使用虚拟机的光驱,装载了一个rhl6.6的镜像回到cobbler的web界面点击Import DVDPrefix :rhel6u5Arch : x86_64Path: /mnt 《---该光盘惊险挂载的所在路径点击run 开始导入,需要等待一段时间,等待导入完毕,可以通过看日志判断是否导入成功(点击菜单Events查看日志)导入完毕之后,会自动生成一个引导条目,点击Profile即可看到。

Cobbler自动化安装操作系统手册

Cobbler自动化安装操作系统手册

xmlrpclib.Fault: <Fault 1: "cobbler.cexceptions.CX:'login failed'"> 查看导入列表,如果报如下内容,需要重启 cobbler,并执行 cobbler get-loaders. service cobblerd restart cobbler get-loaders
重启防火墙使配置生效:/etc/init.d/iptables restart 关闭防火墙: serviceiptables stop 开机 off:chkconfigiptables off 验证:serviceiptables status
3、安装 Cobbler
安装 centos6.x 64 位 cobbler 依赖源和 cobbler #安装 centos6.xcobbler 依赖源 cd /usr/local/src wget/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm rpm –ivhepel-release-6-8.noarch.rpm #安装 cobbler yuminstall cobbler tftptftp-server xinetddhcphttpdrsync #安装运行 cobbler 依赖软件包 yum installpykickstartdebmirrorpython-ctypescman 备注: wget /pub/epel/5/i386/epel-release-5-4.noarch.rpm #CentOS 5.x 32 位 wget /pub/epel/5/i386/epel-release-5-4.noarch.rpm #CentOS 5.x 32 位 wget /pub/epel/6/i386/epel-release-6-8.noarch.rpm #CentOS6.x 32 位
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

目录1.Cobbler的安装 (2)2.Cobbler的配置 (2)3.配置Cobbler_web (4)4.导入光盘及建立Profile (5)5.配置Kickstart的启动文件 (5)6.安装系统 (7)1.Cobbler的安装1.下载rpmforge的repository RPM# wget /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.el6.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,并按照提示下的项进行配置# 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 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 tosomething other 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 correctlyin 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/.*5 : you need to set some SELinux rules if you want to use cobbler-web (an optionalpackage), run the following: /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 installed 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 requirements.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 default 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' 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/dhcp.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 "/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";default-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 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相关权限。

相关文档
最新文档