部署cobbler服务器

1.准备环境
使用nat或者仅主机模式,不要使用桥接模式,方式获取的IP不是自己的

2. 配置yum源
[epel]
name=epel
enabled=1
gpgcheck=0
baseurl=https://mirrors.aliyun.com/epel/7/x86_64/
[centos]
name=centos base
enabled=1
gpgcheck=0
baseurl=http://mirrors.163.com/centos/7/os/x86_64/

3,下载相关的软件
[root@ken ~]# yum install httpd cobbler tftp-server xinetd syslinux dhcp pykickstart -y

4.启动tftp服务
[root@ken ~]# vim /etc/xinetd.d/tftp
disable = no

[root@ken ~]# systemctl restart xinetd
5. 配置dhcp服务
subnet 192.168.182.0 netmask 255.255.255.0 {
range 192.168.182.10 192.168.182.20;
default-lease-time 600;
max-lease-time 7200;
filename “pxelinux.0”;
}

[root@ken ~]# systemctl restart dhcpd

6. 启动httpd
[root@ken ~]# systemctl restart httpd

7. 启动cobbler
[root@ken ~]# systemctl restart cobblerd

8.cobbler检测
[root@ken ~]# cobbler check

9. 修改提示信息

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.

把server指定的本地IP改为提供cobbler服务的IP地址
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.
把next_server指定的本地IP改为提供cobbler服务的IP地址

4 : enable and start rsyncd.service with systemctl

[root@ken ~]# systemctl restart rsyncd
[root@ken ~]# systemctl enable rsyncd
Created symlink from /etc/systemd/system/multi-user.target.wants/rsyncd.service to /usr/lib/systemd/system/rsyncd.service.

6 : 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
[root@ken ~]# openssl passwd -1 -salt ‘123’ ‘123’
$1$123$nE5gIYTYiF1PIXVOFjQaW/

10. 重启cobbler并在此检测
[root@ken ~]# systemctl restart cobblerd
[root@ken ~]# cobbler check
The following are potential configuration items that you may want to fix:
1 : 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.
2 : debmirror package is not installed, it will be required to manage debian deployments and repositories
3 : 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.

