cobbler安装centos 7系统

简介:

环境:CentOS 6.5

前提:关闭selinux,iptables

首先需要挂载光盘:CentOS-7-x86_64-DVD-1503-01

[root@linux-node1 ~]# mount /dev/cdrom /mnt

[root@linux-node1 ~]# yum install cobbler cobbler-web dhcp tftp-server pykickstart  httpd epel* -y

[root@linux-node1 ~]# /etc/init.d/httpd restart

[root@linux-node1 ~]# /etc/init.d/cobblerd start

[root@linux-node1 ~]# cobbler check  

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

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

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

[root@linux-node1 ~]# vim /etc/cobbler/settings

server: 10.0.0.7

next_server: 10.0.0.7

manage_dhcp: 1


[root@linux-node1 ~]# cobbler get-loaders

[root@linux-node1 ~]# vim /etc/xinetd.d/rsync

change 'disable' to 'no'

[root@linux-node1 ~]# /etc/init.d/xinetd restart

[root@linux-node1 ~]# openssl passwd -1 -salt 'oldboy' 'oldboy'

[root@linux-node1 ~]# vim /etc/cobbler/settings

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

[root@linux-node1 ~]# yum install -y debmirror yum-utils fence-agents


[root@linux-node1 ~]# /etc/init.d/cobblerd restart

[root@linux-node1 ~]# cobbler check

[root@linux-node1 ~]# 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;


[root@linux-node1 ~]# cobbler sync

[root@linux-node1 ~]# cobbler import --path=/mnt/ --name=CentOS-7.1-x86_64 --arch=x86_64 /var/www/cobbler/ks_mirror/

[root@linux-node1 ~]# cd /var/lib/cobbler/kickstarts/

上传ks文件至此目录:

[root@linux-node2 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

[root@linux-node1 kickstarts]# mv Cobbler-CentOS-7.1-x86_64.cfg CentOS-7.1-x86_64.cfg

[root@linux-node1 kickstarts]# cobbler profile edit --name=CentOS-7.1-x86_64 --kickstart=/var/lib/cobbler/kickstarts/CentOS-7.1-x86_64.cfg

[root@linux-node1 kickstarts]# cobbler profile edit --name=CentOS-7.1-x86_64 --kopts='net.ifnames=0 biosdevname=0'

然后打开一台新的虚拟机,让它自动获取即可


root             oldboy



     本文转自陈继松 51CTO博客,原文链接:http://blog.51cto.com/chenjisong/1718128,如需转载请自行联系原作者



相关文章
|
12天前
|
存储 安全 Linux
CentOS安装SeaweedFS
通过上述步骤,您应该能够在CentOS系统上成功安装并启动SeaweedFS。记住,根据实际部署规模和需求,可能还需要进一步调整配置参数和优化网络布局。SeaweedFS的灵活性和扩展性意味着随着使用深入,您可能需要探索更多高级配置和管理策略。
94 64
|
13天前
|
存储 安全 Linux
CentOS安装SeaweedFS
通过上述步骤,您应该能够在CentOS系统上成功安装并启动SeaweedFS。记住,根据实际部署规模和需求,可能还需要进一步调整配置参数和优化网络布局。SeaweedFS的灵活性和扩展性意味着随着使用深入,您可能需要探索更多高级配置和管理策略。
100 61
|
5天前
|
Linux 网络安全 数据安全/隐私保护
Linux系统之Centos7安装cockpit图形管理界面
【10月更文挑战第12天】Linux系统之Centos7安装cockpit图形管理界面
24 1
Linux系统之Centos7安装cockpit图形管理界面
|
11天前
|
NoSQL 数据可视化 Linux
redis学习四、可视化操作工具链接 centos redis,付费Redis Desktop Manager和免费Another Redis DeskTop Manager下载、安装
本文介绍了Redis的两个可视化管理工具:付费的Redis Desktop Manager和免费的Another Redis DeskTop Manager,包括它们的下载、安装和使用方法,以及在使用Another Redis DeskTop Manager连接Redis时可能遇到的问题和解决方案。
37 1
redis学习四、可视化操作工具链接 centos redis,付费Redis Desktop Manager和免费Another Redis DeskTop Manager下载、安装
|
8天前
|
NoSQL Linux Redis
Docker学习二(Centos):Docker安装并运行redis(成功运行)
这篇文章介绍了在CentOS系统上使用Docker安装并运行Redis数据库的详细步骤,包括拉取Redis镜像、创建挂载目录、下载配置文件、修改配置以及使用Docker命令运行Redis容器,并检查运行状态和使用Navicat连接Redis。
66 3
|
8天前
|
关系型数据库 MySQL Linux
在 CentOS 7 中通过编译源码方式安装 MySQL 数据库的详细步骤
本文介绍了在 CentOS 7 中通过编译源码方式安装 MySQL 数据库的详细步骤,包括准备工作、下载源码、编译安装、配置服务等,并与使用 RPM 包安装进行了对比,帮助读者根据需求选择合适的方法。编译源码安装虽然复杂,但提供了更高的定制性和灵活性。
66 2
|
10天前
|
关系型数据库 MySQL Linux
在 CentOS 7 中通过编译源码方式安装 MySQL 数据库的详细步骤
【10月更文挑战第7天】本文介绍了在 CentOS 7 中通过编译源码方式安装 MySQL 数据库的详细步骤,包括准备工作、下载源码、编译安装、配置 MySQL 服务、登录设置等。同时,文章还对比了编译源码安装与使用 RPM 包安装的优缺点,帮助读者根据自身需求选择合适的方法。
21 3
|
15天前
|
安全 Linux 编译器
Centos 7.9如何使用源码编译安装curl最新版本
通过上述步骤,您就能在CentOS 7.9上成功地从源代码编译并安装curl的最新版本。这种方法不仅提供了灵活性,允许您定制编译选项,还确保了软件的最新功能和安全更新得到应用。
26 1
|
9天前
|
安全 Linux 数据库连接
CentOS 7环境下DM8数据库的安装与配置
【10月更文挑战第16天】本文介绍了在 CentOS 7 环境下安装与配置达梦数据库(DM8)的详细步骤,包括安装前准备、创建安装用户、上传安装文件、解压并运行安装程序、初始化数据库实例、配置环境变量、启动数据库服务、配置数据库连接和参数、备份与恢复、以及安装后的安全设置、性能优化和定期维护等内容。通过这些步骤,可以顺利完成 DM8 的安装与配置。
|
14天前
|
缓存 Linux 编译器
【C++】CentOS环境搭建-安装log4cplus日志组件包及报错解决方案
通过上述步骤,您应该能够在CentOS环境中成功安装并使用log4cplus日志组件。面对任何安装或使用过程中出现的问题,仔细检查错误信息,对照提供的解决方案进行调整,通常都能找到合适的解决之道。log4cplus的强大功能将为您的项目提供灵活、高效的日志管理方案,助力软件开发与维护。
32 0