码迷,mamicode.com
首页 > 其他好文 > 详细

Cobbler 2.x安装与配置

时间:2017-09-13 01:38:18      阅读:148      评论:0      收藏:0      [点我收藏+]

标签:pytho   eve   mil   als   server   环境   yam   check   verify   

软件环境

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

Cobbler 2.x安装与配置

标签:pytho   eve   mil   als   server   环境   yam   check   verify   

原文地址:http://www.cnblogs.com/samits/p/7512909.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!