批量安装系统软件 一次性装100台电脑的系统

Cobbler是基于Linux的自动化运维工具,基于Python2开发,用于批量自动部署安装操作系统;它提供了基于CLI的管理模式和WEB配置界面,其中WEB配置界面基于Python2和Django框架开发。此外,cobbler还提供API,方便二次开发。补鞋匠属于C/S模式(客户机/服务器模式)1。检查系统版本...

Cobbler是基于Linux的自动化运维工具,基于Python2开发,用于批量自动部署安装操作系统;它提供了基于CLI的管理模式和WEB配置界面,其中WEB配置界面基于Python2和Django框架开发。此外,cobbler还提供API,方便二次开发。补鞋匠属于C/S模式(客户机/服务器模式)

1。检查系统版本

# cat /etc/redhat-release

CentOS Linux版本7.1.1503(核心)(注意,此部署在Centos7中)

# uname -rm

3.10.0-229.el7.x86_*** x86_***

2。安装epel源代码和epel库

#yum install -y epel-release#wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo

3。安装cobbler环境所需的软件包

下载pip的最新版本,然后安装它。

#wget https://bootstrap.pypa.io/get-pip.py#python get-pip.py#ln -s /usr/local/python27/bin/pip2.7 /usr/bin/pip2#pip2 install Django==1.8.9

4。开始安装cobbler

#yum install -y httpd dhcp tftp tftp-server rsync pykickstart xinetd #yum install -y cobbler

5。centos7安装Cobbler-Web(Cobbler-Web版本2.8必须使用django1.8.9版本1.8.9)

#yum install httpd-devel#yum install -y cobbler-web

6。配置HTTPD的配置文件,更改项目存储的权限

#vim /etc/httpd/conf/httpd.conf<Directory "/usr/share/cobbler/web/"> <IfModule mod_ssl.c> SSLRequireSSL </IfModule> <IfModule mod_nss.c> NSSRequireSSL </IfModule> SetEnv VIRTUALENV Options Indexes MultiViews Order allow,deny ##apache2.4必须改为AllowOverride All Allow from all ##apache2.4必须改为Require all granted </Directory>

7。打开服务并启动

#systemctl enable xinetd#systemctl start xinetd#systemctl start httpd#systemctl start cobblerd#systemctl enable httpd#systemctl enable cobblerd#systemctl enable rsyncd#systemctl start rsyncd

8。检查鞋匠

#cobbler check

根据以上提示,按如下步骤修改配置:

修改补鞋匠的设置文件,备份

# cp /etc/cobbler/settings{,.ori}

修改服务器的IP,补鞋匠服务器。

#sed -i 's/server: 127.0.0.1/server: 192.168.0.131/' /etc/cobbler/settings

如果使用Cobbler管理DHCP,请修改此项。

#sed -i 's/next_server: 127.0.0.1/next_server: 192.168.0.131/' /etc/cobbler/settings#sed -i 's/***nage_dhcp: 0/***nage_dhcp: 1/' /etc/cobbler/settings

为了防止系统循环加载,适用于服务器的第一个启动项目是PXE启动。

#sed -i 's/pxe_just_once: 0/pxe_just_once: 1/' /etc/cobbler/settings

为新安装的系统设置默认root密码123456。random-phrase-这里是干扰码,可以自己设置。

# openssl passwd -1 -salt 'cobbler' '123456'

$ 1 $补鞋匠$ sqddobeljkvmxtczr 52/11

# vim /etc/cobbler/settings

default _ password _ crypted:“$ 1 $ cobbler $ sqddobelkjvmxtczr 52/11 ”

修改tftp配置并启用tftp

#vim /etc/xinetd.d/tftp

将disable = yes改为:disable = no

配置DHCP

# vim /etc/cobbler/dhcp.template

按如下方式修改配置:

