澳门在线威尼斯官方 > 电脑操作 > 澳门在线威尼斯官方:无人值班守护安装centos

原标题:澳门在线威尼斯官方:无人值班守护安装centos

浏览次数:183 时间:2020-01-01

 

 Cobbler(补鞋匠卡塔尔(قطر‎是通过将DHCP、TFTP、DNS、HTTP等劳动进行集成,成立二个宗旨管理节点,其能够兑现的效应有布署服务,创造存款和储蓄库,解压缩操作系统媒介,代理或合并一个布署管理种类,调控电源处理等。 Cobbler的最终指标是贯彻无需进行人工干预就可以安装机器。

  pxe概述
  澳门在线威尼斯官方 ,预运行执增势况(Preboot eXecution Environment,PXE,也被称为预实施遭逢卡塔尔国是让计算机通过网卡独立地使用数据设备(如硬盘卡塔尔或然设置操作系统

    PXE Client发送广播包诉求DHCP分配IP地址DHCP
    Server回复须求,给出IP地址以至Boot
    Server的地方PXE下载引导文件实施指导程序

总括来讲,

  pxe客商端会调用网际左券(ip)、客户数量报合同(udp卡塔尔、动态主机设定左券(DHCP卡塔尔、Mini文件传输合同(TFTP卡塔尔(قطر‎

  pxe客商端(client)指机器在pxe运行进度中的脚色。贰个pxe顾客端能够是风姿罗曼蒂克台服务器、台式机计算机也许其余装有pxe运行代码的机械

  PXE主要是由此播放的不二诀要发送三个包,并请注获取一个地址,而后交给TFTP程序下载叁个引导文件。

cobbler和Kickstart批量装机软件

 Cobbler由python语言开垦,是对PXE和Kickstart以致DHCP的卷入。融入超多特色,提供了CLI和Web的田间管理格局。更加有扶助的实行网络安装。同期,Cobbler也提供了API接口,使用别的语言也相当轻松做扩充。它不紧能够安装物理机,同期也支撑kvm、xen虚构化、Guest OS的装置。越来越多的是它还是可以构成Puppet等聚集国化工进出口总企管软件,完成自动化的管住。

  Kickstart 是后生可畏种无人值班守护的设置情势,它的工作规律是在安装进度中著录人工干预填写的种种参数,并转移叁个名字为ks.cfg的文件。大家能够简简单单明了为一个机关安装应答配置管理程序。通过读取那几个布局文件,系统通晓怎么去分区,要设置什么包,配什么IP,优化什么内核参数等等 

  一句话总结:Cobbler补鞋匠是对Kickstart的包裹,简化安装步骤、使用流程,官方称为补鞋匠都能学会的批量装机。

Cobbler 工作流程

server端:

    第一步,启动Cobbler服务
    第二步,实行Cobbler错误检查,实施cobbler check命令
    第三步,进行布置同步,实行cobbler sync命令
    第四步,复制相关运维文件文件到TFTP目录中
    第五步,运维DHCP服务,提供地方分配
    第六步,DHCP服务分配IP地址
    第七步,TFTP传输运行文件
    第八步,Server端接受装置新闻
    第九步,Server端发送ISO镜像与Kickstart文件

Client端:

    第一步,顾客端以PXE格局运行
    第二步,客户端获取IP地址
    第三步,通过TFTP服务器获取运营文件
    第四步,进入Cobbler安装选用分界面
    第五步,顾客端分明加载新闻
    第六步,依据布署消息准备安装系统
    第七步,加载Kickstart文件
    第八步,传输种类安装的别的文件
    第九步,举办安装系统

 

标准情状计划:

  1.互连网景况:host-only、nat网络,因为Cobbler必要用到温馨的dhcp服务器,所感觉了防范都在同多少个网络产生dhcp获取混乱,供给切换互连网!~ 

  2.近乎装置服必须要的碰着筹算:1,关闭iptables,selinux 2,配置静态IP、设置主机名 况兼在hosts文件下绑定 3.时间一起4.安排本地iso镜像里的yum仓库,163源epel源 (安装软件)

cobbler server    -------    client
                   192.168.100.2254%4   ------------------------------------   装机时候由DHCP自动配置

 

一.  在cobbler server上安装cobbler

  yum install cobbler cobbler-web tftp* rsync xinetd http* syslinux dhcp* pykickstart

[root@bokeyuan ~]# yum install cobbler cobbler-web tftp* rsync xinetd http* syslinux dhcp* pykickstart
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
Package rsync-3.0.9-17.el7.x86_64 already installed and latest version
Package 12:dhcp-common-4.2.5-47.el7.centos.x86_64 already installed and latest version
Package 12:dhcp-libs-4.2.5-47.el7.centos.x86_64 already installed and latest version
Package pykickstart-1.99.66.10-1.el7.noarch already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package cobbler.noarch 0:2.6.3-1.el6 will be installed
--> Processing Dependency: python-simplejson for package: cobbler-2.6.3-1.el6.noarch
--> Processing Dependency: python-cheetah for package: cobbler-2.6.3-1.el6.noarch
--> Processing Dependency: mod_wsgi for package: cobbler-2.6.3-1.el6.noarch
--> Processing Dependency: PyYAML for package: cobbler-2.6.3-1.el6.noarch
---> Package cobbler-web.noarch 0:2.6.3-1.el6 will be installed
--> Processing Dependency: mod_ssl for package: cobbler-web-2.6.3-1.el6.noarch
--> Processing Dependency: Django for package: cobbler-web-2.6.3-1.el6.noarch
---> Package dhcp.x86_64 12:4.2.5-47.el7.centos will be installed
---> Package httpcomponents-client.noarch 0:4.2.5-5.el7_0 will be installed
--> Processing Dependency: mvn(commons-logging:commons-logging) for package: httpcomponents-client-4.2.5-5.el7_0.noarch
--> Processing Dependency: mvn(commons-codec:commons-codec) for package: httpcomponents-client-4.2.5-5.el7_0.noarch
---> Package httpcomponents-core.noarch 0:4.2.4-6.el7 will be installed
---> Package httpd.x86_64 0:2.4.6-45.el7.centos will be installed
--> Processing Dependency: /etc/mime.types for package: httpd-2.4.6-45.el7.centos.x86_64
---> Package httpd-devel.x86_64 0:2.4.6-45.el7.centos will be installed
--> Processing Dependency: apr-util-devel for package: httpd-devel-2.4.6-45.el7.centos.x86_64
--> Processing Dependency: apr-devel for package: httpd-devel-2.4.6-45.el7.centos.x86_64
---> Package httpd-manual.noarch 0:2.4.6-45.el7.centos will be installed
---> Package httpd-tools.x86_64 0:2.4.6-45.el7.centos will be installed
---> Package syslinux.x86_64 0:4.05-13.el7 will be installed
---> Package tftp.x86_64 0:5.2-13.el7 will be installed
---> Package tftp-server.x86_64 0:5.2-13.el7 will be installed
---> Package xinetd.x86_64 2:2.3.15-13.el7 will be installed
--> Running transaction check
---> Package Django14.noarch 0:1.4.20-1.el6 will be installed
--> Processing Dependency: python(abi) = 2.6 for package: Django14-1.4.20-1.el6.noarch
--> Processing Dependency: python-simplejson for package: Django14-1.4.20-1.el6.noarch
---> Package PyYAML.x86_64 0:3.10-11.el7 will be installed
--> Processing Dependency: libyaml-0.so.2()(64bit) for package: PyYAML-3.10-11.el7.x86_64
---> Package apache-commons-codec.noarch 0:1.8-7.el7 will be installed
---> Package apache-commons-logging.noarch 0:1.1.2-7.el7 will be installed
--> Processing Dependency: mvn(logkit:logkit) for package: apache-commons-logging-1.1.2-7.el7.noarch
--> Processing Dependency: mvn(log4j:log4j) for package: apache-commons-logging-1.1.2-7.el7.noarch
--> Processing Dependency: mvn(avalon-framework:avalon-framework-api) for package: apache-commons-logging-1.1.2-7.el7.noarch
---> Package apr-devel.x86_64 0:1.4.8-3.el7 will be installed
---> Package apr-util-devel.x86_64 0:1.5.2-6.el7 will be installed
--> Processing Dependency: openldap-devel(x86-64) for package: apr-util-devel-1.5.2-6.el7.x86_64
--> Processing Dependency: libdb-devel(x86-64) for package: apr-util-devel-1.5.2-6.el7.x86_64
--> Processing Dependency: expat-devel(x86-64) for package: apr-util-devel-1.5.2-6.el7.x86_64
---> Package cobbler.noarch 0:2.6.3-1.el6 will be installed
--> Processing Dependency: python-simplejson for package: cobbler-2.6.3-1.el6.noarch
--> Processing Dependency: python-cheetah for package: cobbler-2.6.3-1.el6.noarch
---> Package mailcap.noarch 0:2.1.41-2.el7 will be installed
---> Package mod_ssl.x86_64 1:2.4.6-45.el7.centos will be installed
---> Package mod_wsgi.x86_64 0:3.4-12.el7_0 will be installed
--> Running transaction check
---> Package Django14.noarch 0:1.4.20-1.el6 will be installed
--> Processing Dependency: python(abi) = 2.6 for package: Django14-1.4.20-1.el6.noarch
--> Processing Dependency: python-simplejson for package: Django14-1.4.20-1.el6.noarch
---> Package avalon-framework.noarch 0:4.3-10.el7 will be installed
--> Processing Dependency: xalan-j2 for package: avalon-framework-4.3-10.el7.noarch
---> Package avalon-logkit.noarch 0:2.1-14.el7 will be installed
--> Processing Dependency: tomcat-servlet-3.0-api for package: avalon-logkit-2.1-14.el7.noarch
--> Processing Dependency: jms for package: avalon-logkit-2.1-14.el7.noarch
---> Package cobbler.noarch 0:2.6.3-1.el6 will be installed
--> Processing Dependency: python-simplejson for package: cobbler-2.6.3-1.el6.noarch
--> Processing Dependency: python-cheetah for package: cobbler-2.6.3-1.el6.noarch
---> Package expat-devel.x86_64 0:2.1.0-8.el7 will be installed
---> Package libdb-devel.x86_64 0:5.3.21-19.el7 will be installed
---> Package libyaml.x86_64 0:0.1.4-11.el7_0 will be installed
---> Package log4j.noarch 0:1.2.17-15.el7 will be installed
--> Processing Dependency: mvn(javax.mail:mail) for package: log4j-1.2.17-15.el7.noarch
---> Package openldap-devel.x86_64 0:2.4.40-13.el7 will be installed
--> Processing Dependency: cyrus-sasl-devel(x86-64) for package: openldap-devel-2.4.40-13.el7.x86_64
--> Running transaction check
---> Package Django14.noarch 0:1.4.20-1.el6 will be installed
--> Processing Dependency: python(abi) = 2.6 for package: Django14-1.4.20-1.el6.noarch
--> Processing Dependency: python-simplejson for package: Django14-1.4.20-1.el6.noarch
---> Package cobbler.noarch 0:2.6.3-1.el6 will be installed
--> Processing Dependency: python-simplejson for package: cobbler-2.6.3-1.el6.noarch
--> Processing Dependency: python-cheetah for package: cobbler-2.6.3-1.el6.noarch
---> Package cyrus-sasl-devel.x86_64 0:2.1.26-20.el7_2 will be installed
---> Package geronimo-jms.noarch 0:1.1.1-19.el7 will be installed
---> Package javamail.noarch 0:1.4.6-8.el7 will be installed
---> Package tomcat-servlet-3.0-api.noarch 0:7.0.69-10.el7 will be installed
---> Package xalan-j2.noarch 0:2.7.1-23.el7 will be installed
--> Processing Dependency: xerces-j2 for package: xalan-j2-2.7.1-23.el7.noarch
--> Processing Dependency: osgi(org.apache.xerces) for package: xalan-j2-2.7.1-23.el7.noarch
--> Running transaction check
---> Package Django14.noarch 0:1.4.20-1.el6 will be installed
--> Processing Dependency: python(abi) = 2.6 for package: Django14-1.4.20-1.el6.noarch
--> Processing Dependency: python-simplejson for package: Django14-1.4.20-1.el6.noarch
---> Package cobbler.noarch 0:2.6.3-1.el6 will be installed
--> Processing Dependency: python-simplejson for package: cobbler-2.6.3-1.el6.noarch
--> Processing Dependency: python-cheetah for package: cobbler-2.6.3-1.el6.noarch
---> Package xerces-j2.noarch 0:2.11.0-17.el7_0 will be installed
--> Processing Dependency: xml-commons-resolver >= 1.2 for package: xerces-j2-2.11.0-17.el7_0.noarch
--> Processing Dependency: xml-commons-apis >= 1.4.01 for package: xerces-j2-2.11.0-17.el7_0.noarch
--> Processing Dependency: osgi(org.apache.xml.resolver) for package: xerces-j2-2.11.0-17.el7_0.noarch
--> Processing Dependency: osgi(javax.xml) for package: xerces-j2-2.11.0-17.el7_0.noarch
--> Running transaction check
---> Package Django14.noarch 0:1.4.20-1.el6 will be installed
--> Processing Dependency: python(abi) = 2.6 for package: Django14-1.4.20-1.el6.noarch
--> Processing Dependency: python-simplejson for package: Django14-1.4.20-1.el6.noarch
---> Package cobbler.noarch 0:2.6.3-1.el6 will be installed
--> Processing Dependency: python-simplejson for package: cobbler-2.6.3-1.el6.noarch
--> Processing Dependency: python-cheetah for package: cobbler-2.6.3-1.el6.noarch
---> Package xml-commons-apis.noarch 0:1.4.01-16.el7 will be installed
---> Package xml-commons-resolver.noarch 0:1.2-15.el7 will be installed
--> Finished Dependency Resolution
Error: Package: Django14-1.4.20-1.el6.noarch (cobbler)
           Requires: python-simplejson
Error: Package: cobbler-2.6.3-1.el6.noarch (cobbler)
           Requires: python-simplejson
Error: Package: Django14-1.4.20-1.el6.noarch (cobbler)
           Requires: python(abi) = 2.6
           Installed: python-2.7.5-48.el7.x86_64 (@anaconda)
               python(abi) = 2.7
               python(abi) = 2.7
Error: Package: cobbler-2.6.3-1.el6.noarch (cobbler)
           Requires: python-cheetah
 You could try using --skip-broken to work around the problem
** Found 3 pre-existing rpmdb problem(s), 'yum check' output follows:
ipa-client-4.4.0-12.el7.centos.x86_64 has installed conflicts freeipa-client: ipa-client-4.4.0-12.el7.centos.x86_64
ipa-client-common-4.4.0-12.el7.centos.noarch has installed conflicts freeipa-client-common: ipa-client-common-4.4.0-12.el7.centos.noarch
ipa-common-4.4.0-12.el7.centos.noarch has installed conflicts freeipa-common: ipa-common-4.4.0-12.el7.centos.noarch

 报错解决:提醒--skip-broken ,检查发掘自个儿yum源不全yum不能安装下面四个依赖包。补全yum源化解

 

安装到位,运转软件

[root@bokeyuan ~]# systemctl restart cobblerd.service
[root@bokeyuan ~]# systemctl restart httpd.service
[root@bokeyuan ~]# systemctl enable cobblerd.service  //开机自运行
Created symlink from /etc/systemd/system/multi-user.target.wants/cobblerd.service to /usr/lib/systemd/system/cobblerd.service.
[root@bokeyuan ~]# systemctl enable httpd.service  //开机自运行
Created symlink from /etc/systemd/system/multi-user.target.wants/httpd.service to /usr/lib/systemd/system/httpd.service.

缘何运行apache?血的教导,排了相当久。不先运行apache 后续cobbler check 报python file 的荒诞!!!

二.中央配置

 

[root@bokeyuan ~]# cobbler check
The following are potential configuration items that you may want to fix:

1 : The 'server' field in /etc/cobbler/settings must be set to something other than localhost, or kickstarting features will not work.  This should be a resolvable hostname or IP for the boot server as reachable by all machines that will use it.
2 : For PXE to be functional, the 'next_server' field in /etc/cobbler/settings must be set to something other than 127.0.0.1, and should match the IP of the boot server on the PXE network.
3 : change 'disable' to 'no' in /etc/xinetd.d/tftp
4 : some network boot-loaders are missing from /var/lib/cobbler/loaders, you may run 'cobbler get-loaders' to download them, or, if you only want to handle x86/x86_64 netbooting, you may ensure that you have installed a *recent* version of the syslinux package installed and can ignore this message entirely.  Files in this directory, should you want to support all architectures, should include pxelinux.0, menu.c32, elilo.efi, and yaboot. The 'cobbler get-loaders' command is the easiest way to resolve these requirements.
5 : enable and start rsyncd.service with systemctl
6 : debmirror package is not installed, it will be required to manage debian deployments and repositories
7 : The default password used by the sample templates for newly installed machines (default_password_crypted in /etc/cobbler/settings) is still set to 'cobbler' and should be changed, try: "openssl passwd -1 -salt 'random-phrase-here' 'your-password-here'" to generate new one
8 : fencing tools were not found, and are required to use the (optional) power management features. install cman or fence-agents to use them

Restart cobblerd and then run 'cobbler sync' to apply changes.

 一步步消除上述供给,部分供给可忽视。个体差别不相同每一种人必要数量也不及,基本上大概

解决急需1、2、7
# openssl passwd -1 -salt 'werwqerwqr' '123456'        --123456为密码(那是全自动安装客商端系统成功后的root登入密码),werwqerwqr为随机字节烦恼码(随意写)
$1$werwqerw$.prcfrYFbwuvkD8XspayN.

 

# vim /etc/cobbler/settings
384 server: 192.168.100.221    --换到cobbler服务器端的IP
272 next_server: 192.168.100.221    --同上
101 default_password_crypted: "$1$werwqerw$.prcfrYFbwuvkD8XspayN."  --把密码字符串换到你上边发生的字符串(此密码为顾客机安装后的root登陆密码State of Qatar

减轻急需3
# vim /etc/xinetd.d/tftp
        disable = no    --yes改为no

 

抽薪止沸急需5

#systemctl restart rsyncd.service

#systemctl enable  rsyncd.service

 

缓慢解决急需8
# yum install fence-agents

OK,剩下的须要像

4 : some network boot-loaders are missing from /var/lib/cobbler/loaders, you may run 'cobbler get-loaders' to download them, or, if you only want to handle x86/x86_64 netbooting, you may ensure that you have installed a *recent* version of the syslinux package installed and can ignore this message entirely.  Files in this directory, should you want to support all architectures, should include pxelinux.0, menu.c32, elilo.efi, and yaboot. The 'cobbler get-loaders' command is the easiest way to resolve these requirements.
6 : debmirror package is not installed, it will be required to manage debian deployments and repositories

(难题4能够运用cobbler get-loaders解决,但须求有外网和外网的yum源 跳过,未来是NAT情势;难题6 是关于debian系统的,大家这边能够忽视)

最后# systemctl restart cobblerd.service 重起下cobbler补鞋匠服务!

 

三.导入centos7.3的iso镜像

自个儿的情形iso镜像挂载在/yum目录,此拷贝步骤时间较长

# cobbler import --path=/yum/ --name=centos7.3

# cobbler distro list    --导入成功后,确认导入的镜像名
   centos7.3-x86_64
# cobbler profile list    --导入成功后,确认暗中认可的profile名
   centos7.3-x86_64

[root@bokeyuan ~]# cobbler import --path=/yum/ --name=centos7.3
task started: 2017-09-03_175701_import
task started (id=Media import, time=Sun Sep  3 17:57:01 2017)
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.3:
creating new distro: centos7.3-x86_64
trying symlink: /var/www/cobbler/ks_mirror/centos7.3 -> /var/www/cobbler/links/centos7.3-x86_64
creating new profile: centos7.3-x86_64
associating repos
checking for rsync repo(s)
checking for rhn repo(s)
checking for yum repo(s)
starting descent into /var/www/cobbler/ks_mirror/centos7.3 for centos7.3-x86_64
processing repo at : /var/www/cobbler/ks_mirror/centos7.3
need to process repo/comps: /var/www/cobbler/ks_mirror/centos7.3
looking for /var/www/cobbler/ks_mirror/centos7.3/repodata/*comps*.xml
Keeping repodata as-is :/var/www/cobbler/ks_mirror/centos7.3/repodata
*** TASK COMPLETE ***

 

四.修改dhcp配置
# vim /etc/cobbler/dhcp.template  --在这里文件的第21行到第25行纠正成你对景挂画的网段和ip    

subnet 192.168.100.0 netmask 255.255.255.0 {
     option routers             192.168.100.221;
     option domain-name-servers 192.168.100.221;
     option subnet-mask         255.255.255.0;
     range dynamic-bootp        192.168.100.100 192.168.100.254;

--图形的操作进程这里差相当少后续还应该有这一步 首要

# vim /etc/cobbler/settings    --再去修改那么些构造文件,改成dhcp服务由cobbler来保管
242 manage_dhcp: 1        --把0改为1

#  systemctl restart cobblerd.service   --保存后,再重启此服务

五.使用cobbler sync同步,并启动xinetd服务

上面包车型客车cobbler sync 很主要,假如那步报错必定要排出来,就阅世来讲那步出错日常是IP配置出错,记得留心一点,个体差距不用就不详细表述~  

# cobbler sync

[root@bokeyuan ~]# cobbler sync
task started: 2017-09-03_180107_sync
task started (id=Sync, time=Sun Sep  3 18:01:07 2017)
running pre-sync triggers
cleaning trees
removing: /var/www/cobbler/images/centos7.3-x86_64
removing: /var/lib/tftpboot/pxelinux.cfg/default
removing: /var/lib/tftpboot/grub/images
removing: /var/lib/tftpboot/grub/efidefault
removing: /var/lib/tftpboot/images/centos7.3-x86_64
removing: /var/lib/tftpboot/s390x/profile_list
copying bootloaders
trying hardlink /usr/share/syslinux/pxelinux.0 -> /var/lib/tftpboot/pxelinux.0
trying hardlink /usr/share/syslinux/menu.c32 -> /var/lib/tftpboot/menu.c32
trying hardlink /usr/share/syslinux/memdisk -> /var/lib/tftpboot/memdisk
copying distros to tftpboot
copying files for distro: centos7.3-x86_64
trying hardlink /var/www/cobbler/ks_mirror/centos7.3/images/pxeboot/vmlinuz -> /var/lib/tftpboot/images/centos7.3-x86_64/vmlinuz
trying hardlink /var/www/cobbler/ks_mirror/centos7.3/images/pxeboot/initrd.img -> /var/lib/tftpboot/images/centos7.3-x86_64/initrd.img
copying images
generating PXE configuration files
generating PXE menu structure
copying files for distro: centos7.3-x86_64
trying hardlink /var/www/cobbler/ks_mirror/centos7.3/images/pxeboot/vmlinuz -> /var/www/cobbler/images/centos7.3-x86_64/vmlinuz
trying hardlink /var/www/cobbler/ks_mirror/centos7.3/images/pxeboot/initrd.img -> /var/www/cobbler/images/centos7.3-x86_64/initrd.img
Writing template files for centos7.3-x86_64
rendering TFTPD files
generating /etc/xinetd.d/tftp
processing boot_files for distro: centos7.3-x86_64
cleaning link caches
running post-sync triggers
running python triggers from /var/lib/cobbler/triggers/sync/post/*
running python trigger cobbler.modules.sync_post_restart_services
running shell triggers from /var/lib/cobbler/triggers/sync/post/*
running python triggers from /var/lib/cobbler/triggers/change/*
running python trigger cobbler.modules.scm_track
running shell triggers from /var/lib/cobbler/triggers/change/*
*** TASK COMPLETE ***

 
# systemctl restart xinetd.service
# systemctl enable xinetd.service

 

六.新建另三个设想机 选取互联网安装PXE (保障平等私有互联网,并且最棒2G内存,内部存款和储蓄器小的话会在装置时报空间缺乏的不当卡塔尔,实行安装测量试验

澳门在线威尼斯官方 1    

设置到位后,改革boot携带

澳门在线威尼斯官方 2

 

 

 


电动安装大家早就完毕了,但怎样自定义大家想安装的profile

入眼正是你要求自定义贰个ks文件

自定义ks文件的法子
1,假令你很了然此文件,直接拷别人的沙盘模拟经营修改大概直接采取/root/anaconda-ks.cfg来改正
2,使用一个图纸工具system-config-kickstart来协理你铺排(上边作者便是行使这种情势卡塔尔

# yum install system-config-kickstart
# system-config-kickstart    

--图形的操作进度这里大约

给大家三个做好的ks.cfg文件参照他事他说加以考察:

先是个文件便是用来设置centos7.3宿主机的ks文件,内容如下:
#platform=x86, AMD64, or Intel EM64T
#version=DEVEL
# Install OS instead of upgrade
install
# Keyboard layouts
keyboard 'us'
# Root password
rootpw --iscrypted $1$6RbFC2nC$GBugZL7ACuGhck8DbUZgM/
# Use network installation
url --url=""
# System language
lang en_US
# Firewall configuration
firewall --disabled
# System authorization information
auth  --useshadow  --passalgo=sha512
# Use text mode install
text
firstboot --disable
# SELinux configuration
selinux --disabled

# Network information
network  --bootproto=dhcp --device=eth0
# Reboot after installation
reboot
# System timezone
timezone Asia/Shanghai --isUtc
# System bootloader configuration
bootloader --append="rhgb quiet" --location=mbr
# Clear the Master Boot Record
zerombr
# Partition clearing information
clearpart --all --initlabel
# Disk partitioning information
part /boot --fstype="xfs" --size=300
part swap --fstype="swap" --size=4000
part / --fstype="xfs"  --size=150000
part /data --fstype="xfs" --size=80000

%packages
@additional-devel
@desktop-debugging
@development
@fonts
@gnome-desktop
@input-methods
@kde-desktop
@legacy-x
@platform-devel
@remote-desktop-clients
@x11
initial-setup
initial-setup-gui
vinagre

%end

其次个文本是用来宿主机安装双系统的ks文件

#platform=x86, AMD64, or Intel EM64T
#version=DEVEL
# Install OS instead of upgrade
install
# Keyboard layouts
keyboard 'us'
# Root password
rootpw --iscrypted $1$6RbFC2nC$GBugZL7ACuGhck8DbUZgM/
# Use network installation
url --url=""
# System language
lang en_US
# Firewall configuration
firewall --disabled
# System authorization information
auth  --useshadow  --passalgo=sha512
# Use text mode install
text
firstboot --disable
# SELinux configuration
selinux --disabled

# Network information
network  --bootproto=dhcp --device=eth0
# Reboot after installation
reboot
# System timezone
timezone Asia/Shanghai --isUtc
# System bootloader configuration
bootloader --append="rhgb quiet" --location=mbr
# Clear the Master Boot Record
zerombr
# Partition clearing information
clearpart --none
# Disk partitioning information
part swap --fstype="swap" --size=4000
part / --fstype="xfs" --grow --size=1

%packages
@additional-devel
@desktop-debugging
@development
@fonts
@gnome-desktop
@input-methods
@kde-desktop
@legacy-x
@platform-devel
@remote-desktop-clients
@x11
initial-setup
initial-setup-gui
vinagre

%end

=========================================================================

# cobbler profile help    --查看帮忙
# cobbler profile list    --查看有怎样profile
   centos7.3-x86_64    

# cobbler profile report --name=centos7.3-x86_64 |grep Kickstart
Kickstart                      : /var/lib/cobbler/kickstarts/sample_end.ks  --那就是以此设置方案的kickstart文件
Kickstart Metadata             : {}

笔者未来自定义一个ks文件,也想做成一个profile,步骤如下:
步骤一:
自定义ks文件(使用system-config-kickstart或直接找一个模板文件改革),获得如下的公文

# vim /var/lib/cobbler/kickstarts/centos7.3.ks    --复制下边第一次全国代表大会段音信,粘到此文件里

#platform=x86, AMD64, or Intel EM64T
#version=DEVEL
# Install OS instead of upgrade
install
# Keyboard layouts
keyboard 'us'
# Root password
rootpw --iscrypted $1$6RbFC2nC$GBugZL7ACuGhck8DbUZgM/
# Use network installation
url --url=""
# System language
lang en_US
# Firewall configuration
firewall --disabled
# System authorization information
auth  --useshadow  --passalgo=sha512
# Use text mode install
text
firstboot --disable
# SELinux configuration
selinux --disabled

# Network information
network  --bootproto=dhcp --device=eth0
# Reboot after installation
reboot
# System timezone
timezone Asia/Shanghai --isUtc
# System bootloader configuration
bootloader --append="rhgb quiet" --location=mbr
# Clear the Master Boot Record
zerombr
# Partition clearing information
clearpart --all --initlabel
# Disk partitioning information
part /boot --fstype="xfs" --size=300
part swap --fstype="swap" --size=2000
part / --fstype="xfs" --grow --size=1

%post
rm /etc/yum.repos.d/* -rf
cat > /etc/yum.repos.d/local.repo << EOF
[base]
name=base
baseurl=file:///yum
enabled=1
gpgcheck=0
EOF
%end

%packages
@additional-devel
@desktop-debugging
@development
@fonts
@gnome-desktop
@input-methods
@kde-desktop
@legacy-x
@platform-devel
@remote-desktop-clients
@x11
initial-setup
initial-setup-gui
vinagre

%end

步骤二:把策动好的ks文件做成二个新的profile
# cobbler profile add --name=new_centos7.3 --distro=centos7.3-x86_64  --kickstart=/var/lib/cobbler/kickstarts/centos7.3.ks

# cobbler profile list        --在原来底工上就多了自定义的设置方案
   centos7.3-x86_64
   new_centos7.3

步骤三:
测试
接下来就足以新建三个客户端设想机,使用方面包车型大巴new_centos7.3装置名字来测量检验了

==================================================================

对地方操作的扩张(仅供仿照效法)
# cobbler profile edit --name=new_centos7.3 --kickstart=/var/lib/cobbler/kickstarts/xxx.ks   
# cobbler profile remove --name=new_centos7.3    

======================================================================

顾客端应用koan与服务器的cobbler联系,达成全自动重装系统

客商端供给设置koan软件包(epel源里就有卡塔尔

# yum install koan  
# koan --server=192.168.100.2 --list=profiles       --192.168.100.2为cobbler服务器IP,获得的结果和在cobbler服务器上cobbler profile list命令获得的结果风度翩翩律
   centos7.3-x86_64
   new_centos7.3

# koan --replace-self --server=192.168.100.2 --profile=new_centos7.3  --钦定本客商端依照名称为new_centos7.3的profile重装系统

# reboot  --敲完上边的通令,使用reboot,就能够重装了(没敲上边的授命那reboot正是重启)

写文不易 且行且体贴

那是二个二维码

给个空子,观众扫小编

澳门在线威尼斯官方 3

 

本文由澳门在线威尼斯官方发布于电脑操作,转载请注明出处:澳门在线威尼斯官方:无人值班守护安装centos

关键词:

上一篇:澳门在线威尼斯官方Linux下管理员强行踢出用户的

下一篇:没有了