背景:
阅读新闻
Cobbler全自动安装CentOS
[日期:2013-12-15] 来源:Linux社区 作者:koumm [字体:]
环境:
OEL6.3 x64 (CentOS6.3 x64)
网络环境中无其它DHCP服务器
一、 cobbler安装准备
1. 关闭iptables与selinux
# chkconfig iptables off
# vi /etc/selinux/config
SELINUX=disabled
1 # sestatus 重启后查看
2. 安装源准备并安装cobbler软件
说明:基础源与epel源。
rpm -ivh Fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
yum -y install cobbler cobbler-web httpd rsync tftp-server xinetd dhcp Python-ctypes debmirror pykickstart fence-agents
二、 配置tftp-server与rsync
开启tftp与rsync服务
sed -i '/disable/c disable = no' /etc/xinetd.d/tftp
sed -i -e 's/= yes/= no/g' /etc/xinetd.d/rsync
三、配置cobbler
1. 配置httpd配置文件
# vi /etc/httpd/conf/httpd.conf
ServerName 127.0.0.1:80
2. 配置cobbler主配置文件
sed -i 's/next_server: 127.0.0.1/next_server: 192.168.1.10/g' /etc/cobbler/settings
sed -i 's/server: 127.0.0.1/server: 192.168.1.10/g' /etc/cobbler/settings
sed -i 's/manage_dhcp: 0/manage_dhcp: 1/g' /etc/cobbler/settings
sed -i 's/manage_rsync: 0/manage_rsync: 1/g' /etc/cobbler/settings
3. 配置cobbler web登录认证配置文件
(1) 修改认证文件
sed -i 's/module = authn_denyall/module = authn_configfile/g' /etc/cobbler/modules.conf
(2) 设置用户名密码:
htdigest /etc/cobbler/users.digest "Cobbler" cobbler
4. 生成Cobbler安装系统root初始密码
(1)这里生成密钥和配置默认密钥,ks文件引用
# openssl passwd -1 -salt 'random-phrase-here' '111111'
$1$random-p$WbZ3JxhRzCS/1Ne4S9g4Z.
(2) 将上面的加密串加入cobbler配置文件中。
# vi /etc/cobbler/settings
# 修改为如下配置
default_password_crypted: "$1$random-p$WbZ3JxhRzCS/1Ne4S9g4Z."
四、配置DHCP与启动cobbler相关服务
1. 配置dhcp配置文件
# mv /etc/cobbler/dhcp.template /etc/cobbler/dhcp.template.bak
# vi /etc/cobbler/dhcp.template
ddns-update-style interim;
allow booting;
allow bootp;
ignore client-updates;
set vendorclass = option vendor-class-identifier;
subnet 192.168.1.0 netmask 255.255.255.0 {
option routers 192.168.1.1;
option domain-name-servers 202.100.192.68;
option subnet-mask 255.255.255.0;
range dynamic-bootp 192.168.1.120 192.168.1.254;
filename "/pxelinux.0";
default-lease-time 21600;
max-lease-time 43200;
next-server $next_server;
}
2. 需要启动的服务
chkconfig httpd on
chkconfig xinetd on
chkconfig dhcpd on
chkconfig cobblerd on
service httpd start
service xinetd start
service dhcpd start
service cobblerd start
相关阅读:
使用PPA在Elementary OS 'Luna'上安装Oracle Java 7
相关资讯 Cobbler
本文评论 查看全部评论 (0)
尊重网上道德,遵守中华人民共和国的各项有关法律法规 承担一切因您的行为而直接或间接导致的民事或刑事法律责任 本站管理人员有权保留或删除其管辖留言中的任意内容 本站有权在网站内转载或引用您的评论 参与本评论即表明您已经阅读并接受上述条款
评论声明
最新资讯