Cobbler Cluster Network installed

Source: Internet
Author: User
Tags symlink

centos7.x Version Installation Cobbler
Vim/etc/selinux/config #关闭selinux
Setenforce 0 #半关闭
Chkconfig iptables off #开机不自启
Iptables-f #清空防火墙
[Email protected] ~]# systemctl stop Firewalld #关闭防火墙
[Email protected] ~]# systemctl disable FIREWALLD #开机不自启
[Email protected] ~]# cat/etc/redhat-release #查看linux版本
CentOS Linux release 7.4.1708 (Core)
[Email protected] ~]# uname-r #查看内核版本
3.10.0-693.el7.x86_64
[email protected] ~]# Yum Clean all #清理缓存
[email protected] yum.repos.d]# Yum Makecache #建立缓存
[Email protected] ~]# yum-y install Epel-release #
[Email protected] yum.repos.d]# yum-y install cobbler Cobbler-web pykickstart Debmirror
#pykickstart #自动配置kickstart脚本端
#debmirror #能够被PXE引导的引导文件的软件包
[Email protected] ~]# yum-y install httpd
[Email protected] ~]# systemctl restart httpd
[Email protected] ~]# systemctl restart Cobblerd
[Email protected] ~]# Netstat-an |grep 25151
TCP 0 0 127.0.0.1:25151 0.0.0.0:* LISTEN

[[email protected] ~]# systemctl status httpd #查看apache状态
httpd.service-the Apache HTTP Server
Loaded:l oaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset:disabled)
Active:active (running) since three 2018-09-12 16:11:25 CST; 3h 7min ago
Docs:man:httpd (8)
Man:apachectl (8)
Main pid:1448 (httpd)
Status: "Total requests:0; Current requests/sec:0; Current traffic:0 b/sec "
CGroup:/system.slice/httpd.service
├─1448/usr/sbin/httpd-dforeground
├─1449/ Usr/sbin/httpd-dforeground
├─1450/usr/sbin/httpd-dforeground
├─1451/usr/sbin/httpd-dforeground
├─1452 /usr/sbin/httpd-dforeground
└─1453/usr/sbin/httpd-dforeground

September 16:10:24 Bogon systemd[1]: Starting the Apache HTTP Server ...
September 16:10:55 Bogon httpd[1448]: AH00558:httpd:Could not reliably determine the se ... Age
September 16:11:25 Bogon systemd[1]: Started the Apache HTTP Server.
Hint:some lines were ellipsized, use-l to show on full.

[Email protected] ~]# systemctl status Cobblerd #查看cobbler状态
Cobblerd.service-cobbler Helper Daemon
loaded:loaded (/usr/lib/systemd/system/cobblerd.service; disabled; vendor preset:disabled)
Active:active (running) since three 2018-09-12 16:18:02 CST; 3h 3min ago
process:1498 Execstartpost=/usr/bin/touch/usr/share/cobbler/web/cobbler.wsgi (code=exited, Status=0/SUCCESS)
Main pid:1497 (Cobblerd)
CGroup:/system.slice/cobblerd.service
└─1497/usr/bin/python2-s/usr/bin/cobblerd-f

September 16:18:02 Bogon systemd[1]: Starting Cobbler Helper Daemon ...
September 16:18:02 Bogon systemd[1]: Started Cobbler Helper Daemon.

[Email protected] ~]# vim/etc/cobbler/settings

272 next_server:192.168.10.10
384 server:192.168.10.10

[Email protected] ~]# vim/etc/xinetd.d/tftp

Default:offdescription:The TFTP server serves files using the trivial file transfer \protocol. The TFTP protocol is often used to boot diskless \workstations, download configuration files to network-aware printers, \a nd to start the installation process for some operating systems.

Service TFTP
{
Socket_type = Dgram
protocol = UDP
Wait = yes
user = root
Server =/USR/SBIN/IN.TFTPD
Server_args =-s/tftpboot
Disable = no
Per_source = 11
CPS = 100 2
Flags = IPV4
}
~
[Email protected] ~]# Cobbler get-loaders #更新补丁
Task Started:2018-09-12_195923_get_loaders
Task started (id=download Bootloader Content, time=wed Sep 12 19:59:23 2018)
Downloading Https://cobbler.github.io/loaders/README To/var/lib/cobbler/loaders/readme
Downloading Https://cobbler.github.io/loaders/COPYING.elilo To/var/lib/cobbler/loaders/copying.elilo
Downloading Https://cobbler.github.io/loaders/COPYING.yaboot to/var/lib/cobbler/loaders/copying.yaboot
Downloading Https://cobbler.github.io/loaders/COPYING.syslinux to/var/lib/cobbler/loaders/copying.syslinux
Downloading Https://cobbler.github.io/loaders/elilo-3.8-ia64.efi To/var/lib/cobbler/loaders/elilo-ia64.efi
Downloading https://cobbler.github.io/loaders/yaboot-1.3.17 to/var/lib/cobbler/loaders/yaboot
Downloading https://cobbler.github.io/loaders/pxelinux.0-3.86 to/var/lib/cobbler/loaders/pxelinux.0
Downloading https://cobbler.github.io/loaders/menu.c32-3.86 TO/VAR/LIB/COBBLER/LOADERS/MENU.C32
Downloading Https://cobbler.github.io/loaders/grub-0.97-x86.efi To/var/lib/cobbler/loaders/grub-x86.efi
Downloading Https://cobbler.github.io/loaders/grub-0.97-x86_64.efi To/var/lib/cobbler/loaders/grub-x86_64.efi
TASK Complete

