修改补鞋匠发行版让支持CentOS8
<代码> cp/var/lib/cobbler/distro_signatures。json/var/lib/cobbler/distro_signatures.json.bak
vi/var/lib/cobbler/distro_signatures.json
#找到rhel7段在下面添加内容
" rhel8 ": {
“签名”:“BaseOS”,
“version_file”:“(redhat | sl | slf | centos | oraclelinux | vzlinux)释放——(? !音符)((\ \ w) * -) * 8 [\ \。] + (. *) \ \ . rpm”,
“version_file_regex”:空,
:“kernel_arch内核——(. *). rpm”,
“kernel_arch_regex”:空,
“supported_arches”: [" i386”、“x86_64”、“复印机”,“ppc64”,“ppc64le”),
“supported_repo_breeds”: [“rsync”、“神经”,“百胜”),
:“kernel_file vmlinuz (. *)”,
:“initrd_file initrd (. *) \ \ img”,
“isolinux_ok”:假的,
:“default_kickstart/var/lib/补鞋匠/启动/sample_end.ks”,
“kernel_options”:“”,
“kernel_options_post”:“”,
“boot_files”: []
},
#保存
#重启cobblerd
服务cobblerd重启代码>
下载CentOS8
<代码> http://centos.ustc.edu.cn/centos/8.0.1905/isos/x86_64/centos wget - 8 - x86_64 - 1905 dvd1.iso 代码>
挂载下载完成iso
<代码> mkdir - p/mnt/centos
mount - t iso9660 - r - o ro、循环/tmp/centos - 8 x86_64 - 1905 dvd1。iso/mnt/centos 代码>
创建ks文件及初始化壳文件
<代码> #鞋匠服务器IP 192.168.2.56请修改成自己的鞋匠服务器地址
vim/var/lib/cobbler/kickstarts/CentOS8-x86_64.ks
# Qist启动配置器
#=x86平台、AMD64或英特尔EM64T
#系统语言
朗en_US
#系统键盘
键盘我们
#系统时区
亚洲时区/上海
#根密码
rootpw——iscrypted default_password_crypted美元
# rootpw——iscrypted 1美元ops-node hqdpgemie7z0rbtqkxw20 7美元
#使用文本模式安装
文本
#安装操作系统,而不是升级
安装
#使用NFS安装介质
url—url=$树
#系统引导装载程序配置
#本月。dd modprobe.blacklist=isci
引导装载程序——位置=mbr
#主引导记录
zerombr
#分区结算信息
clearpart————initlabel
#磁盘分区信息
#该
部分/boot——fstype ext4大小5120
#交换部分,大小16384
部分/猣stype ext4大小51200
#/家庭一部分——fstype ext4大小10240
部分/应用程序——fstype xfs大小1——成长
#系统授权信息
#系统授权信息
身份验证——useshadow enablemd5
#网络信息
$片段(“network_config”)
#网络——bootproto=dhcp设备=eth0——onboot=#安装后重新启动
重新启动
#防火墙配置
防火墙,禁用
# SELinux配置
禁用selinux——
#不配置XWindows
skipx
%前
$片段(“log_ks_pre”)
$片段(“kickstart_start”)
$片段(“pre_install_network_config”)
#允许安装监控
$片段(“pre_anamon”)
%结束
#包安装信息
#该
%的包
@基地
@核心
sysstat
iptraf
ncurses-devel
zlib-devel
net-tools
树
mailx
wget
远程登录
bash-completion
%结束
%的帖子
systemctl禁用postfix.service
mkdir - p/root/.ssh
wget - p/root/.ssh http://192.168.2.56/cobbler/ks_mirror/bash/authorized_keys公钥
cd/根
wget http://192.168.2.56/cobbler/ks_mirror/bash/CentOS8-x86_64。sh #安装完成执行shell文件
sh/root/CentOS8-x86_64.sh
sh rm射频/root/*
%结束
#创建CentOS8-x86_64.sh
#创建壳存放目录
mkdir - p/var/www/cobbler/ks_mirror/bash/vim/var/www/cobbler/ks_mirror/bash/CentOS8-x86_64.sh
# !/bin/bash
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #设置配置# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# ulimit设置
echo " ulimit -SHn 1024000”在祝辞/etc/rc.local
猫在祝辞/etc/security/limits.参看& lt; & lt;EOF
*软nofile 1024000
*硬nofile 1024000
*软nproc 1024000
*硬nproc 1024000
EOF
#设置最大服务流程
猫在祝辞/etc/systemd/system.参看& lt; & lt;EOF
DefaultLimitNOFILE=1024000
DefaultLimitNPROC=1024000
EOF
#设置最大用户进程
# sed - s/4096/1024000//etc/security/limits.d/20-nproc.conf
#设置ssh
sed - i ' s/^ GSSAPIAuthentication是的美元/GSSAPIAuthentication没有//etc/ssh/sshd_config
sed - i ' s/#常是的/常没有”/etc/ssh/sshd_config
# sed - i ' s/# # PermitRootLogin PermitRootLogin yes/no/'/etc/ssh/sshd_config
重新启动sshd服务
# sysctl设置
真正的在/etc/sysctl.conf
猫在祝辞/etc/sysctl.参看& lt; & lt;EOF
net.ipv4。ip_forward=1
net.ipv4.conf.default.rp_filter=1
net.ipv4.conf.default.accept_source_route=0
内核。sysrq=0
内核。core_uses_pid=1
net.ipv4。tcp_syncookies=1
fs。file-max=1024000
fs。nr_open=1024000
vm。swappiness=0
vm。max_map_count=2048000
vm。overcommit_memory=1
内核。sem=5010 641280 5010 128
内核。pid_max=4194303
内核。msgmnb=65536
内核。msgmax=65536
内核。shmmax=68719476736
内核。shmall=4294967296
net.ipv4。tcp_max_tw_buckets=6000
net.ipv4。tcp_sack=1
net.ipv4。tcp_window_scaling=1
net.ipv4。tcp_mem=786432 1697152 1945728
net.ipv4。tcp_rmem=4096 87380 16777216
net.ipv4。tcp_wmem=4096 65536 16777216
net.core。wmem_default=8388608
net.core。rmem_default=8388608
net.core。rmem_max=16777216
net.core。wmem_max=16777216
net.core.netdev_max_backlog=2048000
net.core。somaxconn=65535
net.ipv4。tcp_max_orphans=3276800
net.ipv4。tcp_max_syn_backlog=2048000
net.ipv4。tcp_syn_retries=1
net.ipv4。tcp_synack_retries=1
net.ipv4。tcp_tw_reuse=1
net.ipv4。tcp_synack_retries=1
net.ipv4。tcp_tw_reuse=1
net.ipv4。tcp_mem=94500000 915000000 94500000
net.ipv4。null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null