Cobbler網路裝機

2021-09-29 22:47:25 字數 3470 閱讀 5412

基本概念

[root@localhost ~]

# cat /etc/redhat-release

centos linux release 7.5.1804 (core)

[root@localhost ~]

# firewall-cmd --set-default-zone=trusted

success

[root@localhost ~]

# vim /etc/selinux/config

# this file controls the state of selinux on the system.

# selinux= can take one of these three values:

# enforcing - selinux security policy is enforced.

# permissive - selinux prints warnings instead of enforcing.

# disabled - no selinux policy is loaded.

selinux=permissive

[root@localhost ~]

# setenforce 0

[root@localhost ~]

# nmcli connection modify eth0 ipv4.method manual ipv4.addresses 192.168.4.123/24 connection.autoconnect yes

[root@localhost ~]

# nmcli connection up eth0

連線已成功啟用(d-bus 活動路徑:/org/freedesktop/networkmanager/activeconnection/4)

[root@cobbler ~]

# echo cobbler.tedu.cn > /etc/hostname

[root@cobbler ~]

# hostname cobbler.tedu.cn

[root@cobbler ~]

# mkdir /etc/yum.repos.d/repo

[root@cobbler ~]

# mv /etc/yum.repos.d/*.repo /etc/yum.repos.d/repo/

[root@cobbler ~]

# vim /etc/yum.repos.d/yum.repo

[yum]

name=yum

baseurl=

enabled=1

gpgcheck=0

[root@cobbler ~]

# yum repolist

[student@room9pc01 ~]$ scp /home/student/桌面/cobbler.zip [email protected]:/root

:set nu開啟行號

242 manage_dhcp: 1 //設定cobbler管理dhcp

272 next_server: 192.168.4.123 //設定下乙個伺服器還為本機

292 pxe_just_once: 1 //防止客戶端重複安裝作業系統

384 server: 192.168.4.123 //設定本機為cobbler伺服器

[root@cobbler ~]

# vim /etc/cobbler/dhcp.template

:%s /192.168.1/192.168.4/g //末行模式輸入

[root@cobbler ~]

# tar -xpf /cobbler/cobbler_boot.tar.gz //以絕對路徑釋放 -p

[root@cobbler ~]

# systemctl restart rsyncd //同步服務

[root@cobbler ~]

# systemctl enable rsyncd

[root@cobbler ~]

# getenforce

permissive

[root@cobbler ~]

# cobbler sync

[root@cobbler ~]# cobbler import --path=掛載點 --name=匯入系統命名(隨意起)

[root@cobbler ~]

# mkdir /***

[root@cobbler ~]

# mount /dev/cdrom /***/

mount: /dev/sr0 寫保護,將以唯讀方式掛載

[root@cobbler ~]

# cobbler import --path=/*** --name=centos7

Cobbler裝機平台

和pxe相似,cobbler也是一種批量裝機的手段。cobbler可以自動配置dhcp,dns,tftp,web。可以安裝多種作業系統 pxe需要為每一種作業系統做一種配置 使用cobbler,只需要做一次配置,想要更換系統只需要提供光碟就可以了。1.安裝軟體 yum y install dhcp ...

CentOS7實現Cobbler自動裝機

cobbler是乙個使用python開發的開源專案,可以實現乙個全自動批量快速建立linux系統的網路安裝環境,本次實驗就是在centos7上搭建cobbler環境。cobbler基本概念 cobbler是一款快速的網路系統部署工具 集中管理所需服務,如dhcp dns tftp web cobbl...

時間服務與cobbler自動化裝機

一,配置chrony服務,實現伺服器時間自動同步 伺服器端配置 客戶端配置 server 192.1.1.10 iburst 新增時間伺服器位址 二 實現cobbler pxe自動化裝機 cobbler check 檢視需要修改的配置項 修改完成後只有4項 vim etc cobbler setti...