[Email protected] ~]# Systemctl enable RSYNCD #开启rsync
Created symlink From/etc/systemd/system/multi-user.target.wants/rsyncd.service to/usr/lib/systemd/system/ Rsyncd.service.

[Email protected] ~]# vim/etc/debmirror.conf

Download Options

$host = "ftp.debian.org"; $passwd = "[email protected]";
br/> $user = "Anonymous";
$passwd = "[email protected]";
$download _method= "FTP";
# @dists = "Sid"; #注释掉br/> @sections = "Main,main/debian-installer,contrib,non-free";
< p="">

[[email protected] ~]# OpenSSL passwd-1-salt $ (OpenSSL Rand-hex 4)
Password:
$1$19017682$.wzfjpkl.qp88idfa34ik/
[email protected] ~]# vim/etc/cobbler/settings
default_password_crypted: "$1$19017682$.wzfjpkl.qp88idfa34ik/"

Installation of the barrier device isolation #centos6是有cman的, CENTOS7 is not cman, if the error, is normal.
[email protected] ~]# yum-y install Cman fence-agents
Manage DHCP with cobbler, modify 242 rows manage_dhcp:0
Vim/etc/cobbler/settings
Manage_dhcp:1

#防止循环装系统, the first boot entry for the server is PXE boot, modify the 292 row pxe_just_once:0 #修改为1
285 # If this setting are set to 1, cobbler systems, the PXE boot if this setting is set to 1,PXE boot cobbler system
286 # would request at the end of their installation to toggle the end of the installation, will be requested to close
287 #--netboot-enabled record in the Cobbler system record. This eliminates enabled the netboot-enabled record in the Cobbler system record. This will eliminate the
288 # The potential for a PXE boot loop if the system was set to PXE, the potential of the PXE boot cycle if the systems are set to PXE
289 # First In it ' s BIOS order. Enable this if the PXE is first in your the BIOS is the order of the BIOS. Enable this feature if PXE first appears in your BIOS
290 # Boot Order, otherwise leave this disabled. See the Manpage to start the order, otherwise this feature will be disabled. See from
291 # for--netboot-enabled. Support netboot-enabled.

292 Pxe_just_once:1

#修改完后重启服务再进行一次检测
[email protected] system]# systemctl Restart Cobblerd
[[email protected] system]# yum-y Install DHCP
[email protected] system]# cp-a/usr/share/doc/dhcp-4.2.5/dhcpd.conf.example/etc/dhcp/dhcpd.conf
CP: Do you want to overwrite "/etc/dhcp/dhcpd.conf"? Y

[email protected] system]# vim/etc/dhcp/dhcpd.conf
Subnet 192.168.10.0 netmask 255.255.255.0 {
Range 192.168.10.100 192.168.10.200;
Option routers 192.168.10.2;
Default-lease-time 600;
Max-lease-time 7200;
}
Next-server 192.168.10.10;
Filename= "pxelinux.0";

[email protected] system]# systemctl Restart DHCPD
[email protected] system]# systemctl enable DHCPD
Created symlink From/etc/systemd/system/multi-user.target.wants/dhcpd.service to/usr/lib/systemd/system/ Dhcpd.service.

[[email protected]system]# yum-y Install xinetd #在centos7里没有xinetd
[[email protected]system]# Systemctl Enable xinetd
[[email protected]system]# systemctl Restart xinetd
[[email protected]system]# systemctl Restart TFTP
[[email protected]system]# Systemctl Enable TFTP
Created symlink from/etc/systemd/system/sockets.target.wants/tftp.socket To/usr/lib/systemd/system/tftp.socket.
[[email protected]system]# Cobbler Sync
[[email protected]system]# Cobbler Check #检测配置文件
No configuration problems found. All systems go.

#挂载镜像

[email protected] system]# mkdir-p/mnt/cdrom
[email protected] system]# Vim/etc/fstab
/dev/sr0/mnt/cdrom iso9660 Defaults 0 0
[email protected] system]# mount-a

