cobbler安裝centos 7系統

來源:互聯網
上載者:User

標籤:cobbler

首先需要掛載光碟片:CentOS-7-x86_64-DVD-1503-01

[[email protected] ~]# mount /dev/cdrom /mnt

[[email protected] ~]# yum install cobbler cobbler-web dhcp tftp-server pykickstart  httpd -y

[[email protected] ~]# /etc/init.d/httpd restart

[[email protected] ~]# /etc/init.d/cobblerd start

[[email protected] ~]# cobbler check  

The following are potential configuration items that you may want to fix:

..............

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

[[email protected] ~]# vim /etc/cobbler/settings

server: 10.0.0.7

next_server: 10.0.0.7

manage_dhcp: 1


[[email protected] ~]# cobbler get-loaders

[[email protected] ~]# vim /etc/xinetd.d/rsync

change ‘disable‘ to ‘no‘

[[email protected] ~]# /etc/init.d/xinetd restart

[[email protected] ~]# openssl passwd -1 -salt ‘oldboy‘ ‘oldboy‘

[[email protected] ~]# vim /etc/cobbler/settings

default_password_crypted: "$1$oldboy$fXF8f078vI9J/q9XyXA8e/"

[[email protected] ~]# yum install -y debmirror yum-utils fence-agents


[[email protected] ~]# /etc/init.d/cobblerd restart

[[email protected] ~]# cobbler check

[[email protected] ~]# vim /etc/cobbler/dhcp.template

subnet 10.0.0.0 netmask 255.255.255.0 {

     option routers             10.0.0.2;

     option domain-name-servers 10.0.0.2;

     option subnet-mask         255.255.255.0;

     range dynamic-bootp        10.0.0.100 10.0.0.200;


[[email protected] ~]# cobbler sync

[[email protected] ~]# cobbler import --path=/mnt/ --name=CentOS-7.1-x86_64 --arch=x86_64 /var/www/cobbler/ks_mirror/

[[email protected] ~]# cd /var/lib/cobbler/kickstarts/

上傳ks檔案至此目錄:

[[email protected] kickstarts]# cat Cobbler-CentOS-7.1-x86_64.cfg 

#Kickstart Configurator by Jason Zhao

#platform=x86, AMD64, or Intel EM64T

#System  language

lang en_US

#System keyboard

keyboard us

#Sytem timezone

timezone Asia/Shanghai

#Root password

rootpw --iscrypted $default_password_crypted

#rootpw --iscrypted $1$ops-node$7hqdpgEmIE7Z0RbtQkxW20

#Use text mode install

text

#Install OS instead of upgrade

install

#Use NFS installation Media

url --url=$tree

#url --url=http://192.168.56.11/CentOS-7.1-x86_64

#System bootloader configuration

bootloader --location=mbr

#Clear the Master Boot Record

zerombr

#Partition clearing information

clearpart --all --initlabel 

#Disk partitioning information

part /boot --fstype xfs --size 1024 --ondisk sda

part swap --size 16384 --ondisk sda

part / --fstype xfs --size 1 --grow --ondisk sda

#System authorization infomation

auth  --useshadow  --enablemd5 

#Network information

$SNIPPET(‘network_config‘)

#network --bootproto=dhcp --device=eth0 --onboot=on

# Reboot after installation

reboot

#Firewall configuration

firewall --disabled 

#SELinux configuration

selinux --disabled

#Do not configure XWindows

skipx


%pre

$SNIPPET(‘log_ks_pre‘)

$SNIPPET(‘kickstart_start‘)

$SNIPPET(‘pre_install_network_config‘)

# Enable installation monitoring

$SNIPPET(‘pre_anamon‘)

%end


#Package install information

%packages

@ base

@ core

sysstat

iptraf

ntp

lrzsz

ncurses-devel

openssl-devel

zlib-devel

OpenIPMI-tools

mysql

nmap

screen

%end


%post

systemctl disable postfix.service

%end

[[email protected] kickstarts]# mv Cobbler-CentOS-7.1-x86_64.cfg CentOS-7.1-x86_64.cfg

[[email protected] kickstarts]# cobbler profile edit --name=CentOS-7.1-x86_64 --kickstart=/var/lib/cobbler/kickstarts/CentOS-7.1-x86_64.cfg

[[email protected] kickstarts]# cobbler profile edit --name=CentOS-7.1-x86_64 --kopts=‘net.ifnames=0 biosdevname=0‘

然後開啟一台新的虛擬機器,讓它自動擷取即可


root             oldboy

本文出自 “linux” 部落格,請務必保留此出處http://chenjisong.blog.51cto.com/7858025/1718128

cobbler安裝centos 7系統

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.