11.同步
[root@ken ~]# cobbler sync
task started: 2019-05-24_104642_sync
task started (id=Sync, time=Fri May 24 10:46:42 2019)
running pre-sync triggers
cleaning trees
removing: /var/lib/tftpboot/grub/images
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 images
generating PXE configuration files
generating PXE menu structure
rendering TFTPD files
generating /etc/xinetd.d/tftp
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.manage_genders
running python trigger cobbler.modules.scm_track
running shell triggers from /var/lib/cobbler/triggers/change/*
*** TASK COMPLETE ***

12. 导入镜像
[root@ken ~]# cobbler import –path=/mnt –name=”centos7″
task started: 2019-05-24_104753_import
task started (id=Media import, time=Fri May 24 10:47:53 2019)
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:
creating new distro: centos7-x86_64
trying symlink: /var/www/cobbler/ks_mirror/centos7 -> /var/www/cobbler/links/centos7-x86_64
creating new profile: centos7-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 for centos7-x86_64
processing repo at : /var/www/cobbler/ks_mirror/centos7
need to process repo/comps: /var/www/cobbler/ks_mirror/centos7
looking for /var/www/cobbler/ks_mirror/centos7/repodata/*comps*.xml
Keeping repodata as-is :/var/www/cobbler/ks_mirror/centos7/repodata
*** TASK COMPLETE ***

13.查看生成的distro
[root@ken ~]# cobbler distro list
centos7-x86_64

14.查看生成的profile
[root@ken ~]# cobbler profile list
centos7-x86_64

15.准备kickstart文件
[root@ken ~]# cp anaconda-ks.cfg /var/lib/cobbler/kickstarts/ks.cfg

16.编辑kickstart文件
url –url=http://192.168.182.128/cobbler/ks_mirror/centos7/

17.制作自己的profile
[root@ken ~]# cobbler profile add –distro=centos7-x86_64 –kickstart=/var/lib/cobbler/kickstarts/ks.cfg –name=”cent7_ken”

18. 删除默认的profile
[root@ken ~]# cobbler profile remove –name=centos7-x86_64
[root@ken ~]# cobbler profile list
cent7_ken

19.开启客户端进行验证

注意:
1.客户端模式需要与服务器模式一致
2. 内存最少3个G

cobbler实现单台服务器提供安装不同操作系统

第一步:关机重新挂载新的光盘(vmeare)

第二步:开启所有相关的服务
[root@ken ~]# systemctl restart httpd cobblerd xinetd dhcpd

第三步:在linux系统中挂载光盘
[root@ken ~]# mount /dev/cdrom /mnt
mount: /dev/sr0 is write-protected, mounting read-only

第四步:导入一个新的镜像
[root@ken ~]# cobbler import –path=/mnt –name=”centos7.3″
task started: 2019-05-24_192206_import
task started (id=Media import, time=Fri May 24 19:22:06 2019)
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 ***

第四步:查看生成的distro
[root@ken ~]# cobbler distro list
centos7-x86_64
centos7.3-x86_64

第五步:制作profile
[root@ken ~]# cobbler profile add –distro=centos7.3-x86_64 –kickstart=/var/lib/cobbler/kickstarts/ks.cfg –name=”centos7.3_ken”

第六步: 删除默认的profile
[root@ken ~]# cobbler profile list
cent7_ken
centos7.3-x86_64
centos7.3_ken
[root@ken ~]# cobbler profile remove –name=centos7.3-x86_64
[root@ken ~]# cobbler profile list
cent7_ken
centos7.3_ken

第七步:开启客户端进行验证

部署cobbler服务器的更多相关文章

  1. linux项目-之系统安装部署-cobbler

    http://cobbler.github.io/manuals/2.6.0/1/1_-_Release_Notes.html http://www.osyunwei.com/archives/760 ...

  2. 末学者笔记--Centos7系统部署cobbler批量安装系统

      [前言]: cobbler是一个可以实现批量安装系统的Linux应用程序.它有别于pxe+kickstart,cobbler可以实现同个服务器批量安装不同操作系统版本. 系统环境准备及其下载cob ...

  3. Linux下部署FTP服务器

    Linux下部署FTP服务器 下载安装包 在这里介绍的是离线部署FTP,首先下载对应的rpm包,下载链接为: 下载vsftpd服务 下载FTP客户端 安装ftp服务器 关闭防火墙 service ip ...

  4. 部署openssh服务器

    1.安装服务器端软件包 先查看是否已经安装openSSH服务器软件包 # rpm -qa|grep openssh openssh-askpass-.3p1-.el6_6..x86_64 openss ...

  5. 将war包部署到服务器的详细步骤

    第一步: 先将项目打包成war文件,也就是将在项目上单击鼠标右键,选择Export: 选择WAR file,点击下一步: 会出现如下所示,选择你要保存的位置,点击完成: 在你所选择的地方会有个如下所示 ...

  6. 补鞋匠---Cobbler 服务器自动搭建

    Cobbler 服务器自动搭建http://tshare365.com/archives/439.html

  7. 部署git服务器 gitServer 软件

    部署git服务器 gitServer 软件 搭建git服务器也并不是非常的难,有这么多优秀的软件,选择一个适合自己就行了 1. windows版本 http://gitstack.com/ 免费版本, ...

  8. Centos环境下部署游戏服务器-常用命令

         图1     在Linux的世界,如果你不玩命令,那你见了同行都不好意思和人家打招呼.同时服务器正常状况下放在远端,一般都是开ssh登录服务器,相信远程桌面的人很少见吧.这篇文章说说Linu ...

  9. Centos环境下部署游戏服务器-权限

    部署Web服务器的时候,在"DocumentRoot"指向的根目录新建一个文件夹,然后将网页和资源放在这个文件夹里,通过地址http://192.168.0.100/Res/ind ...

随机推荐

  1. c/c++ 感悟 2008-10-03 02:08

    许久没有坐在电脑前写东西了.除了密密麻麻的英文小虫子,还是英文小虫子.今天不是解决bug,明天就是在创造bug,一句话不在bug中沉默就在bug中爆发.或许喜欢小宇宙爆发的样子吧,那样的感觉总是让人热 ...

  2. 【TTS】文本转语音?如何不调用第三方api来实现,使用pyttsx3

    @ 目录 前言 安装pyttsx3 实现TTS接口 后言 前言 本次的实现需求有点困难,所以也就记录下来,别到时候都忘了. 首先先不说正题,有兴趣的可以看一看: 1.目标是实现一个可以传一个文本就返回 ...

  3. CAS和锁的相关面试题

    CAS 锁 锁的四种状态和升级 锁的四种状态:无锁.偏向锁.轻量级锁和重量级锁 无锁 无锁就是没有真正意义上的上锁,所有的线程还是能访问并修改同一个资源,但是通过算法控制,实现同时只有一个线程修改成功 ...

  4. 关于H标签 DL DT DD标签的一个小故事

    看了一篇关于SEO论坛的论文,大概故事内容是:一个专业的销售公司,里面SEO  技术多多,可就是销售网站的SEO的情况极为恼火.这天,老板又招到了一个SEO,直接聘为SEO主管全权负责网站的SEO,并 ...

  5. 牛客网PAT练兵场-数字黑洞

    题解:循环即可 题目地址:https://www.nowcoder.com/questionTerminal/2e6a898974064e72ba09d05a60349c9e /** * Copyri ...

  6. SAP ABAP RFC接口通用日志工具:abap fm logger

    很早之前就想写个能记录函数模块日志的通用工具,最早尝试时,没有想清楚插入代码的体积问题.在一些群友的提醒下,了解到可以用宏来处理这一问题.不过当时比较忙,就没有动笔.最近又想起这件事,花了2天完成了一 ...

  7. CF1203D2 Remove the Substring (hard version) 题解

    这题初赛让我白给了6分,于是我决定回来解决一下它. 说实话,看原题题面和看CCF代码真是两种完全不同的感受…… ------------思路分析: 把$s$串删去一部分之后,会把$s$串分成两部分,当 ...

  8. os.path获取当前路径及父路径

    import os pwd = os.getcwd() print("当前目录: " + pwd) father_path_method1 = os.path.dirname(pw ...

  9. windows 下编译libcurl

    因为linux平台采用了libcurl,有一个程序移植到到windows平台,再linux采用libcurl.在windows下准备也采用该库.在网上搜索了几位同行写的,步骤上面有缺失. 本文将以详细 ...

  10. LWPR

    Scriptable Render Pipeline https://docs.unity3d.com/Manual/ScriptableRenderPipeline.html     Unity轻量 ...