Construction of cobbler


Alibaba Cloud's epel source for install epel source

https://mirrors.aliyun.com/epel/6/x86_64/epel-release-6-8.noarch.rpm

rpm -ivh epel-release-6-8.noarch.rpm

yum install cobbler dhcp http -y

vim /etc/xinetd.d/tftp

service tftp
{
disable = no #默认是yes
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -B 1380 -v -s /var/lib/tftpboot
per_source = 11
cps = 100 2
flags = IPv4
}

vim /etc/xinetd.d/rsync

service rsync
{

disable = no #默认是yes
flags = IPv6
socket_type = stream
wait = no
user = root
server = /usr/bin/rsync
server_args = --daemon
log_on_failure += USERID
}

vim /etc/httpd/conf/httpd.conf

ServerName 127.0.0.1:80


Configure COBBLER

[root@localhost ~]# openssl passwd -1 -salt 'random-phrase-here' '123456' #Generate root password

$1$random-p$mzxQ/Sx848sXgvfwJCoZM0

[root@localhost ~]# vim /etc/cobbler/settings

manage_dhcp: 1 ## Was 0

manage_rsync: 1 ## Was 0

next_server: 192.168.214.10 ## Local IP

server: 192.168.214.10 ## Local IP

default_password_crypted: "$1$random-p$mzxQ/Sx848sXgvfwJCoZM0" ## Generated root password

[root@localhost ~]# vim /etc/cobbler/dhcp.template


ddns-update-style interim; #Just modify this paragraph directly

allow booting;
allow bootp;

ignore client-updates;
set vendorclass = option vendor-class-identifier;

option pxe-system-type code 93 = unsigned integer 16;

subnet 192.168.65.0 netmask 255.255.255.0 {
option routers 192.168.65.1;
option subnet-mask 255.255.255.0;
range dynamic-bootp 192.168.65.100 192.168.65.254;
default-lease-time 21600;
max-lease-time 43200;
next-server $next_server;

[root@localhost ~]# service httpd start

[root@localhost ~]# service xinetd start

[root@localhost ~]# service dhcpd start prompts failure, you can ignore it

[root@localhost ~]# service cobblerd start

[root@localhost ~]# cobbler check #Check configuration

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 655, 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'">


[root@localhost ~]# cobbler get-loaders #Solution

[root@localhost ~]# cobbler check ## Check again


The following are potential configuration items that you may want to fix:

1 : service dhcpd is not running
2 : debmirror package is not installed, it will be required to manage debian deployments and repositories

Restart cobblerd and then run 'cobbler sync' to apply changes.

## 1: Prompt that dhcpd is not running, leave it
alone ## 2: Prompt that debmirror is not installed. If you are not installing a system such as debian, you can ignore this prompt.
(For installation, the download address is: http://rpmfind.net/linux/rpm2html/search.php?query=debmirror)

[root@localhost ~]# cobbler sync #Sync operation


[root@localhost ~]# mount /dev/cdrom /mnt #Mount the mirror and import the installation source

[root@localhost ~]# cobbler import --path=/mnt/ --arch=x86_64 --name=Centos-6.8-minimal

[root@localhost ~]# cobbler list #View profile file

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324662822&siteId=291194637