CentOS+Cobbler安装配置

1.安装epel;

[[email protected] apps]# wget http://mirrors.ustc.edu.cn/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm
[[email protected] apps]# rpm -ivhepel-release-6-8.noarch.rpm

2.安装cobbler相关服务;

[[email protected] apps]# yum install -ycobbler httpd tftp-server xinetd dhcp rsync

3.启动相关服务并且检查配置;

[[email protected] ~]# chkconfig httpd on
[[email protected] ~]# chkconfig cobbleron
[[email protected] ~]# chkconfig xinetdon
[[email protected] apps]#/etc/init.d/cobblerd restart
Stopping cobbler daemon:                                   [  OK  ]
Starting cobbler daemon:                                   [  OK  ]
[[email protected] apps]#/etc/init.d/httpd restart
Stopping httpd:                                           [  OK  ]
Starting httpd: httpd:apr_sockaddr_info_get() failed for cobbler-server
httpd: Could not reliably determine theserver‘s fully qualified domain name, using 127.0.0.1 for ServerName
                                                          [  OK  ]
[[email protected] apps]# cobbler check
The following are potential configurationitems that you may want to fix:
 
1 : The ‘server‘ field in /etc/cobbler/settingsmust be set to something other than localhost, or kickstarting features willnot work.  This should be a resolvablehostname or IP for the boot server as reachable by all machines that will useit.
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 missingfrom /var/lib/cobbler/loaders, you may run ‘cobbler get-loaders‘ to downloadthem, or, if you only want to handle x86/x86_64 netbooting, you may ensure thatyou have installed a *recent* version of the syslinux package installed and canignore this message entirely.  Files inthis directory, should you want to support all architectures, should includepxelinux.0, menu.c32, elilo.efi, and yaboot. The ‘cobbler get-loaders‘ commandis the easiest way to resolve these requirements.
4 : change ‘disable‘ to ‘no‘ in/etc/xinetd.d/rsync
5 : debmirror package is not installed, itwill be required to manage debian deployments and repositories
6 : ksvalidator was not found, installpykickstart
7 : The default password used by the sampletemplates 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 one
8 : fencing tools were not found, and arerequired to use the (optional) power management features. install cman or fence-agentsto use them
 
Restart cobblerd and then run ‘cobblersync‘ to apply changes.

根据上面的提示我们一一进行解决:

1)编辑/etc/cobbler/settings文件,找到server选项,修改成服务器实际IP即可(384行左右)。

384  rver: 10.0.1.7

2)编辑/etc/cobbler/settings文件,找到next_server选项,修改成服务器实际IP即可(272行左右)。

272  xt_server: 10.0.1.7

3)执行cobblerget-loaders,系统自动下载loader程序,完成修复工作。

[[email protected] apps]# cobblerget-loaders

4)编辑/etc/xinetd.d/rsync,把文件中disable字段配置yes改成no。

[[email protected] apps]# vim/etc/xinetd.d/rsync

service rsync

{

disable = no

flags           = IPv6

socket_type     = stream

wait            = no

user            = root

server          = /usr/bin/rsync

server_args     = --daemon

log_on_failure  += USERID

}

5)  提示debmirror没有安装,如果不是debian之类的系统可以忽略。

6)提示需要安装pykickstart。

[[email protected] apps]# yum install -ypykickstart

7)修改cobbler默认密码,并且更改/etc/cobbler/settings文件。

[[email protected] apps]# openssl passwd-1 -salt ‘random-phrase-here‘ ‘123456‘

$1$random-p$mzxQ/Sx848sXgvfwJCoZM0
[[email protected] apps]# vim /etc/cobbler/settings (101行)

101 default_password_crypted:"$1$random-p$mzxQ/Sx848sXgvfwJCoZM0"

8)提示需要安装cman。

[[email protected] apps]# yum install -ycman

4.重启cobbler并且检查配置文件。

[[email protected] apps]#/etc/init.d/cobblerd restart
Stopping cobbler daemon:                                   [  OK  ]
Starting cobbler daemon:                                   [  OK  ]
[[email protected] apps]# cobbler check
The following are potential configurationitems that you may want to fix:
 
1 : debmirror package is not installed, itwill be required to manage debian deployments and repositories
 
Restart cobblerd and then run ‘cobblersync‘ to apply changes.

5.导入安装文件;

[[email protected] apps]# ls
CentOS-6.5-x86_64-bin-DVD1.iso  epel-release-6-8.noarch.rpm
[[email protected]bler-server apps]#mount -o loop -tiso9660 CentOS-6.5-x86_64-bin-DVD1.iso /mnt
[[email protected] apps]# cobbler import--path=/mnt --name=CentOS-6.5-x86_64-bin-DVD1