#导入镜像
[[email protected]system]# Cobbler Import--name= "centos7-x86_64"--path=/mnt/cdrom/
Task Started:2018-09-16_113922_import
Task started (Id=media import, Time=sun Sep 16 11:39:22 2018)
Found a candidate signature:breed=redhat, version=rhel6
Found a candidate signature:breed=redhat, Version=rhel7
Found a matching signature:breed=redhat, VERSION=RHEL7
Adding distros from path/var/www/cobbler/ks_mirror/centos7-x86_64:
Creating new distro:centos7-x86_64
Trying symlink:/var/www/cobbler/ks_mirror/centos7-x86_64-/var/www/cobbler/links/centos7-x86_64
Creating new profile:centos7-x86_64
Associating repos
Checking for rsync repo (s)
Checking for portal repo (s)
Checking for Yum repo (s)
Starting Descent into/var/www/cobbler/ks_mirror/centos7-x86_64 for centos7-x86_64
Processing repo at:/var/www/cobbler/ks_mirror/centos7-x86_64
Need to process Repo/comps:/var/www/cobbler/ks_mirror/centos7-x86_64
Looking for/var/www/cobbler/ks_mirror/centos7-x86_64/repodata/Comps. xml
Keeping Repodata As-is:/var/www/cobbler/ks_mirror/centos7-x86_64/repodata
TASK Complete
[[email protected]mnt]# Cobbler distro List #查看镜像列表
Centos7-x86_64

/var/www/cobbler/ks_mirror/Image Storage Directory

[email protected] ks_mirror]# Cobbler profile list #查看生成的剧本
Centos7-x86_64
[email protected] ks_mirror]# Cobbler profile Remove--name=centos7-x86_64 #删除剧本文件

[email protected] kickstarts]# Cobbler List
Distros:
Centos7-x86_64

Profiles

Systems

Repos

Images

Mgmtclasses:

Packages

Files:
[[email protected] kickstarts]# Cobbler distro report--name=centos7-x86_64 #查看安装镜像文件信息
name:centos7-x86_64
architecture:x86_64< Br>tftp Boot Files: {}
Breed:redhat
Comment:
fetchable files: {}
Initrd:/var/www/cobbler/ks_mirror/cen Tos7-x86_64/images/pxeboot/initrd.img
Kernel:/var/www/cobbler/ks_mirror/centos7-x86_64/images/pxeboot/ Vmlinuz
Kernel options: {}
Kernel options (Post Install): {}
Kickstart Metadata: {' tree ': ' Http://@@[email protected] @/cblr/links/ Centos7-x86_64 '}
Management Classes: []
OS version:rhel7
Owners: [' admin ']
Red Hat Management Key: <&L T;inherit>>
Red Hat Management Server: <<inherit>>
Template Files: {}

[[email protected] kickstarts]# ls
DEFAULT.KS install_profiles sample_autoyast.xml sample_esxi4.ks sample.ks
Esxi4-ks.cfg legacy.ks sample_end.ks (kickstarts file used by default) SAMPLE_ESXI5.KS Sample_old.seed
Esxi5-ks.cfg pxerescue.ks sample_esx4.ks sample_esxi6.ks sample.seed

Copy #找一个centos7-x86_64.cfg files to the/var/lib/cobbler/kickstarts directory
[email protected] kickstarts]# Cobbler profile Add--name=centos7-basic--distro=centos7-x86_64--kickstart= /VAR/LIB/COBBLER/KICKSTARTS/CENTOS7-X86_64.CFG # #指定ks文件名称, import the image file name, import the script file, put the KS file and the image file together

If you want to make multiple systems, first upload the image file, generate the KS script file, and then put the script file and the image file together.

Cobbler profile Edit--name=centos7-basic--kopts= ' net.ifnames=0 biosdevname=0 ' #修改网卡名称, using eth0 name
#指定
Cobbler system Add--name=a1--mac=00:0c:29:6f:b7:4c--profile=centos7-basic--ip-address=192.168.10.20--subnet= 255.255.255.0--interface=eth0--static=1--gateway=192.168.10.2--hostname=www.wk.com--name-servers= " 114.114.114.114 "
Cobbler System List #查看指定主机

Custom Installation System: #cobble默认使用的是https连接
Each installation system to choose, more trouble, then we specify the MAC address to install, you can achieve automatic installation no longer select the operating system, even if there are multiple operating systems, as long as the specified operating system and MAC address can be automatically installed
#cobbler Web-side configuration: The account password is cobbler

Select-System-Create a new system

#定义系统信息

#配置全局网络信息, Gateway, DNS

#配置网卡信息 eth0 eth1
Note Select static

Cobbler Cluster Network installed

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.