运维工具
系统备份和恢复
Clonezilla
install clonezilla network boot system
clonezilla push setting
clonezilla pxelinux.cfg default config
clonezilla pxe boot password
kickstart
kickstart centos5.6-i386 config
kickstart auto install
kickstart example
Cobbler
cobbler backups-restore
aomei 傲梅
傲梅集中备份
傲梅备份 分类
系统监控工具
collectd
collectd 收集系统性能
NMON monitor
Nmon monitor system
njmon script initd code
nmon 2 data to influx db
Zabbix
zabbix 3.2 install on centos 6
zabbix firewall
zabbix support windows
Supervisor
supervisor shell script
supervisor config example
boot supervisrd with systemd on centos7
webhook and github to do file sync with supervisor
日志管理系统
Grafana
grafana install on centos 6
grafana install plugin
grafana influx version
Filebeat
filebeat yum install
Kibana
kibana yum install
Logstash
logstash install on centos
Elasticsearch
yum install elasticsearch 6.8
elasticsearch install on Centos 6.7
ELK init env config
Elasticsearch 错误集锦
Rsyslog
centos 6 rsyslog 日志实时同步
Rsyslog mysql log to master analyzer
Deploy
Jumpserver
jumpserver 0.3.2 install on centos 6
jumpserver 0.3.2 docker install on centos 7
jumpserver 0.5 install on centos 7
Opsmanage
opsmanage install centos7
Jenkins
jenkins install on centos 6
install plugin in jenkins…
jenkins set time execution
tomcat jenkins ansible
jenkins ansible ad-hoc command
jenkins ansible playbook project
jenkins publish over_ssh
Paramike
PSSH
Centos7部署工具pssh
Ansible
how to install ansible with yum
bit rpm install ansible
source to install ansible
ansible init system centos 6
ansible using method
ansible install httpd servers
copy code with ansible-playbook
ansible ping host actived
ansible add username
ansible config parameter
ansible config write format
ansible api study
ansible hosts config ssh
ansible get nmon data
ansible setup filter information
yum repo with ansible-playbook
ansible gitlab ci runner
ansible get data list
ansible get text content
ansible get linux release debug infor
ansible support windows pywinrm
Saltshaker
saltshaker use docker
how to install saltstack
saltshaker manual install
salt install and config
salt init system
deploy saltshaker on centos7
salt file config desc
salt cmdb
saltshaker dj mq mysql build
salt data to mysql
Rsync
rsync + inotify 数据实时同步
代码仓库
Gitlab
yum install gitlab
gitlab-ce and runner
gitlib api example
gitlab config
gitlab ce and ee
Gogs
Gitea
虚拟化系统
Vmware
centos 6 install vmware 14
Vagrant
从零开始创建基础 Box
打包我的 BOX
Vagrantfile Config
Vagrant简易教程
给 Vagrant 从 VirtualBox换用 VMware 或 虚拟机
优化 vagrantFile config
Vagrant 主机定义
vagrant SSH
Vagrant 搭建 说明
WSL
pycharm 安装支持 WSL
windows-WSL 安装
Docker
how to install docker on centos 6
docker config source daoclound
how to use docker by step
how to creat docker subnet
gogs deploy on docker
jenkins use docker to deploy
mysql use docker to deploy
docker-example-1
docker-example-2
mac-osx-toolbox-install-docker
Data DB
Influx DB
InfluxDB install on centos
Mysql DB
centos 6 install mysql 5.5
mysql 5.7 install centos 6
install percona mysql 5.6 with yum
centos 7 install mysql config
mysql data rsync from master/slave
About me
本文档使用 MrDoc 发布
-
+
首页
cobbler backups-restore
--- ## cobbler quickstart guide cobbler软件说明 Cobbler是一个开源项目(补鞋匠),网络安装服务器套件集成了PXE、DHCP、DNS、Kickstart服务管理和yum仓库管理工具,通过配置Cobbler服务器,可以全自动批量安装部署Linux系统。 Cobbler不仅仅是一个pxe服务器,他还可以管理dns和dhcp。相对之前的 Kickstart 更加快捷、方便的批量布署red hat、centos类系统。 在生产环境,是不允许dhcp, 但是pxe需要使用dhcp,所以是可以根据MAC地址来分配IP,这样DHCP就不会影响现有网络了。 源自官网说明 国内需要翻墙 — Bobby 2016/04/02 13:10 实验环境 两台机器,不同网段的cobbler: 所有的服务均部署在同一台服务器上(192.168.31.127) 所有的服务均部署在同一台服务器上(10.81.234.46) 软件要求 cobbler、dhcp、tftp,http、rsync、kickstart disabled selinux iptables ip6tables close selinux # sudo sed -i '/SELINUX/s/enforcing/disabled/' /etc/selinux/config # setenforce 0 # sudo chkconfig iptables off # sudo /etc/init.d/iptables stop 如果你想要开启,请打开TCP:25251、UDP:69 ```bash -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT #Http -A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 69 -j ACCEPT #Tftp -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 25151 -j ACCEPT #Cobbler ``` # sudo chkconfig ip6tables off # sudo /etc/init.d/ip6tables stop Install cobbler relase rpm lib 由于我是在要地测试,我就先安装了开发包 阿里云的yum # wget http://mirrors.aliyun.com/repo/Centos-6.repo /etc/yum.repos.d/Centos-6.repo 网易的yum # wget http://mirrors.163.com/.help/CentOS6-Base-163.repo /etc/yum.repos.d/CentOS6-Base-163.repo epel yum # wget http://mirrors.aliyun.com/repo/epel.repo /etc/yum.repos.d/epel.repo 此时最后重新启动一下电脑, # yum clean all # yum makecache # yum update # reboot # yum groupinstall “Development Tools” -y 我在centos6.7中安装了开发包,导致 python 在同步下载 loaders文件时不能下载。 ## Install cobbler # yum install cobbler cobbler-web xinetd pykickstart cman dhcp tftp tftp-server bind -y Changing settings for cobbler. dhcpd tfpd sync xinetd cobbler settings Starting and Enabling the Cobbler Service # chkconfig httpd on # chkconfig cobblerd on # chkconfig xinetd on # chkconfig dhcpd on # service cobblerd start # service httpd start # service xinetd start # service dhcpd start # service cobblerd status 此时这里 DHCP 有错误可以先不管,先去设置后再重新启动就没有问题了。 Changing xinetd tftp and rsync config tftp server disable item from yes to no. ```bash # vim /etc/xinetd.d/tftp service tftp { # disable = yes disable = no rsync server disable item from yes to no. } # vim /etc/xinetd.d/rsync # allows crc checksumming etc. service rsync { # disable = yes disable = no flags = IPv6 } ``` tftp / rsync has setting done ## Linux Root user password # sudo openssl passwd -1 -salt 'www.jbboo.com' 'test' * $1$www.jbbo$yfAulCU1H/kZz/MYX69uE. ``` # vim /etc/cobbler/settings ``` 可能是在101行处,更换生成的新密码。 * 101 #default_password_crypted: "$1$mF86/UHC$WvcIcX2t6crBz2onWxyac." * 102 default_password_crypted: "$1$www.jbbo$yfAulCU1H/kZz/MYX69uE." ## 设置 Cobbler Web访问的密码 # sudo htdigest /etc/cobbler/users.digest "Cobbler" admin ``` Adding user admin in realm Cobbler New password: Re-type new password: changing Server and Next_Server next_server: 270 # if using cobbler with manage_dhcp, put the IP address 271 # of the cobbler server here so that PXE booting guests can find it 272 # if you do not set this correctly, this will be manifested in TFTP open timeouts. 273 #next_server: 127.0.0.1 274 next_server: 10.81.234.46 server: 380 # this is the address of the cobbler server -- as it is used 381 # by systems during the install process, it must be the address 382 # or hostname of the system as those systems can see the server. 383 # if you have a server that appears differently to different subnets 384 # (dual homed, etc), you need to read the --server-override section 385 # of the manpage for how that works. 386 server: 10.81.234.46 387 #server: 127.0.0.1 manage dhcp 241 # set to 1 to enable Cobbler's DHCP management features. 242 # the choice of DHCP management engine is in /etc/cobbler/modules.conf 243 manage_dhcp: 1 manage rsync 261 # set to 1 to enable Cobbler's RSYNC management features. 262 manage_rsync: 1 manage TFTP 258 # set to 1 to enable Cobbler's TFTP management features. 259 # the choice of TFTP mangement engine is in /etc/cobbler/modules.conf 260 manage_tftpd: 1 only start once, cobbler program. # if this setting is set to 1, cobbler systems that pxe boot # will request at the end of their installation to toggle the # --netboot-enabled record in the cobbler system record. This eliminates # the potential for a PXE boot loop if the system is set to PXE # first in it's BIOS order. Enable this if PXE is first in your BIOS # boot order, otherwise leave this disabled. See the manpage # for --netboot-enabled. pxe_just_once: 1 DHCP Management manage dhcp 13 allow booting; 14 allow bootp; 15 16 ignore client-updates; 17 set vendorclass = option vendor-class-identifier; 18 19 option pxe-system-type code 93 = unsigned integer 16; 20 21 subnet 192.168.31.0 netmask 255.255.255.0 { 22 option routers 192.168.31.1; 23 option domain-name-servers 192.168.31.127; 24 option subnet-mask 255.255.255.0; 25 # range dynamic-bootp 192.168.31.100 192.168.31.254; # 网络中己经有了DHCP 服务器,所以这里要禁止分配,只给正确的 MAC 地址的电脑分配 IP. 26 default-lease-time 21600; 27 max-lease-time 43200; 28 next-server "192.168.31.127"; 29 # next-server $next_server; 30 class "pxeclients" { 31 match if substring (option vendor-class-identifier, 0, 9) = "PXEClient"; 32 if option pxe-system-type = 00:02 { 33 filename "ia64/elilo.efi"; 34 } else if option pxe-system-type = 00:06 { 35 filename "grub/grub-x86.efi"; 36 } else if option pxe-system-type = 00:07 { 37 filename "grub/grub-x86_64.efi"; 38 } else { 39 filename "pxelinux.0"; 40 } 41 } 42 43 # 为指定 MAC 的 IP 地址为 【192.168.31.120】 44 host test { 45 46 hardware ethernet 03:00:27:A7;12:24; 47 fixed-address 192.168.31.120; 48 49 } 50 51 } ``` ``` Check Files and restart servers # ll /var /etc/cobber/ks_mirror # sudo service xinetd restart # sudo service httpd restart # sudo service cobblerd restart Checking for Problems and Your First Sync cobbler check # sudo cobbler get-loaders ``` ```bash task started: 2016-04-02_235933_get_loaders task started (id=Download Bootloader Content, time=Sat Apr 2 23:59:33 2016) downloading http://cobbler.github.io/loaders/README to /var/lib/cobbler/loaders/README downloading http://cobbler.github.io/loaders/COPYING.elilo to /var/lib/cobbler/loaders/COPYING.elilo downloading http://cobbler.github.io/loaders/COPYING.yaboot to /var/lib/cobbler/loaders/COPYING.yaboot downloading http://cobbler.github.io/loaders/COPYING.syslinux to /var/lib/cobbler/loaders/COPYING.syslinux downloading http://cobbler.github.io/loaders/elilo-3.8-ia64.efi to /var/lib/cobbler/loaders/elilo-ia64.efi downloading http://cobbler.github.io/loaders/yaboot-1.3.17 to /var/lib/cobbler/loaders/yaboot downloading http://cobbler.github.io/loaders/pxelinux.0-3.86 to /var/lib/cobbler/loaders/pxelinux.0 downloading http://cobbler.github.io/loaders/menu.c32-3.86 to /var/lib/cobbler/loaders/menu.c32 downloading http://cobbler.github.io/loaders/grub-0.97-x86.efi to /var/lib/cobbler/loaders/grub-x86.efi downloading http://cobbler.github.io/loaders/grub-0.97-x86_64.efi to /var/lib/cobbler/loaders/grub-x86_64.efi *** TASK COMPLETE *** ``` Importing Your First Distribution # ll /usr/local/src/centos6.5_x86_64 # mount -t iso9660 -o loop,ro /path/to/isos/centos6.5_x86_64.iso /media/ct6 # cobbler import --name=centos6.5 --arch=x86_64 --path=/media/ct6 # cobbler distro list # cobbler profile list –name 为安装源定义一个名字 –arch 指定安装源是32位还是64位, 目前支持的选项有: x86│x86_64│ia64 cobbler check problem # cobbler check The following are potential configuration items that you may want to fix: 1 : file /etc/xinetd.d/rsync does not exist 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. cobbler sync # sudo cobbler sync 1. Views distro details 2. cobbler distro report –name=centos6.5-x86_64 ## 测试 test client install linux system. [ network pxe boot ] ## Cobbler目录说明 ```bash Cobbler配置文件目录:/etc/cobbler /etc/cobbler/settings ##cobbler主配置文件 /etc/cobbler/dhcp.template ##DHCP服务的配置模板 /etc/cobbler/tftpd.template ##tftp服务的配置模板 /etc/cobbler/rsync.template ##rsync服务的配置模板 /etc/cobbler/iso ##iso模板配置文件 /etc/cobbler/pxe ##pxe模板文件 /etc/cobbler/power ##电源的配置文件 /etc/cobbler/users.conf ##Web服务授权配置文件 /etc/cobbler/users.digest ##用于web访问的用户名密码配置文件 /etc/cobbler/dnsmasq.template ##DNS服务的配置模板 /etc/cobbler/modules.conf ##Cobbler模块配置文件 Cobbler数据目录:/var/lib/cobbler /var/lib/cobbler/config ##配置文件 /var/lib/cobbler/triggers ##Cobbler命令 /var/lib/cobbler/kickstarts ##默认存放kickstart文件 /var/lib/cobbler/loaders ##存放的各种引导程序 系统安装镜像目录:/var/www/cobbler /var/www/cobbler/ks_mirror ##导入的系统镜像列表 /var/www/cobbler/images ##导入的系统镜像启动文件 /var/www/cobbler/repo_mirror ##yum源存储目录 日志目录:/var/log/cobbler /var/log/cobbler/install.log ##客户端系统安装日志 /var/log/cobbler/cobbler.log ##cobbler日志 ``` ## 异常问题的收集 - PXE-E32:TFTP open timeout PXE-M0F:Exiting Inter PXE ROM operating system not found 原因:iptables未关闭 - 最小化安装的centos无法使用ifconfig命令,使用ip addr查看DHCP分配地址 # yum install net-tools - debmirror package is not installed, it will be required to manage debian deployments and repositories deb system.don't need it.(如果不是安装 debian 之类的系统,此提示可以忽略)
Bobby
2021年12月20日 00:39
分享文档
收藏文档
阅读
150
上一篇
下一篇
微信扫一扫
复制链接
手机扫一扫进行分享
复制链接
关于 MrDoc
觅思文档MrDoc
是
州的先生
开发并开源的在线文档系统,其适合作为个人和小型团队的云笔记、文档和知识库管理工具。
如果觅思文档给你或你的团队带来了帮助,欢迎对作者进行一些打赏捐助,这将有力支持作者持续投入精力更新和维护觅思文档,感谢你的捐助!
>>>捐助鸣谢列表
微信
支付宝
QQ
PayPal
Markdown文件
分享
链接
类型
密码
更新密码