cobbler安装配置
(整理日期:2013-7-10)
前题条件安装
yum install createrepo
这个软件包是用来创建软件仓库的元数据的。
yum install httpd
yum install mkisofs
yum install mod_wsgi
yum install mod_ssl
yum install python-cheetah
yum install python-netaddr
yum install python-simplejson
yum install python-urlgrabber
wget tar -zxvf PyYAML-3.10.tar.gz cd PyYAML-3.10 python setup.py install
yum install rsync
yum install syslinux
yum install tftp-server
yum install yum-utils
yum install python-devel
安装dhcp yum -y install dhcp
安装Django wget
tar -zxvf Django-1.5.1.tar.gz
cd Django-1.5.1
python setup.py install
COBBBLER安装
git clone git://github.com/cobbler/cobbler.git
获取cobbler源代码
cd cobbler
make install
make devinstall
make webtest
安装cobbler 的WEB CGI接口
修改配置文件
cobbler check 检查哪些配置文件需要修改
vi /etc/cobbler/settings 修改下列项
server: 127.0.0.1 =》 server: 172.16.10.88
next_server: 127.0.0.1 =》 next_server: 172.16.10.88
manage_dhcp: 0 =》 manage_dhcp: 1
2、关闭selinux
vi /etc/sysconfig/selinux
SELINUX=enforcing =>SELINUX=disabled
3、开启tftp
vi /etc/xinetd.d/tftp
disable = yes =>disable = no
4、开启rsync
vi /etc/xinetd.d/rsync
disable = yes =》 disable = no
5、防火墙开启相应端口
在iptables中将69,80,25151端口打开
6、修改cobbler默认密码
修改cobbler用户的默认密码,可以使用如下命令生成密码,并使用生成后的密码
替换/etc/cobbler/settings中的密码。生成密码命令:
openssl passwd -1 -salt 'lvan' '12345678'
default_password_crypted: "$1$mF86/UHC$WvcIcX2t6crBz2onWxyac." =>
default_password_crypted: "$1$lvan$7jIeOfPs1m7YuyQY1qqiS."
7、修改/etc/cobbler/dhcp.template 模板文件
修改以下内容,其它内容保持不变
subnet 172.16.10.0 netmask 255.255.255.0 {
option routers 172.16.10.1;
option domain-name-servers 202.96.209.5;
option subnet-mask 255.255.255.0;
range dynamic-bootp 172.16.10.100 172.16.10.254;
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 option pxe-system-type = 00:07 {
filename "grub/grub-x86_64.efi";
} else {
filename "pxelinux.0";
}
}
}
导入安装文件
mount -o loop -t iso9660 /images/CentOS-5.5-i386-bin-DVD.iso /iso
cobbler import --path /iso --name=centos5.5-i386
启动安装测试
/etc/init.d/xinetd restart
cobbler sync
rpm -Uvh
mkdir mkdir initrd
cp /var/www/html/auto_install/centos/5.2/i386/isolinux/initrd.img initrd/
cd initrd/
gzip -dc initrd.img | cpio -ivd
gzip -dc modules.cgz | cpio -ivd
cd modules
find 2.6.18-92.el5 | cpio -o -H crc | gzip -9 > modules.cgz
modinfo bnx2
阅读(1725) | 评论(0) | 转发(0) |