cobbler完整配置附加ks,安装就能用

check检查的时候有时候会说sync文件没找到,不用管它,你能找到就可以。

有问题可以联系我QQ:573241012 email:[email protected]


yum install -y httpd dhcp tftp cobbler cobbler-web debmirror ksvalidator

/etc/init.d/httpd restart

/etc/init.d/cobblerd restart

cobbler check


vi /etc/cobbler/settings

server:10.0.0.7  #localhost adreess

next_server:10.0.0.7  #localhost adreess


vi /etc/xinetd.d/tftp

disable = no #yes change no


vi /etc/xinetd.d/rsync

disable = no

/etc/init.d/xinetd restart


chkconfig iptables off

/etc/init.d/iptables stop


cobbler get-loaders

/etc/init.d/cobblerd  restart


vi /etc/debmirror.conf

#@dists="sid";

#@arches="i386";


[root@NFS1-1 ~]# openssl passwd -1 -salt 'ffhm' 'root'

$1$ffhm$l9A7GN4.p9xqgW26Rf1Gv.


cobbler sync


vi /etc/cobbler/settings

manage_dhcp: 1



vi /etc/cobbler/dhcp.template 

subnet 10.0.0.0 netmask 255.255.255.0 {

     option routers             10.0.0.2;

     option domain-name-servers 10.0.0.2;

     option subnet-mask         255.255.255.0;

     range dynamic-bootp        10.0.0.100 10.0.0.254;

     default-lease-time         21600;

     max-lease-time             43200;

     next-server                $next_server;


cobbler sync


mount /dev/cdrom /mnt/

cobbler import --path=/mnt/ --name rhel-server-6.4 --arch=x86_64


cobbler sync

cat /etc/cobbler/pxe/pxedefault.template

默认使用这个/var/lib/cobbler/kickstarts/sample_end.ks 



yum groupinstall "X Window System" -y

yum groupinstall "Desktop" -y

yum install system-config-kickstart

startx

修改ks配置文件

--name 可以通过 cobbler report来查看

cobbler profile edit --name=rhel-server-6.4-x86_64 --kickstart=/var/lib/cobbler/kickstarts/redhat6.ks


cat redhat6.ks

ks基本配置,需要添加再这上面添加,一般分区、网卡、及包的添加,其他不用动

账号密码都是root

#platform=x86, AMD64, or Intel EM64T

# Install OS instead of upgrade

install

# Use text mode install

text

# Run the Setup Agent on first boot

firstboot --disable

# System keyboard

keyboard us

# System language

lang en_US

# Use network installation

url --url=$tree

# If any cobbler repo definitions were referenced in the kickstart profile, include them here.

$yum_repo_stanza


#Root password

rootpw --iscrypted $default_password_crypted

# Do not configure the X Window System

skipx

# System timezone

timezone  Asia/Shanghai

# System bootloader configuration

bootloader --location=mbr

# Clear the Master Boot Record

zerombr yes

# Partition clearing information

clearpart --all --initlabel

# Disk partitioning information

part /boot --fstype="ext4" --size 200 --ondisk sda

part / --fstype="ext4" --size 1 --grow  --ondisk sda

# System authorization information

auth  --useshadow  --enablemd5

# Network information

network  --bootproto=dhcp --device=eth0 --onboot=on


# Reboot after installation

reboot

# SELinux configuration

selinux --disabled

# Firewall configuration

firewall --disabled


%packages --nobase

@core

%end



错误提示一

解决方法,重启启动cobbler

Traceback (most recent call last):

  File "/usr/bin/cobbler", line 36, in <module>

    sys.exit(app.main())

  File "/usr/lib/python2.6/site-packages/cobbler/cli.py", line 657, in main

    rc = cli.run(sys.argv)

  File "/usr/lib/python2.6/site-packages/cobbler/cli.py", line 270, in run

    self.token         = self.remote.login("", self.shared_secret)

  File "/usr/lib64/python2.6/xmlrpclib.py", line 1199, in __call__

    return self.__send(self.__name, args)

  File "/usr/lib64/python2.6/xmlrpclib.py", line 1489, in __request

    verbose=self.__verbose

  File "/usr/lib64/python2.6/xmlrpclib.py", line 1253, in request

    return self._parse_response(h.getfile(), sock)

  File "/usr/lib64/python2.6/xmlrpclib.py", line 1392, in _parse_response

    return u.close()

  File "/usr/lib64/python2.6/xmlrpclib.py", line 838, in close

    raise Fault(**self._stack[0])

xmlrpclib.Fault: <Fault 1: "<class 'cobbler.cexceptions.CX'>:'login failed'">



你可能感兴趣的:(安装,自动部署,cobbler)