软件环境

Centos7.3

Cobbler 2.8.1

1、下载、编译和安装

创建自动安装脚本cobbler-install.sh

#!/bin/bash

# File Name: /data/srcipts/cobbler-install.sh

#

cd /data/scripts

LOGFILE="/data/scripts/install.log"

COBBLERSERVER=192.168.1.242

PASSWORD=$(openssl passwd -1 -salt "salt" "password")

touch $LOGFILE

# Installing the required packages

yum -y install deltarpm epel-release git \

python-cheetah python-netaddr python-simplejson python-urlgrabber PyYAML\

rsync syslinux tftp-server yum-utils \

httpd mod_wsgi mod_ssl \ 2>>$LOGFILE

 
 

# Downloading cobbler source code

git clone https://github.com/cobbler/cobbler.git 2>>$LOGFILE

cd cobbler

git checkout release28

 
 

# Full new install with source code

make install >>$LOGFILE

# Installing and preserver your existing config files, snippers and kickstarts

#make devinstall

 
 

# Installing the cobbler web GUI (including make devinstall)

make webtest >>$LOGFILE

 
 

#Building RPM packages from Source

#yum -y install rpm-rpm-config rpm-build python-devel

#make rpms

 
 

# Create the dicrectory rpm-build and 6 rpm packages

 
 

# Install with PRM packages

yum -y install cobbler-2.8.1-1.el7.centos.noarch.rpm cobler-web-2.8.1-1.el7.noarch.rpm

 
 

#2. 配置 refer to cobbler site http://cobbler.github.io/manuals/quickstart

#Changing the cobbler main configuration /etc/cobbler/settings

#allow dynamic settting

cp /etc/cobbler/settings /etc/cobbler/settings.init

sed \i 's/allow_dynamic_settings:0/allow_dynamic_setting:1/' /ect/cobbler/settings

 
 

#change the default encrypted password (root/cobbler)

PASS=$(openssl passwd -l -salt "random salt" "your new password")

cobber setting --name=default_password_crypted --value=$PASSWORD

cobber setting --name=server --value=$COBBLERSERVER

cobber setting --name=next server --value=$COBBLERSERVER

cobber setting --name= manage_dhcp

 
 

# Change the DHCP template file

/etc/cobbler/dhcp.template

 
 

# starting and enabling the cobbler service

systemctl start cobblerd

systemctl enable cobblerd

 
 

cobbler check

 
 

cobbler sync

 
 

#importing your first distribution

mkdir /mnt/cdrom

mount -t iso9660 -o loop,ro /dev/sr0 /mnt/cdrom

cobbler import --name=centos7.3 --arch=x86_64 --path=/mnt/cdrom

 
 

#verify the distro

cobbler distro list

cobbler distro report

 
 

cobbler profile list

cobbler profile report

最新文章

  1. tp5 model 中的查询范围(scope)
  2. 利用js2image把代码压缩成圣诞树
  3. 问题: Oracle Database 10g 未在当前操作系统中经过认证
  4. Java Web include指令和动作的区别
  5. 从一个ISP移至另一个ISP而不改变IP的方案
  6. 【动态规划】XMU 1588 01序列计数
  7. 免小号QQ空间说说刷赞器
  8. Oracle查询数据中占用空间最大的表
  9. PHP $_SERVER
  10. JavaScript动态更改页面元素
  11. 动态链接库(DLL)编写经验
  12. 认识浏览器请求头User-Agent
  13. c/c++ 网络编程 UDP up/down 网卡
  14. Python语言——基础02-变量、运算符
  15. arx对正在操作的文件进行保存
  16. 实战一个职业技术学校。 by:hack某某
  17. ABBYY FineReader 12使用教程
  18. js学习(初)
  19. 《剑指offer》写一个函数,求两个整数之和,要求在函数体内不得使用+、-、*、/四则运算符号。
  20. 理解Web应用程序的代码结构和运行原理(3)

热门文章

  1. day 37 CSS
  2. Xamarin.Forms学习系列之Android集成极光推送
  3. 【JavaEE】之MyBatis动态SQL
  4. python小知识课堂
  5. Bean中要使用配置文件中的值,使用set方法注入
  6. 基本shell脚本
  7. 最小生成树——Kruskal与Prim算法
  8. 区块链学习笔记:D02 区块链的技术发展历史和趋势
  9. 使用 NTP/Chrony 同时 Centos7 网络时间
  10. Python如何实现微信群万人同步直播?