seo网络营销是什么意思,深圳seo优化排名公司,lnmp wordpress 数据库,北京建筑信息平台Cobbler自动部署装机 Cobbler 概述与环境配置Cobbler自动装机服务搭建步骤如需图形化界面可自行手动安装 Cobbler 概述与环境配置 Cobbler是一个使用Python开发的开源项目#xff0c;通过将部署系统所涉及的所有服务集中在一起#xff0c;来提供一个全自动批量快速建立linux系… Cobbler自动部署装机 Cobbler 概述与环境配置Cobbler自动装机服务搭建步骤如需图形化界面可自行手动安装 Cobbler 概述与环境配置 Cobbler是一个使用Python开发的开源项目通过将部署系统所涉及的所有服务集中在一起来提供一个全自动批量快速建立linux系统的网络安装环境。 使用VMware虚拟机软件演示需连接上互联网且虚拟机都使用NAT模式。一台CentOS7虚拟机作为服务端另一台CentOS7虚拟机当做客户端留作最终测试安装系统等正常配置。客户端测试机内存需≥2G
Cobbler自动装机服务搭建步骤 1. 导入epel源
[rootlocalhost 1]# rz -E 直接把文件拖进来
rz waiting to receive.
[rootlocalhost 1]# ls
epel-release-latest-7.noarch.rpm
[rootlocalhost ~]# rpm -ivh epel-release-latest-7.noarch.rpm2.安装Cobbler以及其相关服务软件包
[rootlocalhost ~]# yum install -y cobbler dhcp tftp-server pykickstart httpd rsync xinetd各软件包作用如下
软件名说明cobbler用来快速建立Linux网络安装环境dhcp用来为空白主机自动分配IP地址tftp-server提供引导镜像文件的下载pykickstart实现无人值守安装httpd作为控制台程序运行rsync实现数据同步xinetd提供访问控制、加强的日志和资源管理功能 3.修改cobbler主配置文件
[rootlocalhost 1]# vim /etc/cobbler/settings
next_server: 192.168.131.13 指向tftp服务器的IP即本机IP
server: 192.168.131.13 指向cobbler服务器的IP即本机IP
manage_dhcp: 1 让cobbler管理dhcp服务
manage_rsync: 1 让cobbler管理rsync服务
manage_tftpd: 1 让cobbler管理tftp服务 4.启动相关服务并关闭防火墙和selinux
[rootlocalhost ~]# systemctl start httpd.service
[rootlocalhost ~]# systemctl start cobblerd.service
[rootlocalhost ~]# systemctl stop firewalld
[rootlocalhost ~]# setenforce 05.修改tftp的配置文件并开启服务
[rootlocalhost ~]# vim /etc/xinetd.d/tftp
service tftp
{disable no 开启tftp服务此处将yse改为nosocket_type dgramprotocol udpwait yesuser rootserver /usr/sbin/in.tftpdserver_args -B 1380 -v -s /var/lib/tftpbootper_source 11cps 100 2flags IPv4
}[rootlocalhost ~]# systemctl restart xinetd.service
[rootlocalhost ~]# systemctl start rsyncd.service 6.下载引导操作系统文件
[rootlocalhost ~]# cobbler get-loaders
task started: 2021-02-24_111551_get_loaders
task started (idDownload Bootloader Content, timeWed Feb 24 11:15:51 2021)
downloading https://cobbler.github.io/loaders/README to /var/lib/cobbler/loaders/README
downloading https://cobbler.github.io/loaders/COPYING.elilo to /var/lib/cobbler/loaders/COPYING.elilo
downloading https://cobbler.github.io/loaders/COPYING.yaboot to /var/lib/cobbler/loaders/COPYING.yaboot
downloading https://cobbler.github.io/loaders/COPYING.syslinux to /var/lib/cobbler/loaders/COPYING.syslinux
downloading https://cobbler.github.io/loaders/elilo-3.8-ia64.efi to /var/lib/cobbler/loaders/elilo-ia64.efi
downloading https://cobbler.github.io/loaders/yaboot-1.3.17 to /var/lib/cobbler/loaders/yaboot
downloading https://cobbler.github.io/loaders/pxelinux.0-3.86 to /var/lib/cobbler/loaders/pxelinux.0
downloading https://cobbler.github.io/loaders/menu.c32-3.86 to /var/lib/cobbler/loaders/menu.c32
downloading https://cobbler.github.io/loaders/grub-0.97-x86.efi to /var/lib/cobbler/loaders/grub-x86.efi
downloading https://cobbler.github.io/loaders/grub-0.97-x86_64.efi to /var/lib/cobbler/loaders/grub-x86_64.efi
*** TASK COMPLETE *** 7.使用盐值加密方式设置 Cobbler用户初始密码
[rootlocalhost ~]# openssl passwd -1 -salt 11312 11312 使用盐值加密方式生成密钥。前面‘ ’里面的可以任意填写字符后面的‘ ’里面为安装完系统后root用户的密码
$1$5514$rQPa3RgJ5WEG3TaZT6toR1
[rootlocalhost ~]# vim /etc/cobbler/settings 将生成的密钥加入Cobbler配置文件中
:/default_password
default_password_crypted: $1$5514$rWPa3RgJ5XQG3IaZT6toM1 8.配置 DHCP 服务
[rootlocalhost 1]# vim /etc/cobbler/dhcp.templatesubnet 192.168.131.0 netmask 255.255.255.0 { 这里修改的是网段option routers 192.168.131.13; 修改网关option domain-name-servers 192.168.131.2; 修改DNS如果网卡使用的是dhcp模式可通过nslookup 127.0.0.1 | grepserver 查询DNS地址option subnet-mask 255.255.255.0;range dynamic-bootp 192.168.131.10 192.168.131.100;修改地址池default-lease-time 21600;max-lease-time 43200; 9.将配置好的模板文件同步到DHCP服务的配置文件中并重启DHCP服务
[rootlocalhost 1]# cobbler sync
...省略...
*** TASK COMPLETE ***
[rootlocalhost ~]# systemctl restart dhcpd.service10.导入ISO镜像文件
[rootlocalhost ~]# mount /dev/cdrom /mnt/
[rootlocalhost ~]# cobbler import --path/mnt/ --nameCentOS-7-x86_64 --archx86_64
--path:表示镜像所挂载的目录--name表示为安装源定义的名字--atch表示指定安装源的系统位数 默认导入存放路径
为/var/www/cobbler/ks_mirror/CentOS-7-x86_6411.查看内核和初始化文件是否在在tftp-server 共享目录中
[rootlocalhost ~]# yum -y install tree 系统默认没有安装需手动安装tree
[rootlocalhost ~]# tree /var/lib/tftpboot/images 查看文件是否存在
/var/lib/tftpboot/images
└── CentOS-7-x86_64├── initrd.img└── vmlinuz 12.重启所有服务并用cobbler check 对Cobbler做检查设置
[rootlocalhost ~]# systemctl restart cobblerd.service
[rootlocalhost ~]# systemctl restart dhcpd.service
[rootlocalhost ~]# systemctl restart xinetd.service
[rootlocalhost ~]# systemctl restart httpd.service
[rootlocalhost ~]# cobbler check
The following are potential configuration items that you may want to fix:1 : SELinux is enabled. Please review the following wiki page for details on ensuring cobbler works correctly in your SELinux environment:https://github.com/cobbler/cobbler/wiki/Selinux
2 : enable and start rsyncd.service with systemctl
3 : debmirror package is not installed, it will be required to manage debian deployments and repositories
4 : fencing tools were not found, and are required to use the (optional) power management features. install cman or fence-agents to use themRestart cobblerd and then run cobbler sync to apply changes. 13.所有配置完成后开启空白主机即可自动安装系统 此安装方式为最小化安装安装的系统只有字符界面 登录账户root 密码11312 登录上后查询ip并使用Xshell进行连接操作
如需图形化界面可自行手动安装
[rootlocalhost ~]# yum update grub2-common
[rootlocalhost ~]# yum install -y fwupdate-efi
[rootlocalhost ~]# yum install -y net-tools
[rootlocalhost ~]# yum groupinstall GNOME Desktop Graphical Administration Tools
[rootlocalhost ~]# reboot将语言修改成中文
[rootlocalhost ~]# vim /root/anaconda-ks.cfg 1 #versionDEVEL...略...14 lang zh_CN.UTF-8[rootlocalhost ~]# locale
LANGzh_CN.UTF-8
LC_CTYPEzh_CN.UTF-8
LC_NUMERICzh_CN.UTF-8
LC_TIMEzh_CN.UTF-8
LC_COLLATEzh_CN.UTF-8
LC_MONETARYzh_CN.UTF-8
LC_MESSAGESzh_CN.UTF-8
LC_PAPERzh_CN.UTF-8
LC_NAMEzh_CN.UTF-8
LC_ADDRESSzh_CN.UTF-8
LC_TELEPHONEzh_CN.UTF-8
LC_MEASUREMENTzh_CN.UTF-8
LC_IDENTIFICATIONzh_CN.UTF-8
LC_ALL