侧边栏壁纸
博主头像
落叶人生博主等级

走进秋风,寻找秋天的落叶

  • 累计撰写 130562 篇文章
  • 累计创建 28 个标签
  • 累计收到 9 条评论
标签搜索

目 录CONTENT

文章目录

cobbler使用

2023-11-20 星期一 / 0 评论 / 0 点赞 / 68 阅读 / 6020 字

1.概述 Distros 定义外部内核文件和init,import内部 Profiles定义安装配置,指定kickstart文件和lab Repos 管理镜像 2.安装和配置cobble

1.概述

    Distros 定义外部内核文件和init,import内部

    Profiles 定义安装配置,指定kickstart文件和lab

    Repos 管理镜像

2.安装和配置cobbler

centos6.8 192.168.195.213

    安装

# 安装yum源,yum源连接:dl.fedoraproject.org/pub/epel/[root@localhost ~]# rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm[root@localhost ~]# yum list all cobbler已加载插件:fastestmirrorLoading mirror speeds from cached hostfile * base: mirrors.163.com * epel: mirrors.tuna.tsinghua.edu.cn * extras: mirrors.163.com * updates: mirrors.cn99.com已安装的软件包cobbler.x86_64                   2.6.11-1.el6                               @epel# 安装cobbler组件[root@localhost ~]# yum -y install cobbler httpd cobbler-web debmirror pykickstart

    启动

[root@localhost cobbler]# service httpd start正在启动 httpd:[root@localhost cobbler]# service cobblerd startStarting cobbler daemon:                                   [确定][root@localhost cobbler]# ss -tuanlp | grep cobblertcp    LISTEN     0      5              127.0.0.1:25151                 *:*      users:(("cobblerd",1490,8))

    配置

# 检查cobbler配置[root@localhost cobbler]# cobbler checkThe following are potential configuration items that you may want to fix:1 : 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 to something other than 127.0.0.1, and should match the IP of the boot server on the PXE network.3 : change 'disable' to 'no' in /etc/xinetd.d/tftp4 : 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.5 : change 'disable' to 'no' in /etc/xinetd.d/rsync6 : file /etc/xinetd.d/rsync does not exist7 : since iptables may be running, ensure 69, 80/443, and 25151 are unblocked8 : comment out 'dists' on /etc/debmirror.conf for proper debian support9 : comment out 'arches' on /etc/debmirror.conf for proper debian support10 : 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 one11 : fencing tools were not found, and are required to use the (optional) power management features. install cman or fence-agents to use themRestart cobblerd and then run 'cobbler sync' to apply changes.# 更改响应配置[root@localhost cobbler]# vim /etc/cobbler/settingsserver: 192.168.195.213next_server: 192.168.195.213[root@localhost cobbler]# vim /etc/xinetd.d/tftpdisable                 = no[root@localhost cobbler]# cobbler get-loaders # 需要联网[root@localhost cobbler]# vim /etc/xinetd.d/rsyncdisable = no[root@localhost cobbler]# cobbler sync[root@localhost cobbler]# service iptables stop[root@localhost cobbler]# vim /etc/debmirror.conf#@dists="sid";#@arches="i386";[root@localhost cobbler]# openssl passwd -1 -salt 'openssl rand -hex 4'Password: $1$openssl $rALaBX04PfE0AZemCjcoy1[root@localhost cobbler]# vim /etc/cobbler/settingsdefault_password_crypted: "$1$openssl $rALaBX04PfE0AZemCjcoy1"[root@localhost cobbler]# yum -y install cman fence-agents# 重启cobblerd[root@localhost cobbler]# service cobblerd restartStopping cobbler daemon:                                   [确定]Starting cobbler daemon:                                   [确定][root@localhost cobbler]# cobbler checkThe following are potential configuration items that you may want to fix:1 : file /etc/xinetd.d/rsync does not existRestart cobblerd and then run 'cobbler sync' to apply changes.

3.配置及启动cobbler所依赖的服务

[root@localhost ~]# cd /etc/cobbler/[root@localhost cobbler]# vim settingsmanage_dhcp: 0manage_dns: 0# 默认为0 不需要cobbler管理,改为1cobbler管理modules下定义的dns dhcp服务[root@localhost cobbler]# vim modules.conf

    这里独立管理,不通过cobbler管理dhcp、tftp、rsync及dns服务

[root@localhost dhcp]# yum -y install dhcp[root@localhost dhcp]# rpm -q tftp-servertftp-server-0.49-8.el6.x86_64# 配置dhcp服务[root@localhost dhcp]# cd /etc/dhcp/[root@localhost dhcp]# cp /usr/share/doc/dhcp-4.1.1/dhcpd.conf.sample ./dhcpd.conf cp:是否覆盖"./dhcpd.conf"? y[root@localhost dhcp]# vim dhcpd.confoption domain-name "test.com";option domain-name-servers 192.168.10.254 172.16.0.1;default-lease-time 43200;max-lease-time 86400;subnet 192.168.10.0 netmask 255.255.255.0 {        range 192.168.10.21 192.168.10.100;        option routers 192.168.10.254;}# 命令行模式下:,.$d# 删除余下

1:10

广告 广告

评论区