subnet 192.168.1.0 net***sk 255.255.255.0 {option routers192.168.1.1;option do***in-name-servers 114.114.114.114;option subnet-***sk255.255.255.0;range dynamic-bootp10.0.0.100 10.0.0.200;

下载引导加载程序

#cobbler get-loaders

同步配置

#systemctl restart cobblerd#cobbler sync

9。将图像导入到cobbler

#mount /dev/cdrom /mnt#cobbler import --path=/mnt/ --name=CentOS-7-x86_*** --arch=x86_***

10。编辑kickstart文件

#cd /var/lib/cobbler/kickstarts/#vim CentOS-7-x86_***.cfg

配置文件如下所示:

#Kickstart Configurator for cobbler by Jason Zhao#platform=x86, AMD***, or Intel EM***T#System languagelang en_US#System keyboardkeyboard us#Sytem timezonetimezone Asia/Shanghai#Root passwordrootpw --iscrypted $default_password_crypted#Use text mode installtext#Install OS instead of upgradeinstall#Use NFS installation Mediaurl --url=$tree#System bootloader configurationbootloader --location=mbr#Clear the Master Boot Recordzerombr#Partition clearing infor***tionclearpart --all --initlabel#Disk partitioning infor***tionpart /boot --fstype xfs --size 1024 --ondisk sdapart swap --size 1024 --ondisk sdapart / --fstype xfs --size 1 --grow --ondisk sda#System authorization info***tionauth --useshadow --enablemd5#Network infor***tion$SNIPPET('network_config')#network --bootproto=dhcp --device=em1 --onboot=on# Reboot after installationreboot#Firewall configurationfirewall --disabled#SELinux configurationselinux --disabled#Do not configure XWindowsskipx#Package install infor***tion%pre$SNIPPET('log_ks_pre')$SNIPPET('kickstart_start')$SNIPPET('pre_install_network_config')# Enable installation monitoring$SNIPPET('pre_anamon')%end %packages@ base@ coresysstatiptrafntplrzszncurses-developenssl-develzlib-develOpenIPMI-tool***ysqln***pscreen%end %postsystemctl disable postfix.service%end

十一。更改centos6和centos7的ks文件位置

#cobbler profile edit --name=CentOS-7-x86_*** --kickstart=/var/lib/cobbler/kickstarts/CentOS-7-x86_***.cfg

12、补鞋匠常用命令

补鞋检查#检查补鞋配置

Cobbler sync #同步配置到dhcp/pxe和数据目录。

列出所有的补鞋匠元素。

导入安装的系统镜像。

Cobbler report #列出了每个元素的详细信息。

查看导入的分销系统的信息

补鞋匠配置文件#查看配置信息

查看添加的系统信息

Cobbler reposync #将yum仓库同步到本地

十三。检查详细的配置信息。这里显示centos7配置信息

# cobbler profile report# cobbler sync

14。配置绑定***c地址和IP地址,并自动选择

# cobbler system add --name=centos711 --***c=00:0C:29:70:E8:A3 --profile=Centos-7-x86_*** --ip-address=192.168.0.40 --subnet=255.255.255.0 --gateway=192.168.0.1 --inte***ce=eth0 --static=1 --hostname=centos711 --name-servers="223.5.5.5"# cobbler sync

也可以安装cento7系统。

本文来自莫失莫忘投稿,不代表舒华文档立场,如若转载,请注明出处:https://www.chinashuhua.cn/24/591489.html

打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
() 0
上一篇 06-14
下一篇 06-14

相关推荐

  • 萤石云监控怎么样 手机萤石云监控安装步骤

    海康威视绝大多数摄像机和录像机支持***萤石云APP远程监控。对于nvr产品,添加到萤石云账户,需要在录像机上做如下配置:海康威视的大部分摄像机和录像机都支持定位器萤石云APP远程监控。对于要添加到萤石云账户的nvr产品,需要在录像机上进行以下配置:录像机的萤石云设置VCR

    2023-07-29 03:58:01
    956 0
  • ps中文版免费安装教程 手机ps专业的软件推荐

    学平面设计的同学,Adobe2020版相信很多朋友都提前听说过。前几天他们看到他们的热情后马上找到了PS2020版。可惜前几天发的是简化版,朋友告诉小众在使用过程中出现了一些问题,经常打不开软件。这次他们带来了PS 2020完整版,非常稳定!【PS2020+PR2020安装包领取方式见文末

    2023-07-29 02:22:01
    877 0
  • win7offic2010老是安装出错解决方法

    Office2007或office2010,安装程序集组件时出现错误1935“错误1935。此错误通常是Microsoft NET Framework组件的问题。工具原材料net framework方法步骤安装带有1935错误的office,然后安装程序。解决office无法安装的方法如下:1。首先运行输入regedit,然后按enter 2找到HKE

    2023-07-28 22:04:01
    215 0
  • 驱动精灵怎么安装驱动(驱动精灵怎么安装蓝牙驱动)

    安装打印机驱动程序有许多方法。一开始都是安装打印机驱动的可执行程序,就像正常的软件安装一样。现在,打印机驱动程序的安装非常简单。只需要下载第三方驱动安装工具,比如“驱动向导”,就可以实现一键安装。接下来,我将说明安装方法。方法一打开驱动向导软件主界面,选择

    2023-07-28 14:52:01
    307 0

评论列表

联系我们

在线咨询: QQ交谈

邮件:admin@qq.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信