一、Cobbler 安装

$ yum install -y epel-release 
$ yum install -y cobbler cobbler-web pykickstart debmirror xinetd
$ systemctl restart httpd
$ systemctl restart cobblerd

$ vim /etc/cobbler/settings
  server
  next_server
   
$ cobbler get-loaders
$ systemctl enable rsyncd

$ vim /etc/debmirror.conf
   # @dists="sid";
   # @arches="i386";
   
$ openssl passwd -1 -salt $(openssl rand -hex 4)

$ vim /etc/cobbler/settings
default_password_crypted

$ yum install cman fence-agents
$ vim /etc/xinetd.d/tftp
disabled=no

$ systemctl restart cobblerd
$ cobbler sync
$ cobbler check
$ yum install -y dhcp
$ vim /etc/dhcp/dhcpd.conf
    option domain-name "chinasoft.com";
    option domain-name-servers 114.114.114.114,8.8.8.8;
    default-lease-time 43200;
    max-lease-time 86400;
    log-facility local7;
    subnet 20.0.0.0 netmask 255.0.0.0 {
        range 20.20.10.10 20.20.10.240;
        option routers 20.20.20.20;
    }
    next-server 20.20.20.20;
     filename="pxelinux.0";
     
$ systemctl restart dhcpd
$ systemctl enable tftp
$ systemctl enable dhcpd
$ systemctl start tftp
$ systemctl restart cobblerd
$ cobbler distro list
$ cobbler profile list

二、Cobbler 安装 Centos7

$ mount -r /dev/cdrom /media
$ cobbler import --name="centos7.1806" --path=/media
$ cobbler profile remove --name=centos7.1806
$ cp anaconda-ks.cfg /var/lib/cobbler/kickstarts/
$ cobbler profile add --name=centos7.1806 --distro=centos7.1806 --kickstart=/var/lib/cobbler/kickstarts/centos7.1806.cfg
$ cobbler sync
#Kickstart Configurator by WangYang
#platform=x86, AMD64, or Intel EM64T
#System language
lang en_US
#System keyboard
keyboard us
#Sytem timezone
timezone Asia/Shanghai
#Root password
rootpw --iscrypted $default_password_crypted
#rootpw --iscrypted $1$ops-node$7hqdpgEmIE7Z0RbtQkxW20
#Use text mode install
text
#Install OS instead of upgrade
install
#Use NFS installation Media
url --url="http://192.168.66.14/cobbler/ks_mirror/centos7" (需要修改路径)
#System bootloader configuration
bootloader --location=mbr
#Clear the Master Boot Record
zerombr
#Partition clearing information
clearpart --all --initlabel
#Disk partitioning information
part /boot --fstype xfs --size 1024 --ondisk sda
part swap --size 4000 --ondisk sda
part / --fstype xfs --size 1 --grow --ondisk sda
#System authorization infomation
auth  --useshadow  --enablemd5
#Network information
$SNIPPET('network_config')
#network --bootproto=dhcp --device=eth0 --onboot=on
# Reboot after installation
reboot
#Firewall configuration
firewall --disabled
#SELinux configuration
selinux --disabled
#Do not configure XWindows
skipx
%pre
$SNIPPET('log_ks_pre')
$SNIPPET('kickstart_start')
$SNIPPET('pre_install_network_config')
# Enable installation monitoring
$SNIPPET('pre_anamon')
%end
#Package install information
%packages 标红看个人需求,不该也没事
@^minimal
@core
chrony
kexec-tools
%end

三、Cobbler 安装 Centos6(装的是字符版)

$ mount -r /dev/cdrom /media
$ cobbler import --name="centos6.8" --path=/media
$ cobbler profile remove --name=centos6.8
$ cp anaconda-ks.cfg /var/lib/cobbler/kickstarts/
$ cobbler profile add --name=centos6.8 --distro=centos6.8 --kickstart=/var/lib/cobbler/kickstarts/centos6.8.cfg
$ cobbler sync
#platform=x86, AMD64, or Intel EM64T
# System authorization information
auth  --useshadow  --enablemd5
# System bootloader configuration
bootloader --location=mbr
# Partition clearing information
clearpart --all --initlabel
#Partition information
part /boot --fstype ext4 --size 1024 --ondisk sda
part swap --size=1500
part / --fstype ext4 --size 1 --grow --ondisk sda
 
# Use text mode install
text
# Firewall configuration
firewall --disable
# 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
# Network information
$SNIPPET('network_config')
#network --bootproto=dhcp   --device=em1
# Reboot after installation
reboot

#Root password
rootpw --iscrypted $default_password_crypted
# SELinux configuration
selinux --disabled
# Do not configure the X Window System
skipx
# System timezone
timezone   Asia/Shanghai
# Install OS instead of upgrade
install
# Clear the Master Boot Record
zerombr
 
%packages
@base
@compat-libraries
@debugging
@development
tree
nmap
sysstat
lrzsz
dos2unix
telnet

%pre
$SNIPPET('log_ks_pre')
$SNIPPET('kickstart_start')
$SNIPPET('pre_install_network_config')
# Enable installation monitoring
$SNIPPET('pre_anamon')
 
%post

%end

四、Cobbler 设置超时默认安装系统

  $ cobbler system add --name=default --profile=centos7-basic

cobbler 装机服务的更多相关文章

  1. cobbler装机错误--Failed to create kernel channel,-22

    最近使用cobbler安装GPU的机器遇到了一个错误:Failed to create kernel channel,-22 经过各种搜索发现是英伟达的显卡与centos7的默认显卡驱动冲突导致. 网 ...

  2. CentOS7中搭建cobbler自动装机服务

    一.实验环境 一台centos7 epel源网址 https://fedoraproject.org/wiki/EPEL?rd=Epel 使用nat模式 二.实验步骤 1.下载epel源后进行文件夹挂 ...

  3. cobbler自动装机服务简介与配置

    cobbler简介 Cobbler是一个Linux服务器安装的服务,可以通过网络启动(PXE)的方式来快速安装.重装物理服务器和虚拟机,同时还可以管理DHCP,DNS等. Cobbler可以使用命令行 ...

  4. linux上的PXE装机服务的搭建

    PXE 先安装一下依赖服务 yum -y install vsftpd dhcp tftp syslinux tftp-server cd /var/ftp/pub/ mkdir dvd 设置权限 c ...

  5. cobbler装机系统部署

    1.cobbler安装 [root@linux-node1 ~]# cp /etc/cobbler/settings{,.ori} # 备份 # server,Cobbler服务器的IP. sed - ...

  6. Cobbler自动装机--2

     自动重装工具--koan 客户机已经通过cobbler安装centos7系统完毕. 安装koan,能实现重装,安装之前先安装epel源 koan是kickstart-over-a-network的缩 ...

  7. cobbler 配置(转载)

    Cobbler介绍 Cobbler 是一个系统启动服务(boot server),可以通过网络启动(PXE)的方式用来快速安装.重装物理服务器和虚拟机,支持安装不同的 Linux 发行版和 Windo ...

  8. cobbler部署centos6与centos7系列

    cobbler部署centos6与centos7系列 转载自:http://www.jianshu.com/p/a4bed77bf40d 版权声明:完全抄自 http://www.jianshu.co ...

  9. centos 7 下 cobbler 安装

    一.cobbler 介绍: Cobbler 是一个系统启动服务(boot server),可以通过网络启动(PXE)的方式用来快速安装.重装物理服务器和虚拟机,支持安装不同的 Linux 发行版和 W ...

随机推荐

  1. 权值线段树&&可持久化线段树&&主席树

    权值线段树 顾名思义,就是以权值为下标建立的线段树. 现在让我们来考虑考虑上面那句话的产生的三个小问题: 1. 如果说权值作为下标了,那这颗线段树里存什么呢? ----- 这颗线段树中, 记录每个值出 ...

  2. SpringBoot原理发现(一)

    说明: 本系列基于SpringBoot 2.2.9.RELEASE 版本,对SpringBoot的原理进行分析,一共分为四节: SpringBoot原理发现(一):创建Hello World,对pom ...

  3. 同时使用mybatis和mybatis-plus时,pageHelper失效问题解决

    一.问题由来 最近刚拿到一个别人的项目,该项目中使用mybatis和mybatis-plus来操作数据库,我们需要在此基础上添加新功能. 做功能开发时一切都很顺利,我也很快完成了自己负责的模块,然后和 ...

  4. LRU算法详解

    一.什么是 LRU 算法 就是一种缓存淘汰策略. 计算机的缓存容量有限,如果缓存满了就要删除一些内容,给新内容腾位置.但问题是,删除哪些内容呢?我们肯定希望删掉哪些没什么用的缓存,而把有用的数据继续留 ...

  5. 公钥、私钥、SSL/TLS、会话密钥、DES【转载】

    原文链接:https://www.cnblogs.com/thbCode/p/5829719.html 一,公钥私钥1,公钥和私钥成对出现2,公开的密钥叫公钥,只有自己知道的叫私钥3,用公钥加密的数据 ...

  6. 2.while循环

    while循环 #-*- coding: utf-8-*- #指定识别utf-8的字符串 1.while循环以及跳出循环 while True: #无限循环 print('i love pyhon') ...

  7. 【开发板试用报告】鸿蒙OS环境搭建及代码烧录

    鸿蒙系统的代码编译环境需要linux系统,软件开发和代码烧录需要windows环境. Linux环境 参考官方链接:https://gitee.com/openharmony/docs/blob/ma ...

  8. 有奖体验 CODING 产品,iPad Pro、HHKB 键盘等超级礼包等你来!

    DevOps 研发效能升级.高效率研发工具已成为软件研发行业的热门话题,也是每个企业研发团队需要不断探索的命题.CODING 一站式软件研发管理工具平台旨在让开发团队低门槛使用 DevOps 工具,帮 ...

  9. 利用 Github Actions 的 service container 进行集成测试

    Github Action 中 Service Container 的使用 Intro 之前写过一个 StackExchange.Redis 的一个扩展,测试项目依赖 redis,所以之前测试一直只是 ...

  10. MyBatis 中 @Param 注解的四种使用场景

    https://juejin.im/post/6844903894997270536 第一种:方法有多个参数,需要 @Param 注解 第二种:方法参数要取别名,需要 @Param 注解 第三种:XM ...