6.配置DHCP服务;

编辑/etc/cobbler/settings修改242行为1如下:

[[email protected] apps]# vim/etc/cobbler/settings
242 manage_dhcp: 1

编辑/etc/cobbler/dhcp.template修改cobbler dhcp管理模板

[[email protected] apps]# vim/etc/cobbler/dhcp.template
修改如下内容:
subnet 10.0.1.0 netmask 255.255.255.0 {
    option routers              10.0.1.254;
     optiondomain-name-servers  202.106.0.20;
    option subnet-mask        255.255.255.0;
    range dynamic-bootp        10.0.1.100 10.0.1.120;
    default-lease-time          21600;
    max-lease-time             43200;
    next-server                $next_server;
 
[[email protected] apps]#/etc/init.d/xinetd restart
Stopping xinetd:                                          [  OK  ]
Starting xinetd:                                          [  OK  ]

7.同步cobbler配置;

[[email protected] apps]# cobbler sync
task started: 2014-09-03_153036_sync
task started (id=Sync, time=Wed Sep  3 15:30:36 2014)
running pre-sync triggers
cleaning trees
removing:/var/www/cobbler/images/CentOS-6.5-bin-DVD1-x86_64
removing:/var/lib/tftpboot/pxelinux.cfg/default
removing: /var/lib/tftpboot/grub/images
removing:/var/lib/tftpboot/grub/grub-x86_64.efi
removing: /var/lib/tftpboot/grub/efidefault
removing:/var/lib/tftpboot/grub/grub-x86.efi
removing:/var/lib/tftpboot/images/CentOS-6.5-bin-DVD1-x86_64
removing: /var/lib/tftpboot/s390x/profile_list
copying bootloaders
trying hardlink/var/lib/cobbler/loaders/grub-x86_64.efi ->/var/lib/tftpboot/grub/grub-x86_64.efi
trying hardlink/var/lib/cobbler/loaders/grub-x86.efi -> /var/lib/tftpboot/grub/grub-x86.efi
copying distros to tftpboot
copying files for distro:CentOS-6.5-bin-DVD1-x86_64
trying hardlink/var/www/cobbler/ks_mirror/CentOS-6.5-x86_64-bin-DVD1/images/pxeboot/vmlinuz-> /var/lib/tftpboot/images/CentOS-6.5-bin-DVD1-x86_64/vmlinuz
trying hardlink/var/www/cobbler/ks_mirror/CentOS-6.5-x86_64-bin-DVD1/images/pxeboot/initrd.img-> /var/lib/tftpboot/images/CentOS-6.5-bin-DVD1-x86_64/initrd.img
copying images
generating PXE configuration files
generating PXE menu structure
copying files for distro: CentOS-6.5-bin-DVD1-x86_64
trying hardlink/var/www/cobbler/ks_mirror/CentOS-6.5-x86_64-bin-DVD1/images/pxeboot/vmlinuz-> /var/www/cobbler/images/CentOS-6.5-bin-DVD1-x86_64/vmlinuz
trying hardlink/var/www/cobbler/ks_mirror/CentOS-6.5-x86_64-bin-DVD1/images/pxeboot/initrd.img-> /var/www/cobbler/images/CentOS-6.5-bin-DVD1-x86_64/initrd.img
Writing template files forCentOS-6.5-bin-DVD1-x86_64
rendering DHCP files
generating /etc/dhcp/dhcpd.conf
rendering TFTPD files
generating /etc/xinetd.d/tftp
processing boot_files for distro:CentOS-6.5-bin-DVD1-x86_64
cleaning link caches
running post-sync triggers
running python triggers from/var/lib/cobbler/triggers/sync/post/*
running python triggercobbler.modules.sync_post_restart_services
running: dhcpd -t -q
received on stdout:
received on stderr:
running: service dhcpd restart
received on stdout: Starting dhcpd: [  OK  ]
 
received on stderr:
running shell triggers from/var/lib/cobbler/triggers/sync/post/*
running python triggers from/var/lib/cobbler/triggers/change/*
running python triggercobbler.modules.scm_track
running shell triggers from/var/lib/cobbler/triggers/change/*
*** TASK COMPLETE ***

到此cobbler配置已经完成,可以用虚拟机进行测试。

8.安装cobbler-web;

[[email protected] ~]# yum install -ycobbler-web
[[email protected] ~]# /etc/init.d/httpdrestart
Stopping httpd:                                           [  OK  ]
Starting httpd: httpd:apr_sockaddr_info_get() failed for cobbler-server
httpd: Could not reliably determine theserver‘s fully qualified domain name, using 127.0.0.1 for ServerName
                                                          [  OK  ]

访问地址:http://ip/cobbler_web

Username:cobbler

Password:cobbler

登陆之后的界面:

时间: 2024-10-10 05:59:20

CentOS+Cobbler安装配置的相关文章

CentOS 7安装配置Apache HTTP Server

原文 CentOS 7安装配置Apache HTTP Server   RPM安装httpd # yum -yinstall httpd //安装httpd会自动安装一下依赖包: apr apr-util httpd-tools mailcap # rpm -qi httpd Name      : httpd Version    : 2.4.6 Release    : 18.el7.centos Architecture: x86_64 Install Date: Mon 11 Aug 2

CentOS 7 安装配置 NFS

CentOS 7  安装配置 NFS 环境 nps 192.168.1.97 client 192.168.1.98 一.yum 安装 yum -y install nfs-utils rpcbind nfs 的配置文件 /etc/expots 默认为空 vi /etc/exports /opt/test/ 192.168.1.0/24(rw,no_root_squash,no_all_squash,sync,anonuid=501,anongid=501) 二.使配置生效 exportfs -

centos ansible安装配置

关于ansible就不多做简绍了,直接开始安装配置 [安装环境] [[email protected] ~]# cat /etc/centos-release  CentOS release 6.5 (Final) [[email protected] ~]# uname -a Linux AnsibleServer 2.6.32-431.el6.x86_64 #1 SMP Fri Nov 22 03:15:09 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux 安

<转>CentOS 7 安装配置 NFS

CentOS 7  安装配置 NFS 环境 nps 192.168.1.97 client 192.168.1.98 一.yum 安装 yum -y install nfs-utils rpcbind nfs 的配置文件 /etc/expots 默认为空 vi /etc/exports /opt/test/ 192.168.1.0/24(rw,no_root_squash,no_all_squash,sync,anonuid=501,anongid=501) 二.使配置生效 exportfs -

【ruby】【linux】【irb】CentOS上安装配置ruby开发环境,安装 irb

在读<理解Unix进程>这本书,书中代码是用Ruby写的,就自己想实践一下,搜来搜去要安装配置Ruby,我是centOS6.5的系统.下面这篇不错,我又加入了一点自己的理解和试验. 1 方法一:下载ruby的安装包来进行安装 1.安装编译环境gcc 使用yum install gcc在线安装 2.安装ruby开发环境 PS:经常在搜帖子的时候,大神的文章中都是随随便便下载个什么啊,又没告诉我这样的菜鸟到哪里下,让人几番周折,这里 下载 Ruby - Ruby 官方网站:https://www.

记录:CentOS 7 安装配置分布式文件系统 FastDFS 5.1.1

CentOS 7 安装配置分布式文件系统 FastDFS 5.1.1 软件下载:http://download.csdn.net/download/qingchunwuxian1993/9897458 yum-y install net-tools.x86_64 前言 项目中用到文件服务器,有朋友推荐用FastDFS,所以就了解学习了一番,感觉确实颇为强大,在此再次感谢淘宝资深架构师余庆大神开源了如此优秀的轻量级分布式文件系统,本篇文章就记录一下FastDFS的最新版本5.1.1在CentOS7

转帖:CentOS 6安装配置LAMP服务器(Apache+PHP5+MySQL)

这篇文章主要介绍了CentOS 6 安装配置LAMP服务器(Apache+PHP5+MySQL)的方法,需要的朋友可以参考下 准备篇: 1.配置防火墙,开启80端口.3306端口vi /etc/sysconfig/iptables-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT #允许80端口通过防火墙-A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -

阿里云服务器centos下安装配置svn服务器

阿里云服务器centos下安装配置svn服务器 1.安装svn服务器端 yum install subversion      从镜像下载安装svn服务器端中间会提示是否ok,输入y,确认安装成功提示:.....complete!依次执行如下命令:cd /usr/local/              //进入目录,准备创建svn目录 mkdir svnRepo                   //创建一个svn目录 chmod -R 777 svnRepo            //修改目

pxe 简介以及 cobbler安装配置自动化

PXE(CentOS 6.7):准备环境: pxe简介: PXE(preboot execute environment,预启动执行环境)是由Intel公司开发的最新技术,工作于Client/Server的网络模式,支持工作站通过网络从远端服务器下载映像,并由此支持通过网络启动操作系统,在启动过程中,终端要求服务器分配IP地址,再用TFTP(trivial file transfer protocol)或MTFTP(multicast trivial file transfer protocol