南阳网站开发公司,wordpress提示插件安装插件,网站建设外文参考文献,win7 asp网站发布部署三台Rockylinux9服务器 
实验要求 
1. 自动安装ubuntu server20以上版本 
2. 自动部署三台Rockylinux9服务器#xff0c;最小化安装#xff0c;安装基础包#xff0c;并设定国内源#xff0c;设静态IP 实验步骤 安装软件 # yum源必须有epel源 # dnf install -y epel-re…部署三台Rockylinux9服务器 
实验要求 
1. 自动安装ubuntu server20以上版本 
2. 自动部署三台Rockylinux9服务器最小化安装安装基础包并设定国内源设静态IP 实验步骤 安装软件 # yum源必须有epel源 # dnf install -y epel-release #关闭防火墙和selinux systemctl stop firewalld  systemctl disable firewalld sed -i s/^SELINUX.*/SELINUXdisabled/g /etc/selinux/config # reboot 三、部署Cobbler 
1、安装软件 # dnf -y install cobbler dhcp-server 
dnf -y install syslinux dnf-plugins-core pykickstart 
创建三台虚拟机设定MAC地址 将三台虚拟机的MAC地址记录下来 00:50:56:3B:64:2F 
00:50:56:23:4A:8E 
00:50:56:39:61:7A 2、配置cobbler 1修改Cobbler主配置文件 # 生成密文密码 openssl passwd -1 qweasd 
$1$hNAtwYE4$.l1apMwOWpCDpSmE.MBdG0 #设置root密码 
vi /etc/cobbler/settings.yaml 
default_password_crypted: $1$hNAtwYE4$.l1apMwOWpCDpSmE.MBdG0 
$1$hNAtwYE4$.l1apMwOWpCDpSmE.MBdG0 # cobbler接管dhcp manage_dhcp: true manage_dhcp_v4: true #cobbler服务器地址 server: 192.168.8.100 --指定自己的ip地址 #tftp地址 next_server_v4: 192.168.100.128 --指定自己的ip地址 #cobbler接管tftp manage_tftpd: true #当bios首选启动项是pxe时此项设置为true可避免重启反复安装系统否则为false pxe_just_once: true 修改dhcp模版文件 
添加 host server01 { hardware ethernet 00:50:56:3B:64:2F;   fixed-address 192.168.8.110;          } host server02 { hardware ethernet 00:50:56:23:4A:8E;   fixed-address 192.168.8.120;          } host server03 { hardware ethernet 00:50:56:39:61:7A;   fixed-address 192.168.8.130;          } # vi /etc/cobbler/dhcp.template …… subnet 192.168.8.10 netmask 255.255.255.0 { #-网段和子网掩码 option routers             192.168.8.2; #-网关 option domain-name-servers  8.8.8.8; #dns option subnet-mask         255.255.255.0; range dynamic-bootp        192.168.8.100 192.168.8.254; #--起始范围 host server01 { hardware ethernet 00:50:56:3B:64:2F;   #-复制自己生成的mac地址 fixed-address 192.168.8.110;          } host server02 { hardware ethernet 00:50:56:23:4A:8E;   fixed-address 192.168.8.120;          } host server03 { hardware ethernet 00:50:56:39:61:7A;   fixed-address 192.168.8.130;          } default-lease-time         21600; max-lease-time             43200; next-server                $next_server_v4; …… 3启动cobbler同步配置 # systemctl enable --now cobblerd # cobbler sync 4启动dhcp、tftp、http服务 # systemctl enable --now tftp httpd dhcpd #生成引导加载程序 cobbler mkloaders 此命令适用cobblerV3.3.1及之后的版本 # cobbler mkloaders # 查看 # ls /var/lib/cobbler/loaders/ grub         libcom32.c32  linux.c32  menu.c32 ldlinux.c32  libutil.c32   memdisk    pxelinux.0 3、导入系统镜像资源 # 挂载光盘镜像 
# mount /dev/cdrom /mnt/ #虚拟机挂载 
# 导入系统镜像资源并查看 cobbler profile add --name rocky-9-x86_64 --distrorocky-9-x86_64 --autoinstallrocky9.ks # cobbler distro list 
rocky-9-x86_64 # cobbler profile list rocky-9-x86_64 注导入的镜像资源存放在 /var/www/cobbler/distro_mirror/目录中。 #重启cobbler同步配置 # systemctl restart cobblerd # cobbler sync #查看生成的启动菜单 # cat /var/lib/tftpboot/pxelinux.cfg/default 
定义应答文件 
# vi /var/lib/cobbler/templates/rocky9.ks # versionRocky9 ignoredisk --only-usenvme0n1 # Partition clearing information clearpart --all --initlabel # Use graphical install text # Use CDROM installation media # url --urlhttp://192.168.8.10/cblr/links/rocky9-x86_64/ url --url$tree reboot # Keyboard layouts keyboard --vckeymapcn --xlayoutscn # System language lang en_US.UTF-8 selinux --disabled firewall --disabled # Network information network  --bootprotodhcp --deviceens33 --ipv6auto --activate # Root password rootpw --iscrypted $1$s14oAn0D$evyEyWiCjQGRaDrI8UeP90 # Run the Setup Agent on first boot firstboot --enable # Do not configure the X Window System skipx # System services services --disabledchronyd # System timezone timezone Asia/Shanghai --isUtc --nontp # Disk partitioning information zerombr part /boot --fstypeext4 --ondisknvme0n1 --size1024 part /swap --fstypeswap --ondisknvme0n1 --size2048 part / --fstypexfs --ondisknvme0n1 --grow --size1 %packages base 
^minimal-environment %end %addon com_redhat_kdump --enable --reserve-mbauto 
sed -e s|^mirrorlist|#mirrorlist|g \ -e s|^#baseurlhttp://dl.rockylinux.org/$contentdir|baseurlhttps://mirrors.aliyun.com/rockylinux|g \ -i.bak \ /etc/yum.repos.d/Rocky-*.repo %end %post #!/bin/sh #设置允许root用户ssh登录 echo PermitRootLogin yes /etc/ssh/sshd_config sysemctl restart sshd %end %anaconda pwpolicy root --minlen6 --minquality1 --notstrict --nochanges --notempty pwpolicy user --minlen6 --minquality1 --notstrict --nochanges --emptyok pwpolicy luks --minlen6 --minquality1 --notstrict --nochanges --notempty %end #更新启动菜单 # cobbler profile remove --name rocky-9-x86_64 # cobbler profile add --name rocky-9-x86_64 --distrorocky-9-x86_64 --autoinstallrocky9.ks 重启cobbler同步配置 # systemctl restart cobblerd # cobbler sync # cobbler profile list rocky-9-x86_